HomeHome  
  • WelcomeWelcome  
  • Events  
  • PublicationsPublications  
  • FAQFAQ  
  • SearchSearch  
  • MemberlistMemberlist  
  • UsergroupsUsergroups  
  • RegisterRegister  
  • Log inLog in  
  • You are not connected. Please login or register


    The link to the wall of members

    avatar
    • Administrator

        Reputation : 315
        Registered on : 2012-02-22
        Posts : 2362
        School of codes courses: coming soon
      The link to the wall of members

      Description


      Have the link of the wall for each member

      Set up


      First, paste this code wherever you want to have the link
      Code:
      <a class="userprofil" href="/uUIDwall">Member wall</a>

      And add the javascript code:
      Code:
      $(function(){
        $("a.userprofil").attr("href",function(i,o){ return o.replace(/UID/g,(my_getcookie("fa_"+location.host.replace(/\./g,'_')+"_data")||"").replace(/^.*"userid";(s:[1-9][0-9]*:"([1-9][0-9]*)"|i:([1-9][0-9]*));.*$/,"$2$3")) });
      });

      Customize the tutorial


      Well, you can only change "Member wall" with the text you want for the wall-link

      Technical problems


      The tutorial was tested on This forum and works with every browsers; If you notice that the tutorial doesn't work for a browser or for a version of forum (PhpBB2, PhpBB3, PunBB, Invision) contact an administrator and we will fill this field with your segnalation.

      Thanks, the staff

      For every problem or question please, contact us in the section Support for the tutorials, The staff will answer you as soon as it is possible...

      Friendly,
      The team of the Forum of Codes.



      Niko wants you in the team Guest

      Community manager and Administrator at Forumattivo.com

      avatar
      • Veteran staff member

          Reputation : 19
          Registered on : 2012-04-05
          Posts : 77
        Creative getting it from the automatic session cookie but hats a lot of work for the User ID.

        This should work:
        Code:

        var x=unescape(my_getcookie("fa_"+location.host.replace(/\./g,'_')+"_data")).replace(/.*userid.*:([0-9]+);.*/,'$1');
        $('.userprofil').attr('href',x);

        avatar
        • Administrator

            Reputation : 315
            Registered on : 2012-02-22
            Posts : 2362
            School of codes courses: coming soon
          LGforum wrote: Creative getting it from the automatic session cookie but hats a lot of work for the User ID.

          This should work:
          Code:

          var x=unescape(my_getcookie("fa_"+location.host.replace(/\./g,'_')+"_data")).replace(/.*userid.*:([0-9]+);.*/,'$1');
          $('.userprofil').attr('href',x);

          Well, propose this in a new topic :Good:
          We will accept it of course! :bene:



          Niko wants you in the team Guest

          Community manager and Administrator at Forumattivo.com

          avatar
          • Veteran staff member

              Reputation : 19
              Registered on : 2012-04-05
              Posts : 77
            Meh. Its not worth a topic. This will serve as a link:
            Code:

            <a href="/profile?mode=viewprofile&page_profil=messages&u={USERNAME}">Your Wall</a>
            In a widget or announcement or something. No javascript needed ;)


            YOUR BANNER HERE
            728x90
            DMCA.com Protection Status
            © PunBB | Contact | Report an abuse