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)
-   -   vBTopSite (https://vborg.vbsupport.ru/showthread.php?t=59447)

Darkwaltz4 12-29-2003 10:00 PM

vBTopSite
 
vBTopSite - Used from 2.2.9 - 2.3.3, should work on all 2.x

Description: Topsites script for people who's sites revolve around vbulletin.

This script I actually wrote several months ago, and now I finally decided to release them on vb.org.
There are some things which I have not included in this version, but they will be released here as I am satisfied with them:
All functions appearing in 'Useful Admin Functions' in the ACP
Everything else works. ^_^ now anyway, features...


Topsites Features: [in no order, partial list]
  • Works with all vb things, like it shuts off with your forums, and Banned people have no access.
  • Secure Member Panel
  • Seperate Member Base, user need not be joined to forums to join/view topsites
  • Secure Retrieval System
  • Stats rendered in real-time
  • 'Today' Reset system
  • Customizable stat display in the sitecell template. [instructions for that if you ask me]
  • Tracks 12 stats, rankable by 9
  • Not a 'clicking required' topsites, displaying buttons earns hits
  • E-mail verification system
  • Allow certain HTML in description
  • Display filters for accounts which arent displaying the button
  • Comprehensive who's online locations

Admin Features: [in no order, partial list]
  • Topsites active y/n
  • Hit accruing active y/n
  • E-mail verification required (activation) y/n
  • Urls to buttons, arrows (for placing buttons remotely even)
  • Length of 'day' for reset purposes, 1 for daily, 0 to disable
  • Allowed HTML in description (blank for full stripping)
  • Option to resolve bad button urls -> replacing them with the rank button
  • Display filter (explained in the acp, or ask me for more details)
  • Set which stat to rank by
  • Edit/delete sites
  • SEARCH site database
  • Editing page features links to view submitted button, auto-checks validity of urls
  • Automatic emailing script: send to specific site/all sites/inactivated sites/activated sites
  • Displays stats [but not allowing editing]
  • View topsites from acp
  • **Force 'day' reset of unreset sites
  • **Force 'day' reset particular site
  • **Force 'day' reset of ALL sites
  • **Prune sites which joined from DATE, from all sites/inactivated/activated
  • **Clean up IP table of old hits/hits from pruned sites
  • **Flush hits from particular site
  • **Flush hits from site older than DATE

** = Will be appearing on vb.org shortly.

It is advised anyone who uses this hack, to click install, because of the nice updating thing i can do,
and like i said, there will be updates in a little while.

LIVE VERSION: http://forums.ffgon.com/topsites.php
Feel free to join if you are a Final Fantasy site ^_^ [ignore the popups, they dont appear if you are logged into the forums]
MORE:
http://www.animationation.net/community/topsites.php
http://www.bluelaguna.net/forum/topsites.php
http://www.orbsydia.com/forum/topsites.php

anyway, i might post screenshots, but the admin stuff isnt much to see, i basically just explained it up there ^ :-p
If you have any questions, etc, post them

FYI: a more advanced script is in the works by me, which will be free from vbulletin and including many more features,
like a user rating/comment system. This will be 10$ or so, and more details are available if you pm me (dont discuss it here)

Thank you for using this hack! i know i dont usually post my stuff, well here you go ^_^

Roxie 12-30-2003 09:05 PM

I will try it out. :) Looks good.

Roxie 12-30-2003 09:12 PM

What should the rank and default buttons look like?

Darkwaltz4 12-30-2003 09:15 PM

Anything you would like. genereally they are little 31hx88w pixel images, with numbers on them.

oh, i should add that each image be saved X.gif, where X is the number that it is.

Darkwaltz4 12-30-2003 09:30 PM

erm, missing more instructions >.<

open up the file called 'sinc.php'
and update the information contained at the top. its your db name, password, user, basically what appears in config.php of your admin/ folder.

this is used in the hit file, and because of it hits arent as server intensive as they would have been.

EDIT: zip file updated with last two changes

Roxie 12-30-2003 09:34 PM

Where should that file be uploaded? The instructions don't say.
Also, I don't see the new zip.

Darkwaltz4 12-30-2003 09:38 PM

ah...i guess it is updating the upload >.> vb3 does that...

well, it was just instruction changes

and create a folder anywhere you want, on any site you want.

add the buttons you make to it. be sure to create a 'default.gif' image. (numberless) remember the url you place them in, so you can fill it in upon doing your options

ill attach it again here EDIT, nm -_- stupid vb3...now the attachment is 'being uploaded' oh well

Roxie 12-30-2003 09:42 PM

So, upload the sinc.php anywhere? lol. I'm not getting it.

Darkwaltz4 12-30-2003 09:45 PM

in sinc.php, find

PHP Code:

<?php
error_reporting
(7);

$servername="localhost";
$dbusername="";
$dbpassword="";
$dbname="";
$technicalemail "";
$usepconnect 0;

and fill out the corresponding values with what appears in your admin/config.php file

PHP Code:

// type of database running
// (only mysql is supported at the moment)
$dbservertype 'mysql';

// hostname or ip of server
$servername 'localhost';

// username and password to log onto db server
$dbusername 'db_user';
$dbpassword 'db_pass';

// name of database
$dbname 'db_name';

// technical email address - any error messages will be emailed here
$technicalemail 'YOUR_NAME@SOMETHING.com';

// use persistant connections to the database
// 0 = don't use
// 1 = use
$usepconnect 0

its that easy, sinc.php is actually a boiled down version of alot of pages, for the mere fact of connecting to the db during the topsites_hit.php page

Roxie 12-30-2003 09:48 PM

*trying not to sound like a complete idiot* Okay..I know all that, but where should I upload the file. To the main directory or the admin. lol

sweet22 12-30-2003 09:52 PM

there is no attachment or download for the topsite

Roxie 12-30-2003 10:00 PM

I am having to do the queries manually and I got this error with the first one:

There seems to be an error in your SQL query. The MySQL server error output below, if there is any, may also help you in diagnosing the problem

ERROR: Unclosed quote @ 108
STR: '
SQL: CREATE TABLE topsites_ips (
ipin int(10) NOT NULL auto_increment,
address varchar(14) NOT NULL default \'\',
siteid int(5) NOT NULL default \'0\',
dateadd int(20) NOT NULL default \'0\',
PRIMARY KEY (ipin)
) TYPE=MyISAM
SQL-query :

CREATE TABLE topsites_ips ( ipin int(10) NOT NULL auto_increment, address varchar(14) NOT NULL default \'\', siteid int(5) NOT NULL default \'0\', dateadd int(20) NOT NULL default \'0\', PRIMARY KEY (ipin) ) TYPE=MyISAM

MySQL said:

You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '\'\',
siteid int(5) NOT NULL default \'0\',
dateadd int(20)

Darkwaltz4 12-30-2003 10:06 PM

UGH THIS IS GETTING ANNOYING NOW....blame vbhackmaker, here use this

PHP Code:

CREATE TABLE topsites_ips (
  
ipin int(10NOT NULL auto_increment,
  
address varchar(14NOT NULL default '',
  
siteid int(5NOT NULL default '0',
  
dateadd int(20NOT NULL default '0',
  
PRIMARY KEY  (ipin)
TYPE=MyISAM;

CREATE TABLE topsites_options (
  
active tinyint(1NOT NULL default '0',
  
hitson tinyint(1NOT NULL default '0',
  
perpage tinyint(3NOT NULL default '10',
  
daytime tinyint(2NOT NULL default '1',
  require 
tinyint(1NOT NULL default '1',
  
buttons varchar(75NOT NULL default '',
  
totalbuttons int(3NOT NULL default '50',
  
resolve tinyint(1NOT NULL default '0',
  
display tinyint(1NOT NULL default '1',
  
htmlallowed varchar(75NOT NULL default '&lt;b&gt;&lt;u&gt;&lt;i&gt;',
  
bheight tinyint(3NOT NULL default '0',
  
bwidth tinyint(3NOT NULL default '0',
  
bborder tinyint(3NOT NULL default '0',
  
arrows varchar(75NOT NULL default '',
  
rankby varchar(75NOT NULL default 'todayunique',
  
KEY active (active)
TYPE=MyISAM;

CREATE TABLE topsites_sites (
  
siteid int(3NOT NULL auto_increment,
  
siteurl varchar(75NOT NULL default '',
  
sitetitle varchar(75NOT NULL default '',
  
webmaster varchar(30NOT NULL default '',
  
webemail varchar(50NOT NULL default '',
  
sitedescription text NOT NULL,
  
sitepassword varchar(30NOT NULL default '',
  
buttonurl varchar(75NOT NULL default '',
  
totalhits int(10unsigned NOT NULL default '0',
  
totalout int(10unsigned NOT NULL default '0',
  
totalunique int(10unsigned NOT NULL default '0',
  
totalin int(10unsigned NOT NULL default '0',
  
todayin int(10unsigned NOT NULL default '0',
  
todayunique int(10unsigned NOT NULL default '0',
  
todayout int(10unsigned NOT NULL default '0',
  
todayhits int(10unsigned NOT NULL default '0',
  
lastreset int(20NOT NULL default '0',
  
lastrank int(20NOT NULL default '0',
  
joindate int(20NOT NULL default '0',
  
active tinyint(1NOT NULL default '0',
  
PRIMARY KEY  (siteid),
  
UNIQUE KEY siteurl (siteurl,webmaster,webemail,buttonurl)
TYPE=MyISAM;

INSERT INTO topsites_options VALUES (001011'http://YOURSITE/topsites/buttons'1002'<b><u><i>'31880'http://YOURSITE/topsites''todayunique');

---------------------------------
find forum/global.php
----
if (!
$servertoobusy) {
  require(
'./admin/sessions.php');
----
replace with
----
if (!
$servertoobusy) {
if(
$PHP_SELF != "/topsites_hit.php") {
  require(
'./admin/sessions.php');
}

find in admin/index.php
----------
makenavoption("Add","announcement.php?action=add","|");
makenavoption("Modify","announcement.php?action=modify");
makenavselect("Announcements");

add below
// *************************************************
makenavoption("Options","topsites_admin.php?action=options"," | ");
makenavoption("Manage Sites","topsites_admin.php?action=site","<br/>");
makenavoption("Useful Admin Functions","topsites_admin.php?action=functs","<br/>");
makenavoption("Send Emails","topsites_admin.php?action=email"," | ");
makenavoption("View","../topsites.php?page=1","<br/>");
makenavselect("vBTopSite"); 

*sigh* i think i remember why i dont release hacks here, lol

and yeah...............................vb3 is in the process of 'updating the attachment' =_= which means it might not be available until tomarrow...stupid thing. if you click install, ill be able to update you when it returns

Roxie 12-30-2003 10:17 PM

I'm getting errors with all the queries now....I'm going to hold off on installing until you get the file updated. Then I'll try again.

Darkwaltz4 12-30-2003 11:27 PM

Okay, the update is there, i took out the vbhacker stuff, and added all of the instructions which you will need, and that should be everything *heavy sigh* now, this is really ruining my credibility isnt it, lol. Just follow the instructions, vbhacker sucks i just found out, when you are trying to make your own with vbhackmaker.

ULTIMATESSJ 12-30-2003 11:35 PM

One small question

I have my forums installed on a subdomain (for example http://forum.mysite.com). Say i wanted this topsite page to appear on the normal site (example again http://www.mysite.com/topsite.php), what would i need to do?

Darkwaltz4 12-30-2003 11:39 PM

hmmmm....im just guessing, but you might be able to do it if you put the full url into the include file to global.php of your fourms (which it needs to run) however i have a feeling this wont work, because then youll have to edit all the requires in the global.php file....you might try it, but i seriously dont think it will work without some annoyance experienced on your end.

this is one of the problems, which is solved by being free of vb in the version i mentioned above :-p because some people dont like the topsites to be dependant on the forums.

AN-net 12-31-2003 05:51 AM

i seem to be having problems with the second db query>_<

edit:
im having problems with the topsites_options:
specifically:
'require tinyint( 1 ) NOT NULL default '1',
buttons varchar(

Darkwaltz4 12-31-2003 03:32 PM

which version of mysql are you running? the sql statements should all be run through phpmyadmin, after all i used phpmyadmin to render the statements in the first place, lol (using the view dump schema thing)

on a side note, if anyone actually gets this running on their site, mind posting a link? :D i might even list it at the top or something

MindTrix 12-31-2003 03:38 PM

Sounds good, nice job ;)

Hope you get the problems fixed soon

Darkwaltz4 12-31-2003 03:40 PM

the current problem for right now: seems to just be AN-net with the second query

all the problems from previous posts, were trouble with: vb3's attachment process >.> and also vbhacker not liking the vbhackmacker file i used (so i rewrote the instructions without use of vbhacker) and then it became less annoying ^_^

yeah, so anyone returning, ignore most of the above posts >.>

AN-net 12-31-2003 04:10 PM

im using Mysql version: 4.0.15-standard

AN-net 12-31-2003 04:26 PM

Quote:

MySQL said:


You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'require tinyint( 1 ) NOT NULL default '1',
buttons varchar(
i still get that
i having no experience with sql syntax would assume the word require is messing it up, i dont know just a hunch

Darkwaltz4 12-31-2003 04:33 PM

AHA, i know whats going on, and i might update the query in the install file if this keeps up a problem >.>

PHP Code:

CREATE TABLE `topsites_options` (
`
activetinyintNOT NULL default '0',
`
hitsontinyintNOT NULL default '0',
`
perpagetinyintNOT NULL default '10',
`
daytimetinyintNOT NULL default '1',
`
requiretinyintNOT NULL default '1',
`
buttonsvarchar75 NOT NULL default '',
`
totalbuttonsintNOT NULL default '50',
`
resolvetinyintNOT NULL default '0',
`
displaytinyintNOT NULL default '1',
`
htmlallowedvarchar75 NOT NULL default '<b><u><i>',
`
bheighttinyintNOT NULL default '0',
`
bwidthtinyintNOT NULL default '0',
`
bbordertinyintNOT NULL default '0',
`
arrowsvarchar75 NOT NULL default '',
`
rankbyvarchar75 NOT NULL default 'todayunique',
KEY `active` ( `active` ) 
TYPE MyISAM 

there, the problem (thanks for putting the entire error message) was that the word 'require' is a reserved word, and to use it in a table requires that you quote it to work *edit: just verified this*

AN-net 12-31-2003 04:35 PM

yeah it works! Thanks so much ^.^

MindTrix 12-31-2003 04:51 PM

Quote:

Originally Posted by Darkwaltz4
all the problems from previous posts, were trouble with: vb3's attachment process >.>

What do you mean by that?

Darkwaltz4 12-31-2003 04:54 PM

it doesnt update right away (and ive used vb3 gamma, so ive seen the timed updating things)

so basically i sat there sweating, while many people came and went, seeing i had no attachment, when all vb3 had to say about it was 'updating'

ultimately, it deleted the attachment (?) (no not me) and i had to upload a new one

AN-net 12-31-2003 04:59 PM

im getting this now when i fill in the options in admin cp and hit save changes:
Quote:

Database error in vBulletin Control Panel 2.3.2:

Invalid SQL: UPDATE topsites_options SET display='1',active='1',require='1',hitson='1',butt ons='http://www.animationation.net/community/images/topsite/',arrows='ttp://www.animationation.net/community/images/topsite/',perpage='10',totalbuttons='50',daytime='0',htmla llowed='',bheight='31',bwidth='88',bborder='1',res olve='0',rankby='totalunique'
mysql error: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'require='1',hitson='1',buttons='http://www.animationation.net/c

mysql error number: 1064

Date: Wednesday 31st of December 2003 07:58:38 PM
Script: http://www.animationation.net/commun...ites_admin.php
Referer: http://www.animationation.net/commun...ction=options&

MindTrix 12-31-2003 04:59 PM

Oh right i thought you meant it was a problem with it working on vB3, in which case im sure you can guess what my response would have been :)

Thank you for clearing that up for me.

AN-net 12-31-2003 05:03 PM

where should i put that and should i fix the admin file for the topsite?

where did darkwaltz's post go?????????

Darkwaltz4 12-31-2003 05:05 PM

heh, yeah i know i know, i cant code that mess called vb3 [yet]...at least until i figure out the whole template thing, all over again (theres like 3 types now >.<)

anyway, there is definately a different-version issue at work here, with the 'require' column i told you about. to fix it, open up the topsites_ammin.php, and put quote around the query that updates topsites_options

_everywhere_ you see:
-----------
require='
-----------
replace with
-----------
`require`='
-----------

and also, when you get it working, mind posting a link to it? that would be cool ^_^

wow, so now i know what to include in the next version (which ill work on when everyone is good with this one)

AN-net 12-31-2003 05:15 PM

ok this time when i submitted the options it did "update" the options table from admin cp perspective by saying "options updated" but when i went to http://www.animationation.net/community/topsites.php
i get this:
Quote:

Database error in vBulletin 2.3.2:

Invalid SQL: SELECT * FROM topsites_sites WHERE active>0 ORDER BY DESC LIMIT 0,
mysql error: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'DESC LIMIT 0,' at line 1

mysql error number: 1064

Date: Wednesday 31st of December 2003 08:14:14 PM
Script: http://www.animationation.net/commun...es.php?page=1&
Referer:

Darkwaltz4 12-31-2003 05:17 PM

you did not fully fill out your settings, your 'Sites per page' option is not filled out

AN-net 12-31-2003 05:19 PM

ok just checked phpmyadmin and it doesnt seem it updated anything, from looking at it seems instead of updating you need to insert some stuff so you can browse it. just my 2 cents

Darkwaltz4 12-31-2003 05:21 PM

okay, in this case, you never executed the INSERT query

if you need it, its:

PHP Code:

INSERT INTO `topsites_options` ( `active` , `hitson` , `perpage` , `daytime` , `require` , `buttons` , `totalbuttons` , `resolve` , `display` , `htmlallowed` , `bheight` , `bwidth` , `bborder` , `arrows` , `rankby` ) 
VALUES (
'0''0''10''1''1''''50''0''1''<b><u><i>''0''0''0''''todayunique'
); 

when this is done, thats probably what caused the problem when you tried to update your options :D

AN-net 12-31-2003 05:22 PM

omg i forgot to do that, silly me lol( got all caught up in actually creating the options table lol

AN-net 12-31-2003 05:24 PM

To look at anothe working example see:
http://www.animationation.net/commun...es.php?page=1&

Darkwaltz4 12-31-2003 05:26 PM

lol, hopefully the next working example wont take as long to get working ^_^

this hack isnt beta, the install instructions were, lol

ill be updating the zip file above soon, there are the movement arrows i forgot to include, and i also revised the instructions a bit, to avoid many of the issues discovered with them :-p

also, newer queries which should work for all mysql versions. hopefully i can add in some of the starred items soon :-p

AN-net 12-31-2003 05:31 PM

one more problem, ok i signed my own site up to test it and also to see how it works but now, when i get sent the email with the password the password was totally random and weird and also when i copy and pasted it in the site login with my id i got invalid password. is the password susposed to contain subscripts,slashes, and colons?

Darkwaltz4 12-31-2003 05:34 PM

yeah, i put up a change in the random password generator. *in the new zip* if you would like to change it yourself, find:

chr(rand(1,100));

and change it to chr(rand(1,75));
(this code only appears once, so just use Find)

you can edit the password to your site using the ACP 'manage sites' option


All times are GMT. The time now is 04:50 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
  • Page Generation 0.01490 seconds
  • Memory Usage 1,910KB
  • 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
  • (5)bbcode_php_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)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