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)
-   -   Ultimate Board Stats Integration into Users Non-VB page!! (https://vborg.vbsupport.ru/showthread.php?t=43454)

09-11-2002 10:00 PM

Ultimate Board Stats Integration into Users Non-VB page!!
 
This hack will add a ton of new features to your main website.

Version #2 features:

*Users Avatar
*Total Members
*Total Posts
*Total Threads

*Member of the Day (please note that for this hack to work you MIGHT need to have it already installed on your VB. Some people needed it some didnt. If this feature is unimportant to you please delete the CODE located in the file. It is marked.)

*Number of posts since last visit.
*Mini Forum nav Bar for logged in users
*PRIVATE MESSAGE INFORMATION including number of unread messages, new messages and total messages in your INBOX!
*Top Threads Starter
*Top Poster
*Newest Member
*Seperate displays for Logged in Users and guests (guests will see completely different information than Logged in users)
*FAQ and Register links for Guests.
*Login Code for Not logged in Guests or Users
*A completely Template Free Welcome Panel and no hassle script.

This is all done without ANY modifications or template changes. installation of this hack is SIMPLE.

Just upload the boardstat.php file into your server directory. You might to change the Path to your GLOBAL directory if its not in your FORUMS folder.

Currently the Add-on works as a 3 colomn table You can easily change that by opening the boardstat.php file and scrolling down to where it says Begin HTML OUTPUT. You can rearrange the html in any fashion you like.

To get the information to your main website just REQUIRE or use an IFRAME to call the boardstat.php file into your main page.

To make sure this installation is successful and works with no problems, you will need to install the hacks shown in this add-on just as a precaution. Some people are able to just upload the file and go while some need the hacks already installed.

**
Support for this hack is VERY limited until the new year. Reason being that im too busy too keep up with this right now.

Any problems seen in this hack, could be resolved by just commenting out or deleting the Member of the Day Feature. If you have this hack installed already then you should be fine. If you dont then it might or might not work.

Also, hacks like these dont work well across seperate domains or subdomains. In this case before the URL to the boardstat.php file works. If the PHP include doesnt work an IFRAME always will work.

**

See you guys' next year.

Colon33 09-12-2002 05:11 AM

Following SCREEN SHOT of a logged in user

Colon33 09-12-2002 05:12 AM

Screen shot of a Guest on your page

Darren Lewis 09-12-2002 05:28 AM

Looks good :)

Any plans to include who's online info (even just how many people will do, rather than individual names)? I did try Tubedogs hack once but the numbers it gave didn't correlate to the ones on the forum homepage.

Darren.

Colon33 09-12-2002 05:36 AM

Why Darren so you can mootch off me again? jk. :)

I will, i already had something like that done. It used to be on the front page along with whos browsing.. and number on a day all time, things like that. But it lagged the page alot. I need to cut it down a bit so i doesnt do too much lagging of the page loading. But i see you added that avatar thing to your WELCOME PANEL.... ;) Hoped my little endeavor helped you out a bit. hehe. Peace.

garoboldy 09-12-2002 12:46 PM

I cant seem to get your php file to work right.
here is the error I am getting.

Database error in vBulletin 2.2.7:

Invalid SQL: SELECT userid,username
FROM user
WHERE userid<>
AND (usergroupid=5 OR usergroupid=6 OR usergroupid=7 OR usergroupid=2)
ORDER BY RAND()
LIMIT 1
mysql error: You have an error in your SQL syntax near 'AND (usergroupid=5 OR usergroupid=6 OR usergroupid=7 OR usergroupid=2)
' at line 4

mysql error number: 1064

Date: Thursday 12th of September 2002 07:43:03 AM
Script: http://www.evolutionaryconcepts.com/.../boardstat.php
Referer:


it says /forum/forum/boardstat.php but there is no forum/forum
just /forum on my site.
I placed the php file in the vb root directory...and got this...when I put it in my main directory I get a 404 error not found page....

any info will be great!
thanks
:nervous:

Darren Lewis 09-12-2002 04:26 PM

Well, I think Firefly was the one who originally created the avatar hack anyway ;) Ironically I'd already written the release and was about to upload it when I saw you'd already done it :D

I've got quite a few scripts on my front page so I too don't want to slow things down further. Not sure how much people would use the additional info anyway. Someone's just asked me about the PM stuff for my hack. I'll have a fiddle to see if I can it and the who's online stuff working.

I'd like to get it working on properly on subdomains or even other domains.

Darren.

joeboo 09-12-2002 09:56 PM

Man.. there are so many of these hacks now.. anyways, is there any way to get this to work when your forums and site is on different servers?

Colon33 09-12-2002 10:07 PM

Hey Gara... Open the boardstat.php file make the path to your global.php the full path.

Also, i have not installed 2.2.7 because of template problems. This hack might not function properly cause of different code in 2.2.7

But Im a sure its the path to global.php that needs to be changed. So far your the only one whos having troubles, and the only one with 2.2.7. I have given this hack out to about 10 other people.

If that doesnt help you, come back here and let me know. Ill try some more ideas.

Colon33 09-12-2002 10:09 PM

Quote:

Originally posted by joeboo
Man.. there are so many of these hacks now.. anyways, is there any way to get this to work when your forums and site is on different servers?

I still think mines the most feature intensive with hardly no lagtime on the page loads. :) But i might just be biased to my board hacks.... lol Even though this is only my ACTUAL 2nd ever. hehe.



Anyways, Joe, if you have FTP to the server where the board is then you should be able to use it. Some servers allow it to be done. If you are able to upload this to the forum server. Just make the path to the global.php file a full url. This might or might not work. It worked on my previous server but not my new one.

But Joe if you use an IFRAME it WILL work. If you require it into your page you need to have the paths and urls match. An iframe just opens the page ON the other server. Use an iframe, just like i suggested in Version 1 to you. :)

memobug 09-12-2002 11:52 PM

My forum is on a subdomain so I had to change the include path as you suggested. But, then I found that the member of the day was generating SQL errors, so I commented that whole section out and it seems to be working. I don't have member-of-the-day installed.

Regards,

Matt

Oops - my top thread starter is GUEST, leftover from when I imported into vB. That comes up with no username, and no link. Any way to pick up the second biggest thread starter?

garoboldy 09-13-2002 01:16 AM

ok. my full path is home/evolutio/public_html/forum/global.php
urls www.evolutionaryconcepts.com/forum/global.php

I used the full path and it is just a blank page.
still not sure whats going on....sorry to be a bother...:(

Colon33 09-13-2002 03:23 AM

Ok, it seems some people can just upload the file and be done with it. But to be safer with less errors i added that it might be a good idea to install the hacks listed on your board page first. So if you installed the member of the day you should be fine and your website all of sudden has a member of the day feature! :)


Garo..theres no httpdocs folder or anything like that?

try this in the global path

forum/global.php

garoboldy 09-13-2002 03:26 AM

still getting nothing.....

Colon33 09-13-2002 03:26 AM

Quote:

Originally posted by memobug
My forum is on a subdomain so I had to change the include path as you suggested. But, then I found that the member of the day was generating SQL errors, so I commented that whole section out and it seems to be working. I don't have member-of-the-day installed.

Regards,

Matt

Oops - my top thread starter is GUEST, leftover from when I imported into vB. That comes up with no username, and no link. Any way to pick up the second biggest thread starter?

Hmmm, second biggest thread starter? Have you tried deleting user GUEST? It might just pick up the next one in line, but im not sure.... I dont know, i never imported VB before. I am working on a next version of this which will be a hack of this hack and will have a few more options, maybe top 3 threads starters or something like that

memobug 09-13-2002 07:46 AM

There actually is no username GUEST it is just userid=0, which I believe the forum interprets to be a guest poster.

Not a big deal, in any case!

For the new hack, would it be possible to display the number of new posts (or threads even) since the last visit?

Thanks,

Matt

Shepski 09-13-2002 11:02 AM

shame, its a great sounding hack but i also get a blank page with a table with 3 empty colums. tried all sorts of paths top global but no success. running 2.2.6 as i have too many hacks to bother with 2.2.7 and re-install everything :(

Colon33 09-14-2002 04:50 AM

You guys' are putting this file into your FORUMS directory right? Cause so far everyone i give it to is happy, lol. Can you guys give me the URLS to your boardstat.php file?

That might be able to help me out a little bit.

Apok2002 09-14-2002 05:19 AM

I'm also getting a blank page. I have 2.2.6...and I changed the global.php reference to the full url.

www.ez-company.net/forums/boardstat.php

Colon33 09-15-2002 12:43 AM

Quote:

Originally posted by Apok2002
I'm also getting a blank page. I have 2.2.6...and I changed the global.php reference to the full url.

www.ez-company.net/forums/boardstat.php


Warning: open_basedir restriction in effect. File is in wrong directory in /home/httpd/vhosts/ez-company.net/httpdocs/forums/boardstat.php on line 5


This error is a server problem.. talk to your host to turn that off. I had to do the same thing. Also you cant use a URL in recalling global you need to use a path so something like

/home/httpd/vhosts/ezcompany.net/httpdocs/forums/global.php

Try that so far its 4 people with 17 successes. Most problem i believe come because of v 2.2.7

Tigga 09-15-2002 02:14 AM

Quote:

Originally posted by Colon33
Also, i have not installed 2.2.7 because of template problems. This hack might not function properly cause of different code in 2.2.7
I just installed on 2.2.7 and it worked great. I did have to take out the member of the day part though since I don't have or particularly want that hack on my site. I was also getting the same error garoboldy was having before I removed the 'member of the day' section.
Nice hack, but unfortunatly I don't think I'm going to be able to use it. I've been using a slightly modified version of vBhome to include a bar down the left side of all my pages with user's info, online users, buddy lists, and etc. I use SSI to include the file and it works fine on all my HTML pages, but I can't get it to work on any of my other PHP scripts. I've tried this hack, webwelcome, coologin, and probably one or two more, yet none of them seem to work with another PHP script. I've tried using SSI somewhere in the script and the PHP include function, but had no luck with either. It will either display the info as if a user is not logged in and not let them log in from that page, or it will complain about header information already being sent out. If anyone has made this hack or a similar one work with another PHP script or knows how to I would be forever greatful and even give them my first born. :)

weeno 09-15-2002 05:32 AM

I had the same problem when trying to install it on a different site than my forums (but on the same server).

The problem, I think is that globals.php require's files that are in the admin directory.

Globals.php refers to the admin directory as "./admin" so... the partial fix is to create a symbolic link in the directory you are installing the hack to the admin directory

ln -s /full/path/to/admin admin

Now, i have a header error though... trying to set cookies or something

Warning: Cannot add header information - headers already sent by (output started at /home/chaosmin/public_html/portal/test2.php:15) in /home/forums/public_html/admin/functions.php on line 1573

Warning: Cannot add header information - headers already sent by (output started at /home/chaosmin/public_html/portal/test2.php:15) in /home/forums/public_html/admin/functions.php on line 1573

Tigga 09-15-2002 06:41 AM

That's pretty much the same problem I'm having whenever I try to use this script (or something similar) with another PHP script. I don't know that much about PHP, but I'm guessing you can't have 2 different scripts sending out headers.

Colon33 09-16-2002 07:16 AM

UPDATE OF ULIMATE STATS HACK! The Ultimate stats hack now features the total threads and posts since your last visit!
----------------
How's it going guys, i just decided to toss this in there cause i was bored. Hence its not a Large Update.

------
Coming in Version 3.0:

Whos Online
Total Members on a Day Alltime
Most users ever online a day Alltime
Users who have visited the site/board already today
Send PM via Website Home Page
PM notification on website Home Page
And so much more.
----------
**Possible RPG modification integration**

Display your board character/stats/money...etc.

have Fun!.. and remember, always wear a condom... especially when hacking VB!! lol

Shepski 09-16-2002 08:35 AM

got the hack working but noticed one problem with mine. the topthread starter user id is set to 1, the same as the top poster. it displays the right username but dont know why it assigns the userid of 1 to it!

any ideas?

http://www.dvd-swaps.co.uk/dvd2001/d.../boardstat.php

also, when i intergrate it with my homepage i get the following errors:

Warning: Cannot add header information - headers already sent by (output started at .....etc etc

how do i stop this from happening.

Erwin 09-16-2002 09:20 AM

Quote:

Originally posted by Colon33
.. and remember, always wear a condom... especially when hacking VB!! lol
It's VB, not VD.

;)

Colon33 09-17-2002 01:18 AM

Quote:

Originally posted by Shepski
got the hack working but noticed one problem with mine. the topthread starter user id is set to 1, the same as the top poster. it displays the right username but dont know why it assigns the userid of 1 to it!

any ideas?

http://www.dvd-swaps.co.uk/dvd2001/d.../boardstat.php

also, when i intergrate it with my homepage i get the following errors:

Warning: Cannot add header information - headers already sent by (output started at .....etc etc

how do i stop this from happening.


If you are installing this into VBHOME or VBINDEX like i see with your homepage it wont work. You cant call headers twice. You can use an iframe but thats about it for adding it already to another script.

About the User ID i dont know. Have you tried installing the top poster and threads starter? Your server and board might require you to do so. Otherwise you can just remove the LINK by the persons name. If you would please, so i know you didnt change anything on accident PASTE teh top poster and top replier sections as well as the ECHO string in here so i can take a look at it, you might have changed the URL. If anything you can always remove the LINK to the persons name.

Colon33 09-17-2002 01:21 AM

Quote:

Originally posted by Garoboldo
I cant seem to get your php file to work right.
here is the error I am getting.

Database error in vBulletin 2.2.7:

Invalid SQL: SELECT userid,username
FROM user
WHERE userid<>
AND (usergroupid=5 OR usergroupid=6 OR usergroupid=7 OR usergroupid=2)
ORDER BY RAND()
LIMIT 1
mysql error: You have an error in your SQL syntax near 'AND (usergroupid=5 OR usergroupid=6 OR usergroupid=7 OR usergroupid=2)
' at line 4

mysql error number: 1064

Date: Thursday 12th of September 2002 07:43:03 AM
Script: http://www.evolutionaryconcepts.com...m/boardstat.php
Referer:


it says /forum/forum/boardstat.php but there is no forum/forum
just /forum on my site.
I placed the php file in the vb root directory...and got this...when I put it in my main directory I get a 404 error not found page....
.


Garoboldy, either install the member of the day hack or just delete this part and remove it from the echo. This should help. You board seems to require the hack to be installed on the index iteself. Its not a big hack by no means.

Shepski 09-17-2002 07:24 AM

Quote:

Originally posted by Colon33



If you are installing this into VBHOME or VBINDEX like i see with your homepage it wont work. You cant call headers twice. You can use an iframe but thats about it for adding it already to another script.

About the User ID i dont know. Have you tried installing the top poster and threads starter? Your server and board might require you to do so. Otherwise you can just remove the LINK by the persons name. If you would please, so i know you didnt change anything on accident PASTE teh top poster and top replier sections as well as the ECHO string in here so i can take a look at it, you might have changed the URL. If anything you can always remove the LINK to the persons name.

Whats VBHOME and VBINDEX? My homepage is made up by me and Mr Dreamweaver. I have called other scripts up that utilise the forums with no problems that get displayed on my homepage.

I woiuld like to have the top thread starter displayed with a link if possible as it is a neat feature.

Code:

// Top poster
$topposters=$DB_site->query_first("SELECT username,posts,userid FROM user ORDER BY posts desc LIMIT 1");

// Top Threads starter
$toptstarter=$DB_site->query_first("SELECT COUNT(*) AS count,postuserid,postusername FROM thread GROUP BY postuserid ORDER BY count DESC LIMIT 1");

<font size=1 face=verdana>The Current Top Poster is: <a href=http://www.dvd-swaps.co.uk/dvd2001/dvdforums/member.php?&action=getinfo&userid=$topposters[userid]><b>$topposters[username]</b></a></font>($topposters[posts])<br>
<font size=1 face=verdana>The Current Top Thread Starter is: <font color=red><a href=http://www.dvd-swaps.co.uk/dvd2001/dvdforums/member.php?&action=getinfo&userid=$toptstarter[postuserid]><b>$toptstarter[postusername]</b></a></font>($toptstarter[count])</td></tr></table>";

http://www.dvd-swaps.co.uk/dvd2001/d.../boardstat.php - it displays everything corect except the id number which is wierd.

Shepski 09-18-2002 02:02 PM

got it working on home page except for the topthreadstarter id thing. put all the code except for the echo stuff at the beginning of my index code before the <htML> tag and put the echo stuff where i wanted it to display on the page. works a treat :)

http://www.dvd-swaps.co.uk

Colon33 09-22-2002 04:53 PM

Glad you were able to fix it. Sorry i havent been around. Been moving out of my old house. What did you change?

Brew 11-09-2002 11:53 PM

Has anyone gotten this to work with PostNuke?

Thanks

Katman 12-11-2002 01:20 AM

I've found that to get this to work with vB 2.2.8 you have change

require("forums/global.php");

TO

require('./global.php');

And remove the "Member Of The Day" parts, if you don't have that hack installed.

Colon33 12-11-2002 05:46 AM

good thing you added that update there Katman.

Sorry i have been alittle AFK. I had some computer and website issues. I will return to VB and making Modifications of VB prolly the first of the year.

Starting with a completly new version of this hack, if all works out. :)

suzannev 01-10-2003 12:55 PM

This is so perfect - I love it! :cool: Simple to install - thank you so much. The only thing missing for me is Today's Birthdays - anyway to add this easily? I didn't notice you mention this for Version 3.0.

When will Version 3.0 be out? {{rubbing hands together}}

Suzanne
----------------------
Emotional support for the terminally ill since 1999
www.ShareaCard.org

Colon33 01-10-2003 10:12 PM

Version 3.0 will be out as soon as my web server is back online. Mostlikely now will be sometime in february.

Right now its about 45% complete. Infact i had a plan to get birthdays put in there as well. So yes ill be able to get that complete. I am also adding a feature to which where you can click a users name on there birthday and you can send them a birthday card! :)


When i get my new webserver ill be sure to post an update here about it.


Glad you enjoyed it! All of the html is customizable in the echo strings so the skies the limit on what you can add!

:) peace.

SONOFSAM 02-05-2003 12:31 AM

Thnx Colon33 for direrting me here. I have my boardstat.php working:

www.clanrk.com/forums/boardstat.php

but how to use this on my index.shtml? How do i make this info appear there? sorry..im still a noob!

Colon33 02-05-2003 01:48 AM

Nice. It looks very nice too!

Well since you are using .shtml i would assume you are already using SSI to call files into your index file. Try calling the boardstat file into the html page. I dont think this will work though. You can use an IFRAME or you need to rename your file to .php and start using php recall tags which i think are cleaner and well more VB friendly.

Up to you. Get back to me please. :)

suzannev 02-05-2003 01:53 AM

I used this tag to call it on my .shtml page

<!--#include file="shareacard/forums/upload/boardstat.php"-->

I would guess you would use:

<!--#include file="forums/boardstat.php"-->

Colon33 02-05-2003 02:10 AM

Now that i got my FTP and server back online i can continue my plans for this addon. In future releases you wont be restricted to the 3 column layout. Please view www.mogusland.com (whens its completed) to see what i mean.

I also have planned:

buddylist
Whose online (numbers and names)
Birthdays
Calendar Events and so forth.

Help support me by visiting www.mogusland.com :)

Thanks suz, for giving him the shtml line.


All times are GMT. The time now is 01:30 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.01421 seconds
  • Memory Usage 1,852KB
  • 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
  • (1)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
  • (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