I have on
www.defencetalk.com/pictures the CPG stats on home page and on top of the gallery page.
Someone PM me to find out how was it accomplished.
Well first of: I didn't do nothing new. I just used the features provided with the gallery script and Gaugau's SSI.php mod. The SSI.php MOD is avaiable on the download page.
Files to edit:index.php
New files?stats.php
First make a new file using the anycontent.php that is provided with the script:
The file content should look something like this:
<?php
[color=Blue]include_once("/web path/to your website/public_html/coppermine/ssi.php");[/color]
// ------------------------------------------------------------------------- //
// Coppermine Photo Gallery 1.2.0 //
// ------------------------------------------------------------------------- //
// Copyright (C) 2002,2003 Gregory DEMAR <gdemar@wanadoo.fr> //
// http://www.chezgreg.net/coppermine/ //
// ------------------------------------------------------------------------- //
// Updated by the Coppermine Dev Team //
// see /docs/credits.html for details //
// ------------------------------------------------------------------------- //
// This program is free software; you can redistribute it and/or modify //
// it under the terms of the GNU General Public License as published by //
// the Free Software Foundation; either version 2 of the License, or //
// (at your option) any later version. //
// ------------------------------------------------------------------------- //
starttable("100%", "Stats");
?>
<tr><td class="tableg" >
<b>Gallery Stats:</b>
<?php
print "Total Pictures: ";
print cpg_total_pics("");
print " | Total Albums: ";
print cpg_total_albums();
print " | Total Categories: ";
print cpg_total_cats(); print cpg_search(12,"search gallery","go");
?>
</center>
</td></tr>
</td></tr>
<?php
endtable();
?>
Open your INDEX.PHP file and FIND THIS:
case 'anycontent':
if ($cat == 0) {
include('anycontent.php');
}
flush();
break;
ADD AFTER:
case 'stats':
if ($cat == 0) {
include('stats.php');
}
flush();
break;
Save and upload your files(both index.php and stats.php).
Go to your config options in admin menu and edit the
The content of the main page options as needed.
Remember to backup all files when editing or adding new modifications.
I hope this helps.
Thanks!