News:

Wondering if this will always be free?  See why free is better.

Main Menu

PM Informer

Started by Diego Andrés, May 31, 2008, 08:12:19 PM

Previous topic - Next topic

Kimmie

Quote from: Rhyme on July 24, 2008, 07:55:15 AM
Quote from: ccbtimewiz on July 24, 2008, 01:19:37 AM
Quote from: Rhyme on July 24, 2008, 12:21:01 AM
How would I add this to another theme besides the default?

You let me do it before you kill Vortex. :P
* ccbtimewiz is a maintenance admin for Rhyme's forum.

But to those who are wondering, you need to make the correct edits that the mod describes to the templates and files in your theme

Mostly the index.template.php file.

Rhyme is becoming impatient :P

ccbtimewiz  already answered your question. Make the necessary theme edits to the files in your custom theme that the mod affects.

AlenNS

Hi Sinan, great mod!

I would like to ask you is it possible to make some changes for PM notifications?

I want to make when user receive 1 message to be displayed: You have one new message!
When there's two new messages another notification, for three another and that so...

In my language with this settings notifications doesn't have a correct meaning.

For now I solved this out with this text modification:

             one/two/more     messages.
Imate xx novu/e/ih poruku/e/a.

Is it possible to put some kind of variable that would help to solve this problem?

You can see that in my language numbers, adjectives and nouns going through cases like this:

QuoteImate 1 novu poruku.
Imate 2 nove poruke.
Imate 3 nove poruke.
Imate 4 nove poruke.

Imate 5 novih poruka.
Imate 6 novih poruka.
Imate 7 novih poruka.
Imate 8 novih poruka.
Imate 9 novih poruka.
Imate 10 novih poruka.
Imate 21 novu poruku.
Imate 22 nove poruke.
Imate 23 nove poruke.
Imate 24 nove poruke.

Imate 25 novih poruka.
Imate 31 novu poruku.
Imate 32 nove poruke.

But I have never seen someone gets more then 5 to 10 PMs, so if it is possible to make some changes for 1, 2, 3 and 4 new messages and for all other to be same it would be great.

Thanks in advance! :)

[SiNaN]

Thanks AlenNS.

index.template.php

Find:

printf($txt['pmi_title'], $context['user']['unread_messages']);

Replace:

if($context['user']['unread_messages'] < 10) {
if($context['user']['unread_messages'] == 1)
$text = 'pmi_title1';
elseif($context['user']['unread_messages'] < 5)
$text = 'pmi_title2';
else
$text = 'pmi_title3';
}
else {
if($context['user']['unread_messages'] % 10 == 0)
$text = 'pmi_title3';
elseif($context['user']['unread_messages'] % 10 == 1)
$text = 'pmi_title1';
elseif($context['user']['unread_messages'] % 10 < 5)
$text = 'pmi_title2';
else
$text = 'pmi_title3';
}

printf($txt[$text], $context['user']['unread_messages']);


Modifications.serbian.php

Add to end:

$txt['pmi_title1'] = 'Imate %s novu poruku.';
$txt['pmi_title2'] = 'Imate %s nove poruke.';
$txt['pmi_title3'] = 'Imate %s novih poruka.';

Former SMF Core Developer | My Mods | SimplePortal

AlenNS

Haha! :)
Thanks Sinan!!! I knew that you'll make something for me!
Thanks a lot!!! :)

[SiNaN]

Not at all. I'll ask for your help too, soon...
Former SMF Core Developer | My Mods | SimplePortal

AlenNS


hairul

HI,
Im just install this MOD that what i looking for, but after install all my webpage for forum are totally white screen.

Im install on SMF 1.1.5. What are the solution?

kriskd

Is there anyway to test if I got this working right when I don't have any new PMs?  I went into the smf_pm_recipients table and changed is_read to 0, but that doesn't seem to make my message unread.

Obviously I could just make a test account, but if there is a way to do this without having to create an account, I'd appreciate it.
SMF 2.0.2

[SiNaN]

hairul:

How did you install? Do you get any errors? Try uninstalling the mod manually.

kriskd:

If you want to test it;

../Sources/PersonalMessage.php

Find:

redirectexit($context['current_label_redirect']);

Replace:

redirectexit();

Then send yourself a pm.

After you test it, take the change back.
Former SMF Core Developer | My Mods | SimplePortal

kriskd

Sinan,

Thanks for the tip.  I since got a PM from an user and it works great!!  Ended up moving the chunk of code to a different place on index.template.php to work better with my theme.  :)
SMF 2.0.2

[SiNaN]

Okay, glad you liked it. :)
Former SMF Core Developer | My Mods | SimplePortal

qtime

wow, this is so great!!! thanks for your work!

Kimmie

This mod installs fine on the default theme but when I try to add it to both my custom themes (modifying the index.template.php file on both), I get two issues:

1. The pm alert shows up ok - however, the box will not expand when you click on the icon
2. I get several errors in my error log

Ive attached my nidex.template.php file for one of my custom themes so you can look at it. I didnt attach the other one because I already removed the code from that one. I can redo it and upload it as well if you need me to.

8: Undefined index: message
File: /home//public_html/Themes/default/Admin.template.php (main_above sub template - eval?)
Line: 424

8: Undefined index: date
File: /home//public_html/Themes/default/Admin.template.php (main_above sub template - eval?)
Line: 423

8: Undefined index: subject
File: /home//public_html/Themes/default/Admin.template.php (main_above sub template - eval?)
Line: 422

8: Undefined index: from
File: /home//public_html/Themes/default/Admin.template.php (main_above sub template - eval?)
Line: 421

8: Undefined index: message
File: /home//public_html/Themes/Glossy_Default_tp/BoardIndex.template.php (main_above sub template - eval?)
Line: 424

8: Undefined index: date
File: /home//public_html/Themes/Glossy_Default_tp/BoardIndex.template.php (main_above sub template - eval?)
Line: 423

8: Undefined index: subject
File: /home//public_html/Themes/Glossy_Default_tp/BoardIndex.template.php (main_above sub template - eval?)
Line: 422

8: Undefined index: from
File: /home//public_html/Themes/Glossy_Default_tp/BoardIndex.template.php (main_above sub template - eval?)
Line: 421

[SiNaN]

You are using wrong codes. There are two packages:

Pm_Informer_115.zip => SMF 1.x
Pm_Informer_20b3.zip => SMF 2.x

Use the first one.

If you will have problems, I'll do for you. :)
Former SMF Core Developer | My Mods | SimplePortal

Marcus Forsberg

Swedish translation

$txt['pmi_title'] = 'Du har %s ol&auml;sta meddelanden!';
$txt['pmi_view_all'] = '[Visa alla]';]]></add>

[SiNaN]

Former SMF Core Developer | My Mods | SimplePortal

BjornOlsen

#56
Hi.
I did install this mode, but now i get some error.
On my site its coming up:
Fatal error: Call to undefined function: () in /home/isgeocac/public_html/Sources/Load.php on line 2203

Any idea what this meens?

I DID FIX IT.

mr703himself

how can i get this to work on a custom theme?

shadow82x

Quote from: mr703himself on October 03, 2008, 09:45:35 PM
how can i get this to work on a custom theme?
You would have to manually edit it.

http://custom.simplemachines.org/mods/index.php?mod=1202 -< Go there and go to Manual Install Instructions for SMF xx.xx.xx.
Colin B
Former Spammer, Customize, & Support Team Member

madman71

Sinan,

I, too, am having the same trouble as a couple users above.  Im installing on a custom theme and the red box shows up but i can not expand it.  You told him he was using the wrong code.  I didn't load up on package on my server but was just using the Manual install instruction that SMF offers.

Can you take a look at my index and try to figure out why the box wont expand??

im using 1.1.6 SMF
Theme:  Kaleidos11

see attached file


I have left the edited code  beginning on line 150
This is not the location where i want the box. I want it just under the menu bar, like in your screen shots :)


thanks again, Sinan

Advertisement: