vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   vB3 Forumhome Stats Cache Serialize hack v2.2 (https://vborg.vbsupport.ru/showthread.php?t=61420)

Boofo 03-05-2004 02:38 AM

You ought to release your version of the welcome panel. Sounds interesting. PM me with the code, if you don't mind. I'd like to take a look at it. ;)

Steve123 03-05-2004 02:49 AM

Im in the process of making it atm, its just taking me a while because i want to make it with hardly any queries... Plus im doing it in my spare time at work(which is not much)..

Ill show you the code when im done, its based on Welcome Panel 1.2 Hack by Hwulex (Credit to him)

Altho ive changed just about everything he done, got the idea from him.

Mostly you add this to index.php

PHP Code:

$indexpage true

Then edit navbar with

HTML Code:

<if condition="$indexpage">
Welcome Panel here
</if>
<if condition="!$indexpage">
Normal Navbar stuff here
</if>

When its a bit more finished and ive understand more of vb3's code u can have a look :)

Boofo 03-05-2004 04:45 AM

I'll be looking forward to it. ;)

djohn 03-05-2004 07:48 AM

Boofo, thanks! I think i've done what i wanted, the lines are not there, and i've deleted the query lines as well. I just have one question left. DO the lines saying the number of new posts/threads since my last visit automatically get hidden it there weren't any new posts/threads? First time I've loaded the page the lines simply were not there!

Boofo 03-05-2004 08:15 AM

Yes, they won't show up unless there are new posts or new threads since your last visit. ;)

Don't forget the install button. I am going to be doing an update to this shortly and you will want to be notified when that happens.

hXc Radio 03-05-2004 12:06 PM

this installed very nicely on RC4! Everything shows, but one part of instructions I could not figure out was

Turn on DEBUG and go to the Admin CP > vBulletin Options
Add New Setting:

How do I turn on debug and under vb options there is no add link only the current settings to edit. Also once you explain how, do I turn debug back off after I add the new settings?

Boofo 03-05-2004 12:48 PM

Add


PHP Code:

$debug '1'

to the end of /includes/config.php (But before the ?>)

Just make sure you take it out after you have added the setting for the hack. ;)

Boofo 03-08-2004 06:26 AM

Quote:

Originally Posted by Moosehunter
Thanks for the quick reply. That never worked. So i took that whole referrer thing out and it is now working. I do not use the referer system anyways. Once again boofo thanks for the quick reply.

I think I know why the referrer query never worked for you. If you don't have referrers enabled, then there is nothing to find with the query. I need to make a note of that in the install file. Thank you for bringing this to my attention. ;)

hXc Radio 03-09-2004 01:13 AM

Thought you might like to see how I worked this into the nav.. Love the hack! good job!! ;)

Boofo 03-09-2004 01:21 AM

Looks excellent! Can I get the navbar code for that? Also, where did you put the navbar links at?

Did you use the init.php for the specialtemplates? I did that but every once in a while the stats show up empty when I go to a page. Has that happened to you yet?

hXc Radio 03-09-2004 03:18 AM

sure PM me your e-mail addy and I'll send you it. I don't want to release my add-on yet as the shoutcast part is still buggy, if amazon is busy, it lags the site load. So I want to develope it to get the album cover of current song locally via mysql.

Steve123 03-13-2004 11:16 AM

Hey Bofo ive just about finished my forumhome "look"..... with my own welcome panel etc.. that u wanted to see..

Sorry for late reply, been busy porting my party hack into vb3.. (lets u nonimate what forum is an event type thing, then the users have the option of sayin they are attending this event, auto generates timetable and party info etc... ).

God damn the code has changed alot, took me a while to figure it all out.. vb3 code that is..

anyways if u want that code.. just pm me...

sabret00the 03-23-2004 09:30 AM

i'm running the top X stats hack, does this conflict at all?

Boofo 03-23-2004 09:36 AM

I don't know that hack but I wouldn't think there should be any problem with running them both. ;)

Alex 03-23-2004 06:05 PM

Quote:

Originally Posted by Boofo
I don't know that hack but I wouldn't think there should be any problem with running them both. ;)

I have a problem with this hack. It shows me as topposter a user that a) is not registered anymore and b) who can't be by any chance topposter. On top I know the topposter from before upgrading. I had another hack installed which worked.

Buttom Line is: The topposter which shows up is not correct. Could you take a look into that? Thanks. :)

Besides, awesome hack! *clicks install*

Boofo 03-23-2004 06:38 PM

Could you let me see the hack you had installed that you said worked before? The top poster in this hack is accurate. Since it pulls the top poster info from the user table, the person has to be registered or they wouldn't show up as top poster. They couldn't. If a top poster posts enough before they leave, it will show up until someone else surpasses that top poster mark, as long as they have an account on your site.

Alex 03-23-2004 07:28 PM

Quote:

Originally Posted by Boofo
Could you let me see the hack you had installed that you said worked before? The top poster in this hack is accurate. Since it pulls the top poster info from the user table, the person has to be registered or they wouldn't show up as top poster. They couldn't. If a top poster posts enough before they leave, it will show up until someone else surpasses that top poster mark, as long as they have an account on your site.

I really can't remember which hack it was. All I know is, I downloaded it here for vB2.

If you want, take a look on my site:
http://www.spassforen.de/forum/index.php?

There's another glitch I found, which could result from the language settings. (Don't know, if that causes the issue i described first, too): The top_poster_'s id in the link to the member profile uses a "." in it, which results in showing an error by clicking on the name.

Alex 03-23-2004 07:41 PM

I forgot to mention that: You do NOT have to register on my site. Just use username test and password test. I don't want somebody to get the wrong impression here. :)

Boofo 03-23-2004 07:54 PM

Ok, I checked your site out and the Top Poster code IS working. I went into your Member's List and clicked the arrow for the Posts column and the Top Poster is the same as the one that shows on the forumhome.

As far as the problem with the userid link for the name, that is a language issue, it almost has to be. Post the piece of code here for the userid and I will look at it and see if we can help you get it fixed. ;)

Alex 03-23-2004 10:39 PM

Quote:

Originally Posted by Boofo
Ok, I checked your site out and the Top Poster code IS working. I went into your Member's List and clicked the arrow for the Posts column and the Top Poster is the same as the one that shows on the forumhome.

As far as the problem with the userid link for the name, that is a language issue, it almost has to be. Post the piece of code here for the userid and I will look at it and see if we can help you get it fixed. ;)

Ok, there is some kind of missunderstanding. The number of posts and the name for the topPOSTER is fine. But the name of the top_THREADSTARTER is not correct. This user like I said is not a member anymore, his link to the profile takes me to an error page. Did you try to set your language to "Deutsch"? Because the user "test" has english as default language.

Try to get the piece of code out now...

wrongful 03-23-2004 10:50 PM

I seem to be having some major problems with this hack.

First, the total registrations count is more than double what my actual registrations are. Also, how are active members calculated as opposed to people who are a part of the total registrations, and can this be modified. Also, my top referer isn't showing up as you can see in this screenshot. I am using vB3 Gold if that makes any difference.

Alex 03-23-2004 10:51 PM

Ok, here is the piece of code
Code:

// <!-- TOP POSTER -->
        $topposter = $DB_site->query_first("
                SELECT username,posts,userid
                FROM " . TABLE_PREFIX . "user
                ORDER BY posts
                DESC LIMIT 1
        ");

        // <!-- TOP THREAD STARTER -->
        $topstarter=$DB_site->query_first("
                SELECT COUNT(*) AS count,postuserid,postusername
                FROM " . TABLE_PREFIX . "thread
                GROUP BY postuserid
                ORDER BY count
                DESC LIMIT 1
        ");

At least I think it is...

BTW, I tried to set my lanuage to english but even though, the link to the members profile is still wrong. The link doesn't show up like:
www.forum.url/forum/member.php?u=3512
it shows like:
www.forum.url/forum/member.php?u=3,512 (<-- see the comma?)

When I turn it back to german, I have a dot there instead of the comma, which is the german separator for a thousand.

This also happens with topposter, Most Viewed Profile and Top Referrer. With the welcome newest member it is fine. In both languages.

Boofo 03-23-2004 11:27 PM

Ok, change this query:

PHP Code:

    // <!-- TOP THREAD STARTER -->
    
$topstarter=$DB_site->query_first("
        SELECT COUNT(*) AS count,postuserid,postusername
        FROM " 
TABLE_PREFIX "thread
        GROUP BY postuserid
        ORDER BY count
        DESC LIMIT 1
    "
); 

to this:

PHP Code:

    // <!-- TOP THREAD STARTER -->
    
$topstarter=$DB_site->query_first("
            SELECT COUNT(*) AS count,postuserid,postusername
            FROM " 
TABLE_PREFIX "thread
            WHERE postuserid <> 0
            GROUP BY postuserid
            ORDER BY count
            DESC LIMIT 1
        "
); 

As far as the uderids going to an error page, delete the following from the index.php:

PHP Code:

    $statscache['topposterid'] = vb_number_format($statscache['topposterid']);
    
$statscache['topstartid'] = vb_number_format($statscache['topstartid']);
    
$statscache['getfileviewsid'] = vb_number_format($statscache['getfileviewsid']);
    
$statscache['topreferrerid'] = vb_number_format($statscache['topreferrerid']);
    
$statscache['toprepid'] = vb_number_format($statscache['toprepid']); 

I forgot to take that code out when I released the hack. Sorry about that. That should fix everything. Let me know for sure.

Boofo 03-23-2004 11:35 PM

Quote:

Originally Posted by wrongful
I seem to be having some major problems with this hack.

First, the total registrations count is more than double what my actual registrations are. Also, how are active members calculated as opposed to people who are a part of the total registrations, and can this be modified. Also, my top referer isn't showing up as you can see in this screenshot. I am using vB3 Gold if that makes any difference.

Support is only being provided to those who click the install button. That is something that is being ignored on this site and needs to be taken care of by anyone who installs the hacks made here. I hope you can understand.

wrongful 03-23-2004 11:39 PM

Quote:

Originally Posted by Boofo
Support is only being provided to those who click the install button. That is something that is being ignored on this site and needs to be taken care of by anyone who installs the hacks made here. I hope you can understand.

Ok I didn't click it initially because it wasn't working right and I normally don't click install until I have a hack completely working, but if you insist.

Boofo 03-23-2004 11:54 PM

Thank you. ;)

Ok, the Total Registrations are the total regsitrations you have EVER had on your board. When you delete accounts for whatever reason, the Active Registrations are what is left. That is the ACTUAL number of memebers on your site. Does that make any sense. ;)

As far as the userids not being correct, follow the instructions above and delete those lines and when the next cache update is run, it should straighten everything out for the userids.

Also, make sure you have the referrer sysem enabled in the Admin CP. If it is, then you missed a piece of code when installing the hack. Look at the spot where the name should be in the code and tell me what is there right now.

Alex 03-24-2004 12:01 AM

Quote:

Originally Posted by Boofo
Ok, change this query:

PHP Code:

    // <!-- TOP THREAD STARTER -->
    
$topstarter=$DB_site->query_first("
        SELECT COUNT(*) AS count,postuserid,postusername
        FROM " 
TABLE_PREFIX "thread
        GROUP BY postuserid
        ORDER BY count
        DESC LIMIT 1
    "
); 

to this:

PHP Code:

    // <!-- TOP THREAD STARTER -->
    
$topstarter=$DB_site->query_first("
            SELECT COUNT(*) AS count,postuserid,postusername
            FROM " 
TABLE_PREFIX "thread
            WHERE postuserid <> 0
            GROUP BY postuserid
            ORDER BY count
            DESC LIMIT 1
        "
); 

As far as the uderids going to an error page, delete the following from the index.php:

PHP Code:

    $statscache['topposterid'] = vb_number_format($statscache['topposterid']);
    
$statscache['topstartid'] = vb_number_format($statscache['topstartid']);
    
$statscache['getfileviewsid'] = vb_number_format($statscache['getfileviewsid']);
    
$statscache['topreferrerid'] = vb_number_format($statscache['topreferrerid']);
    
$statscache['toprepid'] = vb_number_format($statscache['toprepid']); 

I forgot to take that code out when I released the hack. Sorry about that. That should fix everything. Let me know for sure.

Now I get this:
Code:

Database error in vBulletin 3.0.0:

Invalid SQL: 
        SELECT COUNT(*) AS count,postuserid,postusername
        FROM thread
        WHERE usergroupid IN (2,5,6,7)
        GROUP BY postuserid
        ORDER BY count
        DESC LIMIT 1
   
mysql error: Unknown column 'usergroupid' in 'where clause'

mysql error number: 1054

Date: Wednesday 24th of March 2004 03:03:48 AM
Script: http://www.spassforen.de/forum/index.php?
Username: Alex
IP Address: xxx.xxx.xxx.xxx


Boofo 03-24-2004 12:04 AM

Ok, redo the code with the query from the post above again (you will notice it is different now). I had to change it and you had already re-done it before the post edit. Sorry about that. ;)

Alex 03-24-2004 12:07 AM

Quote:

Originally Posted by Boofo
Ok, redo the code with the query from the post above again (you will notice it is different now). I had to change it and you had already re-done it before the post edit. Sorry about that. ;)

lol... ok, mom ;)

Alex 03-24-2004 12:10 AM

Now we're talking. Thanx dude! :) Oh, and if you have a minute, phrasing all that stuff into the vB's Phrase System would be nice. I do that one now on my own.

Thanks again! :)

Boofo 03-24-2004 12:16 AM

Did the new query get rid of the Top thread Starter that is no longer a member of your site?

Also, if you want to, you can send me what you did for the phrase system and I can incorporate it into the hack and give you full credit for it. ;)

Alex 03-24-2004 03:11 AM

Quote:

Originally Posted by Boofo
Did the new query get rid of the Top thread Starter that is no longer a member of your site?

Also, if you want to, you can send me what you did for the phrase system and I can incorporate it into the hack and give you full credit for it. ;)

I could do it, just can't promise you when, because I have a lot of personal stuff going on right now. Ah, what the hell... I try to put it together tomorrow. ;)

Boofo 03-24-2004 03:14 AM

I was just giving you a hard time. ;)

If you find the time, I will add it gladly. If you are too busy, I can do it sometime soon. ;)

And thank you. ;)

Alex 03-25-2004 01:33 AM

Quote:

Originally Posted by Boofo
I was just giving you a hard time. ;)

If you find the time, I will add it gladly. If you are too busy, I can do it sometime soon. ;)

And thank you. ;)

I've updated the instructions now. Everything is included in the vB phrase system now. PLUS I applied your above fixes, too. The only thing I couldn't do was a script to insert the new phrases automatically. Maybe you want to take a look at it, because there are quiet a few new phrases which have to be inserted manually now.

If you want to take a look at it first to see, if you can write a little script to insert the new phrases automatically I would say you give me your eMail address so I can send it to you. If you are not writing a script should I just attach it here, or do you want to have the updated instructions by eMail anyway?

EDIT: And I found a little glitch with $newuserid. That needs to be vb_number_formated, too. Also in the instructions.

Boofo 03-25-2004 01:47 AM

I'll pm you my email and you can send it there. I will update the hack and credit you accordingly. How does that sound? ;)

And thank you, sir. ;)

Alex 03-25-2004 02:01 AM

No, thank you! You got mail... :)

Boofo 03-25-2004 02:15 AM

I've got mail! ;)

Everything looks great! Thank you. ;)

The only thing is the newuserid can't be done with the number format or we run into the same rpoblem as the others we fixed yesterday. Anyone over 1000 on there userid would get commas for English and persions for German. that was what was messing up the other userids. I has them doing the number format, until you caught that. On my site, I only have about 30 plus users so I wouldn't have caught that for qwuite a while, I'm afraid. ;)

I will get the install file edited and the first post updated with it here shortly. Thank you again for the help in catching my stupid mistakes and with the phrases. ;)

Stop by my site and I will have something special for you, if you are interested. ;)

Alex 03-25-2004 02:28 AM

Actually, the way I edited it, it works fine. ;) Check out my site, works there, too.

Boofo 03-25-2004 02:32 AM

But with the number format, this:

www.forum.url/forum/member.php?u=3512

would become this:

www.forum.url/forum/member.php?u=3,512

;)

Alex 03-25-2004 02:33 AM

Quote:

Originally Posted by Boofo
I've got mail! ;)

Everything looks great! Thank you. ;)

The only thing is the newuserid can't be done with the number format or we run into the same rpoblem as the others we fixed yesterday. Anyone over 1000 on there userid would get commas for English and persions for German. that was what was messing up the other userids. I has them doing the number format, until you caught that. On my site, I only have about 30 plus users so I wouldn't have caught that for qwuite a while, I'm afraid. ;)

I will get the install file edited and the first post updated with it here shortly. Thank you again for the help in catching my stupid mistakes and with the phrases. ;)

Stop by my site and I will have something special for you, if you are interested. ;)

Stopped by, registered, but... duh! Where? What? Who? :D


All times are GMT. The time now is 04:53 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.01658 seconds
  • Memory Usage 1,874KB
  • 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
  • (2)bbcode_code_printable
  • (1)bbcode_html_printable
  • (8)bbcode_php_printable
  • (11)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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