CSSActif, le forum, n'est plus maintenu. Il est néanmoins disponible pour consultation. Pour des outils pratiques, rendez-vous sur: Découvrez CSSActif, une collection d'outils et de tutoriels interactifs pour les développeurs Web — HTML, CSS, JavaScript et bien plus! |
| Problème d'onglet dans profil [RESOLU] | |
| Dumax
{ Membre }
Messages : 12
| Bonjour à tous ! Alors j'ai voulu mettre des onglets dans mon profil, j'ai donc modifier template et CSS. Tout marche très bien sur le premier message, mais sur les suivants plus rien ! Donc voici le lien du forum pour un aperçu Et mon template - Code:
-
<script type="text/javascript"> //<![CDATA[ var multiquote_img_off = '{JS_MULTIQUOTE_IMG_OFF}', multiquote_img_on = '{JS_MULTIQUOTE_IMG_ON}', _atr = '{JS_DIR}addthis/', _ati = '{PATH_IMG_FA}addthis/'{ADDTHIS_LANG}, addthis_localize = { share_caption: "{L_SHARE_CAPTION}", email: "{L_EMAIL}", email_caption: "{L_EMAIL_CAPTION}", favorites: "{L_SHARE_BOOKMARKS}", print: "{L_PRINT}", more: "{L_MORE}" }; $(function(){
if(typeof(_atc) == "undefined") { _atc = { }; } _atc.cwait = 0; $('.addthis_button').mouseup(function(){ if ($('#at15s').css('display') == 'block') { addthis_close(); } }); });
var hiddenMsgLabel = { visible:'{JS_HIDE_HIDDEN_MESSAGE}', hidden:'{JS_SHOW_HIDDEN_MESSAGE}' }; showHiddenMessage = function(id) { try { var regId = parseInt(id, 10); if( isNaN(regId) ) { regId = 0; } if( regId > 0) { $('.post--' + id).toggle(0, function() { if( $(this).is(":visible") ) { $('#hidden-title--' + id).html(hiddenMsgLabel.visible); } else { $('#hidden-title--' + id).html(hiddenMsgLabel.hidden); } }); } } catch(e) { } return false; };
//]]> </script>
<table width="100%" border="0" cellspacing="2" cellpadding="0"> <tr> <td align="left" valign="middle" nowrap="nowrap"> <span class="nav"> <!-- 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 --> </span> </td> <td class="nav" valign="middle" width="100%"> <span class="nav" itemscope itemtype="http://data-vocabulary.org/Breadcrumb"> <a class="nav" href="{U_INDEX}" itemprop="url"><span itemprop="title">{L_INDEX}</span></a> <!--{NAV_SEP}<a class="nav" href="{U_ALBUM}" itemprop="url"><span itemprop="title">{L_ALBUM}</span></a>--> {NAV_CAT_DESC_SECOND} </span> </td> <td align="right" valign="bottom" nowrap="nowrap" width="100%"> <!-- BEGIN switch_twitter_btn --> <span id="twitter_btn" style="margin-left: 6px; "> <a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal">Tweet</a> <script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script> </span> <!-- END switch_twitter_btn --> <!-- BEGIN switch_fb_likebtn --> <script>(function(d, s, id) { var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) return; js = d.createElement(s); js.id = id; js.src = "//connect.facebook.net/{LANGUAGE}/all.js#xfbml=1"; fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'facebook-jssdk'));</script> <div class="fb-like" data-href="{FORUM_URL}{TOPIC_URL}" data-layout="button_count" data-action="like" data-show-faces="false" data-share="false"></div> <!-- END switch_fb_likebtn --> <span class="gensmall bold"> <a class="addthis_button" href="http://www.addthis.com/bookmark.php?v=250&pub=forumotion">{L_SHARE}</a> <!-- BEGIN switch_plus_menu --> | <script type="text/javascript">//<![CDATA[ var url_favourite = '{U_FAVOURITE_JS_PLUS_MENU}'; var url_newposts = '{U_NEWPOSTS_JS_PLUS_MENU}'; var url_egosearch = '{U_EGOSEARCH_JS_PLUS_MENU}'; var url_unanswered = '{U_UNANSWERED_JS_PLUS_MENU}'; var url_watchsearch = '{U_WATCHSEARCH_JS_PLUS_MENU}'; var url_tellfriend = '{U_TELLFRIEND_JS_PLUS_MENU}'; insert_plus_menu('f{FORUM_ID}&t={TOPIC_ID}','{JS_SESSION_ID}', {JS_AUTH_FAVOURITES}); //]]> </script> <!-- END switch_plus_menu --> </span> </td> </tr> </table>
<table width="100%" border="0" cellspacing="3" cellpadding="0" >
{POLL_DISPLAY} <!-- BEGIN postrow --> <!-- BEGIN hidden --> <tr> <td class="postdetails {postrow.hidden.ROW_CLASS}" colspan="3" align="center">{postrow.hidden.MESSAGE}</td> </tr> <!-- END hidden --> <!-- BEGIN displayed --> <tr class="post post--{postrow.displayed.U_POST_ID}" id="p{postrow.displayed.U_POST_ID}" style="{postrow.displayed.DISPLAYABLE_STATE}"> <table class="messages"> <tr> <td class="noprint"> </td> <td align="center" colspan="2" class="t-title"> <h1 class="cattitle"> {TOPIC_TITLE}</h1> </td> <td align="center" class="browse-arrows"><a href="{U_VIEW_OLDER_TOPIC}">{L_VIEW_PREVIOUS_TOPIC}</a> <a href="{U_VIEW_NEWER_TOPIC}">{L_VIEW_NEXT_TOPIC}</a> <a href="#bottom">{L_GOTO_DOWN}</a> </td> </tr> <tr> <td valign="top" width="100%" height="28" colspan="3"> <table class="mess-body" width="100%" border="0" cellspacing="2" cellpadding="0"> <tr> <td width="35%"><div class="mess-top1">Ecrit le {postrow.displayed.POST_DATE}</div></td>
<td width="35%" align="center" valign="top"> <div class="mess-top2"><span class="gensmall">{PAGINATION}</span></div></td> <td width="38%"><div class="mess-top3" valign="top" nowrap="nowrap" class="post-options"><center> {postrow.displayed.THANK_IMG} {postrow.displayed.MULTIQUOTE_IMG} {postrow.displayed.QUOTE_IMG} {postrow.displayed.EDIT_IMG} {postrow.displayed.DELETE_IMG} {postrow.displayed.IP_IMG} {postrow.displayed.REPORT_IMG} </center></div></td> </tr> <tr> <td colspan="3"> <!-- BEGIN switch_vote_active --> <div class="vote gensmall"> <!-- BEGIN switch_vote --> <div class="vote-button"><a href="{postrow.displayed.switch_vote_active.switch_vote.U_VOTE_PLUS}">+</a></div> <!-- END switch_vote -->
<!-- BEGIN switch_bar --> <div class="vote-bar" title="{postrow.displayed.switch_vote_active.L_VOTE_TITLE}"> <!-- BEGIN switch_vote_plus --> <div class="vote-bar-plus" style="height:{postrow.displayed.switch_vote_active.switch_bar.switch_vote_plus.HEIGHT_PLUS}px;"></div> <!-- END switch_vote_plus -->
<!-- BEGIN switch_vote_minus --> <div class="vote-bar-minus" style="height:{postrow.displayed.switch_vote_active.switch_bar.switch_vote_minus.HEIGHT_MINUS}px;"></div> <!-- END switch_vote_minus --> </div> <!-- END switch_bar -->
<!-- BEGIN switch_no_bar --> <div title="{postrow.displayed.switch_vote_active.L_VOTE_TITLE}" class="vote-no-bar">----</div> <!-- END switch_no_bar -->
<!-- BEGIN switch_vote --> <div class="vote-button"><a href="{postrow.displayed.switch_vote_active.switch_vote.U_VOTE_MINUS}">-</a></div> <!-- END switch_vote --> </div> <!-- END switch_vote_active -->
<div class="postbody"> <div>{postrow.displayed.MESSAGE}</div>
<!-- BEGIN switch_attachments --> <dl class="attachbox"> <dt>{postrow.displayed.switch_attachments.L_ATTACHMENTS}</dt> <dd> <!-- BEGIN switch_post_attachments --> <dl class="file"> <dt> <img src="{postrow.displayed.switch_attachments.switch_post_attachments.U_IMG}" alt="" />
<!-- BEGIN switch_dl_att --> <a class="postlink" href="{postrow.displayed.switch_attachments.switch_post_attachments.switch_dl_att.U_ATTACHMENT}">{postrow.displayed.switch_attachments.switch_post_attachments.switch_dl_att.ATTACHMENT}</a> {postrow.displayed.switch_attachments.switch_post_attachments.switch_dl_att.ATTACHMENT_DEL} <!-- END switch_dl_att -->
<!-- BEGIN switch_no_dl_att --> {postrow.displayed.switch_attachments.switch_post_attachments.switch_no_dl_att.ATTACHMENT} {postrow.displayed.switch_attachments.switch_post_attachments.switch_no_dl_att.ATTACHMENT_DEL} <!-- END switch_no_dl_att --> </dt>
<!-- BEGIN switch_no_comment --> <dd> <em>{postrow.displayed.switch_attachments.switch_post_attachments.switch_no_comment.ATTACHMENT_COMMENT}</em> </dd> <!-- END switch_no_comment -->
<!-- BEGIN switch_no_dl_att --> <dd> <em><strong>{postrow.displayed.switch_attachments.switch_post_attachments.switch_no_dl_att.TEXT_NO_DL}</strong></em> </dd> <!-- END switch_no_dl_att -->
<dd>({postrow.displayed.switch_attachments.switch_post_attachments.FILE_SIZE}) {postrow.displayed.switch_attachments.switch_post_attachments.NB_DL}</dd> </dl> <!-- END switch_post_attachments --> </dd> </dl> <!-- END switch_attachments -->
<div class="clear"></div> <!-- BEGIN switch_signature --> <div class="signature_div"> {postrow.displayed.SIGNATURE} </div> <!-- END switch_signature -->
</div> <div align="center" style="margin-top: 20px" valign="middle" width="150"> <a href="#top">{L_BACK_TO_TOP}</a> <a href="#bottom">{L_GOTO_DOWN}</a> </div> </td> </tr> </table> </td> <td valign="top" width="200px"> <div class="profil"> <div class="ruban" valign="center"> <h2><div class="name"><a style="position: relative; top: -30px; width: 1px;" id="{postrow.displayed.U_POST_ID}"></a> <strong>{postrow.displayed.POSTER_NAME}</strong></div></h2> </div> <div class="ruban_droit"></div> <link href='http://fonts.googleapis.com/css?family=Calligraffitti' rel='stylesheet' type='text/css'> <br /> <center><span class="postdetails poster-profile"> {postrow.displayed.POSTER_RANK}<br /> {postrow.displayed.RANK_IMAGE}<br /> <img src="http://2img.net/i/fa/empty.gif" alt="" style="width:150px;height:1px" /></span></center>
<html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>onglet</title> <script type="text/javascript"> //<!-- function change_onglet(name) { document.getElementById('onglet_'+anc_onglet).className = 'onglet_0 onglet'; document.getElementById('onglet_'+name).className = 'onglet_1 onglet'; document.getElementById('contenu_onglet_'+anc_onglet).style.display = 'none'; document.getElementById('contenu_onglet_'+name).style.display = 'block'; anc_onglet = name; } //--> </script> <style type="text/css"> .ruban2 {background-image:url(http://i23.servimg.com/u/f23/13/73/66/80/12611.png); height: 35px; width: 250px; position: relative; left:-5px; top: 25px; float: left; box-shadow: 0px 0px 4px rgba(0,0,0,0.55); z-index: 100; } .ruban2 h2 {font-size: 25px; color: #fff; text-shadow: 1px 1px 2px rgba(0,0,0,0.2); text-align: center; margin:10px; } .ruban2_droit {border-color: transparent transparent transparent #dfdfed; border-style:solid; border-width:15px; height:0px; width:0px; position: relative; left: 230px; top: 27px; z-index: -1;} .onglet { display:inline-block; margin-left:3px; margin-right:3px; cursor:pointer; font-size: 12pt; font-family: 'Calligraffitti', cursive;} .onglet_0 { color: black; } .onglet_1 { border-bottom:0px solid black; padding-bottom:4px; } .contenu_onglet { background-color:#dfdfed; -moz-box-shadow: 0px 0px 1px; -o-box-shadow: 0px 0px 1px;-webkit-box-shadow: 0px 0px 1px; box-shadow: 0px 0px 1px; margin: 5px; padding:10px; display:none; font-size: 11px; text-align: justify; font-family: arial; height: 320px; overflow: auto; width: 200px; } ul { margin-top:0px; margin-bottom:0px; margin-left:-10px }
</style> </head> <body> <div class="systeme_onglets"> <center><div class="contenu_onglets"> <div class="contenu_onglet" id="contenu_onglet_1"> {postrow.displayed.POSTER_AVATAR} </div> <div class="contenu_onglet" id="contenu_onglet_2"> <!-- BEGIN profile_field --> {postrow.displayed.profile_field.LABEL} {postrow.displayed.profile_field.CONTENT}{postrow.displayed.profile_field.SEPARATOR} <!-- END profile_field --> </div> <div class="contenu_onglet" id="contenu_onglet_3"> {postrow.displayed.POSTER_RPG} </div> <div class="contenu_onglet" id="contenu_onglet_4"> {postrow.displayed.PROFILE_IMG} {postrow.displayed.PM_IMG} {postrow.displayed.EMAIL_IMG}<!-- BEGIN contact_field --> {postrow.displayed.contact_field.CONTENT}<!-- END contact_field --> {postrow.displayed.ONLINE_IMG} </div> </div></center> <div class="ruban2"> <h2><div class="onglets"> <span class="onglet_0 onglet" id="onglet_1" onclick="javascript:change_onglet('1');">1,</span> <span class="onglet_0 onglet" id="onglet_2" onclick="javascript:change_onglet('2');">2, </span> <span class="onglet_0 onglet" id="onglet_3" onclick="javascript:change_onglet('3');">3, </span> <span class="onglet_0 onglet" id="onglet_4" onclick="javascript:change_onglet('4');">Soleil !</span> </div></h2> </div> <div class="ruban2_droit"></div> <br/> </div> <script type="text/javascript"> //<!-- var anc_onglet = '1'; change_onglet(anc_onglet); //--> </script> </body> </html> </div> </td> </tr>
<!-- BEGIN first_post_br --> </table> <hr /> <table class="forumline" width="100%" border="0" cellspacing="1" cellpadding="0"> <!-- END first_post_br --> <!-- END displayed --> <!-- END postrow --> <!-- BEGIN no_post --> <tr align="center"> <td class="row1" colspan="2" height="28"> <span class="genmed">{no_post.L_NO_POST}</span> </td> </tr> <!-- END no_post --> </table>
<!-- BEGIN promot_trafic --> <table class="forumline" width="100%" border="0" cellpadding="1" cellspacing="0" id="ptrafic_close" style="display:none;margin: 1px 0px 1px 0px"> <tr> <td class="catBottom" height="28"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td valign="top"><h1 class="cattitle"> {PROMOT_TRAFIC_TITLE}</h1></td> <td align="right" valign="middle" width="10"><span class="gensmall"><a href="javascript:ShowHideLayer('ptrafic_open','ptrafic_close');"><img src="{TABS_MORE_IMG}" alt="+" align="middle" border="0" /></a></span></td> </tr> </table> </td> </tr> </table>
<table class="forumline" width="100%" border="0" cellpadding="1" cellspacing="0" id="ptrafic_open" style="display:'';margin: 1px 0px 1px 0px"> <tr> <td class="catBottom" height="28"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td valign="top"><h1 class="cattitle"> {PROMOT_TRAFIC_TITLE}</h1></td> <td align="right" valign="middle" width="10"><span class="gensmall"><a href="javascript:ShowHideLayer('ptrafic_open','ptrafic_close');"><img src="{TABS_LESS_IMG}" alt="-" align="middle" border="0" /></a></span></td> </tr> </table> </td> </tr> <tr> <td class="row2 postbody" valign="top"> <!-- BEGIN link --> » <a style="text-decoration:none" href="{promot_trafic.link.U_HREF}" target="_blank" title="{promot_trafic.link.TITLE}" rel="nofollow">{promot_trafic.link.TITLE}</a><br /> <!-- END link --> </td> </tr> </table> <!-- END promot_trafic -->
<!-- BEGIN switch_forum_rules --> <table id="forum_rules" class="forumline" width="100%" border="0" cellspacing="0" cellpadding="0" style="margin: 1px 0px 1px 0px"> <tbody> <tr> <td class="catBottom"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tbody> <tr> <td valign="top"> <h1 class="cattitle"> {L_FORUM_RULES}</h1> </td> </tr> </tbody> </table> </td> </tr> <tr> <td class="row1 clearfix"> <table> <tr> <!-- BEGIN switch_forum_rule_image --> <td class="logo"> <img src="{RULE_IMG_URL}" alt="" /> </td> <!-- END switch_forum_rule_image --> <td class="rules postbody"> {RULE_MSG} </td> </tr> </table> </td> </tr> </tbody> </table> <!-- END switch_forum_rules -->
<table class="mess-box" width="100%" height="100%" border="0" cellspacing="0" cellpadding="0"> <tr colspan="2" align="right" width="100%"> <td width="100%" height="28"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="9%" class="noprint"> </td> <td align="center" class="t-title"><a name="bottomtitle"></a><h1 class="cattitle">{TOPIC_TITLE}</h1></td> <td align="left" nowrap="nowrap" width="9%" class="browse-arrows"><a href="{U_VIEW_OLDER_TOPIC}">{L_VIEW_PREVIOUS_TOPIC}</a> <a href="{U_VIEW_NEWER_TOPIC}">{L_VIEW_NEXT_TOPIC}</a> <a href="#top">{L_BACK_TO_TOP}</a> </td> </tr> </table> </td> </tr> <link href='http://fonts.googleapis.com/css?family=Kaushan+Script' rel='stylesheet' type='text/css'> <tr width="104%"> <td class="ruban3" colspan="2" width="100%" align="center" style="padding:0px"> <!-- BEGIN switch_user_logged_in --> <br/><a name="quickreply"></a> {QUICK_REPLY_FORM}<br /> <!-- END switch_user_logged_in --> </td> <div class="ruban3_gauche"></div> <div class="ruban3_droit"></div> </tr> <tr> <td width="100%" colspan="2"> <table align="center" width="100%"> <!-- BEGIN topicpagination --> <tr> <td width="50%" valign="top" {COLSPAN_PAGINATION} align="center"> <div class="mess-box-info"><span class="gensmall">{PAGE_NUMBER}</span></div></td> <td width="50%" valign="top" {COLSPAN_PAGINATION} align="center"> <div class="mess-box-info"><span class="gensmall">{PAGINATION}</span></div></td> </tr> <!-- END topicpagination --> <tr> <td width="50%"> <!-- BEGIN show_permissions --> <div class="mess-box-info"><span class="gensmall">{L_TABS_PERMISSIONS}</span><br/> <span class="gensmall">{S_AUTH_LIST}</span><br/><br/> <!-- END show_permissions --> <!-- BEGIN viewtopic_bottom --> <span class="gensmall">{L_JUMP_TO}: {S_JUMPBOX_SELECT} <input class="liteoption" type="submit" value="{L_GO}" /></span> <!-- END viewtopic_bottom --> </div> </td> <td><div class="mess-box-info" align="center"> <!-- BEGIN viewtopic_bottom --> <table class="noprint" width="100%" border="0" cellspacing="2" style="margin-top: -6px" 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 --> </div></td></tr>
<!-- BEGIN switch_user_logged_in --> <!-- BEGIN watchtopic --> <tr> <td colspan="2" align="center" valign="top"><div class="mess-box-info" ><span class="gensmall">{S_WATCH_TOPIC}</span></div></td> </tr> <!-- END watchtopic --> <!-- END switch_user_logged_in -->
</table> <tr> <th valign="middle" width="100%"> <span class="nav"><a class="nav" href="{U_INDEX}">{L_INDEX}</a>{NAV_SEP}<a class="nav" href="{U_ALBUM}">{L_ALBUM}</a>{NAV_CAT_DESC_SECOND}</span> </th> </tr> </td> </tr>
</table> </td> </tr> <tr> <td style="margin:0; padding: 0;" colspan="2"> <table border="0" cellpadding="0" cellspacing="0" width="100%" id="info_close" style="display:none;"> <tbody> <tr> <td class="catBottom" colspan="2" height="28"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td valign="middle" width="100%"><span class="nav"><a class="nav" href="{U_INDEX}">{L_INDEX}</a>{NAV_SEP}<a class="nav" href="{U_ALBUM}">{L_ALBUM}</a>{NAV_CAT_DESC_SECOND}</span></td> </tr> </table> </td> </tr> </tbody> </table> </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>
<!-- 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 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="{JS_DIR}addthis/addthis_widget.js" type="text/javascript"></script> Voici une capture d'écran du profil qui marche et l'autre non : - Spoiler:
Précisions, j'avais vu un sujet posté ici (lien :http://www.css-actif.com/t15887-probleme-avec-le-profil-a-archiver) avec le même problème, j'ai essayé de faire ce qui a été dit mais ça n'avait pas marché. Alors est-ce moi qui n'est rien compris ou je ne sais pas... Merci à vous, et j'espère que mon sauveur est parmi vous ! |
Dernière édition par Dumax le Jeu 22 Jan 2015, 07:41, édité 1 fois | |
| | | Nihil
{ Modérateur }
Messages : 1216
| En fait le code utilisé n'est pas exactement le même ^___^, on va devoir faire quelques modifs de plus :p Dans ton template, il ne faut pas mettre de balise head, ou body (ici) : - Code:
-
<html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>onglet</title> Ce sont des éléments à mettre seulement quand tu crées ta propre page HTML On va donc commencer par remplacer toute cette partie là : - Code:
-
<html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>onglet</title> <script type="text/javascript"> //<!-- function change_onglet(name) { document.getElementById('onglet_'+anc_onglet).className = 'onglet_0 onglet'; document.getElementById('onglet_'+name).className = 'onglet_1 onglet'; document.getElementById('contenu_onglet_'+anc_onglet).style.display = 'none'; document.getElementById('contenu_onglet_'+name).style.display = 'block'; anc_onglet = name; } //--> </script> <style type="text/css"> .ruban2 {background-image:url(http://i23.servimg.com/u/f23/13/73/66/80/12611.png); height: 35px; width: 250px; position: relative; left:-5px; top: 25px; float: left; box-shadow: 0px 0px 4px rgba(0,0,0,0.55); z-index: 100; } .ruban2 h2 {font-size: 25px; color: #fff; text-shadow: 1px 1px 2px rgba(0,0,0,0.2); text-align: center; margin:10px; } .ruban2_droit {border-color: transparent transparent transparent #dfdfed; border-style:solid; border-width:15px; height:0px; width:0px; position: relative; left: 230px; top: 27px; z-index: -1;} .onglet { display:inline-block; margin-left:3px; margin-right:3px; cursor:pointer; font-size: 12pt; font-family: 'Calligraffitti', cursive;} .onglet_0 { color: black; } .onglet_1 { border-bottom:0px solid black; padding-bottom:4px; } .contenu_onglet { background-color:#dfdfed; -moz-box-shadow: 0px 0px 1px; -o-box-shadow: 0px 0px 1px;-webkit-box-shadow: 0px 0px 1px; box-shadow: 0px 0px 1px; margin: 5px; padding:10px; display:none; font-size: 11px; text-align: justify; font-family: arial; height: 320px; overflow: auto; width: 200px; } ul { margin-top:0px; margin-bottom:0px; margin-left:-10px }
</style> </head> <body> <div class="systeme_onglets"> <center><div class="contenu_onglets"> <div class="contenu_onglet" id="contenu_onglet_1"> {postrow.displayed.POSTER_AVATAR} </div> <div class="contenu_onglet" id="contenu_onglet_2"> <!-- BEGIN profile_field --> {postrow.displayed.profile_field.LABEL} {postrow.displayed.profile_field.CONTENT}{postrow.displayed.profile_field.SEPARATOR} <!-- END profile_field --> </div> <div class="contenu_onglet" id="contenu_onglet_3"> {postrow.displayed.POSTER_RPG} </div> <div class="contenu_onglet" id="contenu_onglet_4"> {postrow.displayed.PROFILE_IMG} {postrow.displayed.PM_IMG} {postrow.displayed.EMAIL_IMG}<!-- BEGIN contact_field --> {postrow.displayed.contact_field.CONTENT}<!-- END contact_field --> {postrow.displayed.ONLINE_IMG} </div> </div></center> <div class="ruban2"> <h2><div class="onglets"> <span class="onglet_0 onglet" id="onglet_1" onclick="javascript:change_onglet('1');">1,</span> <span class="onglet_0 onglet" id="onglet_2" onclick="javascript:change_onglet('2');">2, </span> <span class="onglet_0 onglet" id="onglet_3" onclick="javascript:change_onglet('3');">3, </span> <span class="onglet_0 onglet" id="onglet_4" onclick="javascript:change_onglet('4');">Soleil !</span> </div></h2> </div> <div class="ruban2_droit"></div> <br/> </div> <script type="text/javascript"> //<!-- var anc_onglet = '1'; change_onglet(anc_onglet); //--> </script> </body> </html> Pour commencer je vais te donner des explications pour faire marcher le système d'onglet, puis ensuite sur comment améliorer le problème de page HTML dans ton template. On va essayer de modifier le moins possible le fonctionnement actuel, mais sinon on pourrait faire autrement le système d'onglet On va repérer cette partie là : - Code:
-
<script type="text/javascript"> //<!-- function change_onglet(name) { document.getElementById('onglet_'+anc_onglet).className = 'onglet_0 onglet'; document.getElementById('onglet_'+name).className = 'onglet_1 onglet'; document.getElementById('contenu_onglet_'+anc_onglet).style.display = 'none'; document.getElementById('contenu_onglet_'+name).style.display = 'block'; anc_onglet = name; } //--> </script> <style type="text/css"> .ruban2 {background-image:url(http://i23.servimg.com/u/f23/13/73/66/80/12611.png); height: 35px; width: 250px; position: relative; left:-5px; top: 25px; float: left; box-shadow: 0px 0px 4px rgba(0,0,0,0.55); z-index: 100; } .ruban2 h2 {font-size: 25px; color: #fff; text-shadow: 1px 1px 2px rgba(0,0,0,0.2); text-align: center; margin:10px; } .ruban2_droit {border-color: transparent transparent transparent #dfdfed; border-style:solid; border-width:15px; height:0px; width:0px; position: relative; left: 230px; top: 27px; z-index: -1;} .onglet { display:inline-block; margin-left:3px; margin-right:3px; cursor:pointer; font-size: 12pt; font-family: 'Calligraffitti', cursive;} .onglet_0 { color: black; } .onglet_1 { border-bottom:0px solid black; padding-bottom:4px; } .contenu_onglet { background-color:#dfdfed; -moz-box-shadow: 0px 0px 1px; -o-box-shadow: 0px 0px 1px;-webkit-box-shadow: 0px 0px 1px; box-shadow: 0px 0px 1px; margin: 5px; padding:10px; display:none; font-size: 11px; text-align: justify; font-family: arial; height: 320px; overflow: auto; width: 200px; } ul { margin-top:0px; margin-bottom:0px; margin-left:-10px }
</style>
On va la déplacer juste après cette partie là : - Code:
-
<script type="text/javascript"> //<![CDATA[ var multiquote_img_off = '{JS_MULTIQUOTE_IMG_OFF}', multiquote_img_on = '{JS_MULTIQUOTE_IMG_ON}', _atr = '{JS_DIR}addthis/', _ati = '{PATH_IMG_FA}addthis/'{ADDTHIS_LANG}, addthis_localize = { share_caption: "{L_SHARE_CAPTION}", email: "{L_EMAIL}", email_caption: "{L_EMAIL_CAPTION}", favorites: "{L_SHARE_BOOKMARKS}", print: "{L_PRINT}", more: "{L_MORE}" }; $(function(){
if(typeof(_atc) == "undefined") { _atc = { }; } _atc.cwait = 0; $('.addthis_button').mouseup(function(){ if ($('#at15s').css('display') == 'block') { addthis_close(); } }); });
var hiddenMsgLabel = { visible:'{JS_HIDE_HIDDEN_MESSAGE}', hidden:'{JS_SHOW_HIDDEN_MESSAGE}' }; showHiddenMessage = function(id) { try { var regId = parseInt(id, 10); if( isNaN(regId) ) { regId = 0; } if( regId > 0) { $('.post--' + id).toggle(0, function() { if( $(this).is(":visible") ) { $('#hidden-title--' + id).html(hiddenMsgLabel.visible); } else { $('#hidden-title--' + id).html(hiddenMsgLabel.hidden); } }); } } catch(e) { } return false; };
//]]> </script> Normalement une fois cela fait (validé + publié) le rendu est exactement le même. Tu peux me confirmer que le rendu n'est pas pire ^__^ ? Ensuite on continue les modifications si tout va bien ! | | |
| | | Dumax
{ Membre }
Messages : 12
| Oh merci de me venir en aide Oui c'est bon ^^ | | |
| | | Nihil
{ Modérateur }
Messages : 1216
| Super ! Maintenant pour chaque onglet on va rajouter {postrow.displayed.U_POST_ID} à la fin de l'id. Ca va permettre d'avoir une id unique pour chaque onglet. Ainsi par exemple : - Code:
-
<div class="contenu_onglet" id="contenu_onglet_1"> {postrow.displayed.POSTER_AVATAR} </div> Devient - Code:
-
<div class="contenu_onglet" id="contenu_onglet_1{postrow.displayed.U_POST_ID}"> {postrow.displayed.POSTER_AVATAR} </div> Il faut faire la même chose pour les 3 autres onglets restant. Ainsi pour le 3 on aurait ceci : - Code:
-
<div class="contenu_onglet" id="contenu_onglet_3"> {postrow.displayed.POSTER_RPG} </div>
Avec la modification : - Code:
-
<div class="contenu_onglet" id="contenu_onglet_3{postrow.displayed.U_POST_ID}"> {postrow.displayed.POSTER_RPG} </div>
Ensuite on va s'attaquer aux boutons pour changer d'onglets : - Code:
-
<span class="onglet_0 onglet" id="onglet_1" onclick="javascript:change_onglet('1');">1,</span> <span class="onglet_0 onglet" id="onglet_2" onclick="javascript:change_onglet('2');">2, </span> <span class="onglet_0 onglet" id="onglet_3" onclick="javascript:change_onglet('3');">3, </span> <span class="onglet_0 onglet" id="onglet_4" onclick="javascript:change_onglet('4');">Soleil !</span>
On va faire la même modification, ce qui donne donc : - Code:
-
<span class="onglet_0 onglet" id="onglet_1{postrow.displayed.U_POST_ID}" onclick="javascript:change_onglet('1{postrow.displayed.U_POST_ID}');">1,</span> <span class="onglet_0 onglet" id="onglet_2{postrow.displayed.U_POST_ID}" onclick="javascript:change_onglet('2{postrow.displayed.U_POST_ID}');">2, </span> <span class="onglet_0 onglet" id="onglet_3{postrow.displayed.U_POST_ID}" onclick="javascript:change_onglet('3{postrow.displayed.U_POST_ID}');">3, </span> <span class="onglet_0 onglet" id="onglet_4{postrow.displayed.U_POST_ID}" onclick="javascript:change_onglet('4{postrow.displayed.U_POST_ID}');">Soleil !</span>
Dis moi si une fois fait ça marche mieux | | |
| | | Dumax
{ Membre }
Messages : 12
| Nop ca marche plus -- Si tu as une autre idée pour mettre des onglets, je suis toute ouïe ! Faut être patient avec moi... | | |
| | | Nihil
{ Modérateur }
Messages : 1216
| Oups, j'ai oublié un élément aussi A cet endroit là : - Code:
-
<script type="text/javascript"> //<!-- var anc_onglet = '1'; change_onglet(anc_onglet); //--> </script> On va aussi rajouter l'ID - Code:
-
<script type="text/javascript"> //<!-- var anc_onglet = '1{postrow.displayed.U_POST_ID}'; change_onglet(anc_onglet); //--> </script> Courage, on va y arriver ! | | |
| | | Dumax
{ Membre }
Messages : 12
| Alors ca marche très bien pour les deuxième et autre posts, mais maintenant c'est le profil du premier post qui ne fonctionnent plus très bien, quand je clic sur un onglet, ca ne s'affiche plus correctement et ceux des posts suivants disparaissent | | |
| | | Nihil
{ Modérateur }
Messages : 1216
| Hahaha, je suis bête, je vois exactement d'où ça vient... J'aurai du y penser XDD. En fait, ce système d'onglet là n'est pas fait pour gérer plusieurs système d'onglets dans une seule page, il faudrait réécrire le JS différemment xD.
Pourrais je avoir l'ensemble de ton template viewtopic_body avec les modifications apportées s'il te plait ♥ ? | | |
| | | Dumax
{ Membre }
Messages : 12
| Oui bien sur, le voici - Code:
-
<script type="text/javascript"> //<![CDATA[ var multiquote_img_off = '{JS_MULTIQUOTE_IMG_OFF}', multiquote_img_on = '{JS_MULTIQUOTE_IMG_ON}', _atr = '{JS_DIR}addthis/', _ati = '{PATH_IMG_FA}addthis/'{ADDTHIS_LANG}, addthis_localize = { share_caption: "{L_SHARE_CAPTION}", email: "{L_EMAIL}", email_caption: "{L_EMAIL_CAPTION}", favorites: "{L_SHARE_BOOKMARKS}", print: "{L_PRINT}", more: "{L_MORE}" }; $(function(){
if(typeof(_atc) == "undefined") { _atc = { }; } _atc.cwait = 0; $('.addthis_button').mouseup(function(){ if ($('#at15s').css('display') == 'block') { addthis_close(); } }); });
var hiddenMsgLabel = { visible:'{JS_HIDE_HIDDEN_MESSAGE}', hidden:'{JS_SHOW_HIDDEN_MESSAGE}' }; showHiddenMessage = function(id) { try { var regId = parseInt(id, 10); if( isNaN(regId) ) { regId = 0; } if( regId > 0) { $('.post--' + id).toggle(0, function() { if( $(this).is(":visible") ) { $('#hidden-title--' + id).html(hiddenMsgLabel.visible); } else { $('#hidden-title--' + id).html(hiddenMsgLabel.hidden); } }); } } catch(e) { } return false; };
//]]> </script> <script type="text/javascript"> //<!-- function change_onglet(name) { document.getElementById('onglet_'+anc_onglet).className = 'onglet_0 onglet'; document.getElementById('onglet_'+name).className = 'onglet_1 onglet'; document.getElementById('contenu_onglet_'+anc_onglet).style.display = 'none'; document.getElementById('contenu_onglet_'+name).style.display = 'block'; anc_onglet = name; } //--> </script> <style type="text/css"> .ruban2 {background-image:url(http://i23.servimg.com/u/f23/13/73/66/80/12611.png); height: 35px; width: 250px; position: relative; left:-5px; top: 25px; float: left; box-shadow: 0px 0px 4px rgba(0,0,0,0.55); z-index: 100; } .ruban2 h2 {font-size: 25px; color: #fff; text-shadow: 1px 1px 2px rgba(0,0,0,0.2); text-align: center; margin:10px; } .ruban2_droit {border-color: transparent transparent transparent #dfdfed; border-style:solid; border-width:15px; height:0px; width:0px; position: relative; left: 230px; top: 27px; z-index: -1;} .onglet { display:inline-block; margin-left:3px; margin-right:3px; cursor:pointer; font-size: 12pt; font-family: 'Calligraffitti', cursive;} .onglet_0 { color: black; } .onglet_1 { border-bottom:0px solid black; padding-bottom:4px; } .contenu_onglet { background-color:#dfdfed; -moz-box-shadow: 0px 0px 1px; -o-box-shadow: 0px 0px 1px;-webkit-box-shadow: 0px 0px 1px; box-shadow: 0px 0px 1px; margin: 5px; padding:10px; display:none; font-size: 11px; text-align: justify; font-family: arial; height: 320px; overflow: auto; width: 200px; } ul { margin-top:0px; margin-bottom:0px; margin-left:-10px }
</style>
<table width="100%" border="0" cellspacing="2" cellpadding="0"> <tr> <td align="left" valign="middle" nowrap="nowrap"> <span class="nav"> <!-- 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 --> </span> </td> <td class="nav" valign="middle" width="100%"> <span class="nav" itemscope itemtype="http://data-vocabulary.org/Breadcrumb"> <a class="nav" href="{U_INDEX}" itemprop="url"><span itemprop="title">{L_INDEX}</span></a> <!--{NAV_SEP}<a class="nav" href="{U_ALBUM}" itemprop="url"><span itemprop="title">{L_ALBUM}</span></a>--> {NAV_CAT_DESC_SECOND} </span> </td> <td align="right" valign="bottom" nowrap="nowrap" width="100%"> <!-- BEGIN switch_twitter_btn --> <span id="twitter_btn" style="margin-left: 6px; "> <a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal">Tweet</a> <script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script> </span> <!-- END switch_twitter_btn --> <!-- BEGIN switch_fb_likebtn --> <script>(function(d, s, id) { var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) return; js = d.createElement(s); js.id = id; js.src = "//connect.facebook.net/{LANGUAGE}/all.js#xfbml=1"; fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'facebook-jssdk'));</script> <div class="fb-like" data-href="{FORUM_URL}{TOPIC_URL}" data-layout="button_count" data-action="like" data-show-faces="false" data-share="false"></div> <!-- END switch_fb_likebtn --> <span class="gensmall bold"> <a class="addthis_button" href="http://www.addthis.com/bookmark.php?v=250&pub=forumotion">{L_SHARE}</a> <!-- BEGIN switch_plus_menu --> | <script type="text/javascript">//<![CDATA[ var url_favourite = '{U_FAVOURITE_JS_PLUS_MENU}'; var url_newposts = '{U_NEWPOSTS_JS_PLUS_MENU}'; var url_egosearch = '{U_EGOSEARCH_JS_PLUS_MENU}'; var url_unanswered = '{U_UNANSWERED_JS_PLUS_MENU}'; var url_watchsearch = '{U_WATCHSEARCH_JS_PLUS_MENU}'; var url_tellfriend = '{U_TELLFRIEND_JS_PLUS_MENU}'; insert_plus_menu('f{FORUM_ID}&t={TOPIC_ID}','{JS_SESSION_ID}', {JS_AUTH_FAVOURITES}); //]]> </script> <!-- END switch_plus_menu --> </span> </td> </tr> </table>
<table width="100%" border="0" cellspacing="3" cellpadding="0" >
{POLL_DISPLAY} <!-- BEGIN postrow --> <!-- BEGIN hidden --> <tr> <td class="postdetails {postrow.hidden.ROW_CLASS}" colspan="3" align="center">{postrow.hidden.MESSAGE}</td> </tr> <!-- END hidden --> <!-- BEGIN displayed --> <tr class="post post--{postrow.displayed.U_POST_ID}" id="p{postrow.displayed.U_POST_ID}" style="{postrow.displayed.DISPLAYABLE_STATE}"> <table class="messages"> <tr> <td class="noprint"> </td> <td align="center" colspan="2" class="t-title"> <h1 class="cattitle"> {TOPIC_TITLE}</h1> </td> <td align="center" class="browse-arrows"><a href="{U_VIEW_OLDER_TOPIC}">{L_VIEW_PREVIOUS_TOPIC}</a> <a href="{U_VIEW_NEWER_TOPIC}">{L_VIEW_NEXT_TOPIC}</a> <a href="#bottom">{L_GOTO_DOWN}</a> </td> </tr> <tr> <td valign="top" width="100%" height="28" colspan="3"> <table class="mess-body" width="100%" border="0" cellspacing="2" cellpadding="0"> <tr> <td width="35%"><div class="mess-top1">Ecrit le {postrow.displayed.POST_DATE}</div></td>
<td width="35%" align="center" valign="top"> <div class="mess-top2"><span class="gensmall">{PAGINATION}</span></div></td> <td width="38%"><div class="mess-top3" valign="top" nowrap="nowrap" class="post-options"><center> {postrow.displayed.THANK_IMG} {postrow.displayed.MULTIQUOTE_IMG} {postrow.displayed.QUOTE_IMG} {postrow.displayed.EDIT_IMG} {postrow.displayed.DELETE_IMG} {postrow.displayed.IP_IMG} {postrow.displayed.REPORT_IMG} </center></div></td> </tr> <tr> <td colspan="3"> <!-- BEGIN switch_vote_active --> <div class="vote gensmall"> <!-- BEGIN switch_vote --> <div class="vote-button"><a href="{postrow.displayed.switch_vote_active.switch_vote.U_VOTE_PLUS}">+</a></div> <!-- END switch_vote -->
<!-- BEGIN switch_bar --> <div class="vote-bar" title="{postrow.displayed.switch_vote_active.L_VOTE_TITLE}"> <!-- BEGIN switch_vote_plus --> <div class="vote-bar-plus" style="height:{postrow.displayed.switch_vote_active.switch_bar.switch_vote_plus.HEIGHT_PLUS}px;"></div> <!-- END switch_vote_plus -->
<!-- BEGIN switch_vote_minus --> <div class="vote-bar-minus" style="height:{postrow.displayed.switch_vote_active.switch_bar.switch_vote_minus.HEIGHT_MINUS}px;"></div> <!-- END switch_vote_minus --> </div> <!-- END switch_bar -->
<!-- BEGIN switch_no_bar --> <div title="{postrow.displayed.switch_vote_active.L_VOTE_TITLE}" class="vote-no-bar">----</div> <!-- END switch_no_bar -->
<!-- BEGIN switch_vote --> <div class="vote-button"><a href="{postrow.displayed.switch_vote_active.switch_vote.U_VOTE_MINUS}">-</a></div> <!-- END switch_vote --> </div> <!-- END switch_vote_active -->
<div class="postbody"> <div>{postrow.displayed.MESSAGE}</div>
<!-- BEGIN switch_attachments --> <dl class="attachbox"> <dt>{postrow.displayed.switch_attachments.L_ATTACHMENTS}</dt> <dd> <!-- BEGIN switch_post_attachments --> <dl class="file"> <dt> <img src="{postrow.displayed.switch_attachments.switch_post_attachments.U_IMG}" alt="" />
<!-- BEGIN switch_dl_att --> <a class="postlink" href="{postrow.displayed.switch_attachments.switch_post_attachments.switch_dl_att.U_ATTACHMENT}">{postrow.displayed.switch_attachments.switch_post_attachments.switch_dl_att.ATTACHMENT}</a> {postrow.displayed.switch_attachments.switch_post_attachments.switch_dl_att.ATTACHMENT_DEL} <!-- END switch_dl_att -->
<!-- BEGIN switch_no_dl_att --> {postrow.displayed.switch_attachments.switch_post_attachments.switch_no_dl_att.ATTACHMENT} {postrow.displayed.switch_attachments.switch_post_attachments.switch_no_dl_att.ATTACHMENT_DEL} <!-- END switch_no_dl_att --> </dt>
<!-- BEGIN switch_no_comment --> <dd> <em>{postrow.displayed.switch_attachments.switch_post_attachments.switch_no_comment.ATTACHMENT_COMMENT}</em> </dd> <!-- END switch_no_comment -->
<!-- BEGIN switch_no_dl_att --> <dd> <em><strong>{postrow.displayed.switch_attachments.switch_post_attachments.switch_no_dl_att.TEXT_NO_DL}</strong></em> </dd> <!-- END switch_no_dl_att -->
<dd>({postrow.displayed.switch_attachments.switch_post_attachments.FILE_SIZE}) {postrow.displayed.switch_attachments.switch_post_attachments.NB_DL}</dd> </dl> <!-- END switch_post_attachments --> </dd> </dl> <!-- END switch_attachments -->
<div class="clear"></div> <!-- BEGIN switch_signature --> <div class="signature_div"> {postrow.displayed.SIGNATURE} </div> <!-- END switch_signature -->
</div> <div align="center" style="margin-top: 20px" valign="middle" width="150"> <a href="#top">{L_BACK_TO_TOP}</a> <a href="#bottom">{L_GOTO_DOWN}</a> </div> </td> </tr> </table> </td> <td valign="top" width="200px"> <div class="profil"> <div class="ruban" valign="center"> <h2><div class="name"><a style="position: relative; top: -30px; width: 1px;" id="{postrow.displayed.U_POST_ID}"></a> <strong>{postrow.displayed.POSTER_NAME}</strong></div></h2> </div> <div class="ruban_droit"></div> <link href='http://fonts.googleapis.com/css?family=Calligraffitti' rel='stylesheet' type='text/css'> <br /> <center><span class="postdetails poster-profile"> {postrow.displayed.POSTER_RANK}<br /> {postrow.displayed.RANK_IMAGE}<br /> <img src="http://2img.net/i/fa/empty.gif" alt="" style="width:150px;height:1px" /></span></center>
<html xmlns="http://www.w3.org/1999/xhtml"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>onglet</title>
<body> <div class="systeme_onglets"> <center><div class="contenu_onglets"> <div class="contenu_onglet" id="contenu_onglet_1{postrow.displayed.U_POST_ID}"> {postrow.displayed.POSTER_AVATAR} </div> <div class="contenu_onglet" id="contenu_onglet_2{postrow.displayed.U_POST_ID}"> <!-- BEGIN profile_field --> {postrow.displayed.profile_field.LABEL} {postrow.displayed.profile_field.CONTENT}{postrow.displayed.profile_field.SEPARATOR} <!-- END profile_field --> </div> <div class="contenu_onglet" id="contenu_onglet_3{postrow.displayed.U_POST_ID}"> {postrow.displayed.POSTER_RPG} </div> <div class="contenu_onglet" id="contenu_onglet_4{postrow.displayed.U_POST_ID}"> {postrow.displayed.PROFILE_IMG} {postrow.displayed.PM_IMG} {postrow.displayed.EMAIL_IMG}<!-- BEGIN contact_field --> {postrow.displayed.contact_field.CONTENT}<!-- END contact_field --> {postrow.displayed.ONLINE_IMG} </div> </div></center> <div class="ruban2"> <h2><div class="onglets"> <span class="onglet_0 onglet" id="onglet_1{postrow.displayed.U_POST_ID}" onclick="javascript:change_onglet('1{postrow.displayed.U_POST_ID}');">1,</span> <span class="onglet_0 onglet" id="onglet_2{postrow.displayed.U_POST_ID}" onclick="javascript:change_onglet('2{postrow.displayed.U_POST_ID}');">2, </span> <span class="onglet_0 onglet" id="onglet_3{postrow.displayed.U_POST_ID}" onclick="javascript:change_onglet('3{postrow.displayed.U_POST_ID}');">3, </span> <span class="onglet_0 onglet" id="onglet_4{postrow.displayed.U_POST_ID}" onclick="javascript:change_onglet('4{postrow.displayed.U_POST_ID}');">Soleil !</span> </div></h2> </div> <div class="ruban2_droit"></div> <br/> </div> <script type="text/javascript"> //<!-- var anc_onglet = '1{postrow.displayed.U_POST_ID}'; change_onglet(anc_onglet); //--> </script> </body> </html> </div> </td> </tr>
<!-- BEGIN first_post_br --> </table> <hr /> <table class="forumline" width="100%" border="0" cellspacing="1" cellpadding="0"> <!-- END first_post_br --> <!-- END displayed --> <!-- END postrow --> <!-- BEGIN no_post --> <tr align="center"> <td class="row1" colspan="2" height="28"> <span class="genmed">{no_post.L_NO_POST}</span> </td> </tr> <!-- END no_post --> </table>
<!-- BEGIN promot_trafic --> <table class="forumline" width="100%" border="0" cellpadding="1" cellspacing="0" id="ptrafic_close" style="display:none;margin: 1px 0px 1px 0px"> <tr> <td class="catBottom" height="28"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td valign="top"><h1 class="cattitle"> {PROMOT_TRAFIC_TITLE}</h1></td> <td align="right" valign="middle" width="10"><span class="gensmall"><a href="javascript:ShowHideLayer('ptrafic_open','ptrafic_close');"><img src="{TABS_MORE_IMG}" alt="+" align="middle" border="0" /></a></span></td> </tr> </table> </td> </tr> </table>
<table class="forumline" width="100%" border="0" cellpadding="1" cellspacing="0" id="ptrafic_open" style="display:'';margin: 1px 0px 1px 0px"> <tr> <td class="catBottom" height="28"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td valign="top"><h1 class="cattitle"> {PROMOT_TRAFIC_TITLE}</h1></td> <td align="right" valign="middle" width="10"><span class="gensmall"><a href="javascript:ShowHideLayer('ptrafic_open','ptrafic_close');"><img src="{TABS_LESS_IMG}" alt="-" align="middle" border="0" /></a></span></td> </tr> </table> </td> </tr> <tr> <td class="row2 postbody" valign="top"> <!-- BEGIN link --> » <a style="text-decoration:none" href="{promot_trafic.link.U_HREF}" target="_blank" title="{promot_trafic.link.TITLE}" rel="nofollow">{promot_trafic.link.TITLE}</a><br /> <!-- END link --> </td> </tr> </table> <!-- END promot_trafic -->
<!-- BEGIN switch_forum_rules --> <table id="forum_rules" class="forumline" width="100%" border="0" cellspacing="0" cellpadding="0" style="margin: 1px 0px 1px 0px"> <tbody> <tr> <td class="catBottom"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tbody> <tr> <td valign="top"> <h1 class="cattitle"> {L_FORUM_RULES}</h1> </td> </tr> </tbody> </table> </td> </tr> <tr> <td class="row1 clearfix"> <table> <tr> <!-- BEGIN switch_forum_rule_image --> <td class="logo"> <img src="{RULE_IMG_URL}" alt="" /> </td> <!-- END switch_forum_rule_image --> <td class="rules postbody"> {RULE_MSG} </td> </tr> </table> </td> </tr> </tbody> </table> <!-- END switch_forum_rules -->
<table class="mess-box" width="100%" height="100%" border="0" cellspacing="0" cellpadding="0"> <tr colspan="2" align="right" width="100%"> <td width="100%" height="28"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="9%" class="noprint"> </td> <td align="center" class="t-title"><a name="bottomtitle"></a><h1 class="cattitle">{TOPIC_TITLE}</h1></td> <td align="left" nowrap="nowrap" width="9%" class="browse-arrows"><a href="{U_VIEW_OLDER_TOPIC}">{L_VIEW_PREVIOUS_TOPIC}</a> <a href="{U_VIEW_NEWER_TOPIC}">{L_VIEW_NEXT_TOPIC}</a> <a href="#top">{L_BACK_TO_TOP}</a> </td> </tr> </table> </td> </tr> <link href='http://fonts.googleapis.com/css?family=Kaushan+Script' rel='stylesheet' type='text/css'> <tr width="104%"> <td class="ruban3" colspan="2" width="100%" align="center" style="padding:0px"> <!-- BEGIN switch_user_logged_in --> <br/><a name="quickreply"></a> {QUICK_REPLY_FORM}<br /> <!-- END switch_user_logged_in --> </td> <div class="ruban3_gauche"></div> <div class="ruban3_droit"></div> </tr> <tr> <td width="100%" colspan="2"> <table align="center" width="100%"> <!-- BEGIN topicpagination --> <tr> <td width="50%" valign="top" {COLSPAN_PAGINATION} align="center"> <div class="mess-box-info"><span class="gensmall">{PAGE_NUMBER}</span></div></td> <td width="50%" valign="top" {COLSPAN_PAGINATION} align="center"> <div class="mess-box-info"><span class="gensmall">{PAGINATION}</span></div></td> </tr> <!-- END topicpagination --> <tr> <td width="50%"> <!-- BEGIN show_permissions --> <div class="mess-box-info"><span class="gensmall">{L_TABS_PERMISSIONS}</span><br/> <span class="gensmall">{S_AUTH_LIST}</span><br/><br/> <!-- END show_permissions --> <!-- BEGIN viewtopic_bottom --> <span class="gensmall">{L_JUMP_TO}: {S_JUMPBOX_SELECT} <input class="liteoption" type="submit" value="{L_GO}" /></span> <!-- END viewtopic_bottom --> </div> </td> <td><div class="mess-box-info" align="center"> <!-- BEGIN viewtopic_bottom --> <table class="noprint" width="100%" border="0" cellspacing="2" style="margin-top: -6px" 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 --> </div></td></tr>
<!-- BEGIN switch_user_logged_in --> <!-- BEGIN watchtopic --> <tr> <td colspan="2" align="center" valign="top"><div class="mess-box-info" ><span class="gensmall">{S_WATCH_TOPIC}</span></div></td> </tr> <!-- END watchtopic --> <!-- END switch_user_logged_in -->
</table> <tr> <th valign="middle" width="100%"> <span class="nav"><a class="nav" href="{U_INDEX}">{L_INDEX}</a>{NAV_SEP}<a class="nav" href="{U_ALBUM}">{L_ALBUM}</a>{NAV_CAT_DESC_SECOND}</span> </th> </tr> </td> </tr>
</table> </td> </tr> <tr> <td style="margin:0; padding: 0;" colspan="2"> <table border="0" cellpadding="0" cellspacing="0" width="100%" id="info_close" style="display:none;"> <tbody> <tr> <td class="catBottom" colspan="2" height="28"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td valign="middle" width="100%"><span class="nav"><a class="nav" href="{U_INDEX}">{L_INDEX}</a>{NAV_SEP}<a class="nav" href="{U_ALBUM}">{L_ALBUM}</a>{NAV_CAT_DESC_SECOND}</span></td> </tr> </table> </td> </tr> </tbody> </table> </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>
<!-- 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 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="{JS_DIR}addthis/addthis_widget.js" type="text/javascript"></script> | | |
| | | Nihil
{ Modérateur }
Messages : 1216
| Alors, pourrais tu supprimer ce passage là : - Code:
-
<script type="text/javascript"> //<!-- var anc_onglet = '1{postrow.displayed.U_POST_ID}'; change_onglet(anc_onglet); //--> </script> Ainsi que celui ci : - Code:
-
<script type="text/javascript"> //<!-- function change_onglet(name) { document.getElementById('onglet_'+anc_onglet).className = 'onglet_0 onglet'; document.getElementById('onglet_'+name).className = 'onglet_1 onglet'; document.getElementById('contenu_onglet_'+anc_onglet).style.display = 'none'; document.getElementById('contenu_onglet_'+name).style.display = 'block'; anc_onglet = name; } //--> </script> Là je suis en train d'enlever tout le javascript de base pour pouvoir repartir sur quelque chose de "sain" ^^ Ensuite on remplace : - Code:
-
<div class="contenu_onglet" id="contenu_onglet_1{postrow.displayed.U_POST_ID}"> {postrow.displayed.POSTER_AVATAR} </div>
Par : - Code:
-
<div class="contenu_onglet active_onglet" id="contenu_onglet_1{postrow.displayed.U_POST_ID}"> {postrow.displayed.POSTER_AVATAR} </div> Normalement une fois cela fait le système d'onglet ne fonctionne plus du tout du tout, et rien n'est affiché dans les onglets du profil. Pas d'inquiétude, c'est totalement normal, j'aurai du faire ça depuis le début, c'est à dire "nettoyer" l'ensemble | | |
| | | Dumax
{ Membre }
Messages : 12
| Ya pas de problème, vu ma manière de bosser, je te suis x) C'est fait | | |
| | | Nihil
{ Modérateur }
Messages : 1216
| Alors, go go go : On va rajouter un javascript (PA > Modules > Javascript). Met lui le nom "Onglets dans les profils sujet", et on va cocher "Sur les sujets" Le code à mettre : - Code:
-
$(function(){ $('.onglet').on('click', function(){ var $this = $(this); if ($this.hasClass('onglet_active')) return; var index = $this.index(); $this.siblings().removeClass("onglet_active"); $this.addClass('onglet_active'); $this.closest(".systeme_onglets").find('.contenu_onglet').hide().eq(index).show(); }); }); Ensuite dans le template on va (encore !) remplacer une petite chose : - Code:
-
<span class="onglet_0 onglet" id="onglet_1{postrow.displayed.U_POST_ID}" onclick="javascript:change_onglet('1{postrow.displayed.U_POST_ID}');">1,</span> <span class="onglet_0 onglet" id="onglet_2{postrow.displayed.U_POST_ID}" onclick="javascript:change_onglet('2{postrow.displayed.U_POST_ID}');">2, </span> <span class="onglet_0 onglet" id="onglet_3{postrow.displayed.U_POST_ID}" onclick="javascript:change_onglet('3{postrow.displayed.U_POST_ID}');">3, </span> <span class="onglet_0 onglet" id="onglet_4{postrow.displayed.U_POST_ID}" onclick="javascript:change_onglet('4{postrow.displayed.U_POST_ID}');">Soleil !</span>
Devient : - Code:
-
<span class="onglet_0 onglet">1,</span> <span class="onglet_0 onglet">2, </span> <span class="onglet_0 onglet">3, </span> <span class="onglet_0 onglet">Soleil !</span> On a enlevé les id + le javascript au click. Même chose pour le contenu des onglets : - Code:
-
<div class="contenu_onglet" id="contenu_onglet_1{postrow.displayed.U_POST_ID}"> {postrow.displayed.POSTER_AVATAR} </div> <div class="contenu_onglet" id="contenu_onglet_2{postrow.displayed.U_POST_ID}"> <!-- BEGIN profile_field --> {postrow.displayed.profile_field.LABEL} {postrow.displayed.profile_field.CONTENT}{postrow.displayed.profile_field.SEPARATOR} <!-- END profile_field --> </div> <div class="contenu_onglet" id="contenu_onglet_3{postrow.displayed.U_POST_ID}"> {postrow.displayed.POSTER_RPG} </div> <div class="contenu_onglet" id="contenu_onglet_4{postrow.displayed.U_POST_ID}"> {postrow.displayed.PROFILE_IMG} {postrow.displayed.PM_IMG} {postrow.displayed.EMAIL_IMG}<!-- BEGIN contact_field --> {postrow.displayed.contact_field.CONTENT}<!-- END contact_field --> {postrow.displayed.ONLINE_IMG} </div> Devient : - Code:
-
<div class="contenu_onglet" style="display: block"> {postrow.displayed.POSTER_AVATAR} </div> <div class="contenu_onglet"> <!-- BEGIN profile_field --> {postrow.displayed.profile_field.LABEL} {postrow.displayed.profile_field.CONTENT}{postrow.displayed.profile_field.SEPARATOR} <!-- END profile_field --> </div> <div class="contenu_onglet"> {postrow.displayed.POSTER_RPG} </div> <div class="contenu_onglet"> {postrow.displayed.PROFILE_IMG} {postrow.displayed.PM_IMG} {postrow.displayed.EMAIL_IMG}<!-- BEGIN contact_field --> {postrow.displayed.contact_field.CONTENT}<!-- END contact_field --> {postrow.displayed.ONLINE_IMG} </div>
Ensuite, si tout va bien, il ne nous restera plus que du CSS à mettre pour styliser les boutons pour changer d'onglet. | | |
| | | Dumax
{ Membre }
Messages : 12
| C'est fait et ca marche ! Tu es ma sauveuse | | |
| | | Nihil
{ Modérateur }
Messages : 1216
| Dans ton CSS tu peux rajouter ceci : - Code:
-
.onglets .onglet_active { color: white; } Et tu peux remplacer : - Code:
-
<span class="onglet_0 onglet">1,</span> Par - Code:
-
<span class="onglet_0 onglet onglet_active">1,</span> Normalement là tout devrait marcher ! | | |
| | | Dumax
{ Membre }
Messages : 12
| C'est nickel, un grand merci à toi, même si tu as plus fais le ménage qu'autre chose x) Merci beaucoup !!
| | |
| | | Contenu sponsorisé
| | | | | Problème d'onglet dans profil [RESOLU] | |
|
Sujets similaires | |
|
| Permission de ce forum: | Vous ne pouvez pas répondre aux sujets dans ce forum
| |
| |
| |
|
| Partenaires Or
|