Display last uploads only on front page / main index Display last uploads only on front page / main index
 

News:

CPG Release 1.6.27
change DB IP storage fields to accommodate IPv6 addresses
remove use of E_STRICT (PHP 8.4 deprecated)
update README to reflect new website
align code with new .com CPG website
correct deprecation in captcha

Main Menu

Display last uploads only on front page / main index

Started by ejgladwin, July 07, 2005, 04:12:37 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

ejgladwin

Hi,

There is a post ( http://forum.coppermine-gallery.net/index.php?topic=2487.0 ) which gives instructions on how to make the last uploads display everywhere except the main index page.  I was wondering if I could modify this slightly so that the last uploads show on the main index only, and nowhere else??

In the above post one has to wrap the following around the "lastup" case in index.php:

if ($cat!=0){}

Which seems to basically be saying "if the category is 0 then don't display the last uploads".  How do I change that so it says "if the category is greater than 0 (i.e. everything except the main index) then don't display the last uploads".

I tried replacing the = with a > but it didn't work :)  Any help much appreciated, because it looks like it should be really simple!  Just not simple enough for me :)  Thanks in advance.

ejgladwin

No problem, worked it out myself.  Next time I'll read an online PHP manual before I ask a question :)  I just changed the code to

if ($cat == 0){}

to make the last uploads block only display on the front page.