vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Graveyard (https://vborg.vbsupport.ru/forumdisplay.php?f=224)
-   -   vB Affiliates for 3.5 (https://vborg.vbsupport.ru/showthread.php?t=96485)

ReadOrDie 09-28-2005 01:38 AM

Quote:

Originally Posted by Danny.VBT
You have to set permissions in the usergroup manager

Nothing in the usergroup manager says anything about affiliates...

Guest190829 09-28-2005 02:00 AM

Did you upload the bitfield_vbaffiliates.xml file into your includes/xml directory?

Impreza04 09-28-2005 05:08 AM

Has the affiliate file been updated yet..?

ReadOrDie 09-28-2005 10:58 AM

Quote:

Originally Posted by Danny.VBT
Did you upload the bitfield_vbaffiliates.xml file into your includes/xml directory?

Alright I installed it, but yet again I'm getting another error:
Warning: mysql_real_escape_string() expects parameter 1 to be string, array given in /includes/class_core.php on line 628

Guest190829 09-28-2005 02:51 PM

What page are you getting that error? I think I filtered out a integer type variable, that's what is causing the error.

bi11i 09-28-2005 04:39 PM

Quote:

Originally Posted by Impreza04
Everything is working on my test board apart from when trying to view affiliate.php

PHP Code:

Database error in vBulletin 3.5.0 Release Candidate 3:

Invalid SQL:
SELECT FROM vb_ affiliates_settings;

MySQL Error  Table 'integram_crg.vb_' doesn't exist
Error Number : 1146
Date         : Monday, September 26th 2005 @ 04:22:45 PM 

EDIT: Actually I see the problem myself and its fixed..
PHP Code:

//################## Begin Settings###################//
$setting$db->query_first("SELECT * FROM " TABLE_PREFIX ." affiliates_settings"); 

Has a space..
Replace with
PHP Code:

//################## Begin Settings###################//
$setting$db->query_first("SELECT * FROM " TABLE_PREFIX ."affiliates_settings"); 

Lets try on my real board


The disabled message
"Sorry but the affiliate section of the siteis currently disabled."
Needs a space between site and is :rolleyes:

and
PHP Code:

Database error in vBulletin 3.5.0 Release Candidate 3:

Invalid SQL:
SELECT affiliate_id,sitename,siteurl,buttonurl,name,id,sitedesc,clicksout,clicksin,totalrating,totalvotes 
                                        FROM vB_affiliates LEFT JOIN vB_affiliates_types 
                                        ON affiliates
.type affiliates_types.id 
                                        WHERE active
='1' AND approved='1' 
                                        
ORDER BY sitename DESC 
                                        LIMIT 0
,20;

MySQL Error  Unknown table 'affiliates' in on clause
Error Number 
1109
Date         
MondaySeptember 26th 2005 09:05:35 AM
Script       
http://www.playstation-racing.co.uk/forum/affiliate.php?do=listaffiliates 


thanks, that fixed my SQL error, also.

Are the General Settings optimally configured by default?

bi11i 09-28-2005 04:45 PM

Quote:

Database error in vBulletin 3.5.0 Release Candidate 3:

Invalid SQL:
SELECT affiliate_id,sitename,siteurl,buttonurl,name,id,si tedesc,clicksout,clicksin,totalrating,totalvotes
FROM opio_affiliates AS affiliates_types
LEFT JOIN opio_affiliates_types AS affiliates_type
ON opio_affiliates.type = opio_affiliates_types.id
WHERE active='1' AND approved='1'
ORDER BY sitename DESC
LIMIT 0,5;

MySQL Error : Unknown table 'opio_affiliates' in on clause
Error Number : 1109
Date : Wednesday, September 28th 2005 @ 11:45:15 AM
Script : http://forum.opiophile.org/affiliate...listaffiliates
Referrer : http://forum.opiophile.org/affiliate.php
IP Address : 192.168.0.110
Username : bi11i
Classname : vB_Database_MySQLi
I'm still getting this error no matter which hack to the mod I try. Any definitive solution?

Hawkbizkit 09-28-2005 04:53 PM

Quote:

Originally Posted by bi11i
I'm still getting this error no matter which hack to the mod I try. Any definitive solution?

you are missing the who affiliates table it's self it looks like try runing the query to install the table
Quote:

CREATE TABLE `opio_affiliates` (
`affiliate_id` int(10) NOT NULL auto_increment,
`sitename` varchar(50) NOT NULL default '',
`siteurl` varchar(250) NOT NULL default '',
`sitedesc` mediumtext NOT NULL,
`buttonurl` varchar(150) NOT NULL default '',
`type` tinyint(4) NOT NULL default '0',
`email` varchar(250) NOT NULL default '',
`clicksout` int(20) NOT NULL default '0',
`clicksin` int(20) NOT NULL default '0',
`active` tinyint(4) NOT NULL default '0',
`totalrating` bigint(20) NOT NULL default '0',
`totalvotes` bigint(20) NOT NULL default '0',
`approved` tinyint(4) NOT NULL default '0',
PRIMARY KEY (`affiliate_id`),
KEY `sitename` (`sitename`),
KEY `siteurl` (`siteurl`),
KEY `email` (`email`)
) ;

bi11i 09-28-2005 06:14 PM

Quote:

Originally Posted by Hawkbizkit
you are missing the who affiliates table it's self it looks like try runing the query to install the table

Quote:

error number: 1050
error desc: Table 'opio_affiliates' already exists
when running the query...

Hawkbizkit 09-28-2005 06:22 PM

oh dummy me i read your error wrong sorry well i would say try this code

Find: (should be around line 307ish in affiliates.php)
PHP Code:

            $faffiliate=$db->query_read("SELECT affiliate_id,sitename,siteurl,buttonurl,name,id,sitedesc,clicksout,clicksin,totalrating,totalvotes 
                                        FROM " 
TABLE_PREFIX "affiliates AS affiliates LEFT JOIN " TABLE_PREFIX "affiliates_types  AS affiliates_type
                                        ON " 
TABLE_PREFIX "affiliates.type = " TABLE_PREFIX "affiliates_types.id 
                                        WHERE active='1' AND approved='1' 
                                        ORDER BY 
$by $in 
                                        LIMIT 
$limitvalue,$perpage"
                                        
); 

Replace with: on the first line in this code there is a space between tota lrating just remove the 2 spaces and it should work just fine.
PHP Code:

            $faffiliate=$db->query_read("SELECT affiliate_id,sitename,siteurl,buttonurl,name,id,sitedesc,clicksout,clicksin,totalrating,totalvotes 
                                        FROM " 
TABLE_PREFIX "affiliates LEFT JOIN " TABLE_PREFIX "affiliates_types 
                                        ON " 
TABLE_PREFIX "affiliates.type = " TABLE_PREFIX "affiliates_types.id 
                                        WHERE active='1' AND approved='1' 
                                        ORDER BY 
$by $in 
                                        LIMIT 
$limitvalue,$perpage"
                                        
); 

Thats how i have my code setup and it is working just fine and when i tried it your way it doesn't work...

EDIT: Fix down in post #88


All times are GMT. The time now is 02:05 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.01617 seconds
  • Memory Usage 1,780KB
  • 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
  • (6)bbcode_php_printable
  • (8)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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