• I’m using the ad to manage 2 ad slots on my site. Typically, an ad will run for 7 days and the next ad will be displayed. I’d like to be able to do the following:

    1) (feature request) Schedule the ads in advance. When I create the ad, select a date when it will be active and have it be inactive until the active date is reached. If 2 ads are scheduled for the same slot at the same time, have the new ads over-ride the old ads. (Or, maybe offer this as an option.)

    2) (support question) Have the ads be inactive by default. Is there a way I can do this now in the code?

    Thanks for the help!
    Rick
    https://www.ruzuku.com/anotherstepforward/

Viewing 6 replies - 1 through 6 (of 6 total)
  • #2 kind of goes along with #1. Short of editing the source code, you can’t really do it as of yet. Scheduled ads is something that I do intend on adding, when I get around to it. I’ve been focusing a lot of my attention on my Tweetable plugin at the moment though, as it’s being entered in this year’s WLTC Plugin Competition. I do intend on adding the functionality though.

    Thread Starter rickcecil

    (@rickcecil)

    I’m comfortable mucking with the code, though, I’m not too good at writing, it I can hack at it. Any pointers on what I should look for in the code to change it from active to inactive by default? Thanks!

    In the function that adds a new ad, just look for the SQL statement. There should be a 1 set for the active field. Change it to a 0 and it should make the ads be inactive by default.

    Thread Starter rickcecil

    (@rickcecil)

    I found a Status being set, which looks like it’s defining the active/inactive. But, I can’t determine where it’s being set when an ad is first created.

    The only time it’s set, that I can tell, is when an ad expires.

    Thanks for taking the time to respond. Any other pointers?

    Thanks!

    In adminmenus.php, around lines 130-132 or so:

    if ($post_editedad=='') {
    $updatedb = "INSERT INTO $adtable_name (slot, name, start_date, end_date, clicks, status, target, image_url) VALUES ('$post_adslot', '$post_adname', '$today','$theenddate','$post_countclicks', '1', '$post_adtarget','$post_adimage')";
    $results = $wpdb->query($updatedb);

    Just change the ‘1’ to ‘0’ and you should be all set.

    Thread Starter rickcecil

    (@rickcecil)

    Thank you! Appreciate the help. Good luck with your tweetable plugin!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘WP125 Help Request’ is closed to new replies.