Home | Products | Consulting | Forums | Support | Order | 1-800-752-0455
  Main
Index
Search
Posts
Who's
Online
Log
In

Home: Products: Article Manager 2:
insert code within $article.content$ VIA wordcount parameter?

 

 


floodrod
User

Dec 20, 2006, 6:57 AM

Post #1 of 4 (359 views)
Shortcut
insert code within $article.content$ VIA wordcount parameter? Can't Post

I would like to impliment outside/sponsor code placement within the body of article pages. In multiple column page, it was mentioned you can insert code between listing results by using the code below.

<!-- templateIf: $articleList.currentResultCounter$ == 4 -->

PUT ADD CODE HERE

<!-- /templateIf -->


````````````````````````````````````````````````````

I was wondering if there is a supported way of inserting code in the articlePage.html template using the same technique, but for the code to appear after a certain word count. for instance, after the 100th word in an article, display an ad.




Code
$article.content$   

<!-- templateIf: $articlePage.currentWordCounter$ == 100 -->

PUT ADD CODE HERE

<!-- /templateIf -->





Obviously the red part isn't a supported command, is there a way to to phrase this correctly?




floodrod
User

Dec 20, 2006, 7:35 AM

Post #2 of 4 (356 views)
Shortcut
Re: [floodrod] insert code within $article.content$ VIA wordcount parameter? [In reply to] Can't Post

Also, it seems the code i mentioned to get an ad to display inbetween article list enteries does not work for me.


Code
  

<!-- template insert : $articleList$ -->


<!-- templateIf: $articleList.currentResultCounter$ == 4 --> code <!-- /templateIf -->




I only have 1 column display set up, and when I add that, I get an error message saying the second variable needs $placeholder$ or "quotes" around it. When I put "4", the error message goes away, but the code still does not show up.

Does the above code only with with multi column output?

Here is my full code:


Code
  

<!-- template insert : $articleList$ -->

<!-- templateIf: $articleList.currentResultCounter$ == "4" --> snake <!-- /templateIf -->



<!-- templatecell : articleRow --><font color="#FFFF00" size="2"></font>

<p><b><a name="$article.num$"><font color="#FFFF00">$category.name$</font></a><font color="#FFFF00" size="2">

</font></b><!-- templateIf : $article.RSS_URL$ eq "" --><font size="2" color="#C0C0C0">$article.date$</font><!-- /templateIf --><br>





<a href=
"$published.articlePage.url$"><b>$article.title$</b></a>





<!-- templateIf : $article.externalLink$ ne "" -->
[ <a href="$article.externalLink$"><font color="#FFFF00">Visit&nbsp;Website</font></a> ] <!-- /templateIf -->

<br>

$article.summary$

<br clear="all"><br>

<!-- templateIf : $article.attachments$ ne "" -->

</p>

<div class=
"summary_attachments"> <font color="#FFFFFF">Download attachment(s): $article.attachments$

<!-- templatecell : article.attachments.row -->[</font> <a href="$file.webUrl$">$file.title$</a> ] <!-- /templatecell : article.attachments.row -->

</div>

<!-- /templateIf -->






<!-- /templatecell : articleRow -->
















<!-- templateIf : $articleList$ eq "" -->

<font class="text"><b>Sorry, no articles were found.</b></font><br>

<!-- /templateIf -->





floodrod
User

Dec 21, 2006, 7:25 AM

Post #3 of 4 (335 views)
Shortcut
Re: [floodrod] insert code within $article.content$ VIA wordcount parameter? [In reply to] Can't Post

Ok, i got the code to add a Outside Code between articles listings in Category Index and Global Index when your using a 1 column layout.


Code
  

<!-- templatecell : articleRow -->
<font color="#FFFF00" size="2"></font><p><b><a name="$article.num$">



<!-- templateIf : $articleList.currentResultCounter$ == "2" -->

Mycode
<br><br>

<!-- /templateIf -->





Right after $article.num$"> insert the templateIf. I had to ad 2 <br><br> after my code to space it out so it keeps the same format.

Now, backto my original question,

is there a a corrent syntax to count words in $article.content$




ross
Staff / Moderator


Dec 21, 2006, 8:43 AM

Post #4 of 4 (332 views)
Shortcut
Re: [floodrod] insert code within $article.content$ VIA wordcount parameter? [In reply to] Can't Post

Hi there.

Thanks for all the updates!

I am glad you got the first part going Smile.

Unfortunetly, there isn't a word counter modifier so you would need to use some JavaScript. Of course, since I am not an expert there I don't know exactly what the code would look like.

Now, one thing you could do is use the max word modifier to limit how many words are actually displayed. Do you think that would work?

Let me know what you think Smile.
-----------------------------------------------------------
Cheers,
Ross Fairbairn - Product Specialist
support@interactivetools.com


Hire me!
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 Priority Consulting.



 
 
 


Search for (options)
Products
CMS Builder
Article Manager
Realty Manager
Listings Manager
Order Now
Services
Priority Consulting
Support
Online Documentation
Support Forums
Support Homepage
Company Info
12 reasons to choose us!
Meet the team
Monthly newsletter
Contact Us
Toll Free: 1-800-752-0455
Phone: (604) 689-3347
Sales | Support
Conditions of Use | Privacy Policy | Copyright © interactivetools.com 2008
#201 - 2730 Commercial Drive, Vancouver BC Canada V5N 5P4