will be very useful have one little window for advise you that have one PM in your email box of forum
[edit] changed topic title [/edit]
you mean a popup window.
yeah this would be cool
YabbSE already supported such a feature,
Quote from: klumy on April 07, 2004, 01:34:33 PM
YabbSE already supported such a feature,
If you mean supported as in had, you are wrong. If you mean supported as in could do, so can SMF.
-[Unknown]
great ADMIN this will be very nice addon one popup window that advise you for PM and clicking u will able to see your PM in another window
I did this on mine:
<?php
// Show Flashy icon if user has new messages and it not a guest
if (!$context['user']['is_guest'] && $context['user']['unread_messages'])
echo '
<a href="' . $scripturl . '?action=im"><img src="' . $settings['images_url'] . '/newim.gif" border="0" />(' . $context['user']['unread_messages'] . ')</a> ' . $context['menu_separator'] . '';
?>
It puts a little flashing mail icon in the menu when they have new messages.
where this u code must be write?
Can someone answer this please.
I would be interested in knowing also.
Index.template.php
Find:
// Show the menu up top. Something like [home] [help] [profile] [logout]...
function template_menu()
{
global $context, $settings, $options, $scripturl, $txt;
Add after:
// Show Flashy icon if user has new messages and it not a guest
if (!$context['user']['is_guest'] && $context['user']['unread_messages'])
echo '
<a href="' . $scripturl . '?action=pm"><img src="' . $settings['images_url'] . '/newim.gif" border="0" />(' . $context['user']['unread_messages'] . ')</a> ' . $context['menu_separator'] . '';
change newim.gif to whatever the name of the image is (mine is a flashing envelope)
Menu ends up looking like this. Number in () is the number of new messages:
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fbbs.off-road.com%2Fubbthreads%2Fimages%2Fnewpm.gif&hash=500b6682f26a567ebbf4776b6cb78b670fabd33b) (4) | Home | Help | Search | Admin | Profile | Calendar |
Quote from: dschwab9 on August 27, 2004, 06:27:33 PM
Index.template.php
Find:
// Show the menu up top. Something like [home] [help] [profile] [logout]...
function template_menu()
{
global $context, $settings, $options, $scripturl, $txt;
Add after:
// Show Flashy icon if user has new messages and it not a guest
if (!$context['user']['is_guest'] && $context['user']['unread_messages'])
echo '
(' . $context['user']['unread_messages'] . ') ' . $context['menu_separator'] . '';
change newim.gif to whatever the name of the image is (mine is a flashing envelope)
Menu ends up looking like this. Number in () is the number of new messages:
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fbbs.off-road.com%2Fubbthreads%2Fimages%2Fnewpm.gif&hash=500b6682f26a567ebbf4776b6cb78b670fabd33b) (4) | Home | Help | Search | Admin | Profile | Calendar |
Looks cool! I'll try it out tonight!
Thank you that was Brilliant!!
Can I ask another question please?
My forum is www.tmlforum.net You can log on with the user name, test and pasword also, test
How do I get it to show in the middle where the mail info is now.
In index.template.php FIND: // Only tell them about their messages if they can read their messages!
if ($context['allow_pm'])
echo ', ', $txt[152], ' <a href="', $scripturl, '?action=pm">', $context['user']['messages'], ' ', $context['user']['messages'] != 1 ? $txt[153] : $txt[471], '</a>', $txt['newmessages4'], ' ', $context['user']['unread_messages'], ' ', $context['user']['unread_messages'] == 1 ? $txt['newmessages0'] : $txt['newmessages1'];
echo '.';
That's where it displays the Hey, username, you have X messages, x are new. I think that's where you wanted it, yes?
- Methonis
Yes, that is exactly where I would like to have it, Once I find the code above what do I do?
Thank you for your time on this.
AFTER that code ADD: // Show Flashy icon if user has new messages and it not a guest
if (!$context['user']['is_guest'] && $context['user']['unread_messages'])
echo '
<a href="' . $scripturl . '?action=pm"><img src="' . $settings['images_url'] . '/newim.gif" border="0" />(' . $context['user']['unread_messages'] . ')</a> ' . $context['menu_separator'] . '';
Where is says newim.gif, change it to whatever image you want displayed and make sure it's uploaded to Themes/yourtheme/images
- Methonis
If you're putting it up there, you don't want the menu separator in it. Probably something like this:
// Show Flashy icon if user has new messages and it not a guest
if (!$context['user']['is_guest'] && $context['user']['unread_messages'])
echo '
<a href="' . $scripturl . '?action=pm"><img src="' . $settings['images_url'] . '/newim.gif" border="0" />(' . $context['user']['unread_messages'] . ')</a> ';
Err, yeah, forgot to clip that part out. :D
- Methonis
Metho, I copied dschwab9 code and it looked fine with your code or his they both worked.
Should I know what this menu separator is?
Thanks a million guys.
He just had the original code put a | character between it because he'd had his on his menu. Not a big deal. :)
- Methonis
Thank You so much it looks GREAT :D
If the | is not actually showing, then it is probably causing "Undefined index" errors or something. Not sure if that variable is defined at that point or not. Basically, if they both look the same, and you are happy with the way it looks, use my code.
as the line above in index.template.php all ready displays new messages there no need to display the (n) of new messages again
if (!$context['user']['is_guest'] && $context['user']['unread_messages'])
echo '<a href="' . $scripturl . '?action=pm"><img src="' . $settings['images_url'] . '/newpm.gif" border="0" /></a> ';
being the total simpleton that i am at times, and also a scaredy cat, afraid to break what works...
I would like the flashy gif to appear at the top of the screen,
Quoteyou have 66 messages, 1 are new.
so that the flashy gif appears before the 1
Ive worked out what line to put it on... but obviously it flashes all the time, because IM unsure where exactly to put the ['unread_messages'] code bit... without messing up the other code :(
ok Im a total der brain!
just re read this topic more carefully...
excuse me :-[
Quote from: EG on November 29, 2004, 06:51:54 PM
ok Im a total der brain!
just re read this topic more carefully...
excuse me :-[
And I was just fishing out the code for ya and all... ;)
I have the same on my board, works well...
aww thanks for that!
I just didnt read it through properly! typical ::)
yeah, the members were complaining that they didnt notice when they got a new IM as easily now... the little flashing envelope works wonders ;)
Quote from: EG on November 29, 2004, 07:00:29 PM
the little flashing envelope works wonders ;)
I second that!!
Thanks for this very helpful, and certainly a million miles better than a pop-up.
Quote from: cleavers1066 on December 07, 2004, 08:19:02 AM
Thanks for this very helpful, and certainly a million miles better than a pop-up.
Totally agree. The flashing mail icon should be standard in SMF (and it would be nice to see it on this forum too!)
This is a great tip! but...where is the newim.gif?
Quote from: Little Wolf on February 07, 2005, 02:07:20 PM
This is a great tip! but...where is the newim.gif?
Just use this one!?!...
http://bbs.off-road.com/ubbthreads/images/newpm.gif (https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fbbs.off-road.com%2Fubbthreads%2Fimages%2Fnewpm.gif&hash=500b6682f26a567ebbf4776b6cb78b670fabd33b)
just change the name to newim.gif when you download it...
oh! ok thanks.. that was a stupid question to ask. :-[
Quote from: Little Wolf on February 07, 2005, 06:10:20 PM
oh! ok thanks.. that was a stupid question to ask. :-[
Better to ask a stupid question... then to fix a stupid mistake ;)
If you want a bit more animation
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fwww.nokonium.plus.com%2Fbits%2Fnewim.gif&hash=0ee278627c0789102ea9e96c1f1ee60de04a2901)
Right click and save image
I feel like a total idiot, but whenever I try to stick in the second version of the code (the one that shows in the user info box), I get a template parse error.
What am I doing wrong?
Edit: Nevermind, it's fixed now... think I may have put an extra line before it.
Just a question - if it normally says:
"Hey, Zaha, you have 1 message, 1 are new."
How would I get it to say:
"Hey, Zaha, you have (https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fwww.icestormcity.com%2Fzahaqiel%2Fnewim.gif&hash=cc832514bb52148a502981442fb32ffb5908ccf5) 1 message, 1 are new."
Just the thing I'm looking for. Thank you guys! :)
One more question, to put the image in line with the buttons I added style="margin: 2px
in the code, but the number of messages isn't aligning. Is it possible to move this 2 points higher (like the image below)?
You may need to put align="top" on all the button img tags.
-[Unknown]
Thanks, I'll give it a try.
This is a great mod. I love it. So easy to implement. :D
Awesome Mod! Working Great!
Quote from: Cypher7 on November 29, 2004, 06:56:50 PM
And I was just fishing out the code for ya and all... ;)
I have the same on my board, works well...
could you put up that code.. so the image is in front of the "1 New Message"?
Quote from: dschwab9 on August 27, 2004, 06:27:33 PM
Index.template.php
Find:
// Show the menu up top. Something like [home] [help] [profile] [logout]...
function template_menu()
{
global $context, $settings, $options, $scripturl, $txt;
Add after:
// Show Flashy icon if user has new messages and it not a guest
if (!$context['user']['is_guest'] && $context['user']['unread_messages'])
echo '
<a href="' . $scripturl . '?action=pm"><img src="' . $settings['images_url'] . '/newim.gif" border="0" />(' . $context['user']['unread_messages'] . ')</a> ' . $context['menu_separator'] . '';
change newim.gif to whatever the name of the image is (mine is a flashing envelope)
Menu ends up looking like this. Number in () is the number of new messages:
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fbbs.off-road.com%2Fubbthreads%2Fimages%2Fnewpm.gif&hash=500b6682f26a567ebbf4776b6cb78b670fabd33b) (4) | Home | Help | Search | Admin | Profile | Calendar |
Ok, I inserted your code, heres what it looks like...
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fimg515.imageshack.us%2Fimg515%2F2249%2Fimage11wm.gif&hash=1ee3c066958c82503d5974836149cd4f8c98b9c1) (http://imageshack.us)
Any way to move the flashing icon to the center??
Or move it from where it's at?
If I could make it look like this, it woulld be great...
Thanks
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fimg502.imageshack.us%2Fimg502%2F65%2Fimage27tg.gif&hash=add7d89938e6ba8fecdc360313dd22ef214528b3) (http://imageshack.us)
i have a bit of a problem with this coding...... it works great when i have unread messages.....but if i dont have any unread messages i keep getting the login field in place of the spot that shows i have unread messages........ whats going on?
I modifyed the code a bit and put it into Mod form , more details + the mod package can be seen here
[mod deleted]
Quote from: Alan S on August 18, 2006, 07:13:30 PM
I modifyed the code a bit and put it into Mod form , more details + the mod package can be seen here
http://mods.simplemachines.org/index.php?mod=426
I had beaten you to it awhile ago ;D
http://mods.simplemachines.org/index.php?mod=260 (http://mods.simplemachines.org/index.php?mod=260)
-Snork13
lol oh well at least i got a small bit of experience with the way mods work
I love the idea of a pop up window just like YabbSE already has
I was wondering if there is anyway to add sound like YabbSE allowed? When a new message came in. I remember having a sound directory. when I used the Yabb before....That is a feature I would love to have again
This is a mod done by bigguy.
And can anyone help me out with this mod on the Dilber MC theme? thanks.
Quote from: choloman05 on September 03, 2006, 05:13:48 PM
And can anyone help me out with this mod on the Dilber MC theme? thanks.
If you are having too many problem with Dilber theme then you should go to the DilberMc thread and ask Harzem for help. He is usually good at helping.
Hi
If bloc is around could you tell me how to integrate this into the Nexus5 template as when i try to do it the top header seems to go out of alignment, think its just a table issue but i cant sort it.
Seems to put the Flashy above the menu instead of in line with it
whoops just noticed this should be on TP site
Quote from: RebelRose on September 09, 2006, 12:19:53 AM
Quote from: choloman05 on September 03, 2006, 05:13:48 PM
And can anyone help me out with this mod on the Dilber MC theme? thanks.
If you are having too many problem with Dilber theme then you should go to the DilberMc thread and ask Harzem for help. He is usually good at helping.
Been trying that and no help so far. I think he might read just the latest page of that thread.
Did this, works great! I have it on the Helios theme and in 2 spots (above nav menu and in Forum Stats section)
However, I noticed that it works perfect for the first unread message, however, once you check PMs and then get another new one the newim.gif doesn't show up, although the (1) still does.
Any ideas?
hello i installed thid manually and looks great my only ? is there a way to move where the image is here is a screen shot of mine i wolud like to move it aboive the messages button
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fimg695.imageshack.us%2Fimg695%2F7051%2Fcapturexf.jpg&hash=2f4f5b69d265f6995affc4fddba3524c8c5b87a4)
Quote from: snork13 on August 19, 2006, 09:59:38 AM
Quote from: Alan S on August 18, 2006, 07:13:30 PM
I modifyed the code a bit and put it into Mod form , more details + the mod package can be seen here
http://mods.simplemachines.org/index.php?mod=426
I had beaten you to it awhile ago ;D
http://mods.simplemachines.org/index.php?mod=260 (http://mods.simplemachines.org/index.php?mod=260)
-Snork13
Just curious if there will be a MOD for this email flashy thingy for RC3?
I tried the mod listed above and got the error that it was not compatible with my version... TIA
Quote from: bangkokcanuck on April 26, 2010, 11:40:03 AM
Quote from: snork13 on August 19, 2006, 09:59:38 AM
Quote from: Alan S on August 18, 2006, 07:13:30 PM
I modifyed the code a bit and put it into Mod form , more details + the mod package can be seen here
http://mods.simplemachines.org/index.php?mod=426
I had beaten you to it awhile ago ;D
http://mods.simplemachines.org/index.php?mod=260 (http://mods.simplemachines.org/index.php?mod=260)
-Snork13
Just curious if there will be a MOD for this email flashy thingy for RC3?
I tried the mod listed above and got the error that it was not compatible with my version... TIA
run the install in emulation mode from the package manager
There is that mode that you can use its the same as on the old facebook a black box apeares in the right upper corner if you got a pm or some1 replied on your post!
emulation mode ?
any packages available??
i think the pop up option is default .. its there in vbulletin also
I'll bump this instead of creating a new thread...
I'm using SMF 1.1.11 and having troubles trying to do something like this on a custom theme...
Anyone know how I can go about doing this? =S
Quote from: thenoss on September 25, 2010, 11:09:11 PM
I'll bump this instead of creating a new thread...
I'm using SMF 1.1.11 and having troubles trying to do something like this on a custom theme...
Anyone know how I can go about doing this? =S
Depends on the custom theme. What problems are you experiencing?
I am using the Ziyah Zemin theme. Anyone know how I can get this working as it doesn't have PM notifcation :-[
Quote from: Maxine22 on November 14, 2010, 02:28:01 AM
I am using the Ziyah Zemin theme. Anyone know how I can get this working as it doesn't have PM notifcation :-[
That's odd, isn't it. You'd want to know if you have new messages.
Well, this is how you could implement it. In the file index.template.php of this theme, look for
echo '
<strong>', $txt['hello_member_ndt'], ' ', $context['user']['name'] , '</strong><br />
<a href="', $scripturl, '?action=unread">', $txt['unread_since_visit'], '</a> <br />
<a href="', $scripturl, '?action=unreadreplies">', $txt['show_unread_replies'], '</a><br />';
replace that part with
echo '
<strong>', $txt['hello_member_ndt'], ' ', $context['user']['name'] , '</strong>';
// Show Flashy icon if user has new messages and it not a guest
if (!$context['user']['is_guest'] && $context['user']['unread_messages'])
echo '
<a href="' . $scripturl . '?action=pm"><img src="' . $settings['images_url'] . '/newim.gif" border="0" />(' . $context['user']['unread_messages'] . ')</a> ' . $context['menu_separator'] . '<br />
<a href="', $scripturl, '?action=unread">', $txt['unread_since_visit'], '</a> <br />
<a href="', $scripturl, '?action=unreadreplies">', $txt['show_unread_replies'], '</a><br />';
Which will make it look like this
Hello username (1) {image here}
QuoteThat's odd, isn't it. You'd want to know if you have new messages.
Absolutely. The only way to know a PM is in the inbox is via email which isn't any help if the user doesn't access it on a regular basis.
Okay the code works but when you have read the PM, the notification disappears along with 'show last posts' and 'replies to posts' options......
Any suggestions?
Thanks
Sorry about that. Try this instead
echo '
<strong>', $txt['hello_member_ndt'], ' ', $context['user']['name'] , '</strong>';
// Show Flashy icon if user has new messages and it not a guest
if (!$context['user']['is_guest'] && $context['user']['unread_messages'])
echo '
<a href="' . $scripturl . '?action=pm"><img src="' . $settings['images_url'] . '/newim.gif" border="0" />(' . $context['user']['unread_messages'] . ')</a> ' . $context['menu_separator'] . '<br />';
echo '
<a href="', $scripturl, '?action=unread">', $txt['unread_since_visit'], '</a> <br />
<a href="', $scripturl, '?action=unreadreplies">', $txt['show_unread_replies'], '</a><br />';
If you are having too many problem with Dilber theme then you should go to the DilberMc thread and ask many problem u could confused.
------------------------------------------------------------------------------