[PHPBB2] Les Sondages n'apparaissent plus Oo
2 participants
Forum gratuit : Le forum des forums actifs :: Entraide & Support... :: Problème avec un script, un code :: Archives des problèmes avec un code
Page 1 sur 1 • Partagez
[PHPBB2] Les Sondages n'apparaissent plus Oo
Détails techniques
Version du forum : phpBB2Poste occupé : Fondateur
Navigateur(s) concerné(s) : Mozilla Firefox
Capture d'écran du problème :
- Voir l'image:
Personnes concernées par le problème : Tous les utilisateurs
Problème apparu depuis : 14 Août en effet je ne l'ai pas aperçu avant
Lien du forum : http://www.lvl-albion.com/
Description du problème
Bonjour à vous,
J'aurais malheureusement besoin d'aide, car impossible de voir les sondages :'( Je peux donner mon template si besoin. Merci d'avance =D
Dernière édition par Gwen tanamo le Sam 18 Aoû 2018 - 9:59, édité 1 fois
Re: [PHPBB2] Les Sondages n'apparaissent plus Oo
Sujet toujours d'actualité
Re: [PHPBB2] Les Sondages n'apparaissent plus Oo
Bonjour,
Dans le template viewtopic_body, la variable qui permet l'affichage d'un sondage est la variable {POLL_DISPLAY} à la ligne 122 du template par défaut, avant <!-- BEGIN postrow -->. Il s'agit d'une ligne de tableau, donc isolée elle doit s'écrire entre balises <table>.
Si cette variable n'est pas présente dans votre template, il vous faut l'ajouter.
Si elle est présente dans votre template, elle peut être mal placée.
Dans le template viewtopic_body, la variable qui permet l'affichage d'un sondage est la variable {POLL_DISPLAY} à la ligne 122 du template par défaut, avant <!-- BEGIN postrow -->. Il s'agit d'une ligne de tableau, donc isolée elle doit s'écrire entre balises <table>.
Si cette variable n'est pas présente dans votre template, il vous faut l'ajouter.
Si elle est présente dans votre template, elle peut être mal placée.
MlleAlys- Membre actif
- Messages : 5793
Inscrit(e) le : 12/09/2012
Re: [PHPBB2] Les Sondages n'apparaissent plus Oo
Bonjour,
Voici mon template, en effet je ne sais pas ou mettre ce que vous me dites :
Voici mon template, en effet je ne sais pas ou mettre ce que vous me dites :
- Code:
<link href="https://fonts.googleapis.com/css?family=Nova+Flat" rel="stylesheet">
<section class="topic__wrap">
<div class="topic__buttons">
<!-- BEGIN switch_user_authpost -->
<a href="{U_POST_NEW_TOPIC}" rel="nofollow"><img src="{POST_IMG}" id="{POST_IMG_ID}one" alt="{L_POST_NEW_TOPIC}" align="middle" border="0" /></a>
<!-- END switch_user_authpost -->
<!-- BEGIN switch_user_authreply -->
<a href="{U_POST_REPLY_TOPIC}"><img src="{REPLY_IMG}" id="i_reply" alt="{L_POST_REPLY_TOPIC}" align="middle" border="0" /></a>
<!-- END switch_user_authreply -->
</div>
<div class="pagination">{PAGINATION}</div>
<div class="topic__title">
{TOPIC_TITLE}
</div>
<div class="topic__breadcrumbs">
<a href="{U_INDEX}">{L_INDEX}</a>
{NAV_CAT_DESC_SECOND}
</div>
</section>
<section class="topic">
<!-- BEGIN postrow -->
<!-- BEGIN displayed -->
<div class="topic__post">
<div class="topic__post-avatar">
{postrow.displayed.POSTER_AVATAR}
<div class="topic__post-badges">
<!-- BEGIN profile_field -->
<div>{postrow.displayed.profile_field.CONTENT}</div>
<!-- END profile_field -->
</div>
</div>
<div class="topic__post-body">
<header class="topic__post-profile">
<div class="topic__post-username">
{postrow.displayed.POSTER_NAME}
<span class="topic__post-rank">
<!-- BEGIN profile_field -->
<span>{postrow.displayed.profile_field.CONTENT}</span>
<!-- END profile_field -->
</span>
<div class="topic__post-angle"></div>
</div>
<div class="topic__post-fields">
<!-- BEGIN profile_field -->
<div>{postrow.displayed.profile_field.LABEL}{postrow.displayed.profile_field.CONTENT}</div>
<!-- END profile_field -->
</div>
</header>
<div class="topic__post-message postbody">
<div class="topic__bloc"><a class="topic__number" href="{postrow.displayed.POST_URL}">#{postrow.displayed.COUNT_POSTS}</a> <div class="topic__date">{postrow.displayed.POST_DATE}</div><div class="topic__tools">{postrow.displayed.QUOTE_IMG} {postrow.displayed.EDIT_IMG} {postrow.displayed.DELETE_IMG}</div></div>
{postrow.displayed.MESSAGE}
</div>
<!-- BEGIN switch_signature -->
<div class="signature_div">
{postrow.displayed.SIGNATURE}
</div>
<!-- END switch_signature -->
</div>
</div>
<!-- END displayed -->
<!-- END postrow -->
</section>
<section class="topic__wrap">
<div class="pagination">{PAGINATION}</div>
<table class="forumline noprint" width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="row2" colspan="2" align="center" style="padding:0px">
<!-- BEGIN switch_user_logged_in -->
<a name="quickreply"></a>
{QUICK_REPLY_FORM}<br />
<!-- END switch_user_logged_in -->
</td>
</tr>
</table>
<form action="{S_JUMPBOX_ACTION}" method="get" name="jumpbox" onsubmit="if(document.jumpbox.f.value == -1){return false;}">
<table class="noprint" width="100%" border="0" cellspacing="2" cellpadding="0" align="center">
<tr>
<td align="left" valign="middle" nowrap="nowrap" {WIDTH_GALLERY}>
<span class="nav">
<!-- BEGIN switch_user_authpost -->
<a href="{U_POST_NEW_TOPIC}" rel="nofollow"><img src="{POST_IMG}" id="{POST_IMG_ID}Newtopic" alt="{L_POST_NEW_TOPIC}" align="middle" border="0" /></a>
<!-- END switch_user_authpost -->
<!-- BEGIN switch_user_authreply -->
<a href="{U_POST_REPLY_TOPIC}"><img src="{REPLY_IMG}" alt="{L_POST_REPLY_TOPIC}" align="middle" border="0" /></a>
<!-- END switch_user_authreply -->
</span>
</td>
<td align="right" nowrap="nowrap"><span class="gensmall">{L_JUMP_TO}: {S_JUMPBOX_SELECT} <input class="liteoption" type="submit" value="{L_GO}" /></span></td>
<!-- BEGIN moderation_panel -->
<td align="center">
<span class="gensmall">{moderation_panel.U_YOUR_PERSONAL_MODERATE}</span>
</td>
<td align="center" width="250">
<span class="gensmall"> </span>
</td>
<!-- END moderation_panel -->
</tr>
</table>
</form>
<!-- BEGIN viewtopic_bottom -->
<table class="noprint" width="100%" border="0" cellspacing="2" cellpadding="0" align="center">
<tr>
<td colspan="2" align="left" valign="top" nowrap="nowrap"><br />{S_TOPIC_ADMIN}<br />
<form name="action" method="get" action="{S_FORM_MOD_ACTION}">
<input type="hidden" name="t" value="{TOPIC_ID}" />
<!-- <input type="hidden" name="sid" value="{S_SID}" /> -->
<input type="hidden" name="{SECURE_ID_NAME}" value="{SECURE_ID_VALUE}" />
<span class="gen">{L_MOD_TOOLS}<br />{S_SELECT_MOD} <input class="liteoption" type="submit" value="{L_GO}" /></span>
</form>
</td>
</tr>
</table>
<!-- END viewtopic_bottom -->
<!-- BEGIN switch_image_resize -->
<script type="text/javascript">
//<![CDATA[
$(resize_images({ 'selector' : '.postbody', 'max_width' : {switch_image_resize.IMG_RESIZE_WIDTH}, 'max_height' : {switch_image_resize.IMG_RESIZE_HEIGHT} }));
//]]>
</script>
<!-- END switch_image_resize -->
<script src="//s7.addthis.com/js/300/addthis_widget.js#pubid=forumotion" type="text/javascript"></script>
<section>
Re: [PHPBB2] Les Sondages n'apparaissent plus Oo
Essayez ainsi :
J'ai ajouté la partie suivante avant le début des posts :
Vous pouvez utiliser la class topic__sondage pour la mise en forme via la feuille de style css.
- Code:
<link href="https://fonts.googleapis.com/css?family=Nova+Flat" rel="stylesheet">
<section class="topic__wrap">
<div class="topic__buttons">
<!-- BEGIN switch_user_authpost -->
<a href="{U_POST_NEW_TOPIC}" rel="nofollow"><img src="{POST_IMG}" id="{POST_IMG_ID}one" alt="{L_POST_NEW_TOPIC}" align="middle" border="0" /></a>
<!-- END switch_user_authpost -->
<!-- BEGIN switch_user_authreply -->
<a href="{U_POST_REPLY_TOPIC}"><img src="{REPLY_IMG}" id="i_reply" alt="{L_POST_REPLY_TOPIC}" align="middle" border="0" /></a>
<!-- END switch_user_authreply -->
</div>
<div class="pagination">{PAGINATION}</div>
<div class="topic__title">
{TOPIC_TITLE}
</div>
<div class="topic__breadcrumbs">
<a href="{U_INDEX}">{L_INDEX}</a>
{NAV_CAT_DESC_SECOND}
</div>
</section>
<section class="topic">
<table class="topic__sondage">{POLL_DISPLAY}</table>
<!-- BEGIN postrow -->
<!-- BEGIN displayed -->
<div class="topic__post">
<div class="topic__post-avatar">
{postrow.displayed.POSTER_AVATAR}
<div class="topic__post-badges">
<!-- BEGIN profile_field -->
<div>{postrow.displayed.profile_field.CONTENT}</div>
<!-- END profile_field -->
</div>
</div>
<div class="topic__post-body">
<header class="topic__post-profile">
<div class="topic__post-username">
{postrow.displayed.POSTER_NAME}
<span class="topic__post-rank">
<!-- BEGIN profile_field -->
<span>{postrow.displayed.profile_field.CONTENT}</span>
<!-- END profile_field -->
</span>
<div class="topic__post-angle"></div>
</div>
<div class="topic__post-fields">
<!-- BEGIN profile_field -->
<div>{postrow.displayed.profile_field.LABEL}{postrow.displayed.profile_field.CONTENT}</div>
<!-- END profile_field -->
</div>
</header>
<div class="topic__post-message postbody">
<div class="topic__bloc"><a class="topic__number" href="{postrow.displayed.POST_URL}">#{postrow.displayed.COUNT_POSTS}</a> <div class="topic__date">{postrow.displayed.POST_DATE}</div><div class="topic__tools">{postrow.displayed.QUOTE_IMG} {postrow.displayed.EDIT_IMG} {postrow.displayed.DELETE_IMG}</div></div>
{postrow.displayed.MESSAGE}
</div>
<!-- BEGIN switch_signature -->
<div class="signature_div">
{postrow.displayed.SIGNATURE}
</div>
<!-- END switch_signature -->
</div>
</div>
<!-- END displayed -->
<!-- END postrow -->
</section>
<section class="topic__wrap">
<div class="pagination">{PAGINATION}</div>
<table class="forumline noprint" width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="row2" colspan="2" align="center" style="padding:0px">
<!-- BEGIN switch_user_logged_in -->
<a name="quickreply"></a>
{QUICK_REPLY_FORM}<br />
<!-- END switch_user_logged_in -->
</td>
</tr>
</table>
<form action="{S_JUMPBOX_ACTION}" method="get" name="jumpbox" onsubmit="if(document.jumpbox.f.value == -1){return false;}">
<table class="noprint" width="100%" border="0" cellspacing="2" cellpadding="0" align="center">
<tr>
<td align="left" valign="middle" nowrap="nowrap" {WIDTH_GALLERY}>
<span class="nav">
<!-- BEGIN switch_user_authpost -->
<a href="{U_POST_NEW_TOPIC}" rel="nofollow"><img src="{POST_IMG}" id="{POST_IMG_ID}Newtopic" alt="{L_POST_NEW_TOPIC}" align="middle" border="0" /></a>
<!-- END switch_user_authpost -->
<!-- BEGIN switch_user_authreply -->
<a href="{U_POST_REPLY_TOPIC}"><img src="{REPLY_IMG}" alt="{L_POST_REPLY_TOPIC}" align="middle" border="0" /></a>
<!-- END switch_user_authreply -->
</span>
</td>
<td align="right" nowrap="nowrap"><span class="gensmall">{L_JUMP_TO}: {S_JUMPBOX_SELECT} <input class="liteoption" type="submit" value="{L_GO}" /></span></td>
<!-- BEGIN moderation_panel -->
<td align="center">
<span class="gensmall">{moderation_panel.U_YOUR_PERSONAL_MODERATE}</span>
</td>
<td align="center" width="250">
<span class="gensmall"> </span>
</td>
<!-- END moderation_panel -->
</tr>
</table>
</form>
<!-- BEGIN viewtopic_bottom -->
<table class="noprint" width="100%" border="0" cellspacing="2" cellpadding="0" align="center">
<tr>
<td colspan="2" align="left" valign="top" nowrap="nowrap"><br />{S_TOPIC_ADMIN}<br />
<form name="action" method="get" action="{S_FORM_MOD_ACTION}">
<input type="hidden" name="t" value="{TOPIC_ID}" />
<!-- <input type="hidden" name="sid" value="{S_SID}" /> -->
<input type="hidden" name="{SECURE_ID_NAME}" value="{SECURE_ID_VALUE}" />
<span class="gen">{L_MOD_TOOLS}<br />{S_SELECT_MOD} <input class="liteoption" type="submit" value="{L_GO}" /></span>
</form>
</td>
</tr>
</table>
<!-- END viewtopic_bottom -->
<!-- BEGIN switch_image_resize -->
<script type="text/javascript">
//<![CDATA[
$(resize_images({ 'selector' : '.postbody', 'max_width' : {switch_image_resize.IMG_RESIZE_WIDTH}, 'max_height' : {switch_image_resize.IMG_RESIZE_HEIGHT} }));
//]]>
</script>
<!-- END switch_image_resize -->
<script src="//s7.addthis.com/js/300/addthis_widget.js#pubid=forumotion" type="text/javascript"></script>
<section>
J'ai ajouté la partie suivante avant le début des posts :
- Code:
<table class="topic__sondage">{POLL_DISPLAY}</table>
Vous pouvez utiliser la class topic__sondage pour la mise en forme via la feuille de style css.
MlleAlys- Membre actif
- Messages : 5793
Inscrit(e) le : 12/09/2012
Re: [PHPBB2] Les Sondages n'apparaissent plus Oo
Merci. Cela m'a fais un décalage par contre au numéro 1. Et il y a un trop grand espace. Le bouton supprimer est décalé aussi.
https://i.servimg.com/u/f16/16/84/92/19/fotfw-10.png
https://i.servimg.com/u/f16/16/84/92/19/fotfw-10.png
Re: [PHPBB2] Les Sondages n'apparaissent plus Oo
Serait-il possible d'avoir un lien vers un sondage accessible aux invités ?
MlleAlys- Membre actif
- Messages : 5793
Inscrit(e) le : 12/09/2012
Re: [PHPBB2] Les Sondages n'apparaissent plus Oo
Pour l'espace entre le titre et le sondage : localisez le code css suivant :
Si l'espace obtenu ne vous convient pas, essayez d'ajouter le code suivant :
Je ne vois pas le bouton supprimer, mais essayez en ajoutant le code css suivant pour que le sondage prenne la largeur du forum :
Pour le problème de couleurs de fond avec séparation en diagonale, je ne vois pas dans le template le code qui permet de les mettre en place, pour pouvoir l'adapter, serait-ce dans un javascript indépendant installé dans les modules ?
- Code:
.topic__breadcrumbs {
font-family: Calibri;
font-size: 0;
font-variant: small-caps;
margin: 0 0 30px;
}
Si l'espace obtenu ne vous convient pas, essayez d'ajouter le code suivant :
- Code:
table.topic__sondage td>br[clear="all"] {
display: none;
}
Je ne vois pas le bouton supprimer, mais essayez en ajoutant le code css suivant pour que le sondage prenne la largeur du forum :
- Code:
table.topic__sondage {
width: 97%;
}
Pour le problème de couleurs de fond avec séparation en diagonale, je ne vois pas dans le template le code qui permet de les mettre en place, pour pouvoir l'adapter, serait-ce dans un javascript indépendant installé dans les modules ?
MlleAlys- Membre actif
- Messages : 5793
Inscrit(e) le : 12/09/2012
Re: [PHPBB2] Les Sondages n'apparaissent plus Oo
- Code:
$(function() {
var username = document.querySelectorAll('.topic__post-username');
for (var i = 0; i < username.length; i++) {
var _this = username[i];
var _style = _this.querySelector('span[style]');
if(!_style) continue;
var color = _style.style.color;
_style.parentElement.parentElement.style.backgroundColor = color;
_style.parentElement.parentElement
.parentElement.querySelector('.topic__post-fields').style.backgroundColor = color.replace(/rgb/, 'rgba').replace(/\)/, ',.5)');
if (i % 2) {
// odd
_style.parentElement.parentElement.querySelector('.topic__post-angle').style.borderColor = ('transparent transparent ' + color + ' transparent');
} else {
// even
_style.parentElement.parentElement.querySelector('.topic__post-angle').style.borderColor = (color + ' transparent transparent transparent');
}
}
});
Re: [PHPBB2] Les Sondages n'apparaissent plus Oo
hmmm le javascript n'est pas mon fort, je peux voir celui qui permet l'alternance gauche/droite des profils ?
Ou peut être juste essayer avec le template comem ceci :
Ou peut être juste essayer avec le template comem ceci :
- Code:
<link href="https://fonts.googleapis.com/css?family=Nova+Flat" rel="stylesheet">
<section class="topic__wrap">
<div class="topic__buttons">
<!-- BEGIN switch_user_authpost -->
<a href="{U_POST_NEW_TOPIC}" rel="nofollow"><img src="{POST_IMG}" id="{POST_IMG_ID}one" alt="{L_POST_NEW_TOPIC}" align="middle" border="0" /></a>
<!-- END switch_user_authpost -->
<!-- BEGIN switch_user_authreply -->
<a href="{U_POST_REPLY_TOPIC}"><img src="{REPLY_IMG}" id="i_reply" alt="{L_POST_REPLY_TOPIC}" align="middle" border="0" /></a>
<!-- END switch_user_authreply -->
</div>
<div class="pagination">{PAGINATION}</div>
<div class="topic__title">
{TOPIC_TITLE}
</div>
<div class="topic__breadcrumbs">
<a href="{U_INDEX}">{L_INDEX}</a>
{NAV_CAT_DESC_SECOND}
</div>
</section>
<table class="topic__sondage">{POLL_DISPLAY}</table>
<section class="topic">
<!-- BEGIN postrow -->
<!-- BEGIN displayed -->
<div class="topic__post">
<div class="topic__post-avatar">
{postrow.displayed.POSTER_AVATAR}
<div class="topic__post-badges">
<!-- BEGIN profile_field -->
<div>{postrow.displayed.profile_field.CONTENT}</div>
<!-- END profile_field -->
</div>
</div>
<div class="topic__post-body">
<header class="topic__post-profile">
<div class="topic__post-username">
{postrow.displayed.POSTER_NAME}
<span class="topic__post-rank">
<!-- BEGIN profile_field -->
<span>{postrow.displayed.profile_field.CONTENT}</span>
<!-- END profile_field -->
</span>
<div class="topic__post-angle"></div>
</div>
<div class="topic__post-fields">
<!-- BEGIN profile_field -->
<div>{postrow.displayed.profile_field.LABEL}{postrow.displayed.profile_field.CONTENT}</div>
<!-- END profile_field -->
</div>
</header>
<div class="topic__post-message postbody">
<div class="topic__bloc"><a class="topic__number" href="{postrow.displayed.POST_URL}">#{postrow.displayed.COUNT_POSTS}</a> <div class="topic__date">{postrow.displayed.POST_DATE}</div><div class="topic__tools">{postrow.displayed.QUOTE_IMG} {postrow.displayed.EDIT_IMG} {postrow.displayed.DELETE_IMG}</div></div>
{postrow.displayed.MESSAGE}
</div>
<!-- BEGIN switch_signature -->
<div class="signature_div">
{postrow.displayed.SIGNATURE}
</div>
<!-- END switch_signature -->
</div>
</div>
<!-- END displayed -->
<!-- END postrow -->
</section>
<section class="topic__wrap">
<div class="pagination">{PAGINATION}</div>
<table class="forumline noprint" width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="row2" colspan="2" align="center" style="padding:0px">
<!-- BEGIN switch_user_logged_in -->
<a name="quickreply"></a>
{QUICK_REPLY_FORM}<br />
<!-- END switch_user_logged_in -->
</td>
</tr>
</table>
<form action="{S_JUMPBOX_ACTION}" method="get" name="jumpbox" onsubmit="if(document.jumpbox.f.value == -1){return false;}">
<table class="noprint" width="100%" border="0" cellspacing="2" cellpadding="0" align="center">
<tr>
<td align="left" valign="middle" nowrap="nowrap" {WIDTH_GALLERY}>
<span class="nav">
<!-- BEGIN switch_user_authpost -->
<a href="{U_POST_NEW_TOPIC}" rel="nofollow"><img src="{POST_IMG}" id="{POST_IMG_ID}Newtopic" alt="{L_POST_NEW_TOPIC}" align="middle" border="0" /></a>
<!-- END switch_user_authpost -->
<!-- BEGIN switch_user_authreply -->
<a href="{U_POST_REPLY_TOPIC}"><img src="{REPLY_IMG}" alt="{L_POST_REPLY_TOPIC}" align="middle" border="0" /></a>
<!-- END switch_user_authreply -->
</span>
</td>
<td align="right" nowrap="nowrap"><span class="gensmall">{L_JUMP_TO}: {S_JUMPBOX_SELECT} <input class="liteoption" type="submit" value="{L_GO}" /></span></td>
<!-- BEGIN moderation_panel -->
<td align="center">
<span class="gensmall">{moderation_panel.U_YOUR_PERSONAL_MODERATE}</span>
</td>
<td align="center" width="250">
<span class="gensmall"> </span>
</td>
<!-- END moderation_panel -->
</tr>
</table>
</form>
<!-- BEGIN viewtopic_bottom -->
<table class="noprint" width="100%" border="0" cellspacing="2" cellpadding="0" align="center">
<tr>
<td colspan="2" align="left" valign="top" nowrap="nowrap"><br />{S_TOPIC_ADMIN}<br />
<form name="action" method="get" action="{S_FORM_MOD_ACTION}">
<input type="hidden" name="t" value="{TOPIC_ID}" />
<!-- <input type="hidden" name="sid" value="{S_SID}" /> -->
<input type="hidden" name="{SECURE_ID_NAME}" value="{SECURE_ID_VALUE}" />
<span class="gen">{L_MOD_TOOLS}<br />{S_SELECT_MOD} <input class="liteoption" type="submit" value="{L_GO}" /></span>
</form>
</td>
</tr>
</table>
<!-- END viewtopic_bottom -->
<!-- BEGIN switch_image_resize -->
<script type="text/javascript">
//<![CDATA[
$(resize_images({ 'selector' : '.postbody', 'max_width' : {switch_image_resize.IMG_RESIZE_WIDTH}, 'max_height' : {switch_image_resize.IMG_RESIZE_HEIGHT} }));
//]]>
</script>
<!-- END switch_image_resize -->
<script src="//s7.addthis.com/js/300/addthis_widget.js#pubid=forumotion" type="text/javascript"></script>
<section>
MlleAlys- Membre actif
- Messages : 5793
Inscrit(e) le : 12/09/2012
Re: [PHPBB2] Les Sondages n'apparaissent plus Oo
C'est le seul javascript pour les sujets que je possède. Peut être du css aussi ? Pour les noms néanmoins maintenant avec le nouveau template cela fonctionne parfaitement. Merci à toi de ton aide infiniment. Je mets le sujet en résolu.
Forum gratuit : Le forum des forums actifs :: Entraide & Support... :: Problème avec un script, un code :: Archives des problèmes avec un code
Page 1 sur 1
Permission de ce forum:
Vous ne pouvez pas répondre aux sujets dans ce forum