forum.coppermine-gallery.net

Support => cpg1.4.x Support => Older/other versions => cpg1.4 miscellaneous => Topic started by: Gerdofal on June 16, 2006, 05:37:47 am

Title: Can HOME link be set to go to a home category?
Post by: Gerdofal on June 16, 2006, 05:37:47 am
Greetings,

Is there a way to assign a home category to a user and have their home link go to that category top instead of the default home?

Thanks!
Title: Re: Can HOME link be set to go to a home category?
Post by: Sami on June 16, 2006, 08:42:21 am
you need to modify theme.php ,
what do you realy want?
- a link to one category for all users?
- or a link to one category for each user?
Title: Re: Can HOME link be set to go to a home category?
Post by: Gerdofal on June 16, 2006, 02:47:09 pm
A link to one category per user group really.  Group 1 has a home in category A, Group 2 has a home in category B... etc.

I know I can set everyone's home to a category by messing with the config, but I need them different.

Thanks
Title: Re: Can HOME link be set to go to a home category?
Post by: Sami on June 16, 2006, 03:55:41 pm
it's need some php experience
let's face it :
- first you need to find user's group:
query xxx_session for user_id then query xxx_users with that id for user_group okey now you have group number of user
- now you should bind the category to that user:
I think you need a new table here to define which group goes for wich category , so you have group number just query this new table for category with that group number
- and finaly you need to deal with theme.php functions to show the thumbnails

sorry at this time I don't have much time to give you clear view
Actualy Paver are specialist in this issue ;)
Title: Re: Can HOME link be set to go to a home category?
Post by: Gerdofal on June 16, 2006, 06:05:15 pm
Thanks.  I know PHP and SQL... just have to figure out the table structure here.  Hmm..
Title: Re: Can HOME link be set to go to a home category?
Post by: Paver on June 17, 2006, 04:38:05 am
Ok, it seemed like an interesting project, so here's a plugin (http://forum.coppermine-gallery.net/index.php?topic=32775.0) to set the home category for each group.
Title: Re: Can HOME link be set to go to a home category?
Post by: Sami on June 17, 2006, 07:30:57 am
Great
You see Paver is the man :)
nothing can stop him
Karma ++
Title: Re: Can HOME link be set to go to a home category?
Post by: Gerdofal on June 18, 2006, 05:23:06 pm
Thanks :)  I appreciate that.

Title: Re: Can HOME link be set to go to a home category?
Post by: Joachim Müller on June 19, 2006, 07:40:02 am
Issue solved then?
Title: Re: Can HOME link be set to go to a home category?
Post by: Gerdofal on June 26, 2006, 07:17:50 am
Yes, thank you.  I installed the update and it works perfectly.

(Sorry for taking so long to reply, I was out of town.)