News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

You Have New Messages

Started by !!kaos!!, April 02, 2009, 01:46:52 AM

Previous topic - Next topic

!!kaos!!

                     You Have New Message
                      Authors:  !!kaos!!

Link To Mod

Version 2.0.1

Languages:

English
Turkish
Spanish
Spainsh-latin
Serbian-latin
Swedish
Bulgarian


For Smf Edit By !!kaos!!-
This mod was based on Badboy's code.

Personal message alerts when new MSN Ways to Give the Right Corner




My Mod | My Site | SMF Kurulumu Resimli Anlatım | My Facebook
----------------------------------------------------------------------
SimpleDestek.Com Satışa Çıkmıştır Almak İsteyenler Benimle İletişime Geçsin..

Typeface

the click here to read msg's is in like a font size of 2 , impossible to read same with close window, any idea where to change that? in css? Otherwise it works well for me, thankyou

jjbotella

ERROR:
The box is not shown to write pm!

Foro: SMF 2.0 RC3
Web: www.jjforum.es - Todo para tu PDA, PNA, GPS, PSP y PC.

!!kaos!!

index.template.php

Find
<center><b><a href="', $scripturl, '?action=pm" style="color:blue; font-size:2px">', $txt['newpm'], '</a></b>
Find
<a href="" onClick="closebar(); return false"><span style="font-size:2px; color:red;">', $txt['close'], '</ span></a>

font-size:2px"> font-size: 2px ">
Adjust according to your own.

My Mod | My Site | SMF Kurulumu Resimli Anlatım | My Facebook
----------------------------------------------------------------------
SimpleDestek.Com Satışa Çıkmıştır Almak İsteyenler Benimle İletişime Geçsin..

!!kaos!!

If you install it manually from the different themes

./Themes/you use the theme/index.template.php

find:
</head>

Add before:<script type="text/javascript">

/***********************************************
* Floating Top Bar script- © Dynamic Drive (www.dynamicdrive.com)
* Sliding routine by Roy Whittle (http://www.javascript-fx.com/)
* This notice must stay intact for legal use.
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/

var persistclose=0 //set to 0 or 1. 1 means once the bar is manually closed, it will remain closed for browser session
var startX = 5 //set x offset of bar in pixels
var startY = 5 //set y offset of bar in pixels
var verticalpos="frombottom" //enter "fromtop" or "frombottom"

function iecompattest(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function get_cookie(Name) {
var search = Name   "="
var returnvalue = "";
if (document.cookie.length > 0) {
offset = document.cookie.indexOf(search)
if (offset != -1) {
offset  = search.length
end = document.cookie.indexOf(";", offset);
if (end == -1) end = document.cookie.length;
returnvalue=unescape(document.cookie.substring(offset, end))
}
}
return returnvalue;
}

function closebar(){
if (persistclose)
document.cookie="remainclosed=1"
document.getElementById("topbar").style.visibility="hidden"
}

function staticbar(){
    barheight=document.getElementById("topbar").offsetHeight
    barwidth=document.getElementById("topbar").offsetWidth
    var ns = (navigator.appName.indexOf("Netscape") != -1) || window.opera;
    var d = document;
    function ml(id){
       var el=d.getElementById(id);
       if (!persistclose || persistclose && get_cookie("remainclosed")=="")
       el.style.visibility="visible"
       if(d.layers)el.style=el;
       el.sP=function(x,y){this.style.left=x "px";this.style.top=y "px";};
       el.x = iecompattest().clientWidth - barwidth - startX;
       if (verticalpos=="fromtop")
       el.y = startY;
       else{
       el.y = ns ? pageYOffset   innerHeight : iecompattest().scrollTop   iecompattest().clientHeight;
       el.y -= startY;
       }
       return el;
    }
    window.stayTopLeft=function(){
       if (verticalpos=="fromtop"){
       var pY = ns ? pageYOffset : iecompattest().scrollTop;
       ftlObj.y  = (pY   startY - ftlObj.y)/8;
       }
       else{
       var pY = ns ? pageYOffset   innerHeight - barheight: iecompattest().scrollTop   iecompattest().clientHeight - barheight;
       ftlObj.y  = (pY - startY - ftlObj.y)/8;
       }
       ftlObj.sP(ftlObj.x, ftlObj.y);
       setTimeout("stayTopLeft()", 10);
    }
    ftlObj = ml("topbar");
    stayTopLeft();
}

if (window.addEventListener)
window.addEventListener("load", staticbar, false)
else if (window.attachEvent)
window.attachEvent("onload", staticbar)
else if (document.getElementById)
window.onload=staticbar
</script>


find:</body>

Replace with:
';   

if ($context['user']['is_logged'] && $context['allow_pm'])

      if($context['user']['unread_messages'] >= 1)
     echo '
       <div id="topbar">
          <table width="100%" style="cursor: default;">
             <tr>
                <td valign="top" align="left">

                   <img src="', $settings['images_url'], '/popup.gif" border="0" />
                </td>
                <td valign="top" align="left">
                   <center><a href="', $scripturl, '?action=pm">', $context['user']['unread_messages'] > 0 ? '<strong>'. $context['user']['unread_messages'] . '</strong>' : '' , '</a><font color="black"><font size="1px"><b> ', $txt['therenew'], '</b></font>
                </td>
                <td valign="top" align="right">
                   <a href="" onClick="closebar(); return false">
                      <img src="', $settings['images_url'], '/close.gif" border="0" />

                   </a>
                </td>
             </tr>
          </table>
          <table height="78%" width="100%" style="border-right:1px solid #b9c9ef; border-top:1px solid #728eb8; border-bottom:1px solid #b9c9ef; border-left:1px solid #728eb8; cursor: default;">
             <tr>
                 <td valign="center">
                   <center><b><a href="', $scripturl, '?action=pm" style="color:blue; font-size:2px">', $txt['newpm'], '</a></b>
                </td>
             </tr>
             <tr>
                <td valign="top" align="center" colspan="2">
                   <a href="" onClick="closebar(); return false"><span style="font-size:2px; color:red;">', $txt['close'], '</ span></a>

                </td>
             </tr>
          </table>
       </div>
</body>


./Themes/you use the theme/style.css
Add end:#topbar{
position:absolute;
padding: 2px;
BORDER-RIGHT: #455690 1px solid;
BORDER-TOP: #b9c9ef 1px solid;
BORDER-LEFT: #b9c9ef 1px solid;
BORDER-BOTTOM: #455690 1px solid;
background-color: #e0e9f8;
width: 200px;
height: 105px;
visibility: hidden;
z-index: 100;
}


./Themes/default/languages/Modifications.english.php

find:?>

Add before:
$txt['therenew'] = 'You have new messages';
$txt['newpm'] = 'Click here to read your messages';
$txt['close'] = 'Close window';


Use the attached file at the theme of your images folder.

My Mod | My Site | SMF Kurulumu Resimli Anlatım | My Facebook
----------------------------------------------------------------------
SimpleDestek.Com Satışa Çıkmıştır Almak İsteyenler Benimle İletişime Geçsin..

4Kstore

Thanks, excelent mod.

Spanish translation!

$txt['therenew'] = 'Tienes nuevos mensajes privados';
$txt['newpm'] = 'Click aca para leer los mensajes';
$txt['close'] = 'Cerrar ventana';

¡¡NEW MOD: Sparkles User Names!!!

!!kaos!!

Quote from: 4kstore on April 02, 2009, 08:31:59 PM
Thanks, excelent mod.

Spanish translation!

$txt['therenew'] = 'Tienes nuevos mensajes privados';
$txt['newpm'] = 'Click aca para leer los mensajes';
$txt['close'] = 'Cerrar ventana';

Thanks.

My Mod | My Site | SMF Kurulumu Resimli Anlatım | My Facebook
----------------------------------------------------------------------
SimpleDestek.Com Satışa Çıkmıştır Almak İsteyenler Benimle İletişime Geçsin..

Ravac

Modifications.serbian_latin-utf8.php

$txt['therenew'] = 'Imate nove poruke';
$txt['newpm'] = 'Kliknite ovde da bi ih pročitali';
$txt['close'] = 'Zatvori prozor';


Modifications.serbian_cyrillic-utf8.php

$txt['therenew'] = 'Имате нове поруке';
$txt['newpm'] = 'Кликните oвде да би их прочитали';
$txt['close'] = 'Затвори прозор';

Marcus Forsberg

Nice idea. But I think you should make the popup look more like SMF and less like MSN.

However, swedish translation:


$txt['therenew'] = 'Du har nya meddelanden';
$txt['newpm'] = 'Klicka här för att läsa dina meddelanden';
$txt['close'] = 'Stäng fönstret';

!!kaos!!

Quote from: RavacDS on April 03, 2009, 10:28:51 AM
Modifications.serbian_latin-utf8.php

$txt['therenew'] = 'Imate nove poruke';
$txt['newpm'] = 'Kliknite ovde da bi ih pročitali';
$txt['close'] = 'Zatvori prozor';


Modifications.serbian_cyrillic-utf8.php

$txt['therenew'] = 'Имате нове поруке';
$txt['newpm'] = 'Кликните oвде да би их прочитали';
$txt['close'] = 'Затвори прозор';

Quote from: Nas on April 03, 2009, 10:32:39 AM
Nice idea. But I think you should make the popup look more like SMF and less like MSN.

However, swedish translation:


$txt['therenew'] = 'Du har nya meddelanden';
$txt['newpm'] = 'Klicka här för att läsa dina meddelanden';
$txt['close'] = 'Stäng fönstret';


Thanks. for the add languages

My Mod | My Site | SMF Kurulumu Resimli Anlatım | My Facebook
----------------------------------------------------------------------
SimpleDestek.Com Satışa Çıkmıştır Almak İsteyenler Benimle İletişime Geçsin..

bazo

Hi, thanks !!kaos!! for your MOD, before i used PM informer, but it's not really pretty.

So i change just something because in french it's different with the S at the end so i change that :

In Modifications.french.php :

$txt['therenew1'] = 'Vous avez';
$txt['therenew2'] = 'nouveau(x) message(s)';
$txt['newpm'] = 'Cliquez ici pour le(s) lire';
$txt['close'] = 'Fermer';



and in index.template.php :

<center><font color="black"><font size="1px"><b> ', $txt['therenew1'], '</b></font><a href="', $scripturl, '?action=pm">', $context['user']['unread_messages'] > 0 ? '<strong>'. $context['user']['unread_messages'] . '</strong>' : '' , '</a><font color="black"><font size="1px"><b> ', $txt['therenew2'], '</b></font>


So like that you have the number between Vous avez and nouveau(x) message(s)

Thank again

!!kaos!!

#11
Quote from: bazo on April 04, 2009, 05:52:16 AM

and in index.template.php :

<center><font color="black"><font size="1px"><b> ', $txt['therenew1'], '</b></font><a href="', $scripturl, '?action=pm">', $context['user']['unread_messages'] > 0 ? '<strong>'. $context['user']['unread_messages'] . '</strong>' : '' , '</a><font color="black"><font size="1px"><b> ', $txt['therenew2'], '</b></font>


So like that you have the number between Vous avez and nouveau(x) message(s)

Thank again


I thought it was, but later abandoned

Thanks. for comment


My Mod | My Site | SMF Kurulumu Resimli Anlatım | My Facebook
----------------------------------------------------------------------
SimpleDestek.Com Satışa Çıkmıştır Almak İsteyenler Benimle İletişime Geçsin..

perro88

did you already tried in firefox?

bazo

Quote from: perro88 on April 04, 2009, 11:50:59 AM
did you already tried in firefox?


Me i juste work with FF and everything is OK

M-DVD

Very cute, very good  :)


Quote from: Nas on April 03, 2009, 10:32:39 AM
But I think you should make the popup look more like SMF and less like MSN.

I agree

Özgür

Thanks !!kaos!!. Good mod.

You can add style and javascript codes in Subs.php (html_headers). And users not need theme changes for these two.

Maybe you add your code in new js file. This is useful. :)
So Long

!!kaos!!

#16
Quote from: Özgür´ on April 04, 2009, 06:07:02 PM
Thanks !!kaos!!. Good mod.

You can add style and javascript codes in Subs.php (html_headers). And users not need theme changes for these two.

Maybe you add your code in new js file. This is useful. :)
yes why not?


Thanks. for your comment

My Mod | My Site | SMF Kurulumu Resimli Anlatım | My Facebook
----------------------------------------------------------------------
SimpleDestek.Com Satışa Çıkmıştır Almak İsteyenler Benimle İletişime Geçsin..

KameL

Here's the spanish or spanish-latin translation:

$txt['therenew'] = 'Tienes nuevos mensajes';
$txt['newpm'] = 'Click aquí para leer tus mensajes';
$txt['close'] = 'Cerrar ventana';


And the spanish-utf8 translation:

$txt['therenew'] = 'Tienes nuevos mensajes';
$txt['newpm'] = 'Click aqu&iacute; para leer tus mensajes';
$txt['close'] = 'Cerrar ventana';




6aro

#18
My Bulgarian translation

$txt['therenew'] = 'Имате нови съобщения';
$txt['newpm'] = 'Кликните тук ако искате да ги прочетете';
$txt['close'] = 'Затвори прозореца';

!!kaos!!

Quote from: KameL on April 06, 2009, 07:57:01 PM
Here's the spanish or spanish-latin translation:

$txt['therenew'] = 'Tienes nuevos mensajes';
$txt['newpm'] = 'Click aquí para leer tus mensajes';
$txt['close'] = 'Cerrar ventana';


And the spanish-utf8 translation:

$txt['therenew'] = 'Tienes nuevos mensajes';
$txt['newpm'] = 'Click aqu&iacute; para leer tus mensajes';
$txt['close'] = 'Cerrar ventana';

Quote from: 6aro on April 07, 2009, 03:43:49 AM
My Bulgarian translation

$txt['therenew'] = 'Имате нови съобщения';
$txt['newpm'] = 'Кликните тук ако искате да ги прочетете';
$txt['close'] = 'Затвори прозореца';


Thanks.

My Mod | My Site | SMF Kurulumu Resimli Anlatım | My Facebook
----------------------------------------------------------------------
SimpleDestek.Com Satışa Çıkmıştır Almak İsteyenler Benimle İletişime Geçsin..

Advertisement: