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.
The forum of the forums
3 posters

    How can I add userwall in a link in a template?

    Van-Helsing
    Van-Helsing
    Hyperactive


    Male Posts : 2431
    Reputation : 116
    Language : English, Greek

    Solved How can I add userwall in a link in a template?

    Post by Van-Helsing October 25th 2014, 12:19 pm

    Hi all,
    How can I add the userwall in a link in overall_header template?

    Example code
    Code:

    <li id="user_content"><a href="LINK" title="Userwall">User's wall</a></li>

    I think I need a javascript to complete this function. Can someone help me please?


    Last edited by Black-Shadow on October 25th 2014, 3:21 pm; edited 1 time in total
    _Twisted_Mods_
    _Twisted_Mods_
    Helper
    Helper


    Male Posts : 2083
    Reputation : 336
    Language : English
    Location : Ms

    Solved Re: How can I add userwall in a link in a template?

    Post by _Twisted_Mods_ October 25th 2014, 12:34 pm

    your trying to make a link to the current logged in users wall?
    Van-Helsing
    Van-Helsing
    Hyperactive


    Male Posts : 2431
    Reputation : 116
    Language : English, Greek

    Solved Re: How can I add userwall in a link in a template?

    Post by Van-Helsing October 25th 2014, 1:24 pm

    _Twisted_Mods_ wrote:your trying to make a link to the current logged in users wall?
    Yes I need it for logged in users _Twisted_Mods_
    _Twisted_Mods_
    _Twisted_Mods_
    Helper
    Helper


    Male Posts : 2083
    Reputation : 336
    Language : English
    Location : Ms

    Solved Re: How can I add userwall in a link in a template?

    Post by _Twisted_Mods_ October 25th 2014, 1:51 pm

    haha i figured it out.... now where u want to put it?
    Van-Helsing
    Van-Helsing
    Hyperactive


    Male Posts : 2431
    Reputation : 116
    Language : English, Greek

    Solved Re: How can I add userwall in a link in a template?

    Post by Van-Helsing October 25th 2014, 2:25 pm

    I want to put it in overall_header template.
    _Twisted_Mods_
    _Twisted_Mods_
    Helper
    Helper


    Male Posts : 2083
    Reputation : 336
    Language : English
    Location : Ms

    Solved Re: How can I add userwall in a link in a template?

    Post by _Twisted_Mods_ October 25th 2014, 2:37 pm

    add

    Code:
    <span id="uwall"></span>

    in the overall_header where ever you want the link to be

    and this is the js


    Code:
    $(function(){
    var numb1 = document.getElementById('uwall');
              var userlink = _userdata.user_id;
     numb1.innerHTML += ' <a href="http://yoursite.com/u' + userlink + 'wall">My Wall</a>';
             
            });

    Replace:
    Code:
    http://yoursite.com/

    with your site link
    and

    replace

    Code:
    My Wall

    with your text or img code
    Van-Helsing
    Van-Helsing
    Hyperactive


    Male Posts : 2431
    Reputation : 116
    Language : English, Greek

    Solved Re: How can I add userwall in a link in a template?

    Post by Van-Helsing October 25th 2014, 3:20 pm

    Thank you very much _Twisted_Mods_ I have modified it and the problem is solved.

    Best Regards,
    Black-Shadow
    Base
    Base
    Forumaster


    Male Posts : 10383
    Reputation : 1695
    Language : English and French
    Location : United Kingdom, England

    Solved Re: How can I add userwall in a link in a template?

    Post by Base October 25th 2014, 3:31 pm

    Solved => Archived

      Current date/time is November 13th 2024, 7:14 pm