Advanced search  


CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: [1]   Go Down

Author Topic: modding user gallery.. help needed  (Read 2238 times)

0 Members and 1 Guest are viewing this topic.


  • Coppermine newbie
  • Offline Offline
  • Posts: 3
modding user gallery.. help needed
« on: September 10, 2006, 04:08:48 am »

Hi Guys,

Im trying/wanting to setup CPG to allow user registrations (atm im uploading the content) and have some specific wants/needs I'm hoping someone can help me with.

The gallery is for a car club and I'm wanting to setup User Gallery's as a 'Member's Rides' section for user's to upload pictures of their own car directly into this category.

So far I have these requirements;
1) Automatically create an album when a user is activated named the same as the username (ok got this sorted from

2) Limit users to only 1 album (so far I've just removed the link to albmgr.php when logged in as a user)

3 Have the albums created in my first point use 'Members Rides' (renamed User Gal, cat=1 etc) as the parent Category.

4) Allow users to still modify only the album where their username matches the name.

Im using the following code to create the album when I activate the user. It sets the category as 10000 + UserID

Code: [Select]
$catid = $row['user_id'] + FIRST_USER_CAT;
    cpg_db_query("INSERT INTO {$CONFIG['TABLE_ALBUMS']} (`title`, `category`) VALUES ('".addslashes($user_name)."', $catid)");

The problem with this is when viewing cat=1 (Members rides) it lists another sub-category named the username, then inside that category the actual album also named the username.

How can I make the albums list directly under Members Rides (User Gal, cat=1 etc) rather than in another sub-category?

If this is too complex to post code examples if you could tell me what files/what functions I would need to modify and general logic I could probably figure it out.

Pages: [1]   Go Up

Page created in 0.02 seconds with 21 queries.