Bonjour bonsoir.
Je suis administrateur d'un forum et j'aimerais faire un bouton, ou un lien permettant de remonter un sujet. En effet, cette fonction me serait bien utile et je vois que sur ce forum, elle est disponible pour les auteurs des sujets. Voici donc ma question: comment faire?
Sachant que je suis un novice en programmation web, mais que je touche aux bases du html. Le forum que je tient se trouve être non pas sous forumactif, mais sous
xooit. Je poste ici le template correspondant à l'affichage d'un sujet:
- Code: Tout sélectionner
<table width="760" align="center" border="0" cellspacing="0" cellpadding="0" class="menu">
<tr>
<td>
<table width="100%" cellspacing="2" cellpadding="0" border="0">
<tr>
<td align="left" valign="bottom" colspan="0">
<span class="gensmall"><b><font color="#5C5A5A">{PAGINATION}</font></b><br /> </span>
</td>
</tr>
</table>
<table width="100%" cellspacing="2" cellpadding="0" border="0">
<tr>
<td align="left" valign="bottom" nowrap="nowrap"><span class="nav"><a href="{U_POST_NEW_TOPIC}"><img src="{POST_IMG}" border="0" alt="{L_POST_NEW_TOPIC}" align="middle" /></a> <a href="{U_POST_REPLY_TOPIC}"><img src="{REPLY_IMG}" border="0" alt="{L_POST_REPLY_TOPIC}" align="middle" /></a></span>
</td>
<td align="left" valign="bottom" width="100%"><span class="nav"> <a href="{U_INDEX}" class="nav"><font color="#5C5A5A">Index du forum</font></a> -> <a href="{U_VIEW_FORUM}" class="nav"><font color="#5C5A5A">{FORUM_NAME}</font></a> -> <a href="{U_TOPIC_TITLE}" class="nav"><font color="#5C5A5A">{TOPIC_TITLE}</font></a></span>
</td>
</tr>
</table>
<table class="forumline" width="100%" cellspacing="1" cellpadding="0" border="0">{POLL_DISPLAY}
<tr>
<th class="thLeft" width="150" height="26" nowrap="nowrap">{L_AUTHOR}</th>
<th class="catHead" nowrap="nowrap" align="right"><center>Message</center><span class="nav"><a href="
{U_VIEW_OLDER_TOPIC}" class="nav">{L_VIEW_PREVIOUS_TOPIC}</a><font color=white> :: </font><a href="{U_VIEW_NEWER_TOPIC}" class="nav">{L_VIEW_NEXT_TOPIC}</a> </span></th>
</tr>
<!-- BEGIN postrow -->
<tr>
<td width="150" align="left" valign="top" class="{postrow.ROW_CLASS}"><span class="name"><a name="{postrow.U_POST_ID}"></a><b>{postrow.POSTER_NAME}</b></span><br /><span class="postdetails">{postrow.POSTER_RANK}<br />{postrow.RANK_IMAGE}{postrow.POSTER_AVATAR}<br /><br />{postrow.POSTER_JOINED}<br />{postrow.POSTER_POSTS}<br />{postrow.POSTER_FROM}</span><br />
</td>
<td class="{postrow.ROW_CLASS}" width="100%" height="28" valign="top">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<!-- IF postrow.POSTER_NAME != "" -->
<tr>
<td valign="top"><span class="postdetails"><b>Sujet:</b> {postrow.POST_SUBJECT}</span></td>
<td valign="top" align="right" nowrap="nowrap">
<span class="postdetails"><img src="{postrow.MINI_POST_IMG}" width="12" height="9" alt="{postrow.L_MINI_POST_ALT}" title="{postrow.L_MINI_POST_ALT}" border="0" /><b>{L_POSTED}:</b> {postrow.POST_DATE}</span>
</td>
</tr>
<!-- ELSE -->
<tr>
<td valign="top" nowrap="nowrap">
<span class="postdetails"><b>Réponse rapide:</b></span>
</td>
</tr>
<!-- ENDIF -->
<tr>
<td colspan="2">
<!-- IF postrow.POSTER_NAME != "" -->
<img width="100%" height="5" src="http://img7.hostingpics.net/pics/204228Barre_forum2.png">
<!-- ENDIF -->
<span id="p_{postrow.POST_ID}" class="postbody">{postrow.MESSAGE}</span>
<script language="javascript" type="text/javascript">
var imgHS = document.getElementById("p_{postrow.POST_ID}").innerHTML;
var newimgHS = imgHS.replace(/\[diap\]?([^\[]*) ?\[\/diap\]/g, "<a href='$1' class='highslide' onclick='return hs.expand(this)'><img src='$1' class='maxsize' alt='Highslide JS' title='Cliquez pour agrandir'/></a><div class='highslide-heading'></div>");document.getElementById("p_{postrow.POST_ID}").innerHTML = newimgHS;
</script><span>{postrow.SIGNATURE}</span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="{postrow.ROW_CLASS}" width="150" align="left" valign="middle"><span class="nav"><a href="#top" class="nav"><font color="#5C5A5A">{L_BACK_TO_TOP}</font></a></span>
</td>
<td class="{postrow.ROW_CLASS}" width="100%" height="12" valign="bottom" nowrap="nowrap">
<table cellspacing="0" cellpadding="0" border="0" height="18" width="100%">
<tr>
<td valign="middle" nowrap="nowrap"> {postrow.PROFILE_IMG} {postrow.PM_IMG} {postrow.EMAIL_IMG} {postrow.WWW_IMG} {postrow.AIM_IMG} {postrow.YIM_IMG} {postrow.MSN_IMG}
<td valign="top" align="right" nowrap="nowrap">
{postrow.QUOTE_IMG} {postrow.EDIT_IMG} {postrow.DELETE_IMG} {postrow.IP_IMG}
</td>
<script language="JavaScript" type="text/javascript">
<!--
if ( navigator.userAgent.toLowerCase().indexOf('mozilla') != -1 && navigator.userAgent.indexOf('5.') == -1 && navigator.userAgent.indexOf('6.') == -1 )
document.write(' {postrow.ICQ_IMG}');
else
document.write('</td><td> </td><td valign="top" nowrap="nowrap"><div style="position:relative"><div style="position:absolute">{postrow.ICQ_IMG}</div><div style="position:absolute;left:3px;top:-1px">{postrow.ICQ_STATUS_IMG}</div></div>');
//-->
</script><noscript>{postrow.ICQ_IMG}</noscript>
</td>
</tr>
</table>
</td>
</tr>
<!-- END postrow -->
<tr align="center">
<td class="catBottom" colspan="2" height="28">
<table cellspacing="0" cellpadding="0" border="0">
<tr><form method="post" action="{S_POST_DAYS_ACTION}">
<td align="center"><span class="gensmall"><font color="#FFFFFF"><b>{L_DISPLAY_POSTS}: {S_SELECT_POST_DAYS} {S_SELECT_POST_ORDER} </b></font><input type="submit" value="{L_GO}" class="liteoption" name="submit"/></span>
</td></form>
</tr>
</table>
</td>
</tr>
<table width="100%" cellspacing="2" cellpadding="0" border="0" align="center">
<tr>
<td align="left" valign="middle" nowrap="nowrap"><span class="nav"><a href="{U_POST_NEW_TOPIC}"><img src="{POST_IMG}" border="0" alt="{L_POST_NEW_TOPIC}" align="middle" /></a> <a href="{U_POST_REPLY_TOPIC}"><img src="{REPLY_IMG}" border="0" alt="{L_POST_REPLY_TOPIC}" align="middle" /></a></span>
</td>
<td align="left" valign="top" width="100%">
<span class="nav"> <a href="{U_INDEX}" class="nav"><font color="#5C5A5A">Index du forum</font></a> -> <a href="{U_VIEW_FORUM}" class="nav"><font color="#5C5A5A">{FORUM_NAME}</font></a> -> <a href="{U_TOPIC_TITLE}" class="nav"><font color="#5C5A5A">{TOPIC_TITLE}</font></a><br/> {PAGE_NUMBER}</span>
</td>
<td align="right" valign="top" nowrap="nowrap"><span class="gensmall"></span><br /><span class="nav">{PAGINATION}</span>
</td>
</tr>
</table>
<table width="100%" cellspacing="2" border="0" align="center">
<tr>
<td width="40%" valign="top" nowrap="nowrap" align="left"><span class="gensmall">{S_WATCH_TOPIC}</span><br /> <br />{S_TOPIC_ADMIN}</td>
<td align="right" valign="top" nowrap="nowrap">{JUMPBOX}<span class="gensmall">{S_AUTH_LIST}</span></td>
</tr>
</table>
J'ai comme idée de sauvegarder le dernier post, de l'effacer puis de le poster automatiquement, mais le problème est que je ne sais pas comment faire.
Ne sachant pas trop quels détails vous seront nécessaires pour la résolution de ce problème, je vous laisse me poser des questions au cas où les informations ici présentes sont insuffisantes.
Merci à ceux et celles qui m'aideront.