jluerken
11-25-2004, 02:47 AM
Hi developers,
I did the following:
Add new phrases:
threads_since_last_visit
Neue Threads seit letztem Besuch:
New threads since last visit:
posts_since_last_visit
Neue Posts seit letztem Besuch:
New posts since last visit:
Search in global.php for
if ($bbuserinfo['userid'])
{
$show['guest'] = false;
and change to:
// Lastest Posts and Threads since last visit hack
$getnewthread=$DB_site->query_first("SELECT COUNT(*) AS threads FROM " . TABLE_PREFIX . "thread WHERE lastpost > '$bbuserinfo[lastvisit]'");
$getnewpost=$DB_site->query_first("SELECT count(*) AS posts FROM " . TABLE_PREFIX . "post WHERE dateline > '$bbuserinfo[lastvisit]'");
// Latest Posts and Threads since last visit hack end
$show['guest'] = false;
Edit the navbar template and search for:
$vbphrase[last_visited_x_at_y]
and change to
$vbphrase[last_visited_x_at_y]<br>$vbphrase[threads_since_last_visit]<b> $getnewthread[threads]</b><br>$vbphrase[posts_since_last_visit]<b> $getnewpost[posts]</b></phrase>
This added a small info in the welcome box on how many new threads and posts the board has since the users last visit.
This is working fine for me on all forum pages but not in the cmps_index.php page of the portal.
I think the portal does not know the variables in time.
Can you please tell me where I should place the code that I added to global.php to make this tiny hack also working on the portal page?
Thanks in advance.
I did the following:
Add new phrases:
threads_since_last_visit
Neue Threads seit letztem Besuch:
New threads since last visit:
posts_since_last_visit
Neue Posts seit letztem Besuch:
New posts since last visit:
Search in global.php for
if ($bbuserinfo['userid'])
{
$show['guest'] = false;
and change to:
// Lastest Posts and Threads since last visit hack
$getnewthread=$DB_site->query_first("SELECT COUNT(*) AS threads FROM " . TABLE_PREFIX . "thread WHERE lastpost > '$bbuserinfo[lastvisit]'");
$getnewpost=$DB_site->query_first("SELECT count(*) AS posts FROM " . TABLE_PREFIX . "post WHERE dateline > '$bbuserinfo[lastvisit]'");
// Latest Posts and Threads since last visit hack end
$show['guest'] = false;
Edit the navbar template and search for:
$vbphrase[last_visited_x_at_y]
and change to
$vbphrase[last_visited_x_at_y]<br>$vbphrase[threads_since_last_visit]<b> $getnewthread[threads]</b><br>$vbphrase[posts_since_last_visit]<b> $getnewpost[posts]</b></phrase>
This added a small info in the welcome box on how many new threads and posts the board has since the users last visit.
This is working fine for me on all forum pages but not in the cmps_index.php page of the portal.
I think the portal does not know the variables in time.
Can you please tell me where I should place the code that I added to global.php to make this tiny hack also working on the portal page?
Thanks in advance.