1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

About Tab 1.0

Shows the user's information in a separate tab

  1. Robust

    Robust Well-Known Member

    Robust submitted a new resource:

    About Tab - Shows the user's information in a separate tab

    Read more about this resource...
     
    sami simo likes this.
  2. Pinn

    Pinn Active Member

    How can I use custom fields in the tab about?
     
  3. Robust

    Robust Well-Known Member

    What do you mean?
     
  4. Pinn

    Pinn Active Member

    Would like to create user fields questions/answers for users under your tab, is it feasible?
     
  5. Robust

    Robust Well-Known Member

    Oh, you mean you want to add new user fields into the tab? It's easily possible, but it requires messing around with templates. Since I use a template modification to make the change and add the tab in, you'd have to modify my template modification. The hardest part of this process is getting your board into debug mode.

    Go to library/config.php and add the line:
    $config['debug'] = 1;

    Refresh your admin control panel. Go to Appearance -> Template Modifications -> Look for a row that says member_view, it should be below a little row saying About Tab. Go into the Replace box and add your fields in.

    Code:
    <dl><dt>Text:</dt> <dd>{xen:string censor, $user.occupation}</dd></dl>
    Change $user.occupation to $user.(fieldname). Check the field name at Admin Control Panel -> Users -> Custom User Fields -> Click on the one you want -> Copy the field id.

    Screen Shot 2015-05-04 at 10.12.42.png

    Once done, put your board out of debug mode:

    Remove the line: $config['debug'] = 1;
    Set it to zero: $config['debug'] = 0;
    Or comment it out (what I do): //$config['debug'] = 1;

    If there are any problems or queries, please let me know.
     
    Pinn likes this.
  6. Pinn

    Pinn Active Member

    I have done it without problems. Only I have a problem that the questions which I've now created under the tab about to other user information fields are displayed now and that should not be. Do you have an idea?
     

    Attached Files:

  7. Robust

    Robust Well-Known Member

    Got a screenshot?
     
  8. Pinn

    Pinn Active Member

    Have 2 different user fields, once the questions under your tab and then other information.

    erer.png
     
  9. Robust

    Robust Well-Known Member

    @Pinn Oh, I see. There's another template modification I used to remove them from the information tab. Let me install this real quick on my new development board and check it for you.
     
    Pinn likes this.
  10. Robust

    Robust Well-Known Member

    @Pinn Hm, I completely overlooked this part. Fields are added through a loop. There are a couple of ways to remove them. The proper and the recommended way would probably require PHP code. If you wanted all of the personal user fields moved into the about tab, it's a lot easier. To move specific ones would require some PHP code accustomed to your installation (or a selector in the Options part of the panel, which shows all custom fields and allows you to select which ones should go under About, which could come in a future update).
     
    Pinn likes this.
  11. Pinn

    Pinn Active Member

    MH okey. My concern is that I would have gladly answer users questions. Therefore, it must be displayed in a private tab. An own addon should probably be created.
     
  12. Robust

    Robust Well-Known Member

    It wouldn't be hard to make something like that up. I can make a selection list as an admin option and let you choose which fields you want to be added into the About tab and removed from the other tabs. I'll see if I can do it over the weekend.
     
    Pinn likes this.
  13. Pinn

    Pinn Active Member

    Do you have a solution?
     
  14. Robust

    Robust Well-Known Member

    Hey,

    Quite late here right now. I'm going to look into it in the afternoon tomorrow.

    Edit: Keep postponing it because I get busy, I'll look into it ASAP. Not feeling well right now either.
     
    Last edited: May 14, 2015
    Pinn likes this.
  15. Robust

    Robust Well-Known Member

    I got the backend part of it done but I don't have a clue on how to make the frontend part to send the data/array of tab name and field name, with a field name selector. I'll look at some XF examples later I guess.
     
  16. Pinn

    Pinn Active Member

    Okey, unfortunately can not help you, know even less. Ask in the Forum here.
     
  17. Pinn

    Pinn Active Member

    Is there anything new?

    A new resource would be awesome with questions and answers, which are then evaluated as who responded and compares what eg responded X what one has just answered.
     

Share This Page