2012-07-12, 02:56 PM
Pages: 1 2
2012-07-12, 03:22 PM
This variable will only work on index. If you want to add this in index footer somewhere then Insert the following variable in index template;
{$lang->stats_newestuser}
2012-07-12, 03:38 PM
(2012-07-12, 03:22 PM)Yaldaram Wrote: [ -> ]This variable will only work on index. If you want to add this in index footer somewhere then Insert the following variable in index template;i want that at any page this var gonna showed.
{$lang->stats_newestuser}
2012-07-12, 04:04 PM
And want to show in footer ? Open ./global.php and search for global_end hook. Paste the following code just ABOVE to the hook line;
Now paste {$lang->stats_newestuser} variable in footer template where you want it to show.
$lang->load("index");
$stats = $cache->read("stats");
if(!$stats['lastusername'])
{
$newestmember = "no-one";
}
else
{
$newestmember = build_profile_link($stats['lastusername'], $stats['lastuid']);
}
$lang->stats_newestuser = $lang->sprintf($lang->stats_newestuser, $newestmember);
Now paste {$lang->stats_newestuser} variable in footer template where you want it to show.
2012-07-12, 04:12 PM
(2012-07-12, 04:04 PM)Yaldaram Wrote: [ -> ]And want to show in footer ? Open ./global.php and search for global_end hook. Paste the following code just ABOVE to the hook line;don't work
$lang->load("index"); $stats = $cache->read("stats"); if(!$stats['lastusername']) { $newestmember = "no-one"; } else { $newestmember = build_profile_link($stats['lastusername'], $stats['lastuid']); } $lang->stats_newestuser = $lang->sprintf($lang->stats_newestuser, $newestmember);
Now paste {$lang->stats_newestuser} variable in footer template where you want it to show.
2012-07-12, 04:15 PM
Are you sure you're adding code in ./global.php file , and above that global_end hook ?
Are you sure you're adding the variable in right template set's footer template ?
Are you sure you're adding the variable in right template set's footer template ?
2012-07-12, 04:21 PM
(2012-07-12, 04:15 PM)Yaldaram Wrote: [ -> ]Are you sure you're adding code in ./global.php file , and above that global_end hook ?the code need look like this:
Are you sure you're adding the variable in right template set's footer template ?
$lang->load("index");
$stats = $cache->read("stats");
if(!$stats['lastusername'])
{
$newestmember = "no-one";
}
else
{
$newestmember = build_profile_link($stats['lastusername'], $stats['lastuid']);
}
$lang->stats_newestuser = $lang->sprintf($lang->stats_newestuser, $newestmember);
// Run hooks for end of global.php
$plugins->run_hooks("global_end");
$globaltime = $maintimer->getTime();
?>
2012-07-12, 04:46 PM
In ./global.php , find;
$plugins->run_hooks("global_start");
and Paste the code provide just BELOW that hook line.2012-07-12, 04:50 PM
(2012-07-12, 04:46 PM)Yaldaram Wrote: [ -> ]In ./global.php , find;what are you mean?
and Paste the code provide just BELOW that hook line.$plugins->run_hooks("global_start");
under this row add the text?
2012-07-12, 04:51 PM
Yes..
Pages: 1 2