![]() |
Ultimate Forum Stats Integration for Non-VB Page
This Hack was a port over from my vb2.x script that pulled information from teh forum to a seperate script which you then could break apart and include into your standard website via PHP includes or SSI.
This version is about the same but it now works with VB3.00 Gold Features for Logged in Members: *Users Avatar *Default Avatar For Members Without a Set Avatar *Number of Registered Members *Number of Threads *Number of Posts *How Many Posts since last visit *How Many New PM's *How Many PM's in your Inbox *Latest Registered User *Member with the Most Posts *Member with the Most Threads Features for Guests: *Welcome Text *VB3 Gold Login Box with option to Remember. *Newest Member *Member with the most Posts *Member with the most Threads All that is needed to do is download the attached Zip File. Then open the boardstat.php file in any Text Editor. Follow the Commented Portions that have been outlined in there. You will need to change all the PATHS and URLS in that file to match YOUR server. It might take some tweaking on your part but it works just fine as I have tested it with several other websites. When You are Done Editing it, just upload it to your forums directory and call it to your main website using php includes, ssi or iframes. IF YOUR FORUMS AND SITE ARE ON DIFFERENT SERVERS THEN YOU HAVE TO USE AN IFRAME TO CALL THE FILE OVER. ANYTHING ELSE COULD YIELD HEADER ERRORS. ------------------------------------ Please Remember. Follow the in-file instructions and edit all the URLS and PATHS. I can't stress this enough. I just know someone will pop on and say "Why does my links point to http://www.yourdomain.com/forums..... This is a warning lol ;) ------------------------------------ My Next Few Posts Will include Some Images of How the HTML is Built Inside the File. |
Snaps of the User Logged in and then when the User is logged out.
|
You can see a LIVE view of it Here: http://www.mogusland.com/
|
that's a great hack, now all i need is a decent top10 hack and i can start making my new front page :D
|
Quote:
its the one i use on my homepage :) |
Glad you guys like it. The instructions werent too difficult to understand were they?
|
I dont know yet, what I do know is that I'll be using this.
|
I checked the paths twice and then a third time, I know that they are all correct and I am getting this error
Warning: main(./includes/init.php): failed to open stream: No such file or directory in /home/rantman/public_html/forums/global.php on line 18 I placed the boardstats.php inside my root folder, is that the correct place to put it? |
Well I figured it out that it needs to be in the forums directory and then you can try and use it outside of that but it does not show you logged in when you are outside the forums!
|
If this can be corrected to work without using an iframe, then it would be one of the best hacks available for people that do not use a vb portal.
If you use a include statement then it will not work, example: http://www.sportsrant.com/index_tmp.php sign in test account: user: nyallsports pass: sf49ers Then if you go here: http://www.sportsrant.com/forums/boardstat.php and sign in and look it works. Something about vb does not like the password outside the forum folder. Also some of the links that you are using are incorrect in the form, when you check your private messages, usercp and others are incorrect or not updated. I have changed them and it works. There has to be someone out there that can get this to work outside the forums folder without using an iframe Mike |
looks promissing
|
I finally was able to get this to work by taking/changing some of the code out of the boardstats.php and adding it to my index.php on my home page http://www.sportsrant.com
If anyone wants to try it out: user: nyallsports pass: sf49ers Let me know what you think? |
Yes ill update the hack information when i get home tonight, I seem to have forgot to upload that file that explain the other paths. My bad guys, ill get it up ASAP. If you wish to use this without iframes you need to change the paths in Global.php, init.php ect. msimonds. If you can send me your changes via email ill update the hack infomation for that as well. You guys can troubleshoot it yourselves as well. Just modify the paths in the error script that the file gives you. If it says init.php open init.php and search for all the REQUIRED paths in that file. Ill update with more directions in a little bit.
you can email me at akauth+mogusland.com just replace the + with a @ |
Sounds interesting. Let me know when everything is working
|
I dont know MSIMONDS isnt sending me his modifications.
|
I HAVE FIXED THE SCRIPT.
It will now work just fine with INCLUDING this. I will post instructions tomarrow in full. In the mean time, do you guys want to be able to edit this file directly or resort to VBulletin templates? I personally like leaving vbulletin templates out of this add on but who knows. Tomarrow i will post a Fix for everyone! :) |
Really nice hack, can't wait for for your instructions today ;)
[high]* mmw clicks install[/high] |
I'd say leave out vBulletin. I for one prefer it without as it makes for far easier customisation.
Can't wait for the fix - I'm not really liking the iframe system I've got running. www.roller-coaster.com.au |
Anyluck with the fix :o
|
okay my fixes are a little different becuase I removed some stuff like the avatar and a few of the options.
Should I still post them here Mike |
I personally wouldn't mind it - I removed a lot of the stuff also. :)
|
This is what I have on my index.php in my root folder
PHP Code:
PHP Code:
I can make modifications to work to try and help anyone out that wants to get this to work and I also attahed a modified login.php that can go into your root folder, NOT THE FORUMS FOLDER Mike |
yes one thing i forgot was the CHDIR thing. That was one of the things i added but my computer was overtaken by college freaks finishing up homeworks. Ill look over MSIMONDS stuff and finish it up in about an hour or so.
|
hey if this works for anyone else then that is great. I fI Can help out in anyway just let me know. I have been trying to correct a different login for months becuase of a javescript error, but if it was not for your code, BlackxRam, then I would have never been able to get this to work. Great job man, really!!
|
One problem I am upset about is the seemingly longer loading time. It was MUCH faster with VB2... Im not sure if its a VB3 issue but I would like to try to get it more streamlined.
|
Updated the Zip File so everyone can understand it better.
|
/me clicks install
|
Quote:
I actually have to agree with you there. It does seem to load slower, I will also look into this and see if I can somehow speed it up |
Gave it a go.
All works fine except it wont display an avatar. Just the little box with a red cross in it. If I look at the html page produced I get HTML Code:
<a href="http://www.billspaintball.com/vb3/profile.php?&do=editavatar"><img src="image.php?u=1&dateline=1036410394" border="0"></a> HTML Code:
http://www.billspaintball.com/vb3/image.php?u=1&dateline=1036410394" border="0" What wrong??? EDIT: Doh!! Stupid mistake on my part. FIxed :) Great script, using on my site. :D |
greatttttttttt ;)
|
Quote:
|
Im using this on my site now.
There was one thing that was annoying me a little. That was some of my users have large avatars that messed up the formatting on the non VBb pages when they were displayed because they were so large. Ive added a few lines to this to resize any oversized avatars to a desired max size (keeping everything in proportion of course). Anyone interested? Should I post it here? |
Hi!
Text from guide.txt "If your website uses a CMS (Content Management System) this script might not function as well because it does call information from a another database" Well, I can assure it doesn't work with mambo. I think the problem is caused by chdir('/home/yourpath/to/forums'); I have searched the forum and have not found a login-huck that will work with Mambo. I currently use phpBB2 (before I transfer to VB3) and I have a nice hack which works fine. Do you guys think that the code can be more flexible and work with CMS? Any ideas? Thank you. Nektarios |
By All means bill share it. :)
About the CMS, its really hard to get something like that to work in a CMS if: A) the CMS is in a different Database B) the CMS doesnt allow php scripting to take place C) the CMS has its own cookie system therefore the script might conflict with the CMS There has been some luck in programs like PHPnuke that allows for Custom User "blocks" some CMS's also feature custom blocks as well. Those are the easiest to be able to make work. Otherwise if you use a CMS and are unable to integrate the code directly into your CMS by modifying your core files the best course of action would have to be an iframe. You would have better luck incorporating the two if they were on the same database name and the CMS allowed full php scripting. Most CMS's dont allow it cause its too much of a risk. Coding it for a CMS would be different every time cause every CMS is different. I personally wouldnt know about Mambo I am using a early build of a brand new CMS called IONcms and this hack will work perfectly with that CMS as i built it alongside the cms development. You would need someone who knows Mambo well to integrate it. |
Ok here is my little avatar max size hack.
It works fine on my site but no promisies that it will work elsewhere. Sorry about the messy code, (Im sure there is a neater more efficent way of doing this but, hey, it works) but im a php n00b, this is my first hack :D Anyone can use this in their hack if they wish, just keep the commented credit intact. Anyhow, this is the code. PHP Code:
Find this section in the origional code. Its about half way through the step 2 section. PHP Code:
PHP Code:
$maxw is the maximum width of the avatar. Anything bigger will be resized to this. $maxh is the maximum height of the avatar. Anything bigger will be resized to this. Anything smaller will not be resized up since that can make them look ugly and pixelated. All resized pics will retain their origional width/height proportions. The pic will be resized so that both width and height will fix in the max sizes you have choosen. |
if i have a login.php and index.html, what the cm insert .php to .html, i used <?include, but it don't work, who can help me???
|
i get the following error on my page:
Database error in vBulletin 3.0.3: Invalid SQL: SELECT userid,username FROM user ORDER BY joindate DESC LIMIT 1 mysql error: Table 'gobbas1.user' doesn't exist mysql error number: 1146 |
It looks to me that you have entered some invalid table information to the page.
Are you adding this to a normal PHP page or a CMS SCRIPT? |
CMS script, Mira server.
the thing is that gobbas1 is the database name for my forums, i don't know what table gobbas1.user is though since my vB tables are called vB3_. |
try changing all the Database Fields to match your VB Named Fields, it looks like the script is pulling from the CMS tables... in the stats script change any and all mysql info to vb3.user see if that helps.
|
All times are GMT. The time now is 04:46 PM. |
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:
|