![]() |
How many threads and posts since your last visit!
PLEASE CLICK ON THE INSTALL BUTTON IF YOU INSTALLED THIS! THANKS!
What does this hack do? This hack basically shows the number of new threads and posts since your last visit, in the navbar (under your nick.) Check out the attached screenshot for more information :) Installation This is a pretty simple hack to install. Instructions are as follows: FILE MODIFICATIONS global.php TEMPLATE MODIFICATIONS navbar PHRASES navbar_sincelastvisit OPEN global.php AND FIND PHP Code:
UNDER IT, ADD PHP Code:
UNDER IT, ADD PHP Code:
HTML Code:
<if condition="$show['pmstats']"><br /><phrase 1="$vbphrase[unread_x_nav_compiled]" 2="$vbphrase[total_x_nav_compiled]" 3="$session[sessionurl]">$vbphrase[private_messages_nav]</phrase></if> HTML Code:
<br /><phrase 1="$getnewthread[threads]" 2="$getnewpost[posts]" />$vbphrase[navbar_sincelastvisit]</phrase> WITH THE FOLLOWING CONTENT: Code:
There have been {1} threads and {2} posts since your last visit! Screenshots Attached :) |
Hmmm might actually do this one.
|
good job man, thanks for the hack!
*clicks install* MGM out |
Installed, works smoothly.
|
nice one this will help with making a custom Welcome panel :D
|
Shame I didn't get to release my version that I did ages ago:(
|
Does it actually show new threads, or will a thread show as new if there is a new post in it?
|
Both.
|
i'm new to vb and i wanna try to add hacks and stuff to my board. i found the global.php file on the server but i couldn't find the navbar template file. to make things easier for me, is there a site or list somewhere showing where all the files are installed into which folder or whatever? oh yeah, will this work for vb3 gamma?
|
Quote:
Style Manager in the dropdown menu click edit templates and you will see them all good luck :) |
Installed to phpinclude_start.
Thanks. :) |
Quote:
SELECT threadid FROM thread WHERE dateline > $pmlastvisit Or something like that. |
really easy to install!! great mod, i installed it at www.macshrine.com/forums/index.php
thanks alot :) |
Quote:
|
installed :) thanks for the mod Gary
|
I added something to it, phrases to be exact.
Enter the following phrases on GLOBAL: home_sincelastvisit = since your last visit home_newthreadssincelastvisit = new threads home_newpostsssincelastvisit = new posts and then use this code in the navbar-template: Code:
<br /><b>$getnewthread[threads]</b> $vbphrase[home_newthreadssincelastvisit], <b>$getnewpost[posts]</b> $vbphrase[home_newpostsssincelastvisit] $vbphrase[home_sincelastvisit] |
All you need is one phrase.
Just call it "home_sincelastvisit" "There have been {1} threads and {2} posts since your last visit!" Then use this in navbar: Code:
<phrase 1="$getnewthread[threads]" 2="$getnewpost[posts]" />$vbphrase[home_sincelastvisit]</phrase> |
true... I still have to get used to some things on the new system. Thanks Link :)
|
Which one do I use if I don't want the thread count to go up if someone posts into a thread?
|
This is also possible to be done in one query instead of two.
And you should also give credit to the orignal author for the vb2 one as the query has barley changed. |
Quote:
Thankz Link:D |
Okay I'll be integrating all this new information into the next version of this hack, so stay tooned! :D
|
Quote:
|
Okay the instructions have been updated slightly to be able to incorporate the phrases feature of vB 3. This update is strictly optional, so you do not have to install it, but if you want to have this hack in a different language, then you can install the hack with the updated instructions :)
Thanks to Bernd Glasstett for the idea of using phrases and Link14716 because I'm actually using the phrases that he suggested :p |
Quote:
|
ok, i'm really stupid.... i just managed to upgrade to rc2 myself with no prior experience and it worked out good. i didn't install this hack into it yet cause i was probably going to upgrade first. now i did look for the global.php file and found it in the admincp folder but i couldn't find this text:
****************************** OPEN global.php AND FIND ****************************** echo "End call of global.php: $aftertime\n"; echo "\n<hr />\n\n"; and i looked in the same directory and i looked in the templates folder and i couldn't find this text either: <if condition="$show['pmstats']"><br /><a href="private.php?$session[sessionurl]">$vbphrase[private_messages]</a>: $vbphrase[unread] <if condition="$bbuserinfo['pmunread']"><strong>$bbuserinfo[pmunread]</strong><else />$bbuserinfo[pmunread]</if>, $vbphrase[total] $bbuserinfo[pmtotal].</if> can someone give me step by step where everything is and how it's done. thanks a lot. |
i put it here so its easier for users to understand :)
|
Quote:
Which one do I use if I don't want the thread count to go up if someone posts into a thread? |
just use the second query
|
Quote:
I just asked for the query, instead of just saying it's possible to do in one query :) Also, I can't seem to find the COUNT() function in your code? |
There is no COUNT() because that wouldn't do the job ;) I use a totally different method in order to get the three sets of data I need from just the one query, which with testing on a usual new post/thread count seems equally as fast as two queries.
Remember also thats more queries can sometimes be better and quicker. |
Quote:
|
Yours hacks are used rather often!
|
Is it just me, or will this let people who have no access to a certain forum realize that a new post has been made even if they can't check it?
I make a post in my Central Command, some registered user sees that the posts since last visit went up by 1, even though he has no permission to view the post. Anybody know a way to fix this? Check for permission somehow in or after the query? |
Am I the only person that has no idea where to find the hack installer listed in the txt? installer.php?
:/ |
I think Gary W made an error, I don't think you need to run an installer with this hack, just make the changes listed :)
|
LOL its just one file edit, like a mini mod
|
Yeah I figured it was just a accident. I got it working, now I'm working on trying out vbIndex and eventually replacing vbportal when I switch to 3.0. I got to post on the vbindex topic about an error I'm getting there now :)
|
i really want this hack on my forum but when i try to look in the global.php file, i cannot find those commands listed anywhere on that file. i did a search on the global.php file and i can't find anywhere it says echo or anything. and i'm not sure if the navbar template file is the same as the template file in the admincp directory or not.... can someone please help? thanks.
|
/me clicks install
Thanks mate! Christian |
All times are GMT. The time now is 04:45 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|