PM Notification Bar

Started by Dzonny, March 15, 2009, 06:30:51 PM

Previous topic - Next topic

Dzonny

Link to Mod
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...

cme1st2302

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
SMF Version: 1.1.11
SimplePortal Version: 2.3.2

Admin

He who waits for perfect conditions sees nothing!!
If you need help adding a button or tab PM me!!

Özgür

So Long

KahneFan

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.
#eric_on_twit| (video) Creating Themes for SMF | Reset Your Forum
NOTE: No PM's for support please.

the_shadow

i can't find

// Show the navigation tree.

in my custom template....some help please

thnkx

KahneFan

I'm not familiar with .rar files. Can you post your regular index.template.php file?
#eric_on_twit| (video) Creating Themes for SMF | Reset Your Forum
NOTE: No PM's for support please.

bullbreedluverz

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

KahneFan

I just wanted to make it stand out, but the width is definitely up to the forum owner :D
#eric_on_twit| (video) Creating Themes for SMF | Reset Your Forum
NOTE: No PM's for support please.

bullbreedluverz

#8
Quote from: Özgür´ on March 16, 2009, 11:19:14 AM
What difference Pm Informer?

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

Pleek

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.

KahneFan

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.
#eric_on_twit| (video) Creating Themes for SMF | Reset Your Forum
NOTE: No PM's for support please.

the_shadow

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!!!:(

KahneFan

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
#eric_on_twit| (video) Creating Themes for SMF | Reset Your Forum
NOTE: No PM's for support please.

the_shadow


fotografo74

Nice Mod, thanks!
I installed on my forum, works ok :-)
How can i chanche the bar's background color ?
Thanks!
Antonio

KahneFan

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 which allows you to adjust the bg color.
#eric_on_twit| (video) Creating Themes for SMF | Reset Your Forum
NOTE: No PM's for support please.

fotografo74

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 which allows you to adjust the bg color.
Oh thanks for quick reply! :-)
Antonio

JMantis

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?

KahneFan

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">
#eric_on_twit| (video) Creating Themes for SMF | Reset Your Forum
NOTE: No PM's for support please.

Özgür

<install for="1.1.x - 1.1.xx">   dont work.
User should be use
<install for="1.1.0 - 1.1.99"> 
So Long

Dzonny

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)

WIZARD87

using a custom 2.0 RC 1.2 theme and your mod is not working at all. not sure why but nothing happens ?

Dzonny

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

Kyrna

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?

Kyrna

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.

KahneFan

#eric_on_twit| (video) Creating Themes for SMF | Reset Your Forum
NOTE: No PM's for support please.

Kyrna

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.

KahneFan

./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

#eric_on_twit| (video) Creating Themes for SMF | Reset Your Forum
NOTE: No PM's for support please.

Kyrna

That worked perfectly, thanks!

An awesome mod. :)

C4G-TK

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?

-img removed-

TheListener

#30
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

C4G-TK

Yepp, I upgraded last week or the week before (time is flying by) and it's working fine!

-img removed-

Jack_the_ripper


Dzonny


Jack_the_ripper


3mrhythm

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!
www.nhfragswap.com
www.yariscentral.com

SimpleGost

// The main content should go here.

I cant find this code in my theme....

TheListener

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.


SimpleGost


TheListener

Am using this mod on my newly started forum (yesterday).

Installed with no errors.

Dylert

How can I get a red background for this, or maybe red text?

wolfetundra

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".

Dzonny

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.

kamili34

Where I can modify color of the bar? I'm using aqua style.

Dzonny

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.

Advertisement: