PDA

View Full Version : Adding HTML


Bellinis
03-06-2008, 10:35 AM
I'm trying to add some HTML to the content of a GAL-link, but it doesn't seem to work.

Here's the (affiliate) code I need to add:

<script type="text/javascript">
var uri = 'http://impnl.tradedoubler.com/imp?type(img)g(16955006)a(1039899)' + new String (Math.random()).substring (2, 11);
document.write('<a href="http://clk.tradedoubler.com/click?p=60878&a=1039899&g=16955006" target="_BLANK"><img src="'+uri+'" border=0></a>');
</script>

an alternative would be:
<script type="text/javascript">
var uri = 'http://impnl.tradedoubler.com/imp?type(js)g(16955006)a(1039899)' + new String (Math.random()).substring (2, 11);
document.write('<sc'+'ript type="text/javascript" src="'+uri+'" charset="ISO-8859-1"></sc'+'ript>');
</script>

In my permissions I have 'allow HTML' for admins...

Please advice :)

Morgan
03-07-2008, 04:48 AM
Upgrade to the latest version, and then go to the ACP -> GAL -> Permissions and for each usergroup and for each dictionary, set the permissions are you prefer, and then save, even if it looks correct.

Bellinis
03-07-2008, 10:03 AM
Hmmm, I don't get it. I uninstalled my entire GAL just to make sure my old version is not interfering. Deleted all tables from the database. Downloaded and installed the latest version. Set the permissions to allow HTML for admins. Created a new new GAL, attached an image, added a description in the content and below that the above script. Still the script shows as plain text in the popup. Where do I go wrong?

Morgan
03-07-2008, 02:49 PM
Grab the GAL package again, reFTP the gal_admin.php file into the /forum/admincp directory, and then go edit the newly created GAL and click the save button.

Bellinis
03-07-2008, 03:09 PM
Thanks Morgan... :)

Ok, I re-uploaded the file. Re-created the GAL. Rebuild Post Cache and checked my site. Now only my description shows and nothing below that. (the script should show a linked image). I checked it with different affiliate links and none of them work. Also the page now loads (http://www.tsjechie.net/board/f15/weer-heerlijke-daagjes-gehad-in-praag-18316.html)with a syntax error (IE7). Running vb 3.6.4

Morgan
03-07-2008, 04:31 PM
Enter the JavaScript as one line:

<script type="text/javascript">var uri = 'http://impnl.tradedoubler.com/imp?type(img)g(16955006)a(1039899)' + new String (Math.random()).substring (2, 11); document.write('<a href="http://clk.tradedoubler.com/click?p=60878&a=1039899&g=16955006" target="_BLANK"><img src="'+uri+'" border=0></a>');</script>

It'll soft word-wrap in the box, and that's okay, but if you put in hard returns, they turn into <br /> tags, and that affects the JavaScript.

Bellinis
03-10-2008, 10:57 AM
Ok, it's working great now. Thanks a bunch Morgan! :)

f4vn
03-10-2008, 09:18 PM
Enter the JavaScript as one line:

<script type="text/javascript">var uri = 'http://impnl.tradedoubler.com/imp?type(img)g(16955006)a(1039899)' + new String (Math.random()).substring (2, 11); document.write('<a href="http://clk.tradedoubler.com/click?p=60878&a=1039899&g=16955006" target="_BLANK"><img src="'+uri+'" border=0></a>');</script>

It'll soft word-wrap in the box, and that's okay, but if you put in hard returns, they turn into <br /> tags, and that affects the JavaScript.

Can you tell me where I can add this code in the mod ?

Morgan
03-12-2008, 11:37 AM
That code is Bellinis' ad code; you wouldn't want to use it. To enter your own ad code, use the content box when adding/editing keywords via the ACP.

f4vn
03-17-2008, 11:42 PM
I tried but.... Please see the attached images.

Morgan
03-18-2008, 06:41 PM
Make sure you are using the latest version, do as in post two (http://www.thevbgeek.com/showpost.php?p=23477&postcount=2), giving your usergroup 'Can enter HTML' permission, enter the HTML in the Content box for the keyword, making sure any hard return is an appropriate place for a <br /> tag, and then try running the cache options in the maintenance section.

f4vn
03-20-2008, 12:25 AM
I set 'Can enter HTML' permissions for admin, add code HTML and rebuild Post Cache but it is not changed.
You can see it (http://www.free4vn.org/questions-suggestions/mot-vai-y-ve-download-31586.html#post113635)

Morgan
03-20-2008, 04:43 PM
Sounds like you might not have the latest version of the gal_admin.php file on your server. Grab the GAL package again and FTP the gal_admin.php file, overwriting the one of the server, then do as in post two (http://www.thevbgeek.com/showpost.php?p=23477&postcount=2) and afterwards go to the keyword and save it again.