aide pour une option de trie supplémentaire dans un template

More
14 years 2 days ago #6428 by yopyop001
Salut,

En fait, on a fait le truc à l'envers j'ai l'impression,

Il faut que la date de fin soit supérieure à la date du jour pour que cela s'affiche.

Tu peux essayer
Code:
if ($enddate >= $now) :

Par contre j'ai peur que cela ôse un problème de pagination., car les éléemnts seront chargés même s'ils ne sont pas affichés.

Il faudrait donc que tu affiches tous les résultats...

A suivre...

Please Log in or Create an account to join the conversation.

More
14 years 2 days ago #6429 by micker
re j'ai bien fait la modif
Code:
if ($enddate >= $now) :
et j'ai désactivé la pagination
mais la ca n'affiche plus rien une erreur de date ?
merci

FLEXIcontent is Free but involves a very big effort on our part.
Like the our support? (for a bug-free FC, despite being huge extension) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing reviews. Thanks![/size]

Please Log in or Create an account to join the conversation.

More
14 years 2 days ago #6433 by yopyop001
Re,

En fait, c'est peut-être une histoire de format.

Tu peux tenter :
Code:
$now = new DateTime( $now ); $now = $now->format(’Ymd’);
en dehors de la boucle,

Puis dans la boucle (avant le if):
Code:
$enddate = new DateTime( $enddate); $enddate = $endate->format(’Ymd’); if( $now <= $enddate) :

A suivre

Sinon, peux-tu aussi afficher le $enddate à cote du $now pour voir tout ça.

A plus

Please Log in or Create an account to join the conversation.

More
14 years 2 days ago #6434 by micker
il ce bloque à la ligne 84 sur
Code:
$enddate = $endate->format(’Ymd’);
8-)

FLEXIcontent is Free but involves a very big effort on our part.
Like the our support? (for a bug-free FC, despite being huge extension) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing reviews. Thanks![/size]

Please Log in or Create an account to join the conversation.

More
14 years 2 days ago #6435 by yopyop001
faute de frappe :
Code:
$enddate = $enddate->format(’Ymd’);

;)

Please Log in or Create an account to join the conversation.

More
14 years 2 days ago #6436 by micker
dsl j'aurais pu la voir 8-)
la page marche mais le trie ne fonctione pas ...
Code:
<?php for ($i=0; $i<$leadnum; $i++) : $enddate = $item[$i]->fields['Dfin']->display; $enddate = new DateTime( $enddate); $enddate = $enddate->format(’Ymd’); if( $now <= $enddate) : echo $now; echo $enddate; ?>
j'ai afficher les 2 dates sur ma page de test mais elles sont identiques la now et la enddate...
pourtant dans les article les 20100109 sont les display de Dfin ...
encore une erreur de ma part ?

FLEXIcontent is Free but involves a very big effort on our part.
Like the our support? (for a bug-free FC, despite being huge extension) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing reviews. Thanks![/size]

Please Log in or Create an account to join the conversation.

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.331 seconds
Save
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline