Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Insert code/tags automatically inside body
Hi everybody,
I was wondering if there’s a way to insert some piece of code automatically inside the body of an article. I mean, I’d like to put some text ads (like the ones from Google) directly into the body of my articles. I know I can do it by outputting a form, but my question is if it can be done automatically, without writing the proper txp:output_tag
each time.
Thanks,
V.
Happily served with Txp: Strampelli.net, Brain Essence, NicolaTranfaglia.com…
Offline
Re: Insert code/tags automatically inside body
Hi,
Remember that Google limits you to 3 ads per page.
In your default form:
<txp:body />
<txp:comments_invite wraptag="p" />
Just insert your Google ad form between the body and comments invite verbiage.
We Love TXP . TXP Themes . TXP Tags . TXP Planet . TXP Make
Offline
Re: Insert code/tags automatically inside body
Thanks hcgtv, that’s exactly what i did. But I was looking for a way to put the ad somewhere “inside” the article body, between some paragraphs…
Happily served with Txp: Strampelli.net, Brain Essence, NicolaTranfaglia.com…
Offline
#4 2007-03-13 17:23:56
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: Insert code/tags automatically inside body
Not really – how would anything tell where you wanted the ads stuck? A plugin can insert stuff into article bodies, but it needs to know, one way or another, where you want them placed. Like, is it always going to be in a specific place, such as x number of paragraphs through, or…?
Offline
Re: Insert code/tags automatically inside body
Yeah, a plugin which inserts something always after x pars would be great. Do you know one, Mary?
Happily served with Txp: Strampelli.net, Brain Essence, NicolaTranfaglia.com…
Offline
#6 2007-03-13 17:31:49
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: Insert code/tags automatically inside body
That tells me that such a plugin is possible, but I don’t know if anyone has made one yet.
You could do such a thing with JavaScript too.
Offline