The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Comments |
#122
|
||||
|
||||
Thank you! Installed it perfectly.
*clicked Install* |
#123
|
|||
|
|||
Help! i got the follow error:
Code:
Warning: array_merge() [function.array-merge]: Argument #2 is not an array in W:\www\includes\init.php on line 520 Warning: Invalid argument supplied for foreach() in W:\www\includes\sessions.php on line 270 Warning: array_merge() [function.array-merge]: Argument #2 is not an array in W:\www\includes\functions.php on line 3622 Warning: array_merge() [function.array-merge]: Argument #1 is not an array in W:\www\includes\functions.php on line 3622 Warning: array_merge() [function.array-merge]: Argument #2 is not an array in W:\www\includes\functions.php on line 3622 There seems to have been a slight problem with the database. Please try again by pressing the refresh button in your browser. An E-Mail has been dispatched to our Technical Staff, who you can also contact if the problem persists. We apologise for any inconvenience. |
#124
|
||||
|
||||
Quote:
|
#125
|
|||
|
|||
Quote:
|
#126
|
||||
|
||||
i re-uploaded all the files, did all the edits once again,
but still getting this error : Code:
Database error in vBulletin 3.0.3: Invalid SQL: SELECT COUNT(*) AS referrals, user.username, user.userid FROM vb3_user AS users LEFT JOIN user AS user ON (users.referrerid = user.userid) WHERE user.userid > 0 GROUP BY users.referrerid ORDER BY referrals DESC LIMIT 10 mysql error: Table 'sanp_faS3.user' doesn't exist mysql error number: 1146 Date: Friday 15th of October 2004 01:45:21 PM Script: http://forums.tech-arena.com/referrals.php Referer: Username: SaN-DeeP |
#127
|
||||
|
||||
That's because you have a table prefix. You need to add . TABLE_PREFIX . before each table.
|
#128
|
||||
|
||||
Quote:
Code:
<?php //////////////////////////////////////////////////////// //Referral Statistics// Created By: G-Spot////////////// //////////////////////////////////////////////////////// ///////////////www.gspotracing.com////////////////////// //////////////////////////////////////////////////////// // INSTRUCTIONS: // Change the $max variable to show how many results you want. ////////////////// OPTIONAL REFERRAL RESULTS /////////// // You can limit your referral results to certain usergroups, // by adding the following under each query after the WHERE clause's: // AND user.usergroupid=2 --> // this number will be different for different user groups. To find // the usergroup number login to your admincp and click on usergroup // manager and next to the usergroups you should see something close // to: edit usergroup(id:2) where the 2 is the usergroup number. /////////////////////////////////////// ////////////////////////////////////////////// ////////////////////////////////////////////////////// // ####################### SET PHP ENVIRONMENT ########################### error_reporting(E_ALL & ~E_NOTICE); // #################### DEFINE IMPORTANT CONSTANTS ####################### define('NO_REGISTER_GLOBALS', 1); define('THIS_SCRIPT', 'referrals'); // ################### PRE-CACHE TEMPLATES AND DATA ###################### $globaltemplates = array('refer','referbit','navbar'); // ######################### REQUIRE BACK-END ############################ chdir('/path/to/vbulletin/forums/');//edit path to your vbulletin directory require('./global.php'); // ######################### NAVIGATION ############################ $navbits = array(); $navbits[$parent] = 'Referral Statistics'; $navbits = construct_navbits($navbits); eval('$navbar = "' . fetch_template('navbar') . '";'); // ##################################################### // ##################################################### // ######################### START MAIN SCRIPT ######### // ##################################################### // START REFERRAL STATISTICS SCRIPT // //GET TOTAL REFERALS// $gettotal = $DB_site->query("SELECT COUNT(*) FROM " . TABLE_PREFIX . "user WHERE referrerid > 0"); $total=mysql_fetch_row($gettotal); // END TOTAL REFERALS // // GET LAST DATE RESET // $lastreferals=$DB_site->query("SELECT date FROM " . TABLE_PREFIX . "referrals"); $lastcount = mysql_fetch_row($lastreferals); if ($lastcount == ''){ $lastcount[0]="(No Reset Record Found!)"; } // END LAST DATE RESET // $max=10; //This number decides how many results to display $referrers = $DB_site->query("SELECT COUNT(*) AS referrals, user.username, user.userid FROM " . TABLE_PREFIX . "user AS users LEFT JOIN user AS user ON (users.referrerid = user.userid) WHERE user.userid > 0 GROUP BY users.referrerid ORDER BY referrals DESC LIMIT $max"); while ($referrer=$DB_site->fetch_array($referrers)) { $referreds = $DB_site->query("SELECT username FROM " . TABLE_PREFIX . "user WHERE referrerid = '$referrer[userid]' AND referrerid > 0"); while ($referred = $DB_site->fetch_array($referreds)){ $enc_username = urlencode($referred[username]); if ($referrerlist) { $referrerlist .= ", <A HREF=member.php?action=getinfo&username=$enc_username>$referred[username]</A>"; } else { $referrerlist .= "<A HREF=member.php?action=getinfo&username=$enc_username>$referred[username]</A>"; } } eval("\$referbits .= \"".fetch_template("referbit")."\";"); $referrerlist=""; } eval('print_output("' . fetch_template('refer') . '");'); ?> |
#129
|
||||
|
||||
San-Deep
Do you see this line in my configuration file that you posted above: chdir('/path/to/vbulletin/forums/');//edit path to your vbulletin directory - You need to edit this path to reflect your forums directory and then try it. - try this first. |
#130
|
||||
|
||||
Quote:
|
#131
|
||||
|
||||
Its trying to load this table from mysql: "sandeep_f1nalDbaS3.user" does this table even exist? Please check your table extension that your using against your database tables in your mysql.
|
#132
|
||||
|
||||
Quote:
Code:
there is no table name sandeep_f1nalDbaS3.user but a table named sandeep_f1nalDbaS3.vb3_user exisits, i assume you still need to tweak the file a lil for me :( |
#133
|
||||
|
||||
No, there shouldnt be any more editing needed to the files. - Your post number 125 up above shows that you were gettting the following database error: Table 'sanp_faS3.user' doesn't exist
Now when I visit your website I see the following error: sandeep_f1nalDbaS3.user No table exists So the only thing I can think of is that you dont have the table prefix being integrated correctly on your site... You can try adding (FROM " . TABLE_PREFIX . "vb3_referrals) - the (vb3_) into the each query being executed in the configuration file of my script that you posted in #127 above. That should do the trick, but make sure you add (vb3_) to every table like i showed you in the above example. Let me know - good luck |
#134
|
||||
|
||||
Great work!
|
#135
|
||||
|
||||
OK question, this is perfect for what I want to do with competitions and such. I also have am using the Store Hack.
I want to create a easy way for member to refer. How do I create "buttons" for the members to put on their sites etc so when they click on the button, get referred to my site, register, that the referrer gets credit automatically without having the person that is registering enter the referrerrrrrr's name? Get that sorted and I click install |
#136
|
||||
|
||||
Quote:
Warm Regards, Sandy... |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|