![]() |
Terrific hack .. thank you very much for making this for everyone to use!
~Kat :) |
Does anyone have the code to do this?
I have members that are only interested in a particular forum and would love to be able to see the newest posts for that specific forum. Rob. |
Nice and simple and it works thanks
|
Quote:
here.... https://vborg.vbsupport.ru/showthrea...984#post202984 ...example in sig ;) |
Hey there! Just wanted to let you know that on my small board (average 100+ users) it worked great, however, when I got it on my big board (400+ users) it dragged it down quite a bit! Those two extra queries made a big difference when index.php gets hit a ton of times :)
|
Quote:
seems to run nicely on my vB :) |
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 |
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). |
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 |
Quote:
Code:
Welcome back, <b>$username</b> Code:
Welcome back, <b>$bbuserinfo[username]</b> |
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
|
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 :) |
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'"); (auto don't count for all private forum by adding a checkbox, etc...) |
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!
|
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. |
hghghghghghgh
|
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 :) |
Is there a way to exclude forums from being counted?
|
one post done by me, 5 messages upper :eek:
|
Ahh ;).
|
good hack, thnx!!!
|
great hack!
|
Quote:
|
nice. i installed this one a while ago but upgrading my board killed it.. i just fixed it and 'installed' ;)
|
is there a possibility with all the changes that have occured with this hack that someone can post the actual coding that does in fact work correctly again?
Im a bit unsure after reading through these posts what to remove and what not too and having the updated changes in one spot would be nice. Thx |
bumping this up to get some help on my previous post.
|
/me moves his site to new server, upgrades VB to 2.2.7 and re-installs this most excellent hack!
thanks again! Illu |
Roody (and any else who doesn't want to read through) ... in a good mood today, so I compiled the optimizations from the posts here and here it is:
:::Since Your Last Visit::: *** optimized per the suggestions of the posts here. I also changed the text to display "There are X new thread and X new posts! ... simply b/c the other way made it seemed crowded up top. :) change it to whatever you'd like. :) Run this query on your DB: Code:
ALTER TABLE `post` ADD INDEX(`dateline`) ; Edit: "index.php" Find: Code:
// if user is know, then welcome Add below it: Code:
$getnewthread=$DB_site->query_first("SELECT COUNT(*) AS threads FROM thread WHERE dateline > '$bbuserinfo[lastvisit]'"); Edit Template: /Forum Home Page Templates/"forumhome_welcometext" Find: Code:
Welcome back, <b>$bbuserinfo[username]</b> Add below it: Code:
<br>There are <b>$getnewthread[threads]</b> new threads and <b>$getnewpost[posts]</b> new posts! |
Quote:
hi, this does speed things up, but when i mark all forums read or when i log out, and log back in, it still displays new threads. hidjra |
thanks for the help man. sorry if you think i wasnt reading this thread through. in fact i read it thoroughly, but after all the posts i found it a little confusing. thanks for the update though.
|
hey everyone. i actually just created a post regarding this hack in another forum. I need help trying to get this hack to work at a member level. Basically we have members on my board who can't see all the forums yet this hack leads them to think there is posts that are viewable to them. Is there a way to make this set on a member level.
here is my other post. Member level |
yeah work great on 2.2.8
but how must i do for put the number of new thread as link under each forum descriptions i've tried all the night but no succes for me can you help me please???? Is it the good way for do that i explain ?? |
quick question, if i wanted this to also say
Quote:
|
I'd need what Roody wants.
$getnewthread=$DB_site->(...)and forumid <> 'id of your private forum'"); $getnewpost=$DB_site->(....)and thread.forumid <> 'id of your private forum'"); Can I use several forums here? <> '4' | '6' | '8' ? Members see the counter rising although there are only posts in private forums, that's the point. Thanks, -Tom |
Quote:
|
All times are GMT. The time now is 04:17 AM. |
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:
|