Simple Machines Community Forum

Customizing SMF => Graphics and Templates => Topic started by: ApplianceJunk on January 11, 2008, 12:05:14 AM

Title: Peel Away?
Post by: ApplianceJunk on January 11, 2008, 12:05:14 AM
How can I create a "Peel Away" on our site?

Examples of a Peel Away can be found here.

http://www.bannersmall.com/peelorder.php (http://www.bannersmall.com/peelorder.php)

http://www.theadminzone.com/forums/ (http://www.theadminzone.com/forums/)
Title: Re: Peel Away?
Post by: Hoochie Coochie Man on January 11, 2008, 07:20:22 AM
Download the attached file (named corner.rar) (http://www.simplemachines.org/community/index.php?topic=204833.msg1377702#msg1377702)

edit corner.js..

and

index.template.php
find:
</head>

Add after:
<script type="text/javascript" src="http://www.site_name.com/forum/Themes/theme_name/corner.js"></script>

Than upload the files to your forum, upload them here
www.site_name.com/forum/Themes/theme_name/
And the images must uploaded to your images root
www.site_name.com/forum/Themes/theme_name/images

Title: Re: Peel Away?
Post by: ApplianceJunk on January 11, 2008, 07:43:06 AM
Ok, I downloaded the file and found corner.js

How do I edit a .js file?
What can I use to open it?

What will I need to edit inside the .js file?

Once I do the edit were in my forums do I upload the file or script to?

Thank you,

Title: Re: Peel Away?
Post by: Hoochie Coochie Man on January 11, 2008, 08:12:35 AM
Right click your corner.js file and open it with WordPad.

At the top, you find these.. Change the red links
Quotevar jcorner987 = new Object();

jcorner987.ad_url = escape('PEEL AWAY LİNK');

jcorner987.small_path = 'http://www.site_name.com/forum/Themes/theme_name/small.swf';
jcorner987.small_image = escape('http://www.site_name.org/forum/Themes/theme_name/images/11.gif');
jcorner987.small_width = '100';
jcorner987.small_height = '100';
jcorner987.small_params = 'ico=' + jcorner987.small_image;

jcorner987.big_path = 'http://www.www.site_name.com/forum/Themes/theme_name/big.swf';
jcorner987.big_image = escape('http://www.site_name.com/forum/Themes/theme_name/images/1.gif');
jcorner987.big_width = '650';
jcorner987.big_height = '650';
jcorner987.big_params = 'big=' + jcorner987.big_image + '&ad_url=' + jcorner987.ad_url;



and yes you upload the files to your forum, upload them here
www.site_name.com/forum/Themes/theme_name/
And the images must uploaded to your images root
www.site_name.com/forum/Themes/theme_name/images
Title: Re: Peel Away?
Post by: ApplianceJunk on January 11, 2008, 08:31:06 AM
ok, I got it open and see were to make the edits.

I must have still been sleeping when I asked all them other dumb question, lol...

This is really going to be great!

Can't wait unit I have time to play around with it tonight.

Thanks!!

Title: Re: Peel Away?
Post by: ApplianceJunk on January 11, 2008, 08:43:23 AM
Do I need to creat some kind of flash image for the .swf ones?

http://www.site_name.com/forum/Themes/theme_name/small.swf

Title: Re: Peel Away?
Post by: ApplianceJunk on January 11, 2008, 08:45:29 AM
I see the small and big swf files are in the attachment I downloaded.
Going to stop posting dumb questions until I have time to try it.

thanks again,
Title: Re: Peel Away?
Post by: Hoochie Coochie Man on January 11, 2008, 08:57:04 AM
You are welcome..
I like to hear when you done.. :)

Don't forget to change 1.gif and 11.gif
They are mine :P
Title: Re: Peel Away?
Post by: falguni1 on January 11, 2008, 09:09:16 AM
nice.
Title: Re: Peel Away?
Post by: ApplianceJunk on January 11, 2008, 06:50:31 PM
OMG, first try and it works!! :D

This is amazing!!!

I never get anything on the first try, lol...

When I click the corner now the link opens in a new window.
If I would want it to open in the same window what would I have to change?

Title: Re: Peel Away?
Post by: ApplianceJunk on January 11, 2008, 07:00:47 PM
Something I questioned when I was doing this.

I know you said this goes after the end head tag.

<script type="text/javascript" src="http://www.site_name.com/forum/Themes/theme_name/corner.js"></script>

But it also before the body tag starts too, right?

So it's not in the head or the body??

Just want to make sure I really understand.

Title: Re: Peel Away?
Post by: Hoochie Coochie Man on January 11, 2008, 07:08:40 PM
Quote from: ApplianceJunk on January 11, 2008, 07:00:47 PM
Something I questioned when I was doing this.

I know you said this goes after the end head tag.

<script type="text/javascript" src="http://www.site_name.com/forum/Themes/theme_name/corner.js"></script>

But it also before the body tag starts too, right?

So it's not in the head or the body??

Just want to make sure I really understand.



If you add it before </head> tag, it won't work on Internet Explorer :)
So, it is right..
script must be there..
<head>
<script>
<body>
Title: Re: Peel Away?
Post by: Hoochie Coochie Man on January 11, 2008, 07:18:32 PM
Quote from: ApplianceJunk on January 11, 2008, 06:50:31 PM
When I click the corner now the link opens in a new window.
If I would want it to open in the same window what would I have to change?


I don't know .js files, they are so complicated but I take a look at this corner.js..
I think it is not about with corner.js.. It is about our forum..
When you click a link in our forums, it opens a new window..
Or maybe Someone who is a .js file master, shows us :)
Title: Re: Peel Away?
Post by: ApplianceJunk on January 11, 2008, 07:28:02 PM
Very cool Hoochie Coochie Man, thanks!  8)

One last burning question and maybe this is something I need to ask my affiliate, linkshare.

This is a example of the type of affiliate text links we have to use.

<a href="http://click.linksynergy.com/fs-bin/click?id=omv7WULuxaw&offerid=93887.501129418&type=10&subid=">Part</a><img alt="icon" width="1" height="1" src="http://ad.linksynergy.com/fs-bin/show?id=omv7WULuxaw&bids=93887.501129418&type=10&subid=">

This is were I need to put the corner peel link.

jcorner987.ad_url = escape('http://www.appliancepartspros.com');

It does not work just to copy and paste the affiliate link as is.

I don't think that I would need the text "Part" in the affiliate link but from what I have read on linkshares affiliate site this part need to be in there to track the clicks.

<img alt="icon" width="1" height="1" src="http://ad.linksynergy.com/fs-bin/show?id=omv7WULuxaw&bids=93887.501129418&type=10&subid=">

Any .js file master know?

Seems I maybe getting off topic now, but was just wondering.

Hoochie Coochie Man is great!! :)









Title: Re: Peel Away?
Post by: Hoochie Coochie Man on January 11, 2008, 07:41:35 PM
@ApplianceJunk, I tried to your affiliate linkshare in a blank html page.
I think, image tag has no effect anyway..

So, Just add your link to corner.js  :-\

jcorner987.ad_url = escape('http://click.linksynergy.com/fs-bin/click?id=omv7WULuxaw&offerid=93887.501129418&type=10&subid=');


Regrets
Title: Re: Peel Away?
Post by: ApplianceJunk on January 19, 2008, 01:17:55 PM
The peel away affiliate link is working great!

I had some trouble at first making the small gif look good.
Seem like the text I would put in the image always looked shifted to one side or the other.

Looking at this part of the code I thought the small gif should be 100x100px

jcorner987.small_width = '100';
jcorner987.small_height = '100';


So I started out in paint shop pro with a 100x100px box and did my thing.
Though a lot of trial and error I found that 75x75px  works perfect for the small image.

I did not change anything in the code. I just made sure the size of gif I was using for the small image was 75x75px.

Hope that helps someone.



Title: Re: Peel Away?
Post by: ApplianceJunk on January 19, 2008, 03:36:12 PM
500x500px for the large image.

Not sure why these sizes are different then what is in the code, but it works for me.
Once again I did not change any of the code, just the sizes of the small and large images.