Advertisement:

Author Topic: How to show time of any posted item  (Read 9187 times)

fog

  • Hero Member
  • *****
  • Posts: 1062
Re: How to show time of any posted item
« Reply #30 on: February 14, 2014, 08:49:47 pm »
Yes, I understand, I am using technical language to be indifferent to gender (male / female) .. but does not seem to be the more correct. Actually you're right, you can use terms like: inserted at 5 minutes ago ... but after two weeks, you can use the condition to personalize: Inserted on: 01/02/2014, or posted on: 02/01/2014.

But it is also necessary to put another new parameter translation, before the parenthesis (before the variable printing).

Everything has a solution, thanks for the tip :)

Regards

EDIT: sorry, after parenthesis and before echo  ;D
« Last Edit: February 14, 2014, 08:56:31 pm by fog »

sirjones

  • Full Member
  • ***
  • Posts: 102
Re: How to show time of any posted item
« Reply #31 on: February 16, 2014, 06:34:07 pm »
how about
Code: [Select]
<?php
if (osc_item_is_premium()) {
    
$pubdate osc_premium_field("dt_pub_date");
} else {
$pubdate osc_item_field("dt_pub_date");
}
// dev101's script here
?>

dev101

  • Osclass Hero
  • Hero Member
  • *
  • Posts: 2155
  • osclass.work
Re: How to show time of any posted item
« Reply #32 on: February 16, 2014, 07:01:44 pm »
What is the deal with osc_premium_field test? I use plain script version and it works fine for both types, it is the same column in db.

Regards

ioasw

  • Newbie
  • *
  • Posts: 40
Re: How to show time of any posted item
« Reply #33 on: April 07, 2015, 02:33:28 am »
dev101 = lifesaver!!! thank you.

gnoe

  • Full Member
  • ***
  • Posts: 237
Re: How to show time of any posted item
« Reply #34 on: May 06, 2015, 10:36:37 am »
Nice little script. Thanks. :)