PDA

View Full Version : [Release] Since your last visit X posts and X threads. (2.0!)


Brad
10-12-2002, 10:00 PM
(This has been upgraded to verson 2.0 :))

What this dose:

This will add since your last visit" XX posts and XX threads have been posted to the main page of your vBulletin.

This is based off the hack at vBulletin.org, this one adds it without hacking the index.php file. For reference, the original hack can be found here: https://vborg.vbsupport.ru/showthread.php?s=&threadid=31957

Screenshot in the next post.

Download: Here (http://www.vbulletintemplates.com/mods/attachment.php?s=&postid=23616)

Upgrading from 1.2 to 2.0

Verson 2.0 has been released, 2.0 will cut down the time it takes to run the querys added by this modification.

To upgrade:

---------------------------------
Run this SQL query:
---------------------------------

ALTER TABLE `post` ADD INDEX(`dateline`) ;

Upgrading from 1.0 to 2.0

Verson 2.0 has been released, 2.0 will cut down the time it takes to run the querys added by this modification.

1.0 also ran the querys on EVERY page generated by vBulletin. 1.2 and 2.0 only run these querys on /root/forum/index.php.

If you have already installed this modification upgrade ASAP.

To upgrade:

---------------------------------
Run this SQL query:
---------------------------------

ALTER TABLE `post` ADD INDEX(`dateline`) ;

----------------------------------
Open template phpinclude
----------------------------------

---------
Find:
---------

$loonewthread=$DB_site->query_first("SELECT COUNT(*) AS threads FROM thread WHERE lastpost > '$bbuserinfo[lastvisit]'");
$loonewpost=$DB_site->query_first("SELECT count(*) AS posts FROM post WHERE dateline > '$bbuserinfo[lastvisit]'");

-----------------
Replace with:
-----------------

// Start thread and post scence last vist modification
if (strpos($_SERVER['PHP_SELF'], 'index.php') != false)
{
$loonewthread=$DB_site->query_first("SELECT COUNT(*) AS threads FROM thread WHERE lastpost > '$bbuserinfo[lastvisit]'");
$loonewpost=$DB_site->query_first("SELECT count(*) AS posts FROM post WHERE dateline > '$bbuserinfo[lastvisit]'");
}

Brad
10-13-2002, 01:22 AM
screenshot

Tony G
10-13-2002, 01:26 AM
It worked fine when I tested it now. Nice work. :)

imported_KeemDog37
10-13-2002, 05:43 AM
this is a bad idea it adds queries to every page not just index.php the hack is much better

Brad
10-13-2002, 05:54 AM
Originally posted by KeemDog37
this is a bad idea it adds queries to every page not just index.php the hack is much better


Yes but we cant post hacks here, the queries it adds are small in size and it only add's 2.

imported_KeemDog37
10-13-2002, 06:00 AM
2 on every page thats way too much

Brad
10-13-2002, 06:02 AM
Depending on the size of a query it might or might not be, however i will look and see if i can tie this into one query insted of two. and ill add a warning to the frist post of this thread.

Tony G
10-13-2002, 06:23 AM
When I installed it I didn't see much difference in speed. 2 wasn't too much.

assassingod
10-14-2002, 04:30 PM
*Wonders why ffdcsite has never seen this mod before*

This is brilliant! Great work Anime-loo

Tony G
10-15-2002, 05:25 AM
It's in the vB Welcome Panel, thats probably the only place you could ever see it.

wyzzor
11-02-2002, 12:54 PM
thanks

Brad
01-22-2003, 08:03 AM
Version 2.0 has been released.

This version solves the issues with the time it takes for the querys to run that are added by this modification. It is recomended that you upgrade if you have a older version installed. Upgrade instructions are in the frist post of this thread.

sonic3d
01-30-2003, 06:33 PM
how do i remove the query?

l8er
sonic

Bad Bunny
02-20-2003, 04:45 PM
You cannot remove the queries and still have the hack work. You can, however, reverse the steps of installation of you want to remove it.

If you clarify yourself better, you may get a decent answer.

gmarik
06-08-2003, 07:28 PM
The attachemnt is lost Can you fix that?