HI,
what is the use of serendipity_permalinks database table?
it contains only info about authors,entries and categories.
thanks.
manoj.
What is the use of serendipity_permalinks database table
I split this off of the original topic, because it's different and I wanted to check that my priveleges work before Garvin has his holiday. Sorry for any confusion.
The permalinks table should be a list of "hardcoded" pretty URLs, to an entry ID and type (and a "data" table that I'm not certain about). It's used to turn a human-readable URL into a Serendipity entry or category.
The permalinks table should be a list of "hardcoded" pretty URLs, to an entry ID and type (and a "data" table that I'm not certain about). It's used to turn a human-readable URL into a Serendipity entry or category.
regarding serendipity_permalinks table
HI,
can you please elaborate why permalinks table is used?
I have seen that only author/entry/category information is saved in permalinks.
For what serendipity functionality is this data(in permalinks table) used ?
Also we are customising serendipity so that we dont populate or use categories table at all but use a join with some other table in other database to fetch categories. in this case what will be the flaws if we dont add a corresponding row in permalinks for category.
Thanks.
manoj
can you please elaborate why permalinks table is used?
I have seen that only author/entry/category information is saved in permalinks.
For what serendipity functionality is this data(in permalinks table) used ?
Also we are customising serendipity so that we dont populate or use categories table at all but use a join with some other table in other database to fetch categories. in this case what will be the flaws if we dont add a corresponding row in permalinks for category.
Thanks.
manoj
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: regarding serendipity_permalinks table
Hi!
Permalinks uniquele identify a URL to a specific view of an entry, a category or an author.
Serendipity users can customize the layout of permalinks and abstract them. If no entryid is contained in a permalink patter, the database needs to be queried to get the real ID of an entry, a category or an author to display the view for that.
This table is queried right on start of serendipity, to check which view the current URL that a user enter needs to be displayed: Did the user request the startpage, an entry page, etc.
[quote]Also we are customising serendipity so that we dont populate or use categories table at all but use a join with some other table in other database to fetch categories. in this case what will be the flaws if we dont add a corresponding row in permalinks for category.[/qote]
If your permalinks always contain a %ID% variable, you can disregard the permalinks table, it will not be used.
Manipulating serendipity to join another category table though is a very hard piece of work. Many lines of code would be involved. The easier way would be to create a "virtual" category table as an SQL view. Then you could use the original s9y statements, and make it fetch the category data from your foreign table through the compatible VIEW.
Regards,
Garvin
Permalinks uniquele identify a URL to a specific view of an entry, a category or an author.
Serendipity users can customize the layout of permalinks and abstract them. If no entryid is contained in a permalink patter, the database needs to be queried to get the real ID of an entry, a category or an author to display the view for that.
This table is queried right on start of serendipity, to check which view the current URL that a user enter needs to be displayed: Did the user request the startpage, an entry page, etc.
[quote]Also we are customising serendipity so that we dont populate or use categories table at all but use a join with some other table in other database to fetch categories. in this case what will be the flaws if we dont add a corresponding row in permalinks for category.[/qote]
If your permalinks always contain a %ID% variable, you can disregard the permalinks table, it will not be used.
Manipulating serendipity to join another category table though is a very hard piece of work. Many lines of code would be involved. The easier way would be to create a "virtual" category table as an SQL view. Then you could use the original s9y statements, and make it fetch the category data from your foreign table through the compatible VIEW.
Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
permalinks
Hi,
Sorry but i didnt get my doubts clarified so posting it in a better way.
My doubt is what if we dont add category related data in permalinks table?
Like we are not creating any categories from the Category link in left navigation so there wont be any data in categories table as well as permalinks table.
But when we use new entry/edit entry link we populate the categories drop down from some other table and update the entrycat table.
will this create any problems?
pls, reply and thanks for ur constant support.
manoj.
Sorry but i didnt get my doubts clarified so posting it in a better way.
My doubt is what if we dont add category related data in permalinks table?
Like we are not creating any categories from the Category link in left navigation so there wont be any data in categories table as well as permalinks table.
But when we use new entry/edit entry link we populate the categories drop down from some other table and update the entrycat table.
will this create any problems?
pls, reply and thanks for ur constant support.
manoj.
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: permalinks
Hi!
As I said, if you do not remove the "%id%" part in your permalink setup, you do not need to pay any attention to the permalinks table.
If you do not populate the "categories" table, serendipity will not use categories in many regards, unless you edit all those "many regards" in core code.
Please read what I wrote about VIEWS again.
Best regards,
Garvin
As I said, if you do not remove the "%id%" part in your permalink setup, you do not need to pay any attention to the permalinks table.
If you do not populate the "categories" table, serendipity will not use categories in many regards, unless you edit all those "many regards" in core code.
Please read what I wrote about VIEWS again.
Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Thanks
Thanks garvin for ur valuable suggestions!
I didn't/cudn't read ur reply before i posted my earlier question. Maybe while i was typing the post u replied and i cud only see ur earlier reply after the post was submitted and the page got refreshed.
anyway thanks.will get back to u with few more doubts or for suggestions.
I didn't/cudn't read ur reply before i posted my earlier question. Maybe while i was typing the post u replied and i cud only see ur earlier reply after the post was submitted and the page got refreshed.
anyway thanks.will get back to u with few more doubts or for suggestions.
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: Thanks
Hi!
You're welcome! Note though that I'll leaving for 2 weeks of holiday today, so my response might take some time
Best regards,
Garvin
You're welcome! Note though that I'll leaving for 2 weeks of holiday today, so my response might take some time
Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Access table
Hi garvin,
Also when we add a category rows are inserted in access table regarding read and write permissions for category.
In our case we have few blog users who belong to a same group(a new group say XYZ which doesnt have previliges regarding categories i.e while creating new group XYZ adminCategories: is not checked).
For each user there are a set of categories to choose from which are in another database table. The set of categories for users may be same or may differ it is not specific to the XYZ group.
Since we are not saving the categories in serendipity tables, but rather fetching from master table each time required and thats only related to entries. and only updating entrycat table not updating access table.
This is done because we want to add blog application to users of our existing application and the users can delete the categories or add new categories to the existing application and initially we planned to replicate the data in category table but synchronising category with master data will be expensive and tough. Also each user can have more than 1,2 or n number of categories and the users count can go beyond 100k. this will make categories table huge. in master table there is only 1 record for a user and the categories is a column with all the categories in same column with delimiters.Also how about category_left and category_right will they affect since we dont have values for them.
Also we are planning for only categoryid, category name, category descripition.
But in serendipity_fetchCategories in functions_entires.php there is a LEFT JOIN on access table. will this create any problems.
sorry for the huge query.
pls, reply.
thanks.
Have a nice holiday.
Also when we add a category rows are inserted in access table regarding read and write permissions for category.
In our case we have few blog users who belong to a same group(a new group say XYZ which doesnt have previliges regarding categories i.e while creating new group XYZ adminCategories: is not checked).
For each user there are a set of categories to choose from which are in another database table. The set of categories for users may be same or may differ it is not specific to the XYZ group.
Since we are not saving the categories in serendipity tables, but rather fetching from master table each time required and thats only related to entries. and only updating entrycat table not updating access table.
This is done because we want to add blog application to users of our existing application and the users can delete the categories or add new categories to the existing application and initially we planned to replicate the data in category table but synchronising category with master data will be expensive and tough. Also each user can have more than 1,2 or n number of categories and the users count can go beyond 100k. this will make categories table huge. in master table there is only 1 record for a user and the categories is a column with all the categories in same column with delimiters.Also how about category_left and category_right will they affect since we dont have values for them.
Also we are planning for only categoryid, category name, category descripition.
But in serendipity_fetchCategories in functions_entires.php there is a LEFT JOIN on access table. will this create any problems.
sorry for the huge query.
pls, reply.
thanks.
Have a nice holiday.
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: Access table
Really, you should use MySQL Views for what you plan to do. Otherwise it'll be a lot of work modifying the serendipity sourcecode and checking side effects of your operation. Definitely the whole permission management on categories/entries will be bypassed by your modifications. It would be much better of you to use a View and work with "original" date.

So, this is my last posting before the holiday in this matter, talk to you in 2 weeks
Best regards,
Garvin
Without those values you won't be able to have parent and child categories / a category tree.Also how about category_left and category_right will they affect since we dont have values for them.
Yes, without entries in the access table, category cannot have read/write privileges like planned in Serendipity.But in serendipity_fetchCategories in functions_entires.php there is a LEFT JOIN on access table. will this create any problems.
So, this is my last posting before the holiday in this matter, talk to you in 2 weeks
Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/