Sponsor logo & links in topics pages

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

Sponsor logo & links in topics pages

donharrison
This post was updated on .
Hi Nabble, Is it possible to for me to add my sponsor logo's and link's to appear at the top or bottom of sub-forum topics/post Pages?. Atm l have this appear on the Main page on the forum and the sub-forums header pages:

Sponsored by:
Southside Marine Services WARNEET Bait and TackleYour Logo & Web SiteThink Big Fishing Charters Steve's Custom Welding


And now l want to do such on the sub-forum topics/posts Pages. (the pages where viewers read posts & repies etc) With the ability to change logos & links when required. Cheers. www.fishingwesternport.com
Reply | Threaded
Open this post in threaded view
|

Re: Sponsor logo & links in topics pages

Pedro
Please, edit the macro show_custom_ads. There you can add your logo or ad code.
Let me know if it works as you expected. Otherwise I will help you to set it up.
My test forum.
Reply | Threaded
Open this post in threaded view
|

Re: Sponsor logo & links in topics pages

donharrison
This post was updated on .
- deleted  as this issue is fixed!  but l have another as a result, see below.
Reply | Threaded
Open this post in threaded view
|

Re: Sponsor logo & links in topics pages

donharrison
This post was updated on .
got the macro working however:

Update:

please see here:

http://www.fishingwesternport.com/Members-Fishing-Reports-f4028102.html

can l edit out the 1/2 custom ads on the right hand side of my 3 Sub-Forums? or is it easier to edit this macro to display just 1 set of Custom ads on the Footer alone, on all pages?

eg:

Main Page = 1 set of ads
Topics pages = 1 set of ads
3x Sub Forums = 1 set of ads
all via the Macro etc.

cheers Don.
Reply | Threaded
Open this post in threaded view
|

Re: Sponsor logo & links in topics pages

Pedro
We can set everything.
Could you send me a print screen circling where the different sets of ads should be?
My test forum.
Reply | Threaded
Open this post in threaded view
|

Re: Sponsor logo & links in topics pages

donharrison
Yes, here are prints of all the pages.

Firstly, this is where l keep the sponsor logo's and where l will edit them as needed.
http://www.fishingwesternport.com/Sponsor-Logos-td4043066.html


Main Page of Site
http://www.fishingwesternport.com



Sub Forums x3

http://www.fishingwesternport.com/Members-Fishing-Reports-f4028102.html

http://www.fishingwesternport.com/General-Fishing-Information-f88449.html

http://www.fishingwesternport.com/Boating-and-Fishing-Gear-f88448.html



And the Topics/Posts/Replies Page(s)
eg:


So l want to have logos at the top on the Main page, then at the bottom on the other pages.
(Sub forums & each Topic/Post page)

I want to remove the X marked ads.

Cheers Don


Reply | Threaded
Open this post in threaded view
|

Re: Sponsor logo & links in topics pages

Pedro
Please, take a look at the code I added in your advanced editor:
 <override_macro name="show_custom_ads" parameters="location" requires="servlet" >
     <n.comment>
         The variable n.location has the location of the ad. So, we check where and which ad should be shown.
     </n.comment>
     
     <n.if.regex_matches text="[n.location/]" pattern="app_bottom">  
         <then>
             
         </then>
     </n.if.regex_matches>
     <n.if.regex_matches text="[n.location/]" pattern="topic_bottom">  
         <then>
             <n.ad1/>
         </then>
     </n.if.regex_matches>
     <n.if.regex_matches text="[n.location/]" pattern="first_classic_message">  
         <then>
             
         </then>
     </n.if.regex_matches>
     <n.if.regex_matches text="[n.location/]" pattern="widget">  
         <then>
             
         </then>
     </n.if.regex_matches>
    
</override_macro>

<macro name="ad1">
    <center>
        <table>
            <tr>
                <td><img src="http://www.fishingwesternport.com/file/n4043066/SSMS_LOGO.jpg" border="0"/></td>
                <td><img src="http://www.fishingwesternport.com/file/n4043066/20140825210717.gif" border="0"/></td>
                <td><img src="http://www.fishingwesternport.com/file/n4043066/20140825234209.gif" border="0"/></td>
                <td><img src="http://www.fishingwesternport.com/file/n4043066/20140825220156.gif" border="0"/></td>
                <td><img src="http://www.fishingwesternport.com/file/n4043066/7212014114427.jpg" border="0"/></td>
            </tr>
            <tr>
                <td><center><a href="http://www.southsidemarine.com.au">Southside Marine Services</a></center></td>
                <td><center><a href="http://warneetbaitandtackle.wix.com/warneet3">WARNEET Bait and Tackle</a></center></td>
                <td><center><a href="http://www.fishingwesternport.com/Fishing-Westernport-and-Port-Phillip-Bay-Web-Site-td4042699.html">Your Logo Web Site</a></center></td>
                <td><center><a href="http://www.thinkbigcharters.com.au">Think Big Fishing Charters </a></center></td>
                <td><center><a href="http://www.stevescustomwelding.com.au">Steve's Custom Welding</a></center></td>
                <td colspan="3" />
            </tr>
        </table>
    </center>
    <br />
</macro>
I put your ad in a macro called ad1. So, wherever you need to show this ad you should write n.ad1 as you can see in line 13.

Now, the macro show_custom_ads tests where the ad is being called. As you want the ad only on the bottom of the topic, this is the only location which has n.ad1 .
My test forum.
Reply | Threaded
Open this post in threaded view
|

Re: Sponsor logo & links in topics pages

donharrison
Looks great, and working well on Main Page and Topics. l'll need to study up more on code. Meanwhile, how can l set this for the 3 Sub-forum Pages as currently my ad block is not appearing at the bottom here:

Reply | Threaded
Open this post in threaded view
|

Re: Sponsor logo & links in topics pages

Pedro
Replace your app_bottom check, line 6 - 10, with this:
     <n.if.regex_matches text="[n.location/]" pattern="app_bottom">  
         <then>
              <n.if.not.page_node.is_root>
                  <then><n.ad1/></then>
             </n.if.not.page_node.is_root>            
         </then>
     </n.if.regex_matches>
My test forum.
Reply | Threaded
Open this post in threaded view
|

Re: Sponsor logo & links in topics pages

donharrison
Just did as advised, and its working well!
Thank you for your help, cheers Don.