Results 1 to 1 of 1

Thread: Boxed ads based on channel

  1. #1
    Join Date
    Oct 2007
    Posts
    126

    Default Boxed ads based on channel

    I have followed the ads discussion on pre and post roll. This question is about boxed ads that would be based on which channel is selected. IF my videos had only one channel assigned, then when a viewer is watching the video a specific category would be known. Multiple ads could be placed on the page based on this channel information.

    Many of us use the ad boxes and have code to access databases such as openx to deliver the ads. I would like the boxes to be intelligent enough to know which channel they are being displayed with. Then a corresponding category in the ad database could deliver a related ad.

    Has anyone done this? If not can anyone program this and for how much?
    I would imagine the simplest idea would be to add a line of code in the ad box function that says something like <get the channel, use that channel and send it to the ad program>

    Dave
    CasselmanCanada.com (free access)


  2. #2
    Join Date
    Oct 2007
    Posts
    126

    Default

    Months later and here is where my head is on this problem.

    I have modified my database to have extra fields in the adv record. I can now see many new advertising ad spaces in the admin control panel. Naming is banner_top1, banner_top2, etc, banner_top12. The same for all the other ad locations.

    The thought is that each number will correspond to a channel number. So then I can have different ads for each channel.

    In a page template an ad is called by a line such as this
    {insert name=advertise adv_name='home_right_box'}
    ...which uses functions_insert.php to do the work.

    So if you could go to the videos_channels column of the videos record and take the first real number after the first 0| you would have one (the first) channel number associated with that video. Now store that number in a temp location. (chtemp)
    Go to the functions_insert.php and modify this line
    `adv_name`='" . mysql_clean($v['adv_name']) . "' AND
    to be something like
    `adv_name`='" . mysql_clean($v['adv_name .chtemp']) . "' AND
    so that it appends the number to the end of the adv_name string.
    Then that new string should be able to open the associated advertisement field in the adv record of the database.
    And a different ad can be shown for different channels.

    I don't know enough about php to write the exact code to get the data from the db and strip the first 2 characters and concatenate before the second pipe, and then pass it to a different variable so it can be used.

    Anyone out there have any additional thoughts? Or know how to code this stuff in your sleep?
    Admin, is this something you can add to my files?


    I know I would have to put in 10 or 15 times as many ads in my admin panel. But then I would have different ads like I want. No problem.
    Dave
    CasselmanCanada.com (free access)


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •