Loading profile information ? Hitskin_logo Hitskin.com

This is a Hitskin.com skin preview
Install the skinReturn to the skin page

The forum of the forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.
+3
SLGray
skouliki
Storyteller of Wonderland
7 posters

    Loading profile information ?

    Storyteller of Wonderland
    Storyteller of Wonderland
    Forumember


    Female Posts : 108
    Reputation : 10
    Language : Russian, German, French, English.
    Location : Russia

    Solved Loading profile information ?

    Post by Storyteller of Wonderland April 7th 2019, 2:43 pm

    Hello, I want to know how to display on the page I need, information about the user.
    Information will be from a profile, as an example we will take the Avatar of a particular user.
    In general, I want to create a list of users, but without using the standard user page.
    I tried to work with the script for installing an avatar in the toolbar, but I can not figure out how to make the text, for example, instead of an image!


    Last edited by Storyteller of Wonderland on April 13th 2019, 12:21 pm; edited 1 time in total
    skouliki
    skouliki
    Manager
    Manager


    Female Posts : 15311
    Reputation : 1705
    Language : English,Greek
    Location : Greece

    Solved Re: Loading profile information ?

    Post by skouliki April 7th 2019, 2:47 pm

    hello and welcome 


    can you give us an example/screenshotot of the result you want to achieve

    Storyteller of Wonderland
    Storyteller of Wonderland
    Forumember


    Female Posts : 108
    Reputation : 10
    Language : Russian, German, French, English.
    Location : Russia

    Solved Re: Loading profile information ?

    Post by Storyteller of Wonderland April 7th 2019, 3:36 pm

    skouliki, hello! Hello

    Indeed, I am sorry that I did not attach a screenshot. I haven't been able to create it for a week now, so I’m in a panic.

    Here is an example of what I want:


     Loading profile information ? 377ecbd56855fa88a42cf55ee7ad0081


    I need the reputation, avatar and user header displayed in the block I need and on the page I need. At the same time, I want it to be a list of users that I need. By the way, it would be nice to indicate the number of posts of the user.

    I need this list to be a substitute for the standard list as I want to display selected users in it. I could do everything manually, but if they change the information about themselves or the reputation and number of posts increases, then it will be hard for me to do it manually.


    Storyteller of Wonderland
    Storyteller of Wonderland
    Forumember


    Female Posts : 108
    Reputation : 10
    Language : Russian, German, French, English.
    Location : Russia

    Solved Re: Loading profile information ?

    Post by Storyteller of Wonderland April 8th 2019, 7:25 am

    Code:
    <div id="block1"></div> 





    <script type="text/javascript">  


    $(document).ready(function(){


    $.get('my-page.com', function (data) {  


      $('#block1').html( $('#block11', data).html() ) 


    });


    }); 


    </script> 




    my-page.com - Page with which you need to load content.

    #block1 - The block in which the content should be loaded from #block11.

    #block11 - That part of the content that needs to be downloaded to another page.





    I need this script to load avatars / posts / reputation of users on the list, ie, u1 / u2 / u3

    Well, or something like that ... I no longer know how to translate it into reality! ...


    Code:
    <div id="main-avatar-user"></div>  -- Avatar of User 1


    <div id="main-avatar-user"></div>  -- Avatar of User 2


    <div id="main-avatar-user"></div>  -- Avatar of User 3


    <div id="main-avatar-user"></div>  -- Avatar of User 4


    <div id="main-avatar-user"></div>  -- Avatar of User 5





    <script type="text/javascript">  


    $(document).ready(function(){


    $.get('my-site.com/u1 + 2', function (data) {  


      $('#main-avatar-user').html( $('#user-avatar', data).html() ) 


    });


    }); 


    </script>
    SLGray
    SLGray
    Administrator
    Administrator


    Male Posts : 51497
    Reputation : 3523
    Language : English
    Location : United States

    Solved Re: Loading profile information ?

    Post by SLGray April 8th 2019, 7:28 am

    Please use the code tags when posting codes.



     Loading profile information ? Slgray10

    When your topic has been solved, ensure you mark the topic solved.
    Never post your email in public.
    Storyteller of Wonderland
    Storyteller of Wonderland
    Forumember


    Female Posts : 108
    Reputation : 10
    Language : Russian, German, French, English.
    Location : Russia

    Solved Re: Loading profile information ?

    Post by Storyteller of Wonderland April 8th 2019, 7:32 am

    SLGray wrote:Please use the code tags when posting codes.

    Hello! Ok ok! Please, i'm sorry... Flowers
    Ape
    Ape
    Administrator
    Administrator


    Male Posts : 19324
    Reputation : 2005
    Language : fluent in dork / mumbojumbo & English haha

    Solved Re: Loading profile information ?

    Post by Ape April 8th 2019, 12:46 pm

    I still don't understand what this is for and why it is needed what dose it do ?



     Loading profile information ? Left1212 Loading profile information ? Center11 Loading profile information ? Right112
     Loading profile information ? Ape_b110
     Loading profile information ? Ape1010
    Storyteller of Wonderland
    Storyteller of Wonderland
    Forumember


    Female Posts : 108
    Reputation : 10
    Language : Russian, German, French, English.
    Location : Russia

    Solved Re: Loading profile information ?

    Post by Storyteller of Wonderland April 8th 2019, 2:39 pm

    APE wrote:I still don't understand what this is for and why it is needed what dose it do ?



    That sounds silly. Therefore, I will try to describe more deeply. For example, I would like to use this functionality to customize the users page.
    Yes, it is a bit strange. Well, I have such design ideas. In general, I have a lot of ideas and ready-made solutions. If possible, I would like to share them with you. Solutions are created by me and can be distributed with my license.

    I want could solve this problem manually, but then there will be no automatic change of information.
    What about the number of users, for example, is it possible for it to be automatic? I don't even know what to do ...
    Maybe there is something similar?
    skouliki
    skouliki
    Manager
    Manager


    Female Posts : 15311
    Reputation : 1705
    Language : English,Greek
    Location : Greece

    Solved Re: Loading profile information ?

    Post by skouliki April 8th 2019, 2:47 pm

    you want an html page like a combination of the memberlist page and the profile ? but the design will be yours?

    Storyteller of Wonderland
    Storyteller of Wonderland
    Forumember


    Female Posts : 108
    Reputation : 10
    Language : Russian, German, French, English.
    Location : Russia

    Solved Re: Loading profile information ?

    Post by Storyteller of Wonderland April 8th 2019, 3:22 pm

    skouliki wrote:you want an html page like a combination of the memberlist page and the profile ? but the design will be yours?


    Yes Yes Yes! Exactly!
    skouliki
    skouliki
    Manager
    Manager


    Female Posts : 15311
    Reputation : 1705
    Language : English,Greek
    Location : Greece

    Solved Re: Loading profile information ?

    Post by skouliki April 8th 2019, 4:20 pm

    the only way to achieve this is manual to add the information you need i dont think you can automatically

    Ape
    Ape
    Administrator
    Administrator


    Male Posts : 19324
    Reputation : 2005
    Language : fluent in dork / mumbojumbo & English haha

    Solved Re: Loading profile information ?

    Post by Ape April 8th 2019, 4:46 pm

    Yes sadly none of what you are asking for can be done without having to add it manually every time you want to update the code.



     Loading profile information ? Left1212 Loading profile information ? Center11 Loading profile information ? Right112
     Loading profile information ? Ape_b110
     Loading profile information ? Ape1010
    Draxion
    Draxion
    Helper
    Helper


    Male Posts : 2518
    Reputation : 321
    Language : English
    Location : USA

    Solved Re: Loading profile information ?

    Post by Draxion April 8th 2019, 8:30 pm

    As long as your separate HTML page shares the same footer and header on your forum, this can be very much possible. I sent you a PM.
    TheCrow
    TheCrow
    Manager
    Manager


    Male Posts : 6916
    Reputation : 795
    Language : Greek, English

    Solved Re: Loading profile information ?

    Post by TheCrow April 8th 2019, 10:21 pm

    Hello,

    If all the users you want to add in this new list are within the same group this can be done using a script. Otherwise you'd have to add each user id separately in a list so that a script can load automatically their information to the HTML page you want. But as Draxion said, they have to share the same header and footer, though you can still customize it as you wish to.
    If you are experimenting on javascript you can read and search for the $.get() function that can be used in a script while you have your users links.

    Regards.



     Loading profile information ? Thecro10
    Forum of the Forums

    Forumotion Rules | Tips & Tricks |
    FAQ | Did you forget your password?



    *** The Support Forum will never ask you for your email or password, so please do not post them anywhere! ***
    No support via PM!
    Storyteller of Wonderland
    Storyteller of Wonderland
    Forumember


    Female Posts : 108
    Reputation : 10
    Language : Russian, German, French, English.
    Location : Russia

    Solved Re: Loading profile information ?

    Post by Storyteller of Wonderland April 9th 2019, 5:32 am

    Draxion wrote:As long as your separate HTML page shares the same footer and header on your forum, this can be very much possible. I sent you a PM.

    Yes, it would be logical to use up and down the forum. Customize the design will not be a problem. I will answer you in PM.

    TheCrow wrote:Hello,

    If all the users you want to add in this new list are within the same group this can be done using a script.

    Good evening!

    Suppose they are in the same group, which script is needed?)
    skouliki
    skouliki
    Manager
    Manager


    Female Posts : 15311
    Reputation : 1705
    Language : English,Greek
    Location : Greece

    Solved Re: Loading profile information ?

    Post by skouliki April 9th 2019, 8:23 am

    The support must be through here not via pm

    tikky
    tikky
    Forumember


    Posts : 922
    Reputation : 159
    Language : 🇵🇹

    Solved Re: Loading profile information ?

    Post by tikky April 10th 2019, 2:48 pm

    Hey @Storyteller of Wonderland,
    i don't understand your question, however try use this simple code:
    Code:
    <script type="text/javascript">
        (function($) {
              'use strict';   
           
              $(function() {
         
       
                  var userID = [1, 2, 3, 7]; // USER ID'S
         
          $.each(userID, function (index, id) {
       
                  $.ajax({
         
                      url: '/u' + id +'?change_version=punbb',
                      type: 'GET',
                      success: function(data) {
                       
                      var $content = $('#userlist'),
                          username = $('#profile-advanced-right .module .main-head .h3:eq(0) strong', data).text(),
                          avatar = $('#profile-advanced-right .module:first img:first', data).attr('src'),
                          reputation = $('#field_id-14 dd', data).text(),
                          post = $('#field_id-6 dd', data).text();
       
                    $content.each(function() {
                      var $this = $(this);
                        $this.append(
                          '<div data-attribute="' + username + '">' +
                          '<h2>' + username + '</h2>' +
                          '<img src="' + avatar + '" alt="' + username + '" />' +
                          '<p>' + reputation + ' Reputation</p>' +
                          '<p>' + post + ' Posts</p>' +
                          '</div>'
                                      );
                        });
                 
                      },
                      error: function(err) {
                          alert('Contacte o suporte Forumeiros');
                      }
          });
       
         
                  });
              });
          }(jQuery));
    </script>
    <style type="text/css">
        #userlist {
          display: -webkit-box;
          display: -moz-box;
          display: -ms-flexbox;
          display: -webkit-flex;
          display: flex; 
          -webkit-flex-flow: row wrap;
          justify-content: space-around;
        }
        #userlist > div {
          background: white;
          width: 25%;
          height: auto;
          margin: 0 1px 10px 0;
        }
        #userlist > div h2 {
          font-weight: bolder;
          border-bottom: 1px solid #ccc;
          padding: 15px;
          line-height: 25px;
          height: 50px;
          text-align: right;
        }
        #userlist > div img {
          border-radius: 50%;
          height: 50px;
          width: 50px;
          position: relative;
          margin: -30px 20px 0;
        }
        #userlist > div p {
          padding: 15px;
          text-align: justify;
        }
        #userlist > div[data-attribute=""] {
          display: none;
        }
    </style>

    <div id="userlist"></div>
    and tell me if this is what you wanted Hello


    Cordially,
    pedxz.
    skouliki
    skouliki
    Manager
    Manager


    Female Posts : 15311
    Reputation : 1705
    Language : English,Greek
    Location : Greece

    Solved Re: Loading profile information ?

    Post by skouliki April 10th 2019, 3:45 pm

    he wants an html page like a combination of the memberlist page and the profile

    Storyteller of Wonderland
    Storyteller of Wonderland
    Forumember


    Female Posts : 108
    Reputation : 10
    Language : Russian, German, French, English.
    Location : Russia

    Solved Re: Loading profile information ?

    Post by Storyteller of Wonderland April 11th 2019, 5:13 am

    pedxz wrote:Hey @Storyteller of Wonderland,
    i don't understand your question, however try use this simple code:
    Code:
    <script type="text/javascript">
        (function($) {
              'use strict';   
           
              $(function() {
         
       
                  var userID = [1, 2, 3, 7]; // USER ID'S
         
          $.each(userID, function (index, id) {
       
                  $.ajax({
         
                      url: '/u' + id +'?change_version=punbb',
                      type: 'GET',
                      success: function(data) {
                       
                      var $content = $('#userlist'),
                          username = $('#profile-advanced-right .module .main-head .h3:eq(0) strong', data).text(),
                          avatar = $('#profile-advanced-right .module:first img:first', data).attr('src'),
                          reputation = $('#field_id-14 dd', data).text(),
                          post = $('#field_id-6 dd', data).text();
       
                    $content.each(function() {
                      var $this = $(this);
                        $this.append(
                          '<div data-attribute="' + username + '">' +
                          '<h2>' + username + '</h2>' +
                          '<img src="' + avatar + '" alt="' + username + '" />' +
                          '<p>' + reputation + ' Reputation</p>' +
                          '<p>' + post + ' Posts</p>' +
                          '</div>'
                                      );
                        });
                 
                      },
                      error: function(err) {
                          alert('Contacte o suporte Forumeiros');
                      }
          });
       
         
                  });
              });
          }(jQuery));
    </script>
    <style type="text/css">
        #userlist {
          display: -webkit-box;
          display: -moz-box;
          display: -ms-flexbox;
          display: -webkit-flex;
          display: flex; 
          -webkit-flex-flow: row wrap;
          justify-content: space-around;
        }
        #userlist > div {
          background: white;
          width: 25%;
          height: auto;
          margin: 0 1px 10px 0;
        }
        #userlist > div h2 {
          font-weight: bolder;
          border-bottom: 1px solid #ccc;
          padding: 15px;
          line-height: 25px;
          height: 50px;
          text-align: right;
        }
        #userlist > div img {
          border-radius: 50%;
          height: 50px;
          width: 50px;
          position: relative;
          margin: -30px 20px 0;
        }
        #userlist > div p {
          padding: 15px;
          text-align: justify;
        }
        #userlist > div[data-attribute=""] {
          display: none;
        }
    </style>

    <div id="userlist"></div>
    and tell me if this is what you wanted Hello


    Cordially,
    pedxz.

    Hello, pedxz,
    It does not work ... just an empty space ...
    tikky
    tikky
    Forumember


    Posts : 922
    Reputation : 159
    Language : 🇵🇹

    Solved Re: Loading profile information ?

    Post by tikky April 11th 2019, 11:19 am

    Storyteller of Wonderland wrote:
    pedxz wrote:Hey @Storyteller of Wonderland,
    i don't understand your question, however try use this simple code:
    Code:
    <script type="text/javascript">
        (function($) {
              'use strict';   
           
              $(function() {
         
       
                  var userID = [1, 2, 3, 7]; // USER ID'S
         
          $.each(userID, function (index, id) {
       
                  $.ajax({
         
                      url: '/u' + id +'?change_version=punbb',
                      type: 'GET',
                      success: function(data) {
                       
                      var $content = $('#userlist'),
                          username = $('#profile-advanced-right .module .main-head .h3:eq(0) strong', data).text(),
                          avatar = $('#profile-advanced-right .module:first img:first', data).attr('src'),
                          reputation = $('#field_id-14 dd', data).text(),
                          post = $('#field_id-6 dd', data).text();
       
                    $content.each(function() {
                      var $this = $(this);
                        $this.append(
                          '<div data-attribute="' + username + '">' +
                          '<h2>' + username + '</h2>' +
                          '<img src="' + avatar + '" alt="' + username + '" />' +
                          '<p>' + reputation + ' Reputation</p>' +
                          '<p>' + post + ' Posts</p>' +
                          '</div>'
                                      );
                        });
                 
                      },
                      error: function(err) {
                          alert('Contacte o suporte Forumeiros');
                      }
          });
       
         
                  });
              });
          }(jQuery));
    </script>
    <style type="text/css">
        #userlist {
          display: -webkit-box;
          display: -moz-box;
          display: -ms-flexbox;
          display: -webkit-flex;
          display: flex; 
          -webkit-flex-flow: row wrap;
          justify-content: space-around;
        }
        #userlist > div {
          background: white;
          width: 25%;
          height: auto;
          margin: 0 1px 10px 0;
        }
        #userlist > div h2 {
          font-weight: bolder;
          border-bottom: 1px solid #ccc;
          padding: 15px;
          line-height: 25px;
          height: 50px;
          text-align: right;
        }
        #userlist > div img {
          border-radius: 50%;
          height: 50px;
          width: 50px;
          position: relative;
          margin: -30px 20px 0;
        }
        #userlist > div p {
          padding: 15px;
          text-align: justify;
        }
        #userlist > div[data-attribute=""] {
          display: none;
        }
    </style>

    <div id="userlist"></div>
    and tell me if this is what you wanted Hello


    Cordially,
    pedxz.

    Hello, pedxz,
    It does not work ... just an empty space ...

    What is your forum?
    skouliki
    skouliki
    Manager
    Manager


    Female Posts : 15311
    Reputation : 1705
    Language : English,Greek
    Location : Greece

    Solved Re: Loading profile information ?

    Post by skouliki April 11th 2019, 2:10 pm

    Storyteller of Wonderland wrote:
    Hello, pedxz,
    It does not work ... just an empty space ...

    you have an empty page because you didnt click yes to use forum header and footer

     Loading profile information ? Scre1188

    Storyteller of Wonderland
    Storyteller of Wonderland
    Forumember


    Female Posts : 108
    Reputation : 10
    Language : Russian, German, French, English.
    Location : Russia

    Solved Re: Loading profile information ?

    Post by Storyteller of Wonderland April 13th 2019, 12:20 pm

    skouliki wrote:
    Storyteller of Wonderland wrote:
    Hello, pedxz,
    It does not work ... just an empty space ...

    you have an empty page because you didnt click yes to use forum header and footer


    Excuse for troubling. Nothing happens. Well, the topic can be closed...
    skouliki
    skouliki
    Manager
    Manager


    Female Posts : 15311
    Reputation : 1705
    Language : English,Greek
    Location : Greece

    Solved Re: Loading profile information ?

    Post by skouliki April 13th 2019, 3:38 pm

    marked as solved

    Problem solved & topic archived.
    Please read our forum rules: ESF General Rules