Advanced search  

News:

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 [2]   Go Down

Author Topic: "User albums" on the index-page?  (Read 24638 times)

0 Members and 1 Guest are viewing this topic.

Paver

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1609
  • Paul V.
Re: "User albums" on the index-page?
« Reply #20 on: June 28, 2006, 03:05:20 am »

@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.
Logged

zeus182

  • Coppermine newbie
  • Offline Offline
  • Posts: 8
Re: "User albums" on the index-page?
« Reply #21 on: June 28, 2006, 06:29:51 am »

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
Logged

Paver

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1609
  • Paul V.
Re: "User albums" on the index-page?
« Reply #22 on: June 28, 2006, 02:38:32 pm »

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.
Logged

studeo

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 50
Re: "User albums" on the index-page?
« Reply #23 on: September 07, 2006, 06:32:23 pm »

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
« Last Edit: September 07, 2006, 06:45:03 pm by studeo »
Logged

nigelt74

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 21
Re: "User albums" on the index-page?
« Reply #24 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
Code: [Select]
// 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

Code: [Select]
// 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
Code: [Select]
// MOD - Show user albums under category
        if (is_numeric(strpos($category[0],"Nigel's Site")) && (function_exists(list_users)))

Logged

Nibbler

  • Guest
Re: "User albums" on the index-page?
« Reply #25 on: September 19, 2006, 02:10:45 am »

That line would make more sense as

Code: [Select]
if (is_numeric(strpos($category[0],'cat='.USER_GAL_CAT.'"')) && (function_exists(list_users))) {
That way you don't need to modify it atall.
Logged

natalina

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Gender: Female
  • Posts: 96
    • Interior & Architecture
Re: "User albums" on the index-page?
« Reply #26 on: October 29, 2006, 05:42:09 pm »

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

Nibbler

  • Guest
Re: "User albums" on the index-page?
« Reply #27 on: October 29, 2006, 07:59:31 pm »

Will work with any theme.
Logged

natalina

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Gender: Female
  • Posts: 96
    • Interior & Architecture
Re: "User albums" on the index-page?
« Reply #28 on: October 29, 2006, 08:54:47 pm »

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

  • Guest
Re: "User albums" on the index-page?
« Reply #29 on: October 30, 2006, 12:07:13 am »

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

lauriesscraps

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 26
Re: "User albums" on the index-page?
« Reply #30 on: August 02, 2010, 01:06:37 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
Code: [Select]
// 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

Code: [Select]
// 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
Code: [Select]
// 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!
Logged
Pages: 1 [2]   Go Up
 

Page created in 0.02 seconds with 19 queries.