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
4 posters

    How can i change you have no messages to Inbox

    Mr DarkHaxers2
    Mr DarkHaxers2
    Forumember


    Male Posts : 409
    Reputation : -17
    Language : English
    Location : Modesto,Cali

    Solved How can i change you have no messages to Inbox

    Post by Mr DarkHaxers2 February 25th 2012, 07:58

    I really wanted to do this on my site and how can i do this, how can i change you have no messages to Inbox, here an image what im talking about:

    How can i change you have no messages to Inbox Youhav10 I want to change this to Inbox

    Please help me, If you can

    Forum Version: PunBB
    LGforum
    LGforum
    Hyperactive


    Male Posts : 2265
    Reputation : 264
    Language : English
    Location : UK

    Solved Re: How can i change you have no messages to Inbox

    Post by LGforum February 25th 2012, 08:22

    Everyone someone asks this I challenge myself to do it another way lol.

    Code:

    <script>
    (function(){var x= document.getElementById('i_icon_mini_message') ? 0 : /[0-9]/.exec(document.getElementById('i_icon_mini_new_message').title);
    if(x){
    document.getElementById('i_icon_mini_new_message').nextSibling.nodeValue = 'Inbox: '+x;
    }else { document.getElementById('i_icon_mini_message').nextSibling.nodeValue = 'Inbox: 0'; }})();
    </script>

    Putting that in an announcement or widget will give you a nice new format for that link. It will be instant too, no flash of execution.


    Last edited by LGforum on February 26th 2012, 00:30; edited 3 times in total
    Mr DarkHaxers2
    Mr DarkHaxers2
    Forumember


    Male Posts : 409
    Reputation : -17
    Language : English
    Location : Modesto,Cali

    Solved Re: How can i change you have no messages to Inbox

    Post by Mr DarkHaxers2 February 25th 2012, 08:42

    LGforum wrote:Everyone someone asks this I challenge myself to do it another way lol.

    Code:

    <script>
    (function(){x= document.getElementById('i_icon_mini_message') ? 0 : /[0-9]/.exec(document.getElementById('i_icon_mini_new_message').title);
    if(x){
    document.getElementById('i_icon_mini_new_message').nextSibling.nodeValue = 'Inbox: '+x;
    }else { document.getElementById('i_icon_mini_message').nextSibling.nodeValue = 'Inbox: 0'; })();
    </script>

    Putting that in an announcement or widget will give you a nice new format for that link. It will be instant too, no flash of execution.

    i put this code in Homepage>> Generalities but it did not change it
    LGforum
    LGforum
    Hyperactive


    Male Posts : 2265
    Reputation : 264
    Language : English
    Location : UK

    Solved Re: How can i change you have no messages to Inbox

    Post by LGforum February 25th 2012, 09:17

    Sorry there was a character missing from the script. I have edited it now.

    BUT you do realise that if you put it in the HOMEPAGE message then it will only change in the Homepage.


    On an unrelatd note, why do you have the support forum listed as your site in your profile...?
    Mr DarkHaxers2
    Mr DarkHaxers2
    Forumember


    Male Posts : 409
    Reputation : -17
    Language : English
    Location : Modesto,Cali

    Solved Re: How can i change you have no messages to Inbox

    Post by Mr DarkHaxers2 February 25th 2012, 20:16

    ok updated the website fixed and i put the code in the templates>>Top of teh page but the you have no messages did not change


    Last edited by Mr DarkHaxers2 on February 25th 2012, 20:21; edited 1 time in total
    Nera.
    Nera.
    Energetic


    Female Posts : 7078
    Reputation : 2017
    Language : English
    Location : -

    Solved Re: How can i change you have no messages to Inbox

    Post by Nera. February 25th 2012, 20:20

    Solved?
    LGforum
    LGforum
    Hyperactive


    Male Posts : 2265
    Reputation : 264
    Language : English
    Location : UK

    Solved Re: How can i change you have no messages to Inbox

    Post by LGforum February 25th 2012, 22:37

    I said put it in an announcement of widget. Not templates. They are the only places it will work. Just do as mentioned.
    Mr DarkHaxers2
    Mr DarkHaxers2
    Forumember


    Male Posts : 409
    Reputation : -17
    Language : English
    Location : Modesto,Cali

    Solved Re: How can i change you have no messages to Inbox

    Post by Mr DarkHaxers2 February 25th 2012, 23:02

    ok, i put it in the widgets but it did not work
    LGforum
    LGforum
    Hyperactive


    Male Posts : 2265
    Reputation : 264
    Language : English
    Location : UK

    Solved Re: How can i change you have no messages to Inbox

    Post by LGforum February 26th 2012, 00:27

    link to your forum please.

    I tested this on punbb, worked wonderfully. It will work on all board types.
    Mr DarkHaxers2
    Mr DarkHaxers2
    Forumember


    Male Posts : 409
    Reputation : -17
    Language : English
    Location : Modesto,Cali

    Solved Re: How can i change you have no messages to Inbox

    Post by Mr DarkHaxers2 February 26th 2012, 00:56

    LGforum
    LGforum
    Hyperactive


    Male Posts : 2265
    Reputation : 264
    Language : English
    Location : UK

    Solved Re: How can i change you have no messages to Inbox

    Post by LGforum February 26th 2012, 01:03

    Okay a few things.
    First of all, I'm confused, you said you put it in a widget, but yet don't have widgets on your forum.
    Secondly, the first script I provided had an error in as I said, and I edited the post to fix that... but yet you still haven't updated your script... your still using the one with the error in it.

    And thirdly, you have another script crashing, its your category toggle script.
    Mr DarkHaxers2
    Mr DarkHaxers2
    Forumember


    Male Posts : 409
    Reputation : -17
    Language : English
    Location : Modesto,Cali

    Solved Re: How can i change you have no messages to Inbox

    Post by Mr DarkHaxers2 February 26th 2012, 02:49

    ok i don't used caggorie toggle so wuts the point and is this the new script:

    Code:
    <script>
    (function(){var x= document.getElementById('i_icon_mini_message') ? 0 : /[0-9]/.exec(document.getElementById('i_icon_mini_new_message').title);
    if(x){
    document.getElementById('i_icon_mini_new_message').nextSibling.nodeValue = 'Inbox: '+x;
    }else { document.getElementById('i_icon_mini_message').nextSibling.nodeValue = 'Inbox: 0'; }})();
    </script>
    LGforum
    LGforum
    Hyperactive


    Male Posts : 2265
    Reputation : 264
    Language : English
    Location : UK

    Solved Re: How can i change you have no messages to Inbox

    Post by LGforum February 26th 2012, 03:08

    yes thats the new script.
    If you don't use the category toggle script you should remove it.
    Mr DarkHaxers2
    Mr DarkHaxers2
    Forumember


    Male Posts : 409
    Reputation : -17
    Language : English
    Location : Modesto,Cali

    Solved Re: How can i change you have no messages to Inbox

    Post by Mr DarkHaxers2 February 26th 2012, 03:11

    ok topic solved then
    Sanket
    Sanket
    ForumGuru


    Male Posts : 48766
    Reputation : 2830
    Language : English
    Location : Mumbai

    Solved Re: How can i change you have no messages to Inbox

    Post by Sanket February 26th 2012, 08:36

    Topic Solved & Locked

      Current date/time is November 13th 2024, 18:55