Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Ultimate Forum Stats Integration for Non-VB Page Details »»
Ultimate Forum Stats Integration for Non-VB Page
Version: 1.00, by BlackxRam BlackxRam is offline
Developer Last Online: Feb 2020 Show Printable Version Email this Page

Version: 3.0.0 Rating:
Released: 03-30-2004 Last Update: Never Installs: 33
 
No support by the author.

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.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #32  
Old 04-15-2004, 04:16 AM
BlackxRam BlackxRam is offline
 
Join Date: Aug 2003
Posts: 364
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Billspaintball
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&amp;dateline=1036410394" border="0"></a>
However, If I use the image part of that and enter it straight into the browser like
HTML Code:
http://www.billspaintball.com/vb3/image.php?u=1&amp;dateline=1036410394" border="0"
The image will display.

What wrong???


EDIT:

Doh!!
Stupid mistake on my part.
FIxed

Great script, using on my site.
That seems to be a server issue or perhaps you should put the ENTIRE url into the IMG tag if your forums are on subdomains.
Reply With Quote
  #33  
Old 04-22-2004, 02:20 PM
Billspaintball's Avatar
Billspaintball Billspaintball is offline
 
Join Date: Sep 2003
Location: Bathurst, Au
Posts: 649
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Reply With Quote
  #34  
Old 04-22-2004, 05:15 PM
nektar nektar is offline
 
Join Date: Apr 2004
Posts: 66
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #35  
Old 04-25-2004, 10:24 AM
BlackxRam BlackxRam is offline
 
Join Date: Aug 2003
Posts: 364
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #36  
Old 04-27-2004, 01:01 PM
Billspaintball's Avatar
Billspaintball Billspaintball is offline
 
Join Date: Sep 2003
Location: Bathurst, Au
Posts: 649
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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

Anyone can use this in their hack if they wish, just keep the commented credit intact.

Anyhow, this is the code.
PHP Code:
// display avatar - resize if too big
// By Bill - [url]http://www.billspaintball.com[/url]
$file "http://www.yourdomain.com/pathto/forums/$bbuserinfo[avatarurl]"// Path to pic
$maxw 130// Max thumbnail width
$maxh 140// Max thumbnail height
list($width$height$type) = getimagesize($file);

if ( 
$width <= $maxw AND $height <= $maxh )// check width and height
   
{// if width and height under size display unchanged
       
echo "<img src="$file.$type" align="center" border="0">";
   }
   else 
   {  
    if (
$width $maxw)//check if width is too wide
        
// if it is, resize
        
$ratio $width $maxw//work out resize ratio
        
$newwidth $maxw// new width
        
$newheight = ($height $ratio); // new height at this resize
        
}
        else
        {
        
$newheight $height// if width is ok, set this cos we need it later
        
$newwidth $width// if width was ok, set this cos we ned it later
        
}
    If (
$newheight <= $maxh )        
        {
        
// if current height is ok, were done.
        

        
        else 
// either origional or resized height is too big
            
if( $newheight >= $maxh )
            { 
// if resized height is still too big we resize it
            
$ratio2 $newheight $maxh//work out resize ratio
            
$newheight $maxh// give $newheight a new value
            
$newwidth = ($newwidth $ratio2); // new width at this resize
            
// the value of $newwidth has just been changed
            
else
            {
// if were here then origional height is too big so we resize it
            
$ratio2 $newheight $maxh//work out resize ratio
            
$newheight $maxh// give $newheight a new value
            
$newwidth = ($newwidth $ratio2); // new width at this resize
            
}

        
// now we can finally display resized pic
        
echo "<img src="$file.$type" border="0" width = "$newwidth" height = "$newheight" align="center">"// display resized pic
   

Instructions.

Find this section in the origional code.
Its about half way through the step 2 section.

PHP Code:

</td></tr><tr><td width=10%><a href=\"http://www.yourdomain.com/forums/profile.php?$session[sessionurl]&do=editavatar"><img src="$bbuserinfo[avatarurl]" border="0"></a></td><td width=50%> 
Change it to

PHP Code:
</td></tr><tr><td width=10%><a href=\"http://www.yourdomain.com/forums/profile.php?$session[sessionurl]&do=editavatar">";

//insert my new code here!!!

echo "</a></td><td width=50%> 
You need to edit 2 lines in my 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.
Reply With Quote
  #37  
Old 09-12-2004, 07:14 AM
kelangtri kelangtri is offline
 
Join Date: Oct 2002
Posts: 6
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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???
Reply With Quote
  #38  
Old 11-20-2004, 08:29 PM
Gobbas Gobbas is offline
 
Join Date: Nov 2004
Posts: 6
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #39  
Old 11-21-2004, 02:42 AM
BlackxRam BlackxRam is offline
 
Join Date: Aug 2003
Posts: 364
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Reply With Quote
  #40  
Old 11-21-2004, 02:54 AM
Gobbas Gobbas is offline
 
Join Date: Nov 2004
Posts: 6
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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_.
Reply With Quote
  #41  
Old 11-27-2004, 08:35 PM
BlackxRam BlackxRam is offline
 
Join Date: Aug 2003
Posts: 364
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 12:31 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.11789 seconds
  • Memory Usage 2,343KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (2)bbcode_html
  • (3)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete