SPIP

[ar] [ast] [bg] [br] [ca] [co] [cpf] [cs] [da] [de] [en] [eo] [es] [eu] [fa] [fon] [fr] [gl] [id] [it] [ja] [lb] [nl] [oc] [pl] [pt] [ro] [ru] [sk] [sv] [tr] [vi] [zh] Espace de traduction

Download

#ACCEPTER_FORUM

February 2011

All the versions of this article:


#ACCEPTER_FORUM is used to retrieve the value stored in the accepter_forum field of the spip_articles table. This tag returns the mode of the forum that is linked to the article:

  • "pos": post moderation,
  • "pri": pre moderation,
  • "abo": on subscription,
  • "non": no forum.

This makes it possible for an article loop to display a code indicating whether the forum has been activated for the article or not:

[(#ACCEPTER_FORUM|=={non}|non) the code if the article forum has been activated]
[(#ACCEPTER_FORUM|=={non}|oui) the code if the article forum has not been activated]

Examples, to be inserted inside an (ARTICLES) loop:

Display the forum form if the forum has been activated:

[(#ACCEPTER_FORUM|=={non}|non) #FORMULAIRE_FORUM]

At the top of the "article" page, display a graphic image with a link to the forum included at the bottom of the page:

[(#ACCEPTER_FORUM|=={non}|non) <a href="#forum"><img
src="#CHEMIN{images/commenter.png}" alt="make a comment" /></a>]

Show the template of this page Site powered by SPIP | Translation area | Private area