Advertising by Post (Newspaper)

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Advertising by Post (Newspaper)

Harvey
I have an advertiser that wants to sponsor individual newspaper items with a specific ad. Is this possible? Ie to have a different ad that we determine on each article.

Is this possible?
HTTPS Please!
Reply | Threaded
Open this post in threaded view
|

Re: Advertising by Post (Newspaper)

Pedro
Hi Harvey,

How does this should work? How many custom ads do you think you would have and how do they relate to each post? Is one specific ad per post? Or one ad for a set of posts? Please let me know.
My test forum.
Reply | Threaded
Open this post in threaded view
|

Re: Advertising by Post (Newspaper)

Harvey
I was thinking of a specific ad by post.

Don't do anything yet, just want to know what is involved.
HTTPS Please!
Reply | Threaded
Open this post in threaded view
|

Re: Advertising by Post (Newspaper)

Pedro
This post was updated on .
Hi,

Here is an idea:

you would have to edit your show_custom_ads macro,  replacing the code in that macro with something like this:
<n.switch. value="[n.page_node.id/]">           
   <n.case. value="21" >
      <!-- Ad code for post 21 -->
   </n.case>
   <n.case. value="22" >
      <!-- Ad code for post 22 -->
   </n.case> 
   <n.default_case.>
      <n.if.equal value1="[n.format/]" value2="small-square">
         <then>
            <!-- your small-square custom ad -->
         </then>
         <else>
            <!-- your custom ad -->
         </else>
      </n.if.equal>
   </n.default_case.>
</n.switch.>
In this case, the posts 21 and 22 have different ads. If you want to  add posts, you should add more case blocks.
In the "default case" is your old custom ad code.
My test forum.