Tips and Tricks HQ Support Portal › Forums › WP Affiliate Platform › WP Affiliate Tweaks › Tweaking the Affiliate TOS Url to include A Facebox (Similar to Lightbox)
Tagged: Affiliate hack, Affiliate tweak, tweak
- This topic has 5 replies, 3 voices, and was last updated 14 years, 8 months ago by amin007.
-
AuthorPosts
-
March 1, 2010 at 7:45 pm #863gymgangstaMember
I thought I’d share this tweak to everyone.
For those who would like the terms and conditions to popup like a lightbox or preferably “Facebox” here’s how i did it.
Requires jQuery 1.2.1.
What is it?
Facebox is a jQuery-based, Facebook-style lightbox which can display images, divs, or entire remote pages.
It’s simple to use and easy on the eyes. Download the tarball, view the examples, then start enjoying the curves.
Download Facebox v1.2 at
http://famspam.com/facebox/releases/facebox-1.2.tar.gz
Want to live on the edge? The code is kept in GitHub at http://github.com/defunkt/facebox
go to wp-affiliate-platform/affiliates/register.php line 290
echo AFF_YOU_AGREE_TO.' <strong><a href="'.$terms_url.'" rel="facebox">'.AFF_TERMS_AND_COND.'</a></strong>';
change
" target="_blank"
to" rel="facebox"
in header.php above closing head tag add the facebox call (I installed a facebox folder of the files needed in the root of my domain):
<!-- facebox -->
<script src="/facebox/jquery.js" type="text/javascript"></script>
<link href="/facebox/facebox.css" media="screen" rel="stylesheet" type="text/css"/>
<script src="/facebox/facebox.js" type="text/javascript"></script>
<script type="text/javascript">
jQuery(document).ready(function($) {
$('a[rel*=facebox]').facebox({
loading_image : 'loading.gif',
close_image : 'closelabel.gif'
})
})
</script>
<!-- end facebox -->lastly, I created a simple .html file with my terms and conditions in it. named it aff-tos.html and uploaded it to
/wp-content/plugins/wp-affiliate-platform/affiliates/
March 1, 2010 at 10:30 pm #18465amin007ParticipantVery nice… can you please post a link to your affiliate page so I can check it out?
If their licensing do not have any restriction then I might add it to the affiliate plugin.
Thanks for sharing Gymgangsta.
March 1, 2010 at 11:02 pm #18466gymgangstaMemberDemos can be viewed at: [http://famspam.com/facebox/]
I’m not sure of their licensing.
My site is stil under development and for private eys at the moment but if you send me an email I’ll reply and give you access of course.
My facebox on my site looks just like the demos…. at [http://famspam.com/facebox/]
March 2, 2010 at 12:01 am #18467amin007ParticipantNo problem
For anyone trying to do this… remember the plugin already has the JQuery library inside the “js” directory (wp-affiliate-platform/affiliates/js)
You can also get the JQuery library that comes with WordPress.
March 29, 2010 at 10:27 pm #18468DFranzwaMemberRuhul, I’d like to try implementing facebox on WP eStore in place of Lightbox. I want to be able to click on the thumbnail and open up a “more details” box.
Have you got a rough plan of how I would attack it? Doesn’t have to be a detailed, step-by-bloody-step dissertation , just a rough idea.
Thanks for all your hard work
Dave
March 30, 2010 at 7:23 am #18469amin007ParticipantOnce you add all the necessary javascript files to the header it should just be a matter of specifying the “rel” attribute of a link to “facebox”… similar to the following:
<a href="#info" rel="facebox">text</a>
So I would assume that you just have to find the code for the thumbnails (in the “eStore_misc_functions.php” file) then specify rel=”facebox” instead of rel=”lightbox”
-
AuthorPosts
- You must be logged in to reply to this topic.