Login  |  Register
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media


Welcome, Guest. Please login or register.
Did you miss your activation email?

May 28, 2020, 11:15:22 PM

Login with username, password and session length
  • Total Posts: 190002
  • Total Topics: 20832
  • Online Today: 128
  • Online Ever: 917
  • (January 21, 2020, 09:02:26 AM)
Users Online
Users: 0
Guests: 58
Total: 58

Author Topic: Affiliate snippet  (Read 3576 times)

0 Members and 1 Guest are viewing this topic.


  • Guest
Affiliate snippet
« on: April 26, 2009, 08:41:33 AM »
Hi im trying to find a code that produces this

Its an affiliate button,with the picture hyperlink code underneath,so members can copy and paste the code for there sites.Ive been looking but no luck as im probably using the incorrect search keywords..

thanks for any help.


  • Guest
Re: Affiliate snippet
« Reply #1 on: April 26, 2009, 08:55:28 AM »
Use a php block.

Code: [Select]
echo '<img src="url/to/image.jpg">
code that you want people to be able to copy
</' . 'textarea>

The reason that you need to use a php block is that there is an issue with the closing textarea tag. If you just put in a plain textarea, you'll have problems with your block.


  • Guest
Re: Affiliate snippet
« Reply #2 on: April 26, 2009, 09:14:11 AM »
Thank you, thats nearly perfect.
Is there a way to have the scroll bar to the side of the block like on the shout box,instead of underneath..hope you follow me..

heres a link so you can see.


many thanks.


  • Guest
Re: Affiliate snippet
« Reply #3 on: April 26, 2009, 09:24:38 AM »
I really don't know. Formatting stuff isn't my strong suit.

You can try adding "wordwrap" to your textarea tag and playing around with size as far as rows and columns. All that would be basic html formatting and would be a matter of trial and error to see what looks good.

Offline Lesmond

  • Do what you have to!
  • Administrator
  • *
  • Posts: 3129
    • Tiny Pix... Free Image Hosting and Sharing.
Re: Affiliate snippet
« Reply #4 on: April 26, 2009, 01:02:22 PM »
I have used this javascript in the past, and works well for me

Code: [Select]
<script language="JavaScript">

function highlight(field) {


<center><form name="myForm">
                        <img border="0" src="your-img.gif"></p>
                        <textarea name="myField" rows="7" cols="19"><center><!--Begin Code -->
<a title="your site name here" target="_blank" href="http://www.yoursite.com/"><img border="0" src="http://www.yoursite.com/your-img.jpg" width="150" height="35"></a></center>
                <input type="button" value="Select All" onClick="highlight(this.form.myField)">
paste into a scriptblock change the values to suit your site
Please don't PM me for support without an invitation.