Seite 1 von 3

Lightboxfenster für PM Benachrichtigung

Verfasst: 13.02.2013 15:30
von P@InKiLLeR
Hallo,

ich suche folgendes,es soll sich ein Lightboxfenster öffnen wenn man für eine PM eine Benachrichtigung(PopUp Fenster) bekommt!

Habe das hier gefunden: http://www.wjunction.com/64-webmaster-r ... htbox.html

da google nix ausgespuckt hat! Nur leider funktioniert es nicht,vielleicht habe ich auch was falsch gemacht :-?

Hat jemand einen Tip wie man das Umsetzen könnte das es funktioniert?

Bin für jeden Hinweis dankbar,Gruss :wink:


Version des Boards:3.0.11

Re: Lightboxfenster für PM Benachrichtigung

Verfasst: 13.02.2013 18:05
von Luuq
Hallo,

hast Du versucht den Code genau so einzubauen, wie es dort steht?
Sieht eigentlich alles in Ordnung aus und ich wüsste auch nicht, wieso das nicht funktionieren sollte.

Grüße,
Luuq

Re: Lightboxfenster für PM Benachrichtigung

Verfasst: 13.02.2013 18:11
von P@InKiLLeR
Ja denk ich zumindest,habe alle 3 Dateien(overall_header.html,overall_footer.html,newPM.html) hier liegen ../forum/styles/WarZonev2/template

und den Ordner rokbox im Root,oder muss der woanders hin? :geek:

So siehts bei mir aus:

overall_header.html

Code: Alles auswählen

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="{S_CONTENT_DIRECTION}" lang="{S_USER_LANG}" xml:lang="{S_USER_LANG}">
<head>

<meta http-equiv="content-type" content="text/html; charset={S_CONTENT_ENCODING}" />
<meta http-equiv="content-language" content="{S_USER_LANG}" />
<meta http-equiv="content-style-type" content="text/css" />
<meta http-equiv="imagetoolbar" content="no" />
<meta name="resource-type" content="document" />
<meta name="distribution" content="global" />
<meta name="copyright" content="2000, 2002, 2005, 2007 phpBB Group" />
<meta name="keywords" content="" />
<meta name="description" content="" />
{META}
<title>{SITENAME} &bull; <!-- IF S_IN_MCP -->{L_MCP} &bull; <!-- ELSEIF S_IN_UCP -->{L_UCP} &bull; <!-- ENDIF -->{PAGE_TITLE}</title>

<link rel="stylesheet" href="{T_STYLESHEET_LINK}" type="text/css" />

<script type="text/javascript">
<script type="text/javascript" src="rokbox/mootools-release-1.11.js"></script>

<script type="text/javascript" src="rokbox/rokbox.js"></script>
<link href="rokbox/themes/dark/rokbox-style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="rokbox/themes/light/rokbox-config.js">
// <![CDATA[


function popup(url, width, height, name)
{
    if (!name)
    {
        name = '_popup';
    }

    window.open(url.replace(/&/g, '&'), name, 'height=' + height + ',resizable=yes,scrollbars=yes,width=' + width);
    return false;
}

function jumpto()
{
    var page = prompt('{LA_JUMP_PAGE}:', '{ON_PAGE}');
    var perpage = '{PER_PAGE}';
    var base_url = '{A_BASE_URL}';

    if (page !== null && !isNaN(page) && page > 0)
    {
        document.location.href = base_url.replace(/&/g, '&') + '&start=' + ((page - 1) * perpage);
    }
}

/**
* Find a member
*/
function find_username(url)
{
    popup(url, 760, 570, '_usersearch');
    return false;
}

/**
* Mark/unmark checklist
* id = ID of parent container, name = name prefix, state = state [true/false]
*/
function marklist(id, name, state)
{
    var parent = document.getElementById(id);
    if (!parent)
    {
        eval('parent = document.' + id);
    }

    if (!parent)
    {
        return;
    }

    var rb = parent.getElementsByTagName('input');
    
    for (var r = 0; r < rb.length; r++)
    {
        if (rb[r].name.substr(0, name.length) == name)
        {
            rb[r].checked = state;
        }
    }
}

<!-- IF ._file -->

    /**
    * Play quicktime file by determining it's width/height
    * from the displayed rectangle area
    *
    * Only defined if there is a file block present.
    */
    function play_qt_file(obj)
    {
        var rectangle = obj.GetRectangle();

        if (rectangle)
        {
            rectangle = rectangle.split(',')
            var x1 = parseInt(rectangle[0]);
            var x2 = parseInt(rectangle[2]);
            var y1 = parseInt(rectangle[1]);
            var y2 = parseInt(rectangle[3]);

            var width = (x1 < 0) ? (x1 * -1) + x2 : x2 - x1;
            var height = (y1 < 0) ? (y1 * -1) + y2 : y2 - y1;
        }
        else
        {
            var width = 200;
            var height = 0;
        }

        obj.width = width;
        obj.height = height + 16;

        obj.SetControllerVisible(true);

        obj.Play();
    }
<!-- ENDIF -->

</script>
</head>
<body onload="<!-- IF S_DISPLAY_PM -->clickElement('myclicker')<!-- ENDIF -->" class="{S_CONTENT_DIRECTION}">
<!--Header-->
<div class="header">

<div class="navalign">
<a class="nav_links" href="{U_FAQ}">{L_FAQ}</a>
&nbsp; &nbsp;<a class="nav_links" href="{U_SEARCH}">{L_SEARCH}</a>
&nbsp; &nbsp;<a class="nav_links" href="{U_MEMBERLIST}">{L_MEMBERLIST}</a>
<!-- IF S_USER_LOGGED_IN -->&nbsp; &nbsp;<a class="nav_links" href="{U_PROFILE}">{L_PROFILE}</a><!-- ENDIF -->
<br />
<a href="{U_SEARCH_UNANSWERED}">{L_SEARCH_UNANSWERED}</a> &middot; <a href="{U_SEARCH_ACTIVE_TOPICS}">{L_SEARCH_ACTIVE_TOPICS}</a>
<!-- IF S_USER_LOGGED_IN -->
<a href="{U_SEARCH_NEW}"> &middot; {L_SEARCH_NEW}</a> &middot; <a href="{U_SEARCH_SELF}">{L_SEARCH_SELF}</a>
<!-- ENDIF -->
</div>
</div>
<!--End Header-->
<!-- IF S_DISPLAY_PM -->
<a id="myclicker" rel="rokbox[320 40][module=privmsg]" href="#" title="" accesskey="l"></a>
<!-- ENDIF -->
<div id="wrapper">
<div class="content_top"></div>
<div class="contentbg">
<div id="ipbwrapper3">
<a name="top"></a>

<br />






    <br style="clear: both;" />

    <!-- INCLUDE breadcrumbs.html -->

    <br />

overall_footer.html

Code: Alles auswählen

<!-- IF not S_IS_BOT -->{RUN_CRON_TASK}<!-- ENDIF -->
<!-- IF U_ACP --><center><span class="gensmall">[ <a href="{U_ACP}">{L_ACP}</a> ]</span></center><br /><br /><!-- ENDIF -->

<!--
    We request you retain the full copyright notice below including the link to www.phpbb.com.
    This not only gives respect to the large amount of time given freely by the developers
    but also helps build interest, traffic and use of phpBB3. If you (honestly) cannot retain
    the full copyright we ask you at least leave in place the "Powered by phpBB" line, with
    "phpBB" linked to www.phpbb.com. If you refuse to include even this then support on our
    forums may be affected.

    The phpBB Group : 2006
//-->

<!--Footer-->
<div align="center" style="position: relative; right: 10px;">
<div class="footer_bg">
<div style="padding-top: 25px;">
<span class="copyright">Powered by <a href="http://www.phpbb.com/">phpBB</a> &copy; 2000, 2002, 2005, 2007 phpBB Group</span><!-- IF TRANSLATION_INFO --><br />{TRANSLATION_INFO}<!-- ENDIF --><!-- IF DEBUG_OUTPUT --><br /><bdo dir="ltr">[ {DEBUG_OUTPUT}]</bdo><!-- ENDIF --></span></div>
<!--DO NOT REMOVE--><center><a style="text-decoration: none;" href="http://www.gamesitetemplates.com">Design By  GameSiteTemplates</a><center><!--DO NOT REMOVE-->
</div>
</div>
<!--End Footer-->
</div> <!--IPBWrapper3 Alignement DIV-->
</div> <!--ContentBG DIV-->
<div class="content_bottom"></div> <!--Content Bottom-->
</div> <!--Wrapper DIV-->
<!-- IF S_DISPLAY_PM -->
<!-- INCLUDE newPM.html -->

<script type="text/javascript">
function clickElement(elementid){
if ({S_NEW_PM})
{
var e = document.getElementById(elementid);
    if (typeof e == 'object') {
        /*if(typeof e.click != 'undefined') {
            e.click();
            alert('click');
            return false;
        }
        else */
        if(document.createEvent) {
            var evObj = document.createEvent('MouseEvents');
            evObj.initEvent('click',true,true);
            e.dispatchEvent(evObj);
            return false;
        }
        else if(document.createEventObject) {
            e.fireEvent('onclick');
            alert('createEventObject');
            return false;
        }
        else {
            e.click();
            alert('click');
            return false;
        }
    }
}
}
</script>
<!-- ENDIF -->
</body>
</html>

newPM.html

Code: Alles auswählen

<style type="text/css">
#privmsg {display: none;}
</style>

<div id="privmsg">
<center>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="top" style="padding-left: 6px;">
You have a new message. Would you like to read it?
</td>
</tr>
</table>
<br />
<a href="ucp.php?i=pm&folder=inbox"><button type="button">Yes</button></a>
&nbsp;&nbsp;
<a href="#" onClick="javascript:rokbox.close()"><button type="button">No</button></a>
</center>
</div>

Re: Lightboxfenster für PM Benachrichtigung

Verfasst: 13.02.2013 18:14
von Luuq
Hallo,

das sieht alles ganz gut aus. Der besagte Ordner muss in das root-Verzeichnis.
Das ist da, wo alle anderen Ordner deiner phpBB-Installation auch liegen.

Bitte bachte dazu auch folgendes: KB:tippstyles

Gruß,
Luuq

Re: Lightboxfenster für PM Benachrichtigung

Verfasst: 13.02.2013 18:18
von Miriam
Nur um nochmal sicher zu gehen: Das Verzeichnis rokbox muß sich im phpBB-Root Verzeichnis befinden... Das wäre dann da, wo auch die config.php des Forums ist.

Re: Lightboxfenster für PM Benachrichtigung

Verfasst: 13.02.2013 18:53
von P@InKiLLeR
Miriam hat geschrieben:Nur um nochmal sicher zu gehen: Das Verzeichnis rokbox muß sich im phpBB-Root Verzeichnis befinden... Das wäre dann da, wo auch die config.php des Forums ist.
Ja da liegt der Ordner,Cache wurde auch geleert,keine Änderung...achja PM Fenster öffnen bei Eingehender Nachricht wurde im Profil auch aktiviert :roll:

Kann es ein das diese MOD für phpbb2 ist und deswegen nicht geht?

Re: Lightboxfenster für PM Benachrichtigung

Verfasst: 14.02.2013 12:09
von P@InKiLLeR
Die Datei /forum/styles/WarZonev2/template/newPM.html wird als leer angezeigt wenn ich Sie über die URL lade ist das normal?

Vielleicht liegt da ja der Hund begraben oder brauch die bestimmte CHMOD rechte? :-?

Re: Lightboxfenster für PM Benachrichtigung

Verfasst: 14.02.2013 13:58
von P@InKiLLeR
Habs Problem gefunden man stelle sich vor es lag am Browser :roll:

Es gibt aber leider immer noch ein kleines Problem es funktioniert nur im IE und FF im Chrome gehts nicht,jemand ne Ahnung woran das liegt!

Evtl. liegt es ja an rokbox oder am mootools,hab schon die neue Version von mootools ausprobiert 1.2.5 und die neue 1.4.5!


Vielleicht gibts ja hier nen Profi der sich damit auskennt oder jemand der das gleich Problem mal hatte :)

Re: Lightboxfenster für PM Benachrichtigung

Verfasst: 14.02.2013 15:33
von BNa
Mootools sucks. Nimm lieber eine homogene jQuery Lösung :wink:
Die läuft dann auch Multibrowser.

Re: Lightboxfenster für PM Benachrichtigung

Verfasst: 14.02.2013 16:10
von P@InKiLLeR
BNa hat geschrieben:Mootools sucks. Nimm lieber eine homogene jQuery Lösung :wink:
Die läuft dann auch Multibrowser.
Was muss ich da machen bin leider kein Coder,was muss ich da wo einfügen,danke im vorraus ? :-?


Gruss