Seite 1 von 1
Drop-Down Link Menu im Index einbauen ?
Verfasst: 16.10.2006 14:07
von professor
Hi!
Ich suche eineen Mod,d er es ermöglicht, ein Drop-Down Menü auf dem Index anzuzeigen, in welchem dann verschiedene Links anzuwählen sind. Ich möchte einfach Platz sparen und keine zusätzlichen Leisten oder Fenster einbauen, sondern einfach nur ein Menü machen. So was wie in der Art des "Change Style Mods". Gibts da schon so etwas oder hat jmd zufällig nen Code im Kopf (für die ganz schlauen untger euch! *gg*) ??? Bin für jede Hilfe dankbar.
Edit: So ähnlich wie das Header-navigationmenü nur eben mit reinen Links und keinen Menüpunkten!
lg phil
Verfasst: 16.10.2006 18:18
von Elvis
dann könntest Du hier mit glück haben.
hier der Code
Code: Alles auswählen
##############################################################
## MOD Title: Header Dropdownmenue
## MOD Author: AWSW < > (AWSW) http://www.awsw.de
## MOD Description: This MOD will create a DropDownfield in your phpBB-Header, which will cary all of your Header-Links. After selecting one of the Items the Link will be enterd imediately. In the code you can select, if you want to open the link in a opend windows or in a new one. In the Code you´ll find examples for adding EMail and external Links in the menue.<br><br>Die Links im Header werden zusammengefasst in einem DropDownFeld. Nach Auswahl eines Menüpunktes, wird zu dem angeklickten Ziel gewechselt. Dabei kann zusätzlich im hinterlegten Link angegeben werden, ob dabei eine neue Browserseite geöffnet werden soll oder die gleiche Seite verwendet werden soll. Im Code ist auch ein Beispiel vorhanden, mit dem man eine neue EMail an den Admin des Forums senden kann.
## MOD Version: 1.00
##
## Installation Level: easy
## Installation Time: 10 Minutes
## Files To Edit:
## Included Files: n/a
## Generator: phpBB2 Mod Maker 0.1.67
##############################################################
## This MOD is released under the GPL License. Intellectual Property is retained by the MOD Author(s) listed above. http://www.gnu.org
##############################################################
## For Security Purposes, Please Check: http://www.awsw.de/ for the latest version of this MOD. Downloading this MOD from other sites could cause malicious code to enter into your phpBB Forum. You´ll find support to this MOD at http://www.phpbb.de/
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up Your Complete Database And All Files Related To This MOD !
##############################################################
##
## Notes:
## - A line for a link in the Menu should look like this:
## <option value="{U_FAQ}~">{L_FAQ}</option> or <option value="portal.php~">Portal</option>
## The shown ~ before the " has to be in the code, so that it would work...
## - If you want to start the link in a new window, the line should be like this:
## <option value="{U_FAQ}~window:New">{L_FAQ}</option> or <option value="portal.php~window:New">Portal</option> or <option value="http://www.awsw.de~window:New">www.awsw.de</option>
## - In the last part of the code you can find an example for an EMail-Adresslink.
## <option value="mailto:test@test.de&subject=Mail to Forum-Admin&body=Mail to Forum-Admin:~">Mail @ Admin</option>
## - In the last part of the code you can find an example for external link.
## <option value="http://www.phpbb.de~window:New">www.phpBB.de</option>
## - You can add more links, by using one of following syntax:
## <option value="intro.php~">Intro</option>
## or:
## <option value="{U_FAQ}~">{L_FAQ}</option>
## or:
## <option value="mailto:test@test.de&subject=Mail to Forum-Admin&body=Mail to Forum-Admin:~">Mail @ Admin</option>
## or:
## <option value="http://www.phpbb.de~window:New">www.phpBB.de</option>
##
## Hinweise:
## - Eine Zeile im Menü sollte immer so aussehen:
## <option value="{U_FAQ}~">{L_FAQ}</option> oder <option value="portal.php~">Portal</option>
## Nach der aufzurufenden Datei/Ziel muss immer das gezeigte ~ vor dem " folgen...
## - Soll das Ziel in einer neuen leeren Browserseite aufgerufen werden, so sieht ein Aufruf z.B. so aus:
## <option value="{U_FAQ}~window:New">{L_FAQ}</option> oder <option value="portal.php~window:New">Portal</option> oder <option value="http://www.awsw.de~window:New">www.awsw.de</option>
## - Im unteren Teil ist eine Zeile zu finden, die eine neue EMail erstellen kann. In dieser ist die Mailadresse noch anzupassen:
## <option value="mailto:test@test.de&subject=Mail zum Forum an Admin&body=Mail zum Forum an Admin:~">Mail @ Admin</option>
## - Darunter ist ein Beispiel zu finden, bei dem eine externe URL aufgerufen wird.
## <option value="http://www.phpbb.de~window:New">www.phpBB.de</option>
## - Weitere Links im Menü können noch durch Ergänzung weiterer Zeilen angefügt werden, im einem der folgenden Syntax:
## <option value="intro.php~">Intro</option>
## oder:
## <option value="{U_FAQ}~">{L_FAQ}</option>
## oder:
## <option value="mailto:test@test.de&subject=Mail zum Forum an Admin&body=Mail zum Forum an Admin:~">Mail @ Admin</option>
## oder:
## <option value="http://www.phpbb.de~window:New">www.phpBB.de</option>
##
##############################################################
#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/overall_header.tpl
#
#-----[ FIND ]------------------------------------------
#
</head>
#
#-----[ BEFORE, ADD ]------------------------------------------
#
<script language="JavaScript">
<!--
function P7_JumpMenu(selObj,restore){ //v1.3 by Project Seven
var theFullString = selObj.options[selObj.selectedIndex].value;
if (restore) selObj.selectedIndex=0;
var theLength = theFullString.length;
var endPos = theFullString.lastIndexOf("~");
var theUrl, theTarget, theParent;
if (endPos > 0) {theUrl = theFullString.substring(0,endPos);}
else {theUrl = theFullString;}
endPos++
if (endPos < theLength) {theTarget = theFullString.substring(endPos,theLength)}
else {theTarget = "window:Main";}
if (theTarget == "window:New") {window.open(theUrl);}
else if (theTarget == "window:Main") {eval("parent.location='"+theUrl+"'");}
else {eval("parent.frames[\'"+theTarget+"\'].location='"+theUrl+"'");}
}
//-->
</script>
#
#-----[ FIND ]------------------------------------------
#
<tr>
<td align="center" valign="top" nowrap="nowrap"><span class="mainmenu"> <a href="{U_FAQ}" class="mainmenu">
#
#-----[ BEFORE, ADD ]------------------------------------------
#
<!--
#
#-----[ FIND ]------------------------------------------
#
<tr>
<td height="25" align="center" valign="top" nowrap="nowrap"><span class="mainmenu"> <a href="{U_PROFILE}" class="mainmenu">
</tr>
#
#-----[ AFTER, ADD ]------------------------------------------
#
-->
<tr>
<td align="center" valign="top" nowrap="nowrap"><span class="mainmenu">
<center>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="mytext"><br>
<form name="form1">
<select name="AWSWMenue" onChange="P7_JumpMenu(this,1)" class="mainmenu">
<option value="~" selected> > > > > > > > Navigation < < < < < < < </option>
<option value="intro.php~">Intro</option>
<option value="portal.php~">Portal</option>
<option value="{U_INDEX}~">Index</option>
<!-- BEGIN switch_user_logged_out -->
<option value="{U_REGISTER}~">{L_REGISTER}</option>
<!-- END switch_user_logged_out -->
<option value="{U_LOGIN_LOGOUT}~">{L_LOGIN_LOGOUT}</option>
<option value="{U_PRIVATEMSGS}~">{PRIVATE_MESSAGE_INFO}</option>
<option value="{U_PROFILE}~">{L_PROFILE}</option>
<option value="{U_FAQ}~">{L_FAQ}</option>
<option value="{U_SEARCH}~">{L_SEARCH}</option>
<option value="{U_MEMBERLIST}~">{L_MEMBERLIST}</option>
<option value="{U_GROUP_CP}~">{L_USERGROUPS}</option>
<option value="{U_FAV}~">{L_FAV}</option>
<option value="mailto:test@test.de&subject=Mail zum Forum an Admin&body=Mail zum Forum an Admin:~">Mail @ Admin</option>
<option value="http://www.phpbb.de~window:New">www.phpBB.de</option>
<option value="http://www.awsw.de~window:New">www.awsw.de</option>
</select>
</form>
</td>
<td> </td>
</tr>
</table>
</center>
</span></td>
</tr>
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
Verfasst: 17.10.2006 08:53
von professor
Hi!
Jo danke für deine Hilfe und für den Code. Beim Navi-Drop Down handelt es sich aber um Menü-Buttons. Ich würde NUR Links zu anderen Seiten benötigen, also mit URL's anstatt L_Index oder U_PROFILE und so. Will zum Bsp Google einfügen, sodass man im Drop Down Menü anstatt Memberlist nun Google findet.
2. Dieser Mod, den du hier gepostet hast ERSETZT mir das ganze Navi-Menü vom Forum. Ich hingegen möchte dieses Drop Down Menü zusätzlich einfügen ohne, dass die Menü-Punkte gelöscht werden.
Trotzdem Danke für Deine Hilfe!
lg Phil
Verfasst: 17.10.2006 11:16
von Elvis
professor hat geschrieben:Hi!
2. Dieser Mod, den du hier gepostet hast ERSETZT mir das ganze Navi-Menü vom Forum. Ich hingegen möchte dieses Drop Down Menü zusätzlich einfügen ohne, dass die Menü-Punkte gelöscht werden.
dann ändere den Code doch einfach, sollte nur ein Beispiel sein wie man ein Dropdown Feld da rein bekommt.
Verfasst: 17.10.2006 12:31
von professor
lol, du hast leicht reden, ich bin kein CODE-Profi.

Ich weiß eben nicht wo das drin steht, dass dieses Menü den Rest ersetzt bzw was ich ändern muss dass mein Drop Down UND das Menü erhalten bleibt. Ich glaube das ganze spielt sich hier ab:
Code: Alles auswählen
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/overall_header.tpl
#
#-----[ FIND ]------------------------------------------
#
</head>
#
#-----[ BEFORE, ADD ]------------------------------------------
#
<script language="JavaScript">
<!--
function P7_JumpMenu(selObj,restore){ //v1.3 by Project Seven
var theFullString = selObj.options[selObj.selectedIndex].value;
if (restore) selObj.selectedIndex=0;
var theLength = theFullString.length;
var endPos = theFullString.lastIndexOf("~");
var theUrl, theTarget, theParent;
if (endPos > 0) {theUrl = theFullString.substring(0,endPos);}
else {theUrl = theFullString;}
endPos++
if (endPos < theLength) {theTarget = theFullString.substring(endPos,theLength)}
else {theTarget = "window:Main";}
if (theTarget == "window:New") {window.open(theUrl);}
else if (theTarget == "window:Main") {eval("parent.location='"+theUrl+"'");}
else {eval("parent.frames[\'"+theTarget+"\'].location='"+theUrl+"'");}
}
//-->
</script>
#
#-----[ FIND ]------------------------------------------
#
<tr>
<td align="center" valign="top" nowrap="nowrap"><span class="mainmenu"> <a href="{U_FAQ}" class="mainmenu">
#
#-----[ BEFORE, ADD ]------------------------------------------
#
<!--
welcher Befehl das ist weiß ich leider nicht.
Verfasst: 17.10.2006 12:52
von gloriosa
Hallo,
ich habe nur recht wenig Zeit und werfe mal schnell ein Info dazwischen.
In den neuen Programmcode für das Navigationsmenue in der
overall_header.tpl sind Zeilen wie diese
Code: Alles auswählen
<option value="http://www.phpbb.de~">phpBB.de Supportboard</option>
einzufügen und schon sind externe Link vorhanden.

Verfasst: 17.10.2006 13:15
von Skippy
Code: Alles auswählen
#
#-----[ FIND ]------------------------------------------
#
<tr>
<td align="center" valign="top" nowrap="nowrap"><span class="mainmenu"> <a href="{U_FAQ}" class="mainmenu">
#
#-----[ BEFORE, ADD ]------------------------------------------
#
<!--
Das lässt du weg
Code: Alles auswählen
#
#-----[ FIND ]------------------------------------------
#
<tr>
<td height="25" align="center" valign="top" nowrap="nowrap"><span class="mainmenu"> <a href="{U_PROFILE}" class="mainmenu">
</tr>
#
#-----[ AFTER, ADD ]------------------------------------------
#
-->
Die erste Ziele hier musst du auch weglassen den rest der anweisung fügst du ganz normal ein und schon hast du dein drop downmenü zusätzlich
und für deine externen links gibts dann folgend veränderung am Menü
nach
Code: Alles auswählen
<option value="www.phpbb.de/index.php~">Phpbb.de</option>
Verfasst: 17.10.2006 13:33
von professor
Hey, super danke an alle die mir so rasch gehlofen haben, ich werd's gleich mal ausprobieren

! klingt vielversprechend
lg Phil