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)
-   -   vBaffiliates5 - Allow Users to Add & Edit their Own Affiliate Links!!! (https://vborg.vbsupport.ru/showthread.php?t=47008)

Chris M 12-25-2002 10:00 PM

vBaffiliates5 - Allow Users to Add & Edit their Own Affiliate Links!!!
 
Please do the following before attempting to install:

1.) Backup your Files before doing anything
2.) Be aware that although I have tested this myself, there may still be problems...If you do not backup your files, I cannot condone your install of this hack...
3.) If you want to Backup your Database, You can - There shouldn't be any need to...

The file you should have is:

vBaffiliates5.zip

Install Info:
Hack Version: 5.0 [Final]
Files to edit: 2
Templates to add:13 (New Install) / 0 (Upgrade from v4)
Templates to edit: As Many as needed (New Install) / Minimum of 1 (Upgrade)
Queries to Run: 6 (New Install) / 0 (Upgrade from v4)
Time to install: Approx 8-10 Minutes
Included files: There are 2 install files included - One is for upgrading from v4, and the other is for a new install - Do not mix them up;)

Credits
Requested by - DarkDraco07 here & Sinecure

Support - I am offering Support in this Thread ONLY...I unfortunately cannot be here during the coming weeks (Mon-Fri), so therefore you will have to rely on others for assitance, should it be urgent...If you do require assitance, please - Only reply in this thread

Hack info

What does it do? - Basically, you can allow registered board users to add Affiliation Links to the database, which have to be moderated by you...You can then display a Random Banner generated totally at random wherever you like, and it will be linked to the site of the submitter...Also it stores the Image Height and Width in the database, and you can limit the size of the Banners they can upload...If they change the image (located on their server) without editing their Banner, then it will not show up their Banner, Link, Hit Count, Edit Link or Site Name...They must then ask an Admin to update the Banner...Now there is also a List of the Banners on the site, and their Moderated Status...You can also choose how many Banners to show in the list;)

Testing

You can see the BETA Release here...

Changes since BETA
  • Changed the way that Links are shown
  • Added another Template to add

Changes since 1.0[Final]
  • Added missing re-direct template
  • Added another Template to add
  • Added image size restriction
  • Changed a template
  • Added an intelligent Image check to see if they changed the size of the image in an attempt to cheat the system

Changes since 2.0[Final]
  • Corrected forum/global.php mishap
  • Added a Hit Counter
  • Added a "User Edit" Screen
  • Changed a template
  • Update the Intelligent Image check to see if they changed the size of the image in an attempt to cheat the system

Changes since 3.0[Final]
  • Updated forum/global.php to show a Admin CP Options controlled number of Banners
  • Added a Banner List page, showing all the Banners and their Moderated Status
  • Added a Banner List page Banner Limit, to show only the number of Banners Randomnly that you want
  • Update the Intelligent Image check to see if they changed the size of the image in an attempt to cheat the system and put it in a while loop

Changes since 4.0[Final]
  • Updated forum/vbaffiliates.php to work with register_globals off, and modified code structure slightly
  • Updated admin/affiladmin.php to work with register_globals off, and modified code structure slightly

Additional Info/Updates

2.0[Final] - 2.0[Final] has just been released...This includes an Image Size restriction, and a clever system for those who think they can get around the system - It stores the image's height and width, and uses HTML to code the width and height of the image - If they change it, it will show a red "no image found" image instead...

3.0[Final] - 3.0[Final] has just been released...This includes an update to the Image Size restriction, and an update for the clever system for those who think they can get around the system - It stores the image's height and width, and uses HTML to code the width and height of the image - If they change it, it will not show their Banner, Link, Site Name, Edit Link or Hit Count...

4.0[Final] - 4.0[Final] has just been released...This includes an update to the Image Size restriction, and an update for the clever system for those who think they can get around the system - It stores the image's height and width, and uses HTML to code the width and height of the image - If they change it, it will not show their Banner, Link, Site Name, Edit Link or Hit Count...Now there is also a List of the Banners on the site, and their Moderated Status...You can also choose how many Banners to show in the list;)

5.0[Final] - 5.0[Final] has just been released...This release includes a new set of .php files which have been re-coded to work with register_globals off, and also the coding structure has been changed...

The next release is a List of "User's Banners" page, and a then a Timed function to set the Moderated status to 0 (No) when the time period expires...

Screenshots/Live Demo

There are NEW screenshots provided in the next post, in vBaffiliates5-screenshots.zip:)

Enjoy!:)

Satan

Chris M 12-26-2002 08:03 PM

Screenshots of vBaffiliates5:)

Satan

assassingod 12-26-2002 08:07 PM

Mega coolness:D
Finally the final release:D

Great hack hellsatan:D Will install on my board very soon:)

Chris M 12-26-2002 08:08 PM

Heh thanks Ag:)

I am gonna install this on DarkBlazes soon:)

Satan

Mystis 12-26-2002 09:32 PM

I'm working on something semi-similar to this, this looks absolutely fantastic though :) Great job!

DarkDraco07 12-26-2002 10:13 PM

would be nice to add a option that allows unregistered members to affiliate. cuz we are a gaming clan and we get allies and stuff. and adding a email field would hurt >.>

Mystic Gohan 12-27-2002 01:00 AM

this seems very kool. I like this concept I will most definatly install on my forum *clicks Install*

zajako 12-27-2002 01:49 AM

by moderate, do you mean admin approve it before it shows up?

Smoothie 12-27-2002 01:53 AM

anyone have a live screenshot of this installed?

DarkDraco07 12-27-2002 03:25 AM

<a href="http://www.darknemesis.com/myvbindex.php" target="_blank">www.darknemesis.com/myvbindex.php</a> is a working version

DarkDraco07 12-27-2002 03:47 AM

also, if anyone wants to do what i did heres how to do it:

if you want unregistered people to be able to affiliate without registering do this:

open vbaffiliates.php and find:
--------------------------------------
if ($bbuserinfo['usergroupid']=="1") {
show_nopermission();
}
--------------------------------------

erase it and upload :p

Smoothie 12-27-2002 04:38 AM

Quote:

Originally posted by DarkDraco07
www.darknemesis.com/myvbindex.php is a working version
Cool. Thanks. :classic:

Smoothie 12-27-2002 04:40 AM

Another question. How are you controlling the size of the banner?

DarkDraco07 12-27-2002 05:08 AM

um, the banners are originally 88x31. i dont know if hellsatan made it so its 88x31 only. and for the topsites i just edited the image height and width in the html coding

assassingod 12-27-2002 06:30 AM

Quote:

Originally posted by zajako
by moderate, do you mean admin approve it before it shows up?
Yes, thats correct

jjj0923 12-27-2002 10:51 AM

this hack functions similarly to:

https://vborg.vbsupport.ru/showthrea...threadid=44551

colicab-d 12-27-2002 12:13 PM

is there a way to show the links on a page in rows etc?

Also could it be possible to categorize them?

Chris M 12-27-2002 12:39 PM

@jj0923 - I suppose you could look at it that way...But this shows the Banners, and was coded differently to Arunan's hack;)

@colicab-d - I'm not sure what you mean by rows:s It would be possible to Categorise them, but I don't see the need when you only get to see a Randomnly chosen one...

If, by rows, you mean more than one Banner, then just change the Query in global.php, and change:

[sql]LIMIT 1[/sql]
to the number of banners you want to show, i.e.
[sql]LIMIT 3[/sql]

:)

@Smoothie - Controlling the Banner is proving to be difficult - Seeing as the url is stored, not the image, it is hard to find a way to limit the size of the banner...

Satan

NTLDR 12-27-2002 01:11 PM

Quote:

Originally posted by hellsatan
@Smoothie - Controlling the Banner is proving to be difficult - Seeing as the url is stored, not the image, it is hard to find a way to limit the size of the banner..
I'm helping Chris come up with some solutions so that users can't cheat the system :p

Chris M 12-27-2002 02:15 PM

Yes:)

Thanks NTLDR:)

We have worked out a way to do it...They still can cheat the system (:(), but their banner will look screwed up if they do:p

Releasing 2.0 in a few minutes!:)

Satan

NTLDR 12-27-2002 02:29 PM

I've an idea to rectify that ;)

Smoothie 12-27-2002 03:01 PM

Does the current system link the banner? I'd rather upload the banner to my own server, and have it displayed from there.

Smoothie 12-27-2002 03:16 PM

Just looked at the screen shots, very nice.

Chris M 12-27-2002 03:41 PM

Yes it does link the banner...I am working on the Hits version (v3) next, and then the "timed banner" addon for you:)

Satan

alkatraz 12-27-2002 05:24 PM

Cool hack!

Smoothie 12-27-2002 05:31 PM

Quote:

Originally posted by hellsatan
Yes it does link the banner...I am working on the Hits version (v3) next, and then the "timed banner" addon for you:)

Satan

I was wondering, would it be possible to allow an upload of the banner, instead of linking?

Something like this hack, which allows banner uploads. I really don't want someones banner slowing our site down.

Check it out:
https://vborg.vbsupport.ru/showthrea...hlight=vblinks

Chris M 12-27-2002 05:31 PM

Thanks alkatraz - v3 is very near to release:)

I just need to test the major new feature, which is "User Editability";)

Satan

Chris M 12-27-2002 05:34 PM

@Smoothie - It is possible...I just need to learn how to do a good Upload script that complies with the limitations set by each board...

Satan

Dean C 12-27-2002 07:39 PM

This looks nice satan... :p

Mystis 12-27-2002 09:00 PM

Quote:

Originally posted by hellsatan
@Smoothie - Controlling the Banner is proving to be difficult - Seeing as the url is stored, not the image, it is hard to find a way to limit the size of the banner...

Satan

That would be a simple one to get around.

PHP Code:

/* Add to functions.php */
function checkimagesize($imageurl){
    global 
$maxwidth$maxheight;
    
$size getimagesize($imageurl);
    if(
$size[0]>=$maxwidth&&$size[1]>=$maxheight){
        return 
true;
    }else{
        return 
false;
    }
}

/* Usage */
if(checkimagesize($image)){
    
//display
}else{
    
//skip this ad and get another one


Code's untested, but it should work.

Chris M 12-27-2002 09:16 PM

It's ok Mystis...

v2 has the Size limiter in;):)

I used code a little bit different to that;)

@Mist - Thanks:p

Satan

Chris M 12-27-2002 10:40 PM

v3

v3 will be released tomorrow:)

v3 includes:
  • User edit Link
  • Hit counter
  • v2 bug fixes

:)

Satan

kevo 12-28-2002 01:17 AM

Good cant wait.. V2.. When someone tries to add their link. It always says that the banner is too big.. How do i fix that.

DarkDraco07 12-28-2002 03:22 AM

how do u make it show more than 1 banner

Chris M 12-28-2002 09:46 AM

@kevo - I myself had this problem...In the vBulletin Options, be sure to read what Value you are setting for Height and Width restrictions...

If you do not want restrictions, just set them both to something like 900:)

@DarkDraco - This is untested, but:

Open forum/global.php
Find:
Code:

$affillink = $DB_site->query_first("SELECT linkid,name,link,b_link,height,width FROM vbaffiliates WHERE moderated='1' ORDER BY RAND() LIMIT 1");
Replace with:
Code:

$affillink = $DB_site->query_first("SELECT linkid,name,link,b_link,height,width FROM vbaffiliates WHERE moderated='1' ORDER BY RAND() LIMIT X");
Change the X to a value you want to show...I wouldn't recommend more than 3...

Satan

colicab-d 12-28-2002 10:30 AM

i would like to see it be able to display all the links on a page in rows and categorized :D thats what i mean , that would be so cool :D

Chris M 12-28-2002 12:34 PM

Hmm...Like a List of Affiliates? Hmmm...Maybe v4 or v5;)

Satan

Chris M 12-28-2002 02:08 PM

v3 released

v3 is released:) Check the First Post for Installation file, and 2nd post for Screenshots:)

Satan

DrkFusion 12-28-2002 08:24 PM

COol Great job Satan!

Chris M 12-28-2002 10:07 PM

Heh thanks Arunan:)

Satan


All times are GMT. The time now is 10:46 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.01422 seconds
  • Memory Usage 1,832KB
  • 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
  • (2)bbcode_code_printable
  • (1)bbcode_php_printable
  • (5)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