The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Details »» | |||||||||||||||||||||||||
Somebody here request it so I made it quickly.... Basically this hack here tells your users how many new posts and threads there have been since hteir last visit on the main page.
An example is https://vborg.vbsupport.ru and right under your username. INSTRUCTIONS: Inside index.php (not admin) find: PHP Code:
PHP Code:
In the template forumhome_welcometext find: PHP Code:
PHP Code:
That's it! If you installed the hack please click the install button! Show Your Support
|
Comments |
#47
|
||||
|
||||
Quote:
seems to run nicely on my vB |
#48
|
|||
|
|||
I installed this hack last night and it was working fine, I then did this..
Went into the forumhome_welcometext template and took out the user name code from it and place it in my forumhome display template (I did becuase I want it to display 'wELCOME BACK USER NAME on top line, then dispaly x new threads x new posts few lines under this) After I did this - I refreshed and instead of saying Welcome back Admin.. it said Welcome back anothermembersname ??????? I then quickly took out the user name code from the index template and put it back in the forum home_welcometext template - things were all sound again!! Now today.. other people are saying to me that it says Welcome back differentusername instead of their own name.. The name its displaying is from the online users lists.. Whats going on?? Thanks |
#49
|
|||
|
|||
The way it works now, this hack counts threads & posts in EVERY forum, private forums included.
Is there an easy way to not count those forums the user doesn't have access to? Some of my users are confused, because it says 12 threads, but they're only getting 10 back (2 are in private forums). |
#50
|
|||
|
|||
hmm, i have the same problem
i had to remove this hack from my welcome-panel. is there a chance to get a fix for it?? greets LaNder |
#51
|
||||
|
||||
Quote:
Code:
Welcome back, <b>$username</b> Code:
Welcome back, <b>$bbuserinfo[username]</b> |
#52
|
|||
|
|||
Yes...sorry to say for some reason this nice feature totally trashed my DB server. Actually pegs out my CPU's on the DB server only for it seems to have to count of something way too much. Currently 732 users on line. Upload index.php...crash! Ver 2.2.4
|
#53
|
|||
|
|||
The load of a COUNT-Statement is far too high on busy servers.
It will delay your forumshome by several seconds (!) and put an enormous load on the poor database. If your fora are quite busy (>100 ppl online), I would disencourage you of using this hack. Unfortunately I am no sql Guru. There is for sure a way to form a statement less ressource intensive but I am afraid I can only critizise not help Maybe anyone can jump in here? BTW: Allthough I may sound a bit harsh here (which I am not, I hope), I really appreciate everyone releasing hacks and I know it's sometimes really a mess to deal with, so please don't feel offended |
#54
|
||||
|
||||
Quote:
into your SQL request, use this instead of original code: Code:
$getnewthread=$DB_site->query_first("SELECT COUNT(*) AS threads FROM thread WHERE lastpost > '$bbuserinfo[lastvisit]' and forumid <> 'id of your private forum'"); $getnewpost=$DB_site->query_first("SELECT count(*) AS posts FROM post,thread WHERE post.dateline > '$bbuserinfo[lastvisit]' and thread.threadid=post.threadid and thread.forumid <> 'id of your private forum'"); (auto don't count for all private forum by adding a checkbox, etc...) |
#55
|
||||
|
||||
Agreed.. I have at time 130-160 online at a time, it put a LARGE load on the CPU's and slowed the forums considerably. Nice hack for smaller boards though!
|
#56
|
||||
|
||||
Just run this query once on your DB,
ALTER TABLE `post` ADD INDEX(`dateline`) ; problem solved. It brings back my page generation time back from 2.5 seconds to 0.5 seconds. |
#57
|
|||
|
|||
hghghghghghgh
|
#58
|
|||
|
|||
Hi there,
I have come back to this hack after applying tril0Byte's welcome panel hack. And indeed, adding an index for dateline increases speed just back to normal. Great! Hack installed |
#59
|
||||
|
||||
Is there a way to exclude forums from being counted?
|
#60
|
||||
|
||||
one post done by me, 5 messages upper
|
#61
|
||||
|
||||
Ahh .
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|