Link to Mod (http://custom.simplemachines.org/mods/index.php?mod=1707)
PM Notification Bar
Originaly created by KahneFan
This is a simple PM notification bar which uses your theme's current style to create a bar alerting members of new PMs. Since this displays within your forum pop-up blockers won't give it trouble.
Attached is a screen shot of the mod in action. I would give a demo, but I'm sure people would keep checking the mail :D
Edit:Updated to work with 1.1.9 and 1.1.8 versions. For that versions use pm_notification_bar_1.1.x.zip.
If you have some errors, bugs or something, please be kind to post your comment here, and we will try to help...
Very nice mod KahneFan!!! Love the pop-up blockers but hate it when u need the pop-up. This will prove to be quite handy.
Chris
What difference Pm Informer (http://www.simplemachines.org/community/index.php?topic=299276.0)?
Hmm, guess I have not seen that mod before. TBH, doesn't appear to be a lot of difference. That mod allows you to edit your style in the admin, whereas mine uses styles already being used on your site. Other than that.... probably not much.
i can't find
// Show the navigation tree.
in my custom template....some help please
thnkx
I'm not familiar with .rar files. Can you post your regular index.template.php file?
nice mod KF, like the way it fits nicely with my theme although the 90% width is bit overkill (IMO) ive changed it to set px width at 340px
Quote from: the_shadow on March 16, 2009, 04:41:52 PM
i can't find
// Show the navigation tree.
in my custom template....some help please
thnkx
try this - make sure you have a back up tho as this may not work but ive placed it just before where // Show the navigation tree. should be in default theme
I just wanted to make it stand out, but the width is definitely up to the forum owner :D
Quote from: Özgür´ on March 16, 2009, 11:19:14 AM
What difference Pm Informer (http://www.simplemachines.org/community/index.php?topic=299276.0)?
i think the difference being that KF's mod utilises the catbg image and adds the boarder around which blends well with the forum design, where as PM Informer just had a coloured background and no offence to the mod designer - it was very basic looking
my members liked PM Informer but i disliked its design as it didnt blend well with my forum but with my tweek, as is definately up to the forum owner ;D, looks much better and fits in with my forum design
gona make this for 1.1.8? cause thats what im using now and i don't want to have a upgrade my whole site just to add this feature.
I don't use 1.1.x, but I could try to look at it. It should be too tough to implement. I just need to know the text strings, the rest is basic HTML.
Quote from: KahneFan on March 16, 2009, 05:57:27 PM
I'm not familiar with .rar files. Can you post your regular index.template.php file?
here u go KahneFan....
Quote from: stikkki
try this - make sure you have a back up tho as this may not work but ive placed it just before where // Show the navigation tree. should be in default theme
i made this modification in my default theme but i want it to work in my custum....this is mine index.template of my cystum template...and i can´t find that frase!!!:(
I don't know what your theme looks like, but the attached should work. Be sure to back up first... although the file attached above is basically a backup :D
i will see....thankx!!!!
Nice Mod, thanks!
I installed on my forum, works ok :-)
How can i chanche the bar's background color ?
Thanks!
Antonio
It uses the same class as your catbg's. You would need to either change your catbg, or create a whole new class just for the bar.
Or, you could use PM Informer (http://custom.simplemachines.org/mods/index.php?mod=1202) which allows you to adjust the bg color.
Quote from: KahneFan on March 20, 2009, 03:19:00 AM
It uses the same class as your catbg's. You would need to either change your catbg, or create a whole new class just for the bar.
Or, you could use PM Informer (http://custom.simplemachines.org/mods/index.php?mod=1202) which allows you to adjust the bg color.
Oh thanks for quick reply! :-)
Antonio
Just tried to install this plugin but I get the following error:
"The package you are trying to download or install is either corrupt or not compatible with this version of SMF"
I'm using SMF 1.1.10 with a custom theme.
Anyone know what could be the problem?
The package info XML page just needs to be updated from:
<install for="1.1.8 - 1.1.9">
to
<install for="1.1.8 - 1.1.10">
or
<install for="1.1.x - 1.1.xx">
<install for="1.1.x - 1.1.xx"> dont work.
User should be use
<install for="1.1.0 - 1.1.99">
Version 2.0 Realised.
Now it works with smf 1.1.x and with 2.0 versions include 1.1.10 and 2.0RC1.2...
Enjoy. 8)
using a custom 2.0 RC 1.2 theme and your mod is not working at all. not sure why but nothing happens ?
Quote from: WIZARD87 on September 16, 2009, 09:56:50 PM
using a custom 2.0 RC 1.2 theme and your mod is not working at all. not sure why but nothing happens ?
If you're using custom theme, you should add codes manually for Index.template.php
http://custom.simplemachines.org/mods/index.php?action=parse;mod=1707;attach=109029;smf_version=2.0_RC1.2
Trying to install just now and got the "The package you are trying to download or install is either corrupt or not compatible with this version of SMF." I'm using 1.1.10. Can anyone help?
OK, ignore the above. I made the changes to the package-info.html that someone else mentioned, zipped it up, and was able to install just fine. My question is - how do I make this work in other themes? I tried parsing the instructions but it says it isn't compatible no matter which of the 1.x version I choose and I don't know if the instructions for 2.0RC will work just fine with 1.1.10 since I have no clue what the differences are between versions.
It parses for 1.1.8.
Quote from: KahneFan on October 14, 2009, 09:38:44 PM
It parses for 1.1.8.
Not when I try. I tried for every version and it wouldn't parse any of the 1.x versions.
./Themes/default/index.template.php
FIND:
// The main content should go here.
REPLACE WITH:
if(!empty($context['user']['unread_messages'])) {
echo '<br /><br /><div class="categoryframe tborder" style="width: 90%; text-align: center; margin: auto;"><h3 class="catbg headerpadding"><center>';
echo '<a href="', $scripturl, '?action=pm">', $txt['msg_alert_you_have'], ' ', $context['user']['messages'], ' ', $context['user']['messages'] != 1 ? $txt['msg_alert_messages'] : $txt['message_lowercase'], $txt['newmessages4'], ' ', $context['user']['unread_messages'], ' ', $context['user']['unread_messages'] == 1 ? $txt['newmessages0'] : $txt['newmessages1'] , '.</a>';
echo '</center></h3></div>'; }
// The main content should go here.
./Themes/default/languages/Modifications.english.php
FIND:
?>
ADD BEFORE:
//Start Pm Notification Bar by Dzonny
$txt['msg_alert_you_have'] = 'You have';
$txt['msg_alert_messages'] = 'messages';
$txt['message_lowercase'] = 'messages';
$txt['newmessages4'] = ',';
$txt['newmessages0'] = 'new message';
$txt['newmessages1'] = 'new messages';
//End Pm Notification Bar by Dzonny
That worked perfectly, thanks!
An awesome mod. :)
This installed fine on RC2, but I don't have a 2nd account on the test forum to test it. Has anyone else installed this on an RC2 forum, yet?
Quote from: C4G-TK on December 13, 2009, 07:02:32 PM
This installed fine on RC2, but I don't have a 2nd account on the test forum to test it. Has anyone else installed this on an RC2 forum, yet?
Have installed the mod onto www.parascifi.net
Will be testing the feature out later tonight.
EDIT:
The mod does work on RC2
Yepp, I upgraded last week or the week before (time is flying by) and it's working fine!
It is working on rc4?
Yes, it should work.
U just need to install it manually: (dont worry, just two changes)
http://custom.simplemachines.org/mods/index.php?action=parse;mod=1707;attach=109029;smf_version=2.0_RC1.2
Thanks Dzonny :D
i like the idea behind this. do you think its possible to change the image used for the pm button to a different button when there is a new message?
instead of there being a bar with a notification..
my forum is www.nhfragswap.com/forum
the theme is darkmark
i would love to be able to change the regular PM buttom to a PM button with a exclaimation or something on it when there is a new message. I posted in the theme builders support thread a long time ago and never got a response.. figured you might have an idea of how i can make this happen :)
Thanks!
// The main content should go here.
I cant find this code in my theme....
Quote from: InternetFazoni on November 26, 2011, 08:20:55 AM
// The main content should go here.
I cant find this code in my theme....
Helps if you mention the theme you are using as a link.
whitebox
Am using this mod on my newly started forum (yesterday).
Installed with no errors.
How can I get a red background for this, or maybe red text?
I would like to remove the first post number. Instead of it saying "You have X messages, X new messages" I want it to say "You have X new messages".
When you have a mod installed, open your index.template.php and find:
if(!empty($context['user']['unread_messages'])) {
echo '<br /><br /><div class="categoryframe tborder" style="width: 90%; text-align: center; margin: auto;"><h3 class="catbg headerpadding"><center>';
echo '<a href="', $scripturl, '?action=pm">', $txt['msg_alert_you_have'], ' ', $context['user']['messages'], ' ', $context['user']['messages'] != 1 ? $txt['msg_alert_messages'] : $txt['message_lowercase'], $txt['newmessages4'], ' ', $context['user']['unread_messages'], ' ', $context['user']['unread_messages'] == 1 ? $txt['newmessages0'] : $txt['newmessages1'] , '.</a>';
echo '</center></h3></div>'; }
// The main content should go here.
And replace with:
if(!empty($context['user']['unread_messages'])) {
echo '<br /><br /><div class="categoryframe tborder" style="width: 90%; text-align: center; margin: auto;"><h3 class="catbg headerpadding"><center>';
echo '<a href="', $scripturl, '?action=pm">', $txt['msg_alert_you_have'], ' ', $context['user']['unread_messages'], ' ', $context['user']['unread_messages'] == 1 ? $txt['newmessages0'] : $txt['newmessages1'] , '.</a>';
echo '</center></h3></div>'; }
// The main content should go here.
And that should do the trick. Let me know if you need any further help.
@Dylert - You can, but you must apply your own style to it, as it's using default ones now mainly. Take a look at "style" attributes inside the code this mod adds to index.template.php and you can see what i'm talking about.
Where I can modify color of the bar? I'm using aqua style.
Quote from: kamili34 on March 27, 2014, 02:14:02 PM
Where I can modify color of the bar? I'm using aqua style.
I'm not sure which bar you're trying to modify, but try with "categoryframe" class or "catbg headerpadding" class.