Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Spacetime

    (@spacetime)

    Very simple to do.

    If there is one page (url) or only few pages for each parameter then you can whitelist them for specific block, for example:

    /page1.php?src=email

    If there are many pages for each URL parameter (query) then you can write a simple PHP code to extract the parameter and display code block accordingly.

    For example, you put the following code to block 1 and enable PHP processing for this block:

    <?php
    if (isset ($_GET ['src'])) {
      switch ($_GET ['src']) {
        case 'email':
            echo adinserter (2);
            break;
        case 'facebook':
            echo adinserter (3);
            break;
        case 'twitter':
            echo adinserter (4);
            break;
        default:
            echo adinserter (5);
      }
    }
    ?>

    Then you put ads in blocks 2 (email), 3 (facebook), 4 (twitter) and 5 (default), enable PHP function adinserter for them and use code block 1 for automatic placement.

    This is just an example to give you a hint, you should write the code according to your needs.

    Thread Starter clix999

    (@clix999)

    Great, Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Different Ads According To URL Parameters’ is closed to new replies.