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.

How can i change you have no messages to Inbox

4 posters

Go down

Solved How can i change you have no messages to Inbox

Post by Mr DarkHaxers2 February 25th 2012, 6:58 am

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
Mr DarkHaxers2
Mr DarkHaxers2
Forumember

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

Back to top Go down

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

Post by LGforum February 25th 2012, 7:22 am

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 25th 2012, 11:30 pm; edited 3 times in total
LGforum
LGforum
Hyperactive

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

Back to top Go down

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

Post by Mr DarkHaxers2 February 25th 2012, 7:42 am

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
Mr DarkHaxers2
Mr DarkHaxers2
Forumember

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

Back to top Go down

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

Post by LGforum February 25th 2012, 8:17 am

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...?
LGforum
LGforum
Hyperactive

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

Back to top Go down

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

Post by Mr DarkHaxers2 February 25th 2012, 7:16 pm

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, 7:21 pm; edited 1 time in total
Mr DarkHaxers2
Mr DarkHaxers2
Forumember

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

Back to top Go down

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

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

Solved?
Nera.
Nera.
Energetic

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

Back to top Go down

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

Post by LGforum February 25th 2012, 9:37 pm

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

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

Back to top Go down

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

Post by Mr DarkHaxers2 February 25th 2012, 10:02 pm

ok, i put it in the widgets but it did not work
Mr DarkHaxers2
Mr DarkHaxers2
Forumember

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

Back to top Go down

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

Post by LGforum February 25th 2012, 11:27 pm

link to your forum please.

I tested this on punbb, worked wonderfully. It will work on all board types.
LGforum
LGforum
Hyperactive

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

Back to top Go down

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

Post by Mr DarkHaxers2 February 25th 2012, 11:56 pm

Mr DarkHaxers2
Mr DarkHaxers2
Forumember

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

Back to top Go down

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

Post by LGforum February 26th 2012, 12:03 am

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.
LGforum
LGforum
Hyperactive

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

Back to top Go down

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

Post by Mr DarkHaxers2 February 26th 2012, 1:49 am

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>
Mr DarkHaxers2
Mr DarkHaxers2
Forumember

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

Back to top Go down

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

Post by LGforum February 26th 2012, 2:08 am

yes thats the new script.
If you don't use the category toggle script you should remove it.
LGforum
LGforum
Hyperactive

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

Back to top Go down

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

Post by Mr DarkHaxers2 February 26th 2012, 2:11 am

ok topic solved then
Mr DarkHaxers2
Mr DarkHaxers2
Forumember

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

Back to top Go down

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

Post by Sanket February 26th 2012, 7:36 am

Topic Solved & Locked
Sanket
Sanket
ForumGuru

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

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum