Loading


Advertisement:

Author Topic: Different advertising banner in different categories  (Read 335 times)

agtbook

  • Newbie
  • *
  • Posts: 6
Different advertising banner in different categories
« on: March 05, 2017, 07:11:45 am »
How to put a different advertising banner by category ?

marius-ciclistu

  • issues
  • Sr. Member
  • *
  • Posts: 359
Re: Different advertising banner in different categories
« Reply #1 on: May 31, 2017, 11:30:14 pm »
HI.
Just as an ideea, you could  compare the url of the page (https://stackoverflow.com/questions/1283327/how-to-get-url-of-current-page-in-php#1283330)  to see if it contains "category_name" and then execute a banner script for that category. You can compare the 2 strings of characters using php functions(you can find them on the web by searching).

You could do it in a case or with one if () statement for every category.

You can put all this code into admin area under every banner location's input area.

Maybe someone else would provide a code that returns only the category name based on the url or I don't know more details about osclass regarding this.