1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. This forum is for release discussion only. Discussions that do not relate specifically to the resource release should be discussed in another, more appropriate forum.
    Dismiss Notice
  3. This forum has been archived. New threads and replies may not be made. All add-ons/resources that are active should be migrated to the Resource Manager. See this thread for more information.

Add a link to trophies you've been awarded on your Account view navigation bar

Discussion in 'Template Modifications [Archive]' started by Brogan, Dec 3, 2010.

  1. Brogan

    Brogan XenForo Moderator Staff Member

    A very simple edit this one.

    Open the navigation_visitor_tab template and find this:
    HTML:
    <li><a href="{xen:link account/likes}">{xen:phrase likes_youve_received}</a></li>
    Below it add this:
    HTML:
    <li><a href="{xen:link members/trophies, $visitor}">{xen:phrase trophies}</a></li>
    The result is a new link in the navigation bar like so:
    trophies1.PNG

    Which when clicked loads your trophies page:
    trophies2.PNG


    I do plan to add the Trophies tab as I suggested in this thread but until I do, this will suffice as a stop gap.
     
  2. anotheralias

    anotheralias Well-Known Member

    Is there any way to replace either the number or the text with an image? So that each trophy awarded would be a different image?
     
  3. Brogan

    Brogan XenForo Moderator Staff Member

    Not using this template modification as it uses the default trophy page view.

    When I get around to doing the Trophy tab then that might be an option.
     
  4. anotheralias

    anotheralias Well-Known Member

    Ah ok - thanks for letting me know.
     
  5. ddmmh

    ddmmh Well-Known Member

    Hi Brogan,
    Great mod although it didnt work for me at all? No errors... but no trophie link either. I am using beta 4, could this be the issue? Thanks.
     
  6. Brogan

    Brogan XenForo Moderator Staff Member

  7. ddmmh

    ddmmh Well-Known Member

    Hi Brogan,
    I tried again thinking I might of stuffed it up.. but i followed all the steps.
    Here is a screenshot of what I added. I notice your quoted codes above are a little different? So as you can see by the screenshot below I searched for "watched/threads" to find the code your referring to, this is where I may have gone wrong?
    1.png
    Heres the other screenshot of my account.
    2.png
     
  8. Brogan

    Brogan XenForo Moderator Staff Member

    Yes, you've edited the template in the wrong place.

    You need to look for the commented out entry as I posted in my the first post:
    <!--<li><a href="{xen:link 'watched/threads'}">{xen:phrase watched_threads}</a></li>--> </ul>

    For reference, it's this section:
    nav_vis_tabs.PNG
     
  9. Floris

    Floris Guest

    Thanks Brogan :) Fun addition.
     
  10. Brogan

    Brogan XenForo Moderator Staff Member

  11. ddmmh

    ddmmh Well-Known Member

    Hi Brogan,

    I just realised I never wrote back to you. Sorry about that, wasnt being rude, just probably thought I did but didnt... i have a fantastic memory you see. I did try this again and got it to work perfectly, great little addition, thank you.
     
  12. Brogan

    Brogan XenForo Moderator Staff Member

    No worries.

    Glad you got it working.
     
  13. Peggy

    Peggy Well-Known Member

    I wonder if, in the future, we'll be able to have a different trophy, or different colored trophy, for each achievement?
     
  14. Digital Doctor

    Digital Doctor Well-Known Member

    Are there "Trophy Skins" ?
     
  15. Brogan

    Brogan XenForo Moderator Staff Member

    There aren't even trophy images.

    The ones in the screenshot above is something I added myself.
     
  16. Digital Doctor

    Digital Doctor Well-Known Member

    Might be an idea for xF 1.1

    You could have themed "trophies".

    For a racing car site:
    Trophy (1) = Welcome Trophy - Now you've got a race car !
    Trophy (2) = First Message Trophy - You've completed your first lap of the track !
    Trophy (5) = Double figures Trophy - You are becoming a serious racecar driver.
    Trophy (6) = Like Trophy - Someone likes your car !
    Trophy (7) = Keeps coming Back Trophy - you've completed your first race ! Congrats !

    Trophies would be associated with a hidden trophy specific page and images. (end user customizable).
    At the bottom of the themed trophy-specific page.

    It might mention the users new abilities.

     
  17. Peggy

    Peggy Well-Known Member

    Nice idea DD.
     
  18. ddmmh

    ddmmh Well-Known Member

    That would be great for a site like brogans. I am developing an MMA site. I could use belts. white belts, yellow belts etc etc
     
    Digital Doctor likes this.
  19. Digital Doctor

    Digital Doctor Well-Known Member

    View attachment 7061
    [​IMG]
    How about releasing an addon that allows the admin to choose a trophy image :) ?
     
  20. Brogan

    Brogan XenForo Moderator Staff Member

    Well eventually I plan to do a trophy tab so I could include it as part of that.
    In the meantime, this is how to get a trophy image to display.

    Add this to EXTRA.css:
    Code:
    /* Trophy icon */
    .trophy_icon {
    display: block;
    width: 24px;
    height: 30px;
    float: left;
    background: url('@imagePath/images/trophy.png');
    }
    Open the trophy template and after this:
    Code:
    <div class="trophy" id="trophy-{$trophy.trophy_id}">
    Add this:
    Code:
    <div class="trophy_icon"></div>
    The trophy icon I am currently using is attached.
    You will need to upload it to the relevant directory - I created a /images directory in the style I am using and placed it there.
     

    Attached Files:

    Hyperion, Veer, Michael and 2 others like this.

Share This Page