vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Since Your Last Visit! (https://vborg.vbsupport.ru/showthread.php?t=31957)

Aracnakat 11-19-2001 05:22 AM

Terrific hack .. thank you very much for making this for everyone to use!


~Kat :)

dr1 11-21-2001 03:49 PM

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.

CHeeKY 11-24-2001 01:45 PM

Nice and simple and it works thanks

trilOByte 11-26-2001 10:12 AM

Quote:

Originally posted by FireFly
Lesane, there's no link on my numbers. :confused:

LuBi, it invloves a lot of new code and templates, I can just "post it all".

Hey Firefly/MrLister thanks for the cool hacks. I've been playing around with this myself, I think I got a decent version working and I wrote it up for an admin friend as a walkthrough. I hope you don't mind, but I used your hack (fully credited of course ;)) and posted a template/hack thing. I think it's cool, and I think it's what LuBi is looking for....

here....
https://vborg.vbsupport.ru/showthrea...984#post202984

...example in sig ;)

Me2Be 11-26-2001 08:34 PM

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 :)

eva2000 11-27-2001 12:40 PM

Quote:

Originally posted by Me2Be
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 :)
ouch :(

seems to run nicely on my vB :)

Bimma Boy 12-26-2001 05:05 PM

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

mister 12-27-2001 12:44 PM

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).

LaNder 03-02-2002 08:58 AM

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

trilOByte 03-02-2002 01:37 PM

Quote:

Originally posted by Bimma Boy
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

Instead of using...

Code:

Welcome back, <b>$username</b>
try...

Code:

Welcome back, <b>$bbuserinfo[username]</b>

David Bott 03-19-2002 07:40 PM

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

LamBras 03-21-2002 03:54 PM

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 :)

RCK 04-01-2002 02:19 PM

Quote:

Originally posted by mister
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).
Easy fix, here is your solution :)
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'");

Of course, this is only a temp solution, and it should have to be improved for the vb3 environement.
(auto don't count for all private forum by adding a checkbox, etc...)

Okiewan 04-01-2002 03:54 PM

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!

Frenck 04-13-2002 10:24 PM

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.

robcg 04-19-2002 09:19 PM

hghghghghghgh

LamBras 06-10-2002 08:35 AM

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 :)

Austin Dea 06-10-2002 05:13 PM

Is there a way to exclude forums from being counted?

RCK 06-10-2002 05:19 PM

one post done by me, 5 messages upper :eek:

Austin Dea 06-11-2002 01:11 AM

Ahh ;).

proton242 06-12-2002 08:03 AM

good hack, thnx!!!

Limpkinw 06-13-2002 01:45 AM

great hack!

Martin CX 07-13-2002 07:08 PM

Quote:

Originally posted by Frenck
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.

Yeah? Does this solve the problems with serverstrain? :hopeful:

santeematt 07-17-2002 03:38 PM

nice. i installed this one a while ago but upgrading my board killed it.. i just fixed it and 'installed' ;)

Roody 08-29-2002 01:17 PM

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

Roody 09-01-2002 12:48 AM

bumping this up to get some help on my previous post.

Illuvatar 09-08-2002 12:35 AM

/me moves his site to new server, upgrades VB to 2.2.7 and re-installs this most excellent hack!

thanks again!

Illu

ExAvIoUr 09-12-2002 05:53 AM

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]'");
$getnewpost=$DB_site->query_first("SELECT COUNT(*) AS posts FROM post 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!

hidjra 09-25-2002 09:38 PM

Quote:

Originally posted by ExAvIoUr
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]'");
$getnewpost=$DB_site->query_first("SELECT COUNT(*) AS posts FROM post 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!



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

Roody 09-28-2002 05:16 AM

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.

Roody 12-04-2002 02:22 PM

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

sebastien69 01-06-2003 04:16 AM

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 ??

sabret00the 03-26-2003 06:49 PM

quick question, if i wanted this to also say
Quote:

there has been XX new journal entries
and XX new journal entry comments
and XX new quizzes
would you be able to tell me how?

Thomas P 02-16-2004 05:30 PM

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

Thomas P 03-03-2004 01:19 PM

Quote:

Originally Posted by Thomas P
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.

^^^moderate bump :)


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
  • Page Generation 0.01225 seconds
  • Memory Usage 1,820KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (13)bbcode_code_printable
  • (8)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (35)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete