This one is for:
Modifications/Add-Ons/Hacks
Mods: Visualshttp://forum.coppermine-gallery.net/index.php?board=82.0CPG 1.4.xTested with 1.4.10Description:If you want to display last additions for particular category this modification is for you.
1.Open file:
index.php2.Find code:
case 'anycontent':
if ($cat == 0) {
ob_start();
/**
* Any php code or HTML can be put in this file and will be displayed
*/
include('anycontent.php');
$anycontent = CPGPluginAPI::filter('anycontent',ob_get_contents());
ob_end_clean();
echo ($anycontent);
}
flush();
break;
3.After add code:
case 'anycontent2':
if ($cat == 0) {
ob_start();
/**
* Any php code or HTML can be put in this file and will be displayed
*/
include('anycontent2.php');
$anycontent2 = CPGPluginAPI::filter('anycontent2',ob_get_contents());
ob_end_clean();
echo ($anycontent2);
}
flush();
break;
4.Go to:
"Config" -> "Album list view" -> "The content of the main page"
5.Add in the beginnig of the line:
anycontent2,3/
So, for example, you will have line:anycontent2,3/lastup,3/random,1/breadcrumb/catlist/alblist
6.Download file:
anycontent2.zip
7.Unpack from archive and open it in any text editor the file:
anycontent2.php
8.Find block of code:
////////////////////////
//Category number
$cat2 = 2;
////////////////////////
9.Set $cat2 (line 39) to the category number you need and save the file.
10.Find block of code:
////////////////////////
//Case type (look below for avaliable types)
$case2 = 'lastup';
////////////////////////
11.Set $case2 (line 42) to the case type you need and save the file.
- 'lastup': last uploads
- 'random': random files (setting this one to random files for huge categories with more than 10,000 pics might result in performance problems; change to something else in this case)
- 'lastcom': last comments
- 'topn': most viewed
- 'toprated': top rated
- 'lasthits': last viewed
- 'lastalb': last albums to which uploads
- 'favpics': particular user's favourite pictures sorted by last uploads
12.Upload to the gallery root that file:
anycontent2.php
P.S. There is also a line in anycontent2.php:starttable("100%", "Powered by Coppermine Photo Gallery Forum and Makc666");
You can comment it out (add double slashes // at the beginning of the line)
orchange to any text you like
