Advertisement:

Author Topic: Ad expires  (Read 1645 times)

elena

  • Jr. Member
  • **
  • Posts: 96
Ad expires
« on: November 26, 2012, 03:31:34 am »
Hello.

I entered the maturity in the various categories.

Via a post of "trains58554" now the ad appears with the expiration date.
The change is made​​:

finctions.php

/ **
      * Return the date the item expires
      *
      * @ Return string
      * /
     osc_item_expire_date function () {
             $ category = Category :: newInstance () -> findByPrimaryKey (osc_item_category_id ());
             $ expiration = $ category ['i_expiration_days'];
             $ NOEXPIRE = __ ('Forever Ad', 'modern');
             if ($ expiration == 0) {return $ NOEXPIRE;}
             else {
                 $ date_expiration = date ("Ymd", strtotime (osc_item_pub_date ())). "+ $ Expiration day";
                 date_expiration osc_format_date $ = ($ date_expiration);
                 return $ date_expiration;
             }
     }

item.php

<? php echo osc_item_expire_date ();?>

The problem is that if I click on ads in management "Set as premium" in the ad is the deadline, and I want to change the expiration time, the longer course.

I want to make this change without adding plugin since I have tried several and none work for me.

On the site I have included a PayPal donation button, which is why I do not need a plugin, at the time when a user makes a donation I transform your ad from "standard" to "Premium".

you can do what I ask?

Thank you.

P.S. Sorry for the google translation.