Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2006-10-18 01:44:36

deronsizemore
Member
From: Kentucky
Registered: 2005-11-02
Posts: 324

Random advertisements

I was reading <a href=“http://forum.textpattern.com/viewtopic.php?id=19164”>THIS THREAD</a> about random testimonials and it got me thinking.

Eventually I’m hoping to get interest in advertising on my site, could I use the same code for displaying random advertisement links on a site? Just make new articles with nothing but linked images? I assume it will work, but thought I would ask.

<txp:article_custom form="testimonials" limit="3" section="ads" sort="rand()" />

Offline

#2 2006-10-18 03:27:56

mercury
Member
Registered: 2006-05-12
Posts: 26

Re: Random advertisements

Offline

#3 2006-10-18 03:38:50

jm
Plugin Author
From: Missoula, MT
Registered: 2005-11-27
Posts: 1,746
Website

Re: Random advertisements

You could do that but you could also use a linklist. Either way works, but the linklist route is pretty simple.

  1. Content>Organize
    1. Create a link category: “ads”
  2. Content>Links
    1. Post a link with the image in either the title or description
      1. If you post the image as the title, you’ll need to use HTML (I don’t think it’s Textiled)
      2. If you post the image as a description, you can use Textile (!img) – Adv Prefs>Textile Link Description
  3. Post the URL
  4. Page Template: <txp:linklist category="ads" form="ads" limit="1" sort="rand()" />
  5. Form Template: <a href="<txp:link_url />" rel="external"><txp:link_description /></a> – replace description with title, if you prefer.

Offline

#4 2006-10-18 12:46:20

deronsizemore
Member
From: Kentucky
Registered: 2005-11-02
Posts: 324

Re: Random advertisements

Thanks Jon. Seems easy enough either way. I need to bookmark this thread, cause I know I’ll forget that by the time I’m actually needing to set up something like this (if I ever do). :-)

Offline

Board footer

Powered by FluxBB