rotates phrases ,, good idea... :)
Using Jamroom
Just create a /modules/blRotate/include.php file and put this in it -
<?php
defined('APP_DIR') or exit();
function blRotate_meta()
{
$_tmp = array(
'name' => 'Rotate Phrases',
'url' => 'rotate',
'version' => '0.0.1',
'developer' => 'BopLive' . strftime('%Y'),
'description' => 'Prives a smarty function to rotate promotional phrases',
'category' => 'site',
'license' => 'mpl',
'activate' => true
);
return $_tmp;
}
function blRotate_init()
{
return true;
}
function smarty_function_blRotate_rotate_phrases($params, &$smarty)
{
global $_conf;
$key = 'footer_powered_by';
if ($footer = jrCore_is_cached('blRotate', $key)) {
return $footer;
}
$_options = array(
'Phrase 1',
'Phrase 2',
'Phrase 3',
'Phrase 4',
'etc.',
'etc.',
'etc.'
);
$k = array_rand($_options);
$option = $_options[$k];
$footer = '<span style="font-size:9px;"><a href="' . $_conf['jrCore_base_url'] . '">' . $option . '</a></span>';
jrCore_add_to_cache('jrCore', $key, $footer);
return $footer;
}Then put {blRotate_rotate_phrases} in the template where you want it to show.
hth
Pa