8
« on: September 24, 2006, 08:17:44 AM »
Hi,
there is a way to dynamically display the 4images version of your site in signature.php. Dynamically means, you can do it without defining it as a constant in signature.php itself and it will change automatically if you upgrade your version of 4images. In order to use this, it may be necessary to increase the height of your signature#.png files in \signatures also. You may use a grafic editor of your choice to do this.
To do this insert the red code-fragtments into signature.php:
[qcode]
$lang_online = "Online: ";
$lang_comments = "Comments: ";
$lang_version = "4images Version: ";
// --------- End Config ----------
[/qcode]
[qcode]
$current_time = time();
if (!$time || (($current_time - $time) > $expire || ($current_time - $time) < 0) || $debug)
{
$show = array();
include(ROOT_PATH.'config.php');
include(ROOT_PATH.'includes/constants.php');
include(ROOT_PATH.'includes/db_mysql.php');
define('MEDIA_PATH', ROOT_PATH.MEDIA_DIR);
define('THUMB_PATH', ROOT_PATH.THUMB_DIR);
define('MEDIA_TEMP_PATH', ROOT_PATH.MEDIA_TEMP_DIR);
define('THUMB_TEMP_PATH', ROOT_PATH.THUMB_TEMP_DIR);
define('TEMPLATE_PATH', ROOT_PATH.TEMPLATE_DIR."/".$template);
define('ICON_PATH', ROOT_PATH.TEMPLATE_DIR."/".$template."/icons");
include(ROOT_PATH.'includes/functions.php');
$site_db = new Db($db_host, $db_user, $db_password, $db_name);
$version = SCRIPT_VERSION;
// --- Random image -----
[/qcode]
[qcode]
//array with data:
//[0] - font type
//[1] - offset
//[2] - text
//[3] - color (i.e. "text_color" will use $text_color variable)
$stats = array(
array(array($fsize, $offset2+$tiny, $lang_images, "text_color"), array($fsize, $far, $show['total_images']." (".$show['total_new_images']." new)", "text_color")),
array(array($fsize, $offset2+$tiny, $lang_cat, "text_color"), array($fsize, $far, $show['total_categories'], "text_color")),
array(array($fsize, $offset2+$tiny, $lang_comments, "text_color"), array($fsize, $far, $show['comments'], "text_color")),
array(array($fsize, $offset2+$tiny, $lang_users, "text_color"), array($fsize, $far, $show['total_users'], "text_color"), array($fsize, $far+strlen($show['total_users'])*($fsize+4), " and ".$show['total_users_awaiting']." not activated", "text_color")),
array(array($fsize, $offset2+$tiny, $lang_online, "text_color"), array($fsize, $far, $total_online, "red"), array($fsize, $far+strlen($total_online)*($fsize+4), $online, "text_color")),
array(array($fsize, $offset2+$tiny, $lang_new_user, "text_color"), array($fsize, $far, $show['new_user'], "text_color")),
array(array($fsize, $offset2+$tiny, $lang_version, "text_color"), array($fsize, $far, $version, "text_color"))
);
if ($signature_template_random)
[/qcode]
You can see the result in my signature below.
e-trader_2002