Rank-uri multiple

Vezi subiectul anterior Vezi subiectul urmator In jos

Rank-uri multiple

Mesaj Scris de Apollo la data de Sam 22 Apr - 10:57

Rank-uri multiple

Buna ziua, am vazut pe o platforma externa o chestiie cu care poti pune mai multe rang-uri unui utilizator, m-am gandit ce ar fii sa putem realiza si noi pe forumgratuit asa ceva. Si uite minunea.
(!) Atentie, codurile create pot provoca unele probleme la forumurile care detin mai multe coduri JS eronare.

Pasul 1:
Panou de administrare ~> UTILIZATORI & GRUPURI ~> Utilizatori ~> Profiluri ~> Camp din profil ~>  Adauga


  • Tip : Optiuni multiple
  • Nume : Aditional Rank's
  • Obligatoriu la inscriere?: Nu
  • Afisare : Profil, Mesaje
  • Tip de afisaj : Text
  • Cine poate modifica valoarea continutului? Moderatori


Optiuni multiple
Adauga
Cod:
Contribuitor<br /><img src="https://i.servimg.com/u/f86/11/80/17/98/contri10.png" alt="Contribuitor" />

Pasul 2:
Panou de administrare ~> Afisare ~> Template-uri ~> viewtopic_body

phpBB2

Cautam:

Cod:
<!-- BEGIN profile_field -->
 {postrow.displayed.profile_field.LABEL} {postrow.displayed.profile_field.CONTENT}{postrow.displayed.profile_field.SEPARATOR}
 <!-- END profile_field -->
inlocuim cu:

Cod:
<!-- BEGIN profile_field -->
                                          <span class="profile_field"><span class="row">{postrow.displayed.profile_field.LABEL}</span> <span class="field">{postrow.displayed.profile_field.CONTENT}</span>{postrow.displayed.profile_field.SEPARATOR}</span>
 <!-- END profile_field -->

phpBB3

Cautam:

Cod:
<div class="postprofile" id="profile{postrow.displayed.U_POST_ID}">
inlocuim cu:

Cod:
<div class="postprofile user_profile" id="profile{postrow.displayed.U_POST_ID}">

Cautam:

Cod:
<dd>
 <!-- BEGIN profile_field -->
                                          {postrow.displayed.profile_field.LABEL}{postrow.displayed.profile_field.CONTENT}{postrow.displayed.profile_field.SEPARATOR}</span>
 <!-- END profile_field -->
 {postrow.displayed.POSTER_RPG}
 </dd>
inlocuim cu:

Cod:
<dd>
 <!-- BEGIN profile_field -->
                                          <span class="profile_field"><span class="row">{postrow.displayed.profile_field.LABEL}</span> <span class="field">{postrow.displayed.profile_field.CONTENT}</span>{postrow.displayed.profile_field.SEPARATOR}</span>
 <!-- END profile_field -->
 {postrow.displayed.POSTER_RPG}
 </dd>


PunBB

Cautam:

Cod:
<!-- BEGIN profile_field -->
 {postrow.displayed.profile_field.LABEL}{postrow.displayed.profile_field.CONTENT}{postrow.displayed.profile_field.SEPARATOR}
 <!-- END profile_field -->
inlocuim cu:

Cod:
<!-- BEGIN profile_field -->
                                          <span class="profile_field"><span class="row">{postrow.displayed.profile_field.LABEL}</span> <span class="field">{postrow.displayed.profile_field.CONTENT}</span>{postrow.displayed.profile_field.SEPARATOR}</span>
 <!-- END profile_field -->

Pasul 3:
Panou de administrare ~> HTML & JAVASCRIPT ~> Coduri JavaScript
  • Titlu * : Aditional Rank's (Versiune)
  • Amplasare : Topicuri
  • Cod JavaScript * :


phpBB2
Cod JS:
Cod:
var js = window.jQuery;
js(function() {
   js('.poster-profile', js('.post')).each(function() {
             var t = this;
      js('span.profile_field:contains("Aditional Rank :") ul.profile_field_list li', t).each(function() {
         js(this).html(js(this).text());
         js('img', this).after('<br />');
      });
         
          js('span.profile_field:contains("Aditional Rank :") ul.profile_field_list li', t).insertBefore(js('a:has("img"):eq(0)', t));
      js('span.profile_field:contains("Aditional Rank :")', t).remove();
      js('li > img', t).unwrap();
   });
});

phpBB3
Cod JS:
Cod:
var js = window.jQuery;
js(function() {
   js('.postprofile', js('.post')).each(function() {
             var t = this;
      js('span.profile_field:contains("Aditional Rank :") ul.profile_field_list li', t).each(function() {
         js(this).html(js(this).text());
         js('img', this).after('<br />');
      });
         
      js('span.profile_field:contains("Aditional Rank :") ul.profile_field_list li', t).appendTo(js('dd:eq(0)', t));
      js('span.profile_field:contains("Aditional Rank :")', t).remove();
      js('dd:eq(0) li > img', t).unwrap();
   });
});

PunBB
Cod JS:
Cod:
var js = window.jQuery;
js(function() {
   js('.user-info', js('.post')).each(function() {
             var t = this;
      js('span.profile_field:contains("Aditional Rank :") ul.profile_field_list li', t).each(function() {
         js(this).html(js(this).text());
         js('img', this).after('<br />');
      });
         
          js('span.profile_field:contains("Aditional Rank :") ul.profile_field_list li', t).appendTo(js(this).parent().find('.user-basic-info', t));
      js('span.profile_field:contains("Aditional Rank :")', t).remove();
      js(this).parent().find('.user-basic-info li > img', t).unwrap();
   });
});

Rezultat final:
phpBB2
phpBB3
PunBB
avatar
Apollo
Membru onorific
Membru onorific

masculin

Mesaje : 906
Varsta : 22
Localizare : C:\system32
Data de inscriere : 10/08/2015
Multumiri : 113
Niciun avertisment

https://www.forumcodes.com

Sus In jos

Vezi subiectul anterior Vezi subiectul urmator Sus


Permisiunile acestui forum:
Nu puteti raspunde la subiectele acestui forum