Main
Index
Search
Posts
Who's
Online
Log
In

Home: Discontinued/Classic Products: Article Manager 2:
javascript in articles

 

 


Kimber
User

Jul 23, 2008, 3:38 AM

Post #1 of 11 (4086 views)
Shortcut
javascript in articles Can't Post

Hello,

I am sure this has been posted before but I can't find help searching the forum.

When I add an articles, I would like to put related affiliate program links under the article.

Example:

<script type="text/javascript">
<!--
sas187tabidvalue = '000000';
sas187tabafftrackvalue = '';
// -->
</script>
<script type="text/javascript" src=http://widgets.shareasale.com/3373/187.js?u=000000>
</script>

but when I go back to edit the codes, they are changed. They show in the articles correct when added using the < > Source Editor but I worry my clicks will not get tracked with the article manager editing the codes.

Is there a way to add a new field in the Admin > Database Editor > Table Editor which these codes can be put in and show in the article correct and can be edited later. Or if I can not edit later, once they are put in will the work correctly edited?

Thanks
Kimberly


Jake
Staff


Jul 23, 2008, 1:04 PM

Post #2 of 11 (4019 views)
Shortcut
Re: [Kimber] javascript in articles [In reply to] Can't Post

Hi Kimberly,

As you mentioned, your best bet here is to create a new text box field for this javascript code in the Database Editor. Then all you need to do is add its placeholder on your template where you'd like it to appear. If you use a text box field instead of the WYSIWYG editor your javascript will be added to your page correctly. Smile
-----------------------------------------------------------
Cheers,
Jake Marvin - Product Specialist
support@interactivetools.com

[hr][i][url "http://www.interactivetools.com/consulting/"][b]Hire me![/b][/url]
Save time by getting our experts to help with your project. Template changes, advanced features, full integration, whatever you need. Whether you need one hour or fifty, get it done fast with [url "http://www.interactivetools.com/consulting/"][b]Priority Consulting[/b][/url].[/i]


Kimber
User

Jul 23, 2008, 1:45 PM

Post #3 of 11 (4018 views)
Shortcut
Re: [Jake] javascript in articles [In reply to] Can't Post

Thanks, I think I understand what you are saying to do.

After enough years using this with article manager - it all starting to make sense! Crazy Which is a scare thought for my tech experience!


BillG
User

Aug 27, 2009, 12:15 PM

Post #4 of 11 (3520 views)
Shortcut
Re: [Jake] javascript in articles [In reply to] Can't Post

I created a new field called inserCode. Can you tell me how do I add it's placeholder into my article content?


Donna
Staff / Moderator


Aug 27, 2009, 12:23 PM

Post #5 of 11 (3518 views)
Shortcut
Re: [BillG] javascript in articles [In reply to] Can't Post

Hi Bill,

Assuming you created this as an article field and haven't changed the name of the article table... the placeholder would be $article.inserCode$ -- pop that into your template wherever you want it to show up. :)

Donna

--
support@interactivetools.com


BillG
User

Aug 27, 2009, 12:38 PM

Post #6 of 11 (3515 views)
Shortcut
Re: [Donna] javascript in articles [In reply to] Can't Post

Donna, if I understand you correctly, I would place it in my content like this:

==================CONTENT===================================================
President Obama sent former President Clinton abroad. Don't read that last sentence out loud. See
this video which is generated by JavaScript:
$article.inserCode$
And now, more funny news that has more than one meaning!
====================================================================


Is that correct? Sly


Donna
Staff / Moderator


Aug 27, 2009, 12:52 PM

Post #7 of 11 (3513 views)
Shortcut
Re: [BillG] javascript in articles [In reply to] Can't Post

Hi there,

No, not quite -- you can't put a placeholder inside another field, it needs to go directly into your template. It would need to be in a fixed spot though, not within the article content itself.

Donna

--
support@interactivetools.com


BillG
User

Aug 27, 2009, 1:01 PM

Post #8 of 11 (3509 views)
Shortcut
Re: [Donna] javascript in articles [In reply to] Can't Post

Well, that's useless.


Donna
Staff / Moderator


Aug 27, 2009, 1:24 PM

Post #9 of 11 (3506 views)
Shortcut
Re: [BillG] javascript in articles [In reply to] Can't Post

Well, the original poster needed something specifically for the use that our staff described above... if you're looking for something different, feel free to create a new post with your request, and we can see what we can come up with for you. :)

Donna

--
support@interactivetools.com


BillG
User

Sep 1, 2009, 11:11 AM

Post #10 of 11 (3472 views)
Shortcut
Re: [Donna] javascript in articles [In reply to] Can't Post

I think I was rather specific in what I wanted. Asking me to start a new thread is a copout.


Donna
Staff / Moderator


Sep 1, 2009, 11:19 AM

Post #11 of 11 (3469 views)
Shortcut
Re: [BillG] javascript in articles [In reply to] Can't Post

Hi Bill,

Mostly for other users who are looking to do the same thing as your request is a bit different from the original posters, so this thread ends up getting a bit clogged with two totally separate issues. Also, if I can get a full idea of what the end result you're looking for is, it'll make it easier to make recommendations. If you'd rather keep it in this thread, that's fine too -- but either way, can you describe how the end result should work? The method you're hoping for (ie, putting a placeholder within another field) won't work, but we can probably come up with something else that will work for you instead -- but knowing exactly what you're trying to do will make that a lot easier.

I hope this helps explain why I was hoping you'd be able to start a new thread. :)

Donna

--
support@interactivetools.com