PDA

View Full Version : Affiliates Module [Affiliate hack needed]


Pages : [1] 2

BoNfiRe
06-22-2004, 08:32 AM
this will add a scrolling/fading block to your vBa CMPS.

First you need this hack (http://www.vbulletin.org/forum/showthread.php?t=63044)

All instructions included njoy

Demo here (http://www.tlgn.com/?)

Socket
06-22-2004, 09:39 AM
Nice hack Bonfire :)

Got it installed but can't see any banners in the block :(

Prob something I'm doing wrong but thx all the same

Socket

Our Sponsors
 

BoNfiRe
06-22-2004, 09:58 AM
do u have any affiliates in there ? I will check the file quick but I made sure it was ok first but I may have screwed something up knowing me lol.

BoNfiRe
06-22-2004, 10:00 AM
ok it's the template affiliatesbit rename that affiliatebits :o my bad just updating the zip now

Our Sponsors
 

cosmictej
06-22-2004, 10:11 AM
im having same problem cant see anything, i tried changin the name, but i still cant see anythin thnx 4 the hack and i do have soem affliates

BoNfiRe
06-22-2004, 10:29 AM
Just checked it over again, from fresh on my site, and it worked fine ummm checked the code that seems fine too. Please check the template names. Anyone else having problems ?

cosmictej
06-22-2004, 10:35 AM
it might be the readme I have done everything it said

BoNfiRe
06-22-2004, 10:38 AM
oops nvm ummmmm

BoNfiRe
06-22-2004, 10:43 AM
quick question what isn't showing the block, or the contents ?

cosmictej
06-22-2004, 10:43 AM
retried it, same problems mate, the block aint showing, there is no sign of it

BoNfiRe
06-22-2004, 10:44 AM
can u make me a temp admin so I can check things out ? pm me if so

BoNfiRe
06-22-2004, 10:56 AM
just made a small error :( well edit the module, and where you have templates to include change adv_portal_affiliate to adv_portal_affiliates ( shouldn't make it not show though :confused: )

cosmictej
06-22-2004, 10:59 AM
did u get my pm?

BoNfiRe
06-22-2004, 11:17 AM
yes sry I found the problem where it says Or template to include u added affiliateblock.php but the template is in the file so u leave that blank. BUT when I did get it to work I had a mysql error so I dissabled it. here is another affiliateblock.php upload it over the one you have and enable it again. Also what version of the Affiliates hack are you using ?

cosmictej
06-22-2004, 11:21 AM
still not working, umm i only added it last week so it must be the latest version, but im not sure hw can i check?

BoNfiRe
06-22-2004, 11:30 AM
ok well the mysql error I got was mysql error: Unknown column 'clicksout' in 'field list' so I downloaded the latest version, and checked the queries on the install file this is what I found ......Run this query:
DROP TABLE IF EXISTS affiliates;
CREATE TABLE affiliates (
affiliate_id int(10) NOT NULL auto_increment,
sitename varchar(50) NOT NULL,
siteurl varchar(250) NOT NULL,
sitedesc mediumtext NOT NULL,
buttonurl varchar(150) NOT NULL,
type tinyint(4) NOT NULL,
email varchar(250) NOT NULL,
clicksout int(20) NOT NULL,
clicksin int(20) NOT NULL,
active tinyint(4) NOT NULL,
totalrating bigint(20) NOT NULL,
totalvotes bigint(20) NOT NULL,
approved tinyint(4) NOT NULL,
PRIMARY KEY (affiliate_id),
KEY sitename (sitename),
KEY siteurl (siteurl),
KEY email (email)
);
and the queries are ther so i'm baffled it 'should' work but these are NOT on your database unless i'm missing something.

I would like to know if anyone else is having this problem

cosmictej
06-22-2004, 11:36 AM
have the queries been runned?

BoNfiRe
06-22-2004, 11:41 AM
well I asume so you have affiliates installed but I don't know if they are there unless I can access your db or if the tables are something different

I just took a look @ your admin/affiliates/general settings and noticed that they are totally different :D I think you should check your version ;)

cosmictej
06-22-2004, 11:45 AM
check ur pm

Socket
06-22-2004, 11:51 AM
Hiya Bonfire

Tried you fixed and get this error now which seems to match yours... :(

I'm using the latest version of the affiliate hack ..unless he's updated it since Saturday...

Invalid SQL: SELECT sitename,siteurl,affiliate_id,clicksin,buttonurl FROM affiliates WHERE active='1' ORDER BY clicks DESC LIMIT 5
mysql error: Unknown column 'clicks' in 'order clause'

mysql error number: 1054

Date: Tuesday 22nd of June 2004 04:23:22 PM
Script: http://www.
Referer: http://www.
Username: xxxxx
IP Address: xxxxx

BoNfiRe
06-22-2004, 12:07 PM
could u both please try this, and tell me how it goes
just replace it with the one that is in the modules directory

cosmictej
06-22-2004, 12:10 PM
works thanks, but 1 problem it displays the banners very small and doesnt display the whole banner

BoNfiRe
06-22-2004, 12:12 PM
I just looked this is because it is meant to display an 88x31 banner and the ones you are using are much larger also if the above script worked then you are using an outdated version of the hack ;)

cosmictej
06-22-2004, 12:16 PM
can the banner size be edited? so it can display bigger ones? Also i dont think i am using an outdated verison, as it was only installed on saturday

BoNfiRe
06-22-2004, 12:21 PM
ok i'm not sure if it's outdated, or not BUT the latest version @ vbulletin.org has different queries to what you have in your database, and I assume that is the latest version, as for the image size replace your adv_portal_affiliates template with this one<!-- Affiliates -->

<SCRIPT src="fading.js"> </SCRIPT>
<table align="center" border="0" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" class="tborder" width="100%">
<thead>
<tr>
<td class="tcat"><span class="smallfont"><strong>$vba_options[portal_blockbullet] </strong></span><strong>Affiliates</strong></td>
</tr>
</thead>
<tr>
<td class="$getbgrow" align="center"><div class="smallfont"><MARQUEE behavior="scroll" loop="-1" direction="up" scrollamount="2" hspace="0" vspace="0" scrolldelay="90" onmouseover='this.stop()' onmouseout='this.start()'>$affiliatebits</MARQUEE>
</td>
</tr>
<tr>
<td class="$getbgrow" align="center" width="100%">
<span class="smallfont"><a href="$vboptions[bburl]/affiliate.php?do=apply">Add Your Site</a></span>
</td>
</tr>
</table>
<br />

<!-- End Affiliates -->

cosmictej
06-22-2004, 12:25 PM
gr8 its all perfect nw m8, cant wait to see anyother hacks you come up with maybe, the others i requested please?

Socket
06-22-2004, 01:21 PM
Hiya Bonfire

I've sent you a pm

Cheers

BoNfiRe
06-23-2004, 08:58 PM
Did ya get it working Socket ?

Socket
06-24-2004, 02:17 AM
Nah Bonfire but I'm having another look once I've woken up :D

cosmictej
06-24-2004, 02:33 AM
bonfire did it for me, maybe he could for you too

mholtum
06-24-2004, 03:08 AM
he did it for me too

Socket
06-24-2004, 06:18 AM
hehe yeah he's ready had a look at it for me :)

It *could* be a problem with my install of CMPS but everything else runs fine until I add this hack then I get an sql error....so its all a little weird...

Socket

BoNfiRe
06-24-2004, 08:37 AM
hehe yeah he's ready had a look at it for me :)

It *could* be a problem with my install of CMPS but everything else runs fine until I add this hack then I get an sql error....so its all a little weird...

Socket
The sql error I was getting when I had a look was because vBa CMPS wan't set up I sent you a pm when you get your portal running to let me know, and I will take a look again.

Alternativly you could ( if you have no affiliates, or if you don't mind adding them again. ) run these queries then redo the hack using the files in the zip.
~~~~~~~~~~~~~~~~~~~~~~~~~~
Begin Queries
~~~~~~~~~~~~~~~~~~~~~~~~~~
-----------------------------------
Run this query:
DROP TABLE IF EXISTS affiliates;
CREATE TABLE affiliates (
affiliate_id int(10) NOT NULL auto_increment,
sitename varchar(50) NOT NULL,
siteurl varchar(250) NOT NULL,
sitedesc mediumtext NOT NULL,
buttonurl varchar(150) NOT NULL,
type tinyint(4) NOT NULL,
email varchar(250) NOT NULL,
clicksout int(20) NOT NULL,
clicksin int(20) NOT NULL,
active tinyint(4) NOT NULL,
totalrating bigint(20) NOT NULL,
totalvotes bigint(20) NOT NULL,
approved tinyint(4) NOT NULL,
PRIMARY KEY (affiliate_id),
KEY sitename (sitename),
KEY siteurl (siteurl),
KEY email (email)
);
-----------------------------------
Run this query:
DROP TABLE IF EXISTS affiliates_records;
CREATE TABLE affiliates_records (
record_id int(10) NOT NULL auto_increment,
ip varchar(15) NOT NULL,
userid int(10) NOT NULL,
record_date int(10) unsigned NOT NULL,
record_type varchar(9) NOT NULL,
PRIMARY KEY (record_id)
);
-----------------------------------
Run this query:
DROP TABLE IF EXISTS affiliates_settings;
CREATE TABLE affiliates_settings (
active tinyint(4) NOT NULL,
button tinyint(4) NOT NULL,
perpage int(3) NOT NULL,
top tinyint(4) NOT NULL,
top_limit int(3) NOT NULL,
vbcode tinyint(4) NOT NULL,
bbsmilies tinyint(4) NOT NULL,
bbimage tinyint(4) NOT NULL,
moment tinyint(4) NOT NULL,
most_hitsout tinyint(4) NOT NULL,
most_hitsin tinyint(4) NOT NULL,
most_votes tinyint(4) NOT NULL,
imagelink varchar(255) NOT NULL,
senderemail varchar(255) NOT NULL,
module_position tinyint(4) NOT NULL,
cantview varchar(50) NOT NULL,
cantapply varchar(50) NOT NULL,
cantrate varchar(50) NOT NULL,
disclaimer tinyint(4) NOT NULL,
validate tinyint(4) NOT NULL,
reporting tinyint(4) NOT NULL,
reportemail varchar(255) NOT NULL,
cantreport varchar(50) NOT NULL,
delay int(3) NOT NULL
);
-----------------------------------
Run this query:
INSERT INTO affiliates_settings VALUES('', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '');
-----------------------------------
Run this query:
DROP TABLE IF EXISTS affiliates_types;
CREATE TABLE affiliates_types (
id int(10) NOT NULL auto_increment,
name varchar(255) NOT NULL,
PRIMARY KEY (id),
KEY name (name)
);
-----------------------------------
Run this query:
INSERT INTO phrase (languageid,varname,text,phrasetypeid) VALUES ('-1', 'saved_affiliate_x_successfully', '<i>{1}\'s</i> has been updates!', '9000');
INSERT INTO phrase (languageid,varname,text,phrasetypeid) VALUES ('-1', 'deleted_affiliate_x_successfully', '<i>{1}</i> has been deleted!', '9000');
INSERT INTO phrase (languageid,varname,text,phrasetypeid) VALUES ('-1', 'deleted_affiliate_x_unsuccessfully', '<i>{1}</i> was not deleted due to your choice selection.', '9000');
INSERT INTO phrase (languageid,varname,text,phrasetypeid) VALUES ('-1', 'inserted_affiliate_x_successfully', '<i>{1}</i> has been successfully added to the data base.', '9000');
INSERT INTO phrase (languageid,varname,text,phrasetypeid) VALUES ('-1', 'inserted_affiliate_x_unsuccessfully', 'This affiliates could not be added to the database because you either did not enter an affiliate name or an affiliate url or an affiliate email.', '9000');
INSERT INTO phrase (languageid,varname,text,phrasetypeid) VALUES ('-1', 'saved_affiliate_settings_successfully', 'Settings for Affiliates Addon Updated.', '9000');
INSERT INTO phrase (languageid,varname,text,phrasetypeid) VALUES ('-1', 'updated_affiliate_type_successfully', '<i>{1}</i> was updated successfully.', '9000');
INSERT INTO phrase (languageid,varname,text,phrasetypeid) VALUES ('-1', 'updated_affiliate_type_unsuccessfully', 'The type was <u>not</u> updated because the types name was left blank.', '9000');
INSERT INTO phrase (languageid,varname,text,phrasetypeid) VALUES ('-1', 'saved_affiliate_type_unsuccessfully', 'This type/category was not added to the database due to the name of this type/category not being filled in.', '9000');
INSERT INTO phrase (languageid,varname,text,phrasetypeid) VALUES ('-1', 'saved_affiliate_type_successfully', '<i>{1}</i> was added to the database successfully.', '9000');
INSERT INTO phrase (languageid,varname,text,phrasetypeid) VALUES ('0', 'approved_affiliate_x_successfully', '<i>{1}</i> has been approved successfully and an email has been dispatched to its admin\'s email.', '9000');
-----------------------------------
~~~~~~~~~~~~~~~~~~~~~~~~~~
End Queries
~~~~~~~~~~~~~~~~~~~~~~~~~~

Socket
06-24-2004, 08:50 AM
Hi Bonfire

but that the strange thing it was running only died when I included the module
...as I said in the last PM ....when I add the module I get the error...when I remove it from the page CMPS works again...lol :confused:

Anyway if you look now its running...that temp login is still there if you wanna see what happens when u enable the module then feel free...its only the forums that are live at the moment so you not gonna effect anything.

I'll try the other suggestion once you have had a look :)

Thanks for all you help :D

Socket

BoNfiRe
06-24-2004, 12:59 PM
OK I just took a look, and umm i'm lost you have 26 enabled modules in your admincp yet I can only see 10 on your front page, and they are visable to all usergroups :confused: I checked the affiliates block, and all seemed fine with what I could see yet there was no module showing similar to the other 15 blocks you have enabled but are not showing up. :eek: lol

Socket
06-24-2004, 01:56 PM
lol....yeah I've been messing with modules......tell ya what I'll tidy everything up and have a mess about myself if its anything like my other mistake today then is gonna be something stupid... ;)

Again thanks for looking :D

Cheers

Socket

BoNfiRe
06-25-2004, 05:21 AM
lmao messing u say well I guess thats what ya could call it

bfoot045
06-29-2004, 11:49 AM
How would I edit the affilatebits template so the block would display text instead of a button, thanx.

BoNfiRe
06-29-2004, 11:56 AM
it will only work with button links from the affiliates hack not text links sorry

pbjunkie
07-14-2004, 10:06 AM
Everything seems to be working great with the exception of when you click on an affiliate it indicates "an ID or URL was not defined". It then redirects you to the affiliates page from which you can select the affiliate and go to their site.

Any suggestions?

Thanks,
Rich

03GTFL
08-02-2004, 10:26 AM
I installed this hack, when i click on "Affliates" from the nav bar it just goes to blank page.

????

KW802
08-02-2004, 10:49 AM
Am I cracking up or is the demo link not running CMPS? :confused:

mholtum
08-02-2004, 11:53 AM
Am I cracking up or is the demo link not running CMPS? :confused:
He was running CMPS when he posted the hack.

KW802
08-02-2004, 11:58 AM
He was running CMPS when he posted the hack.
Interesting. I'd be curious why he switched. Oh, well.... :)

03GTFL
08-02-2004, 12:47 PM
I got this hack installed but how come the Affliates Block does'nt show up on my main CMPS page?

mholtum
08-02-2004, 12:48 PM
Is it active?

03GTFL
08-02-2004, 12:53 PM
Nevermind...fixed


Forget to fill in the code for the adv_portal_affliates....

DOH!!

KW802
08-02-2004, 01:01 PM
Yeah i went into VbA Cmps/modules and it says its active.


Wait!! i looked under the module and where it says Templates Used: theres nothing in there

whats supposed to be in there?
Did you create the two templates needed? Should be "affliatebits" and "adv_portal_affiliates" referenced.

meth
09-02-2004, 10:07 AM
Everything seems to be working great with the exception of when you click on an affiliate it indicates "an ID or URL was not defined". It then redirects you to the affiliates page from which you can select the affiliate and go to their site.

Any suggestions?

Thanks,
Rich


I had the same problem, and I changed in the template affiliatebits
/affiliate.php?do=redirect&u=$affiliate[siteurl]&id=$affiliate[affiliate_id]

to

/affiliate.php?do=redirect&u=$affiliate[siteurl]&a=$affiliate[affiliate_id]

SiCkerOne666
09-16-2004, 11:14 AM
When I Have It Active It Always Gives Me This Error:
Database error in vBulletin 3.0.1:

Invalid SQL: SELECT sitename,siteurl,affiliate_id,clicks,buttonurl FROM affiliates WHERE active='1' ORDER BY clicks DESC LIMIT 5
mysql error: Unknown column 'clicks' in 'field list'

mysql error number: 1054

Date: Wednesday 15th of September 2004 11:37:56 AM
Script: http://xxxxxxxxxxxxxxxxxxxxx/portal.php
Referer:
Username: xxxxxxxxxxxx
IP Address: xx.xxx.xxx.x
How Do I Fix This Error?
Thank You