News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

PM Informer

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

Previous topic - Next topic

RoH

worked... sweet..

thanks nascar..

BTW: what all background color names can i use and also, the border style names like dotted, dashed..etc.

how many are there ?

Marcus Forsberg

There are a lot of different colours to use. Try different names. If they don't exist, it will turn black.
The borders are dashed, solid, dotted, outset, inset, groove, double and ridge.

skyhintack

Thanks  ;)

The lime green looks great! Love the Mod.  :D

Costa

NAscar Dude!
Can you update for brazilian support language?

modifications.portuguese_brazilian.php

// Start PM Informer mod by Nascar
$txt['pmi_title'] = 'Você tem %s mensagem(s) novas!';
$txt['pmi_view_all'] = '[Ver Todas]';
$txt['pmi_style'] = 'Aspecto CSS para a informação de MPs. <div class="smalltext">Tem que ser assim:<br/><i>border: {bordersize}px {bordertype} {bordercolor}; background: {backgroundcolor}; color: {textcolor};</i>';
$txt['pmi_style_standard'] = 'border: 1px solid #FF0000; background: #F4CFCF; color: #FF0000;';
// End PM Informer mod by Nascar


modifications.portuguese_brazilian_utf-8.php

// Start PM Informer mod by Nascar
$txt['pmi_title'] = 'Voc&ecirc; tem %s mensagem(s) novas!';
$txt['pmi_view_all'] = '[Ver Todas]';
$txt['pmi_style'] = 'Aspecto CSS para a informaç&atilde;o de MPs. <div class="smalltext">Tem que ser assim:<br/><i>border: {bordersize}px {bordertype} {bordercolor}; background: {backgroundcolor}; color: {textcolor};</i>';
$txt['pmi_style_standard'] = 'border: 1px solid #FF0000; background: #F4CFCF; color: #FF0000;';
// End PM Informer mod by Nascar


Congrats
Hugo "Costa" Fernandes - PT SMF
Todas as MP's a pedir ajuda são sujeitas a radioactividade, microondas, queimadas e atiradas borda fora.

"At least someone appreciates the fact that I am doing and not thinking..."
"Laziness is counter-revolutionary."

tadi

Hello,

Can you please help me to install the mod on two these themes?

I attached the index.template of the theme classic and fire theme.

I have the smf 1.1.7

Thank you




Marcus Forsberg

I will help you as soon as Ihave my computer back. -Read my signature-

tadi


Daymon

The mod works great, but is collapsed by default. Is there any way to have it open vs collapsed when there is a new PM?

tom333

Hello, I installed PM informer on my theme and all work ok.
I see PM informer window and I see message in window.
But when quote private message I dont see message in PM window (on defoult place I see message).
Where is a problem?
Thanks in advance
p.s. sry on my bad english

Marcus Forsberg

Daymon:
yes, that is possible. I'll get back to you on it soon,

tom333:
Can you post a screenshot on what you mean?

Daymon

Quote from: Nascar on November 28, 2008, 10:58:39 AM
Daymon:
yes, that is possible. I'll get back to you on it soon,


Thanks, Nascar. Awaiting your reply.

Adish - (F.L.A.M.E.R)

Hey Nascar, I cannot find the theme edits in the classic theme, can you give me an alternative ?

Forum version 1.1.7

Using the PM informer for SMF 1.1.6

Marcus Forsberg

Classic theme codes is comming, for F.L.A.M.E.R and tadi.

Adish - (F.L.A.M.E.R)


Marcus Forsberg

I decided to to it emidiatly.
This is for 1.1.7 only.

index.template.php:

Code (Find) Select
<tr><td valign="top" style="background-color: #ffffff;">';

Code (Add before) Select

//The PM Informer is closed by default.
$options['collapse_header_pmi'] = 1;

//Do we have some new pms? Show the newest.
if(!empty($context['user']['unread_messages'])) {
echo '
<table align="center" width="500px">
<tr>
<td>
<div style="padding: 6px; vertical-align: middle; text-align: center; ',!empty($modSettings['pmi_style']) ? $modSettings['pmi_style'] : $txt['pmi_style_standard'],'">
<a href="#" onclick="shrinkHeaderPMI(!current_header_pmi); return false;"><img id="upshrink_pmi" src="', $settings['images_url'], '/', empty($options['collapse_header_pmi']) ? 'collapse.gif' : 'expand.gif', '" alt="*" title="', $txt['upshrink_description'], '" style="margin-right: 2ex;" align="right" /></a>';
printf($txt['pmi_title'], $context['user']['unread_messages']);
echo '
</div>
<div id="upshrinkHeaderPMI"', empty($options['collapse_header_pmi']) ? '' : ' style="display: none;"', '>
<table border="0" width="100%" cellspacing="1" cellpadding="4" class="bordercolor">
<tr class="windowbg">
<td>
<b>', $txt[318], ':</b> <a href="' . $scripturl . '?action=profile;u=', $context['pm_informer']['from'], '">', $context['pm_informer']['sender'], '</a><br />
<b>', $txt[319], ':</b> ', $context['pm_informer']['subject'], '<br />
<b>', $txt[317], ':</b> ', $context['pm_informer']['msgtime'], '<br />
<b>', $txt[72], ':</b> ', $context['pm_informer']['body'], '<br /><br />
<div align="right"><a href="' . $scripturl . '?action=pm"><span class="smalltext">', $txt['pmi_view_all'], '</span></a></div>
</td>
</tr>
</table>
</div>
</td>
</tr>
</table>';
}


Code (Find) Select
</head>

Code (Add after) Select

// the routine for the pm informer
echo '
<script language="JavaScript" type="text/javascript"><!-- // -->';

echo chr(60) . chr(33) . chr(91) . chr(67) . chr(68) . chr(65) . chr(84) . chr(65) . chr(91);

echo '
var current_header_pmi = ', empty($options['collapse_header_pmi']) ? 'false' : 'true', ';

function shrinkHeaderPMI(mode)
{';

if ($context['user']['is_guest'])
echo '
document.cookie = "upshrinkPMI=" + (mode ? 1 : 0);';
else
echo '
smf_setThemeOption("collapse_header_pmi", mode ? 1 : 0, null, "', $context['session_id'], '");';

echo '
document.getElementById("upshrink_pmi").src = smf_images_url + (mode ? "/expand.gif" : "/collapse.gif");

document.getElementById("upshrinkHeaderPMI").style.display = mode ? "none" : "";

current_header_pmi = mode;
}
// ';

echo chr(93) . chr(93) . chr(62);
echo '
</script>';


 



It's untested, so backup file first.

Adish - (F.L.A.M.E.R)

Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in .../Themes/classic/index.template.php on line 210

201:       }
202:    </style>';
203:    // YSHOUT END - <head> code
204:
205:    // Output any remaining HTML headers. (from mods, maybe?)
206:    echo $context['html_headers'], '
207: </head>
208:    // the routine for the pm informer
209:    echo '
210:       <script language="JavaScript" type="text/javascript"><!-- // -->';211:
212:    echo chr(60) . chr(33) . chr(91) . chr(67) . chr(68) . chr(65) . chr(84) . chr(65) . chr(91);
213:
214:    echo '

Marcus Forsberg

Add after means that you should add that code above </head> ;)


Kermit

Quote from: Nascar on December 07, 2008, 09:55:17 AM
Add after means that you should add that code above </head> ;)



I assume add after means,add sth after that code also below that code,add before can be above  :P
My Mods
Please don't PM/mail me for support,unless i invite you
Formerly known as Duncan85
Quote
"Two things are infinite: the universe and human stupidity; and I'm not sure about the the universe."

A. Einstein

Adish - (F.L.A.M.E.R)

it wouldnt work, it gives me the same error.

I tried a number of ways, i think the first code closes the Echo ' and thats why its causing it, so i removed the '; but yet the same thing...

Marcus Forsberg

Let me see the file, please

Advertisement: