WeStandWithUkraine

188 Posts
uriel
9 years ago
6
Topic

Inglês> 

Hello! 

I'm interested to know how to limit the time a post (article)

Would allow for a maximum time. These posts will be users.

I wish all these had a time of 15 days!

How could I do this?

Thanks for your time!


Português >> 

Limitar tempo de postagem ? 

Olá!! Estou interessado em saber como limitar o tempo de uma postagem (artigo) 

Gostaria de permitir um tempo maximo. Essas postagens serão de usuários. 

Gostaria que todas essas tivessem um tempo de 15 dias! 

Como poderia fazer isso ? 

Obrigado pelo seu tempo! 


Get a VIP membership
595 Posts
Octopoos - Mehdi
9 years ago
0
Level 1

Hi uriel,

Can you give us an example?

a suggestion, use the fields "publish up" and "down publish".

Regards,
Mehdi.

188 Posts
uriel
9 years ago
0
Level 1

Hello! Thanks for the reply!

I want to create a kind of classifieds system!

Where the object will be announced online for a maximum of 15 days. For example.

Users will create content (advertising objects).

The unpublish the announcement needs to be automatic. 


Think about common classified sites, which have a maximum time of announcement!

Thanks for your time!


188 Posts
uriel
9 years ago
0
Level 1

Hello!! 

I thought in the field but not yet imagined with placing a default date of 15 days or more for any item created in this form!

https://docs.google.com/file/d/0B3v09YcuAz33U3ZHWXV0SkNPMEE/edit?usp=drive_web



188 Posts
uriel
9 years ago
1
Level 1

Solved 

Override siteform 

$dateFormat = 'Y-m-d H:i:s'; 
$dateDown = new DateTime();
$dateDown->add( new DateInterval( "P30D" ) );
$date = $dateDown->format($dateFormat);

Thanks for your time!


544 Posts
joomleb
8 years ago
0
Level 2

Hi Uriel, 

would be better mark this topic as "solved" :) Thanks

310 Posts
ricco
8 years ago
0
Level 1

Hi Uriel,


Could please tell us how exactly did you do the site form override as I need the same future and I cannot get to work?


Thank you so much

Best regards

Ricco

Get a VIP membership