Bine ai venit pe comunitatea Crazy-Gaming ! Fați un cont pentru a sta la curent cu toate noutățile!

Modernizare informatii index_box si inserare avatar

Vezi subiectul anterior Vezi subiectul urmator In jos

Modernizare informatii index_box si inserare avatar

Mesaj Scris de mihai la data de Mier Mar 15, 2017 6:40 pm

Salutare dragi prieteni in acest tutorial o sa va arat cum putem moderniza informatiile din index_box
si ma refer la aceste informatii din imaginea de mai jos:


Este si pacat daca tot le avem sa nu ne folosim de ele,foarte multe lume le sterge,nu le mai stergeti,sunt foarte folositoare.
Dupa ce le om optimiza ele vor apararea in felul urmator:
Inainte de conectarea pe forum:

Apoi dupa ce va conectati pe forum:



Haideti sa incepem:

Pasul 1:

Intram in Panou de administrare/afisare/template-uri/general/index_box si cautam urmatorul fragment de cod si il stergem:

Cod:
<table width="100%" border="0" cellspacing="1" cellpadding="0" align="center">
 <tr>
 <td valign="bottom">
 <!-- BEGIN switch_user_logged_in -->
 <span class="gensmall">{LAST_VISIT_DATE}<br />
 {CURRENT_TIME}<br />
 </span>
 <!-- END switch_user_logged_in -->
 <div class="nav"><a class="nav" href="{U_INDEX}">{L_INDEX}</a>{NAV_CAT_DESC}</div>
 </td>
 <td class="gensmall" align="right" valign="bottom">
 <!-- BEGIN switch_user_logged_in -->
 <a class="gensmall" href="{U_SEARCH_NEW}">{L_SEARCH_NEW}</a><br />
 <a class="gensmall" href="{U_SEARCH_SELF}">{L_SEARCH_SELF}</a><br />
 <!-- END switch_user_logged_in -->
 <a class="gensmall" href="{U_SEARCH_UNANSWERED}">{L_SEARCH_UNANSWERED}</a>
 </td>
 </tr>
</table>


In locul lui il adaugati pe acesta:

Cod:
<table width="100%" border="0" cellspacing="1" cellpadding="0" align="center">
 <tr>
 <td valign="bottom">
 <!-- BEGIN switch_user_logged_in -->
 <span class="gensmall">{LAST_VISIT_DATE}<br />
 {CURRENT_TIME}<br />
 </span>
 <!-- END switch_user_logged_in -->
 <div class="nav"><a class="nav" href="{U_INDEX}">{L_INDEX}</a>{NAV_CAT_DESC}</div>
 </td>
 <td class="gensmall" align="right" valign="bottom">
 <!-- BEGIN switch_user_logged_in -->
 <a class="gensmall" href="{U_SEARCH_NEW}">{L_SEARCH_NEW}</a><br />
 <a class="gensmall" href="{U_SEARCH_SELF}">{L_SEARCH_SELF}</a><br />
 <!-- END switch_user_logged_in -->
 <a class="gensmall" href="{U_SEARCH_UNANSWERED}">{L_SEARCH_UNANSWERED}</a>
 </td>
 </tr>
</table>



<!-- BEGIN switch_user_logged_in -->
<div id="pun-visit" class="clearfix">
 <ul>
                <li><a href="#" class="avatar_top"><img src="https://imgfast.net/users/1114/24/58/82/avatars/1026-67.png"  alt="avatar" /> {LOGGED_AS}</a></li>
                     <li class="right"><a href="{U_SEARCH_NEW}"><img src="https://cdn0.iconfinder.com/data/icons/kameleon-free-pack/110/Bell-32.png"></img>{L_SEARCH_NEW}</a></li>
      
                   <li class="right"><a href="{U_SEARCH_SELF}"><img src="https://cdn3.iconfinder.com/data/icons/fatcow/32/pencil_add.png"></img>{L_SEARCH_SELF}</a></li>
 
           <li class="right"><a href="{U_SEARCH_UNANSWERED}"><img src="https://cdn3.iconfinder.com/data/icons/mix-and-miscellaneous/93/message_handdrawn_communicate-32.png"></img>{L_SEARCH_UNANSWERED}</a></li>
 
           <li class="right"><a href="{U_MARK_READ}"><img src="https://cdn1.iconfinder.com/data/icons/KDE_Crystal_Diamond_2.5_Classical_Mod/22x22/apps/clean.png"></img>Marcheaza tot</a></li>
 
     </ul>

</div>
<!-- END switch_user_logged_in -->
<!-- BEGIN switch_user_logged_out -->
<div id="pun-visits">
  <p>{L_NOT_CONNECTED} <a href="/login?logout" class="login"><img src="http://i.imgur.com/mhgT03z.png"></img>Conectare</a><a href="/register" class="register"><img src="http://i.imgur.com/MswKBAh.png"></img>Inregistrare</a></p>
</div>
<!-- END switch_user_logged_out -->

Salvati si publicati template-ul.
Pentru ca avatarul sa apara in informatii trebuie sa ne ajutam de un cod javascript creat de SSYT din urmatorul tutorial:
http://help.forumgratuit.ro/t52788-variabile-suplimentare-pentru-template-uri

Pasul 2:
Intram in panou de administrare/module/html&javascript/gestiunea codurilor javascript si adaugam codul javascript de la SSYT:


Cod:
(function(){if(window.ActiveXObject)var b=new ActiveXObject("Microsoft.XMLHTTP");else window.XMLHttpRequest&&(b=new XMLHttpRequest);null!=b&&(b.onreadystatechange=function(){if(4==b.readyState&&"undefined"===typeof var_fa_is_done){var_fa_is_done=1;var d,g="FORUMURL FORUMURLINK FORUMNAME FORUMNAMELINK FORUMDESC FORUMBIRTHDAY FORUMAGE FORUMCOUNTFORUM FORUMCOUNTOPIC FORUMCOUNTPOST FORUMCOUNTUSER FORUMONLINEUSER FORUMONLINEDATE FORUMLASTUSER FORUMLASTUSERLINK USERNAME USERLINK USERBIRTHDAY USERAGE USERREGDATE USERLASTVISIT USERCOUNTPOST NOW NOWWITHTIME".split(" ");
for(d=0;d<g.length;d++){var h=g[d],e=b.responseText.replace(RegExp('^.+<li style="margin-bottom:5px;direction:ltr;text-align:left;"><strong>{'+h+"}</strong>&nbsp;:&nbsp;(.*?)&nbsp;<span style='direction:ltr'>(.*?)</span><br /></li>.+$"),"$1");if(b.responseText!=e){for(var j=document.getElementsByTagName("*")||document.all,c=[],a=-1;++a<j.length;)for(var k=j[a],l=k.className.split(" "),f=0;f<l.length;f++)if(l[f]==h){c.push(k);break}for(a=-1;++a!=c.length;)"INPUT"==c[a].tagName||"TEXTAREA"==
c[a].tagName?c[a].value+=e:c[a].innerHTML+=e}}}},b.open("GET","/popup_help.forum?l=miscvars",!0),b.send(null))})();

Amplasare in toate paginile.

Pasul 3: Adaugare CSS.

Intram in panou de administrare/afisare/culori/css si adaugam urmatorul cod:

Pentru codul css trebuie sa raspundeti la subiect




Asta a fost tot.Enjoy!

_________________
CSS/JS/HTML
avatar

mihai
Utilizator Forum

Postări : 20
Cash : 867
Data de inscriere : 08/06/2016
Varsta : 19
Localizare : Bucharest, Romania.

Vezi profilul utilizatorului

Sus In jos

Vezi subiectul anterior Vezi subiectul urmator Sus


 
Permisiunile acestui forum:
Nu puteti raspunde la subiectele acestui forum