"User albums" on the index-page? - Page 2 "User albums" on the index-page? - Page 2
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

"User albums" on the index-page?

Started by udgang99, June 18, 2006, 11:31:45 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Paver

@zeus182: Ok, let's troubleshoot why your user galleries are not showing up on your index page.  Are you sure you copied the code I posted above, including the // MOD block in it into the correct theme.php file?  Looking at your index page source code, I see no output from my // MOD block whatsoever.

I tried the mod on my testbed using the rainy_day theme and it worked fine.

This is not related to its not working or not, but it's recommended to make a copy of the original theme before modifying its files.  That way, you can return to the original theme if issues arise and it makes upgrades much easier.

zeus182

I finally got this thing worked out so that it will work for me.  Adding the code was not so simple as it sounded and it took several tries to get it right, but finally...

photos.jenrobinson.net

all albums including user galleries are on the index page.

Thanks

Paver

That's weird that it's below the stats line.  As I said, it shows up in the correct place for me in the rainy_day theme.  I merely copied the code of the function from the post above into the rainy_day theme.php and it worked immediately, in the correct place, right under "User galleries".

I'm not sure what's difficult about this.  But I'm glad you got something working.

studeo

#23
The modification code for theme.php worked for me! I've been looking for this link! One question: how many rows of thumnails will be displayed? I would like at least 3 rows.

Thanks Paver

nigelt74

Thanks Paver and all the others who have posted in this thread

The code worked well for me,

although for a while it wouldn't work
And this was the problem (I am not sure if i caused this problem, or it is the way the coppermine install program writes the gallery name to the database)
So I will put what i did here just in case anyone else gets this problem

This is the default mod line

// MOD - Show user albums under category
        if (is_numeric(strpos($category[0],'User galleries')) && (function_exists(list_users)))


First i changed the user galleries string to the name i had renamed them to "Nigel's Site" as below


// MOD - Show user albums under category
        if (is_numeric(strpos($category[0],"Nigel's Site")) && (function_exists(list_users)))


Hope that helps someone
But that still didn't work and nothing else did, so i finally checked my database and got the actual name from the Categories table the name was stored as Nigel's,
( ' being the html code for ' )
when i entered that into the string as below, it worked perfectly

// MOD - Show user albums under category
        if (is_numeric(strpos($category[0],"Nigel's Site")) && (function_exists(list_users)))



Nibbler

That line would make more sense as

if (is_numeric(strpos($category[0],'cat='.USER_GAL_CAT.'"')) && (function_exists(list_users))) {

That way you don't need to modify it atall.

natalina

Very useful! But I wonder if it is possible to use this mod in classic theme ???

Nibbler


natalina

Thank u:) It's great, but I'm little bit confused: classic theme is very somple there are no functions at all, so where I must put the mod? I suppose, before ?>?

Nibbler

Yes, you just need to add the code into the file before the closing php tag.

lauriesscraps

Quote from: nigelt74 on September 19, 2006, 01:42:52 AM
Thanks Paver and all the others who have posted in this thread

The code worked well for me,

although for a while it wouldn't work
And this was the problem (I am not sure if i caused this problem, or it is the way the coppermine install program writes the gallery name to the database)
So I will put what i did here just in case anyone else gets this problem

This is the default mod line

// MOD - Show user albums under category
        if (is_numeric(strpos($category[0],'User galleries')) && (function_exists(list_users)))


First i changed the user galleries string to the name i had renamed them to "Nigel's Site" as below


// MOD - Show user albums under category
        if (is_numeric(strpos($category[0],"Nigel's Site")) && (function_exists(list_users)))


Hope that helps someone
But that still didn't work and nothing else did, so i finally checked my database and got the actual name from the Categories table the name was stored as Nigel's,
( ' being the html code for ' )
when i entered that into the string as below, it worked perfectly

// MOD - Show user albums under category
        if (is_numeric(strpos($category[0],"Nigel's Site")) && (function_exists(list_users)))




I was having this problem with the thumbnails not showing up even after I double checked and then checked again the coding i was putting in. This is what fixed it for me. THANK YOU for posting this!