HTML Logo by World Wide Web Consortium (www.w3.org). Click to learn more about our commitment to accessibility and standards.

Moving forward with Composr

ocPortal has been relaunched as Composr CMS, which is now in beta. ocPortal 9 will be superseded by Composr 10.

Head over to compo.sr for our new site, and to our migration roadmap. Existing ocPortal member accounts have been mirrored.


vertical ads

Login / Search

 [ Join | More ]
 Add topic 
Posted
Rating:
#67865 (In Topic #14451)
Avatar

Fan in training

I've been asked to put a vertical ad in the left column and another one in the right. This means that the left panel and the right panel have to contain some dynamic code (which I can write in PHP). I also need a way to add and remove ads. What's the best way to do this?
Back to the top
 
Posted
Rating:
#67867
Avatar

Look in HEADER.tpl for {$BANNER}, that is how it is shown in the default position. Without a parameter like this it's the general banner category that is used. But you can do like {$BANNER,side} (and put that in the panel) if you create a banner type called 'side'. Set that banner type with appropriate dimensions for the place you've put it.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#69604
Avatar

Fan in training

I got that working (and then had lots of other work that kept me busy). The ad should have two links below it, besides the link which is the ad itself. One is a link to the profile page of the ad submitter (all ads are submitted by members of the site). The other is a page where members can add reviews and view other people's reviews of the ad. How can I do this? Do I need to add fields to the database, or write some PHP code?
Back to the top
 
Posted
Rating:
#69605
Avatar

PHP code, it's a very custom job.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#69926
Avatar

Fan in training

Okay, I'd like to start with a mockup, which will have the links but the links will be stubs. I modify the code that handles {$BANNER}, right? Where is it? Once I have that working, I can put some PHP code behind the links.

Do I need to add a field to the table to record which user submitted the ad?
Back to the top
 
Posted
Rating:
#70114
Avatar

Fan in training


I changed BANNER_IMAGE.tpl to the following:

Code

<table>
<tr><td colspan=2>
<a rel="external" title="{!LINK_NEW_WINDOW}" class="link_exempt" target="_blank"
href="{$FIND_SCRIPT*,banner}?source={SOURCE*&}&amp;dest={DEST*&}&amp;type=click{$KEEP*,0,1}">
<img width="{WIDTH*}" alt="{CAPTION*}" style="border: 0" title="{CAPTION*}" src="{IMG*}" />
</a>
</td></tr>
<tr><td>Reviews</td><td>Submitter</td></tr>
</table>
Next I have to get the ad number so that I can pass it to the PHP code.
Back to the top
 
There are too many online users to list.
Control functions:

Quick reply   Contract

Your name:
Your message: