bbcode DropDown einzeln?

Du suchst einen bestimmten Mod, weißt aber nicht genau wo bzw. ob er überhaupt existiert? Wenn dir dieser Artikel nicht weiterhilft, kannst du hier den von dir gewünschten/gesuchten Mod beschreiben ...
Falls ein Mod-Autor eine der Anfragen hier aufnimmt, um einen neuen Mod zu entwickeln, geht's in [3.0.x] Mods in Entwicklung weiter.
Forumsregeln
phpBB 3.0 hat das Ende seiner Lebenszeit überschritten
phpBB 3.0 wird nicht mehr aktiv unterstützt. Insbesondere werden - auch bei Sicherheitslücken - keine Patches mehr bereitgestellt. Der Einsatz von phpBB 3.0 erfolgt daher auf eigene Gefahr. Wir empfehlen einen Umstieg auf die neuste phpBB-Version, welches aktiv weiterentwickelt wird und für welches regelmäßig Updates zur Verfügung gestellt werden.
Benutzeravatar
Shorty1968
Mitglied
Beiträge: 1894
Registriert: 08.09.2011 17:37

bbcode DropDown einzeln?

Beitrag von Shorty1968 »

Hallo ich suche ein bbcode DropDown auswahl , aber einzeln der den man über Google findet Packt alle bbcodes ind das DropDown.

Gruß
Charlie_M
Mitglied
Beiträge: 1210
Registriert: 17.07.2008 13:09
Kontaktdaten:

Re: bbcode DropDown einzeln?

Beitrag von Charlie_M »

Ganz easy:
Öffne posting_button.html
Suche:

Code: Alles auswählen

	<!-- BEGIN custom_tags -->
		<input type="button" class="button2" name="addbbcode{custom_tags.BBCODE_ID}" value="{custom_tags.BBCODE_TAG}" onclick="bbstyle({custom_tags.BBCODE_ID})" title="{custom_tags.BBCODE_HELPLINE}" />
	<!-- END custom_tags -->
Füge DANACH ein:

Code: Alles auswählen

	<select onchange="if(this.selectedIndex > 0) { bbstyle(parseInt(this.options[this.selectedIndex].value, 10)); this.selectedIndex = 0; }">
       <option value=""></option>
       <option value="22">ID_TAG22</option>
       <option value="24">ID_TAG24</option>
       <option value="26">ID_TAG26</option>
    </select>	
Das Einzige was du selber herausfinden musst ist die BBCODE_ID:
Dazu schaust in der DB in der Tabelle phpbb_bbcode nach den gewünschten TAG und trägst die entsprechende ID bei Value ein, unter ID_TAG trägst den Titel des BBCodes ein.
Benutzeravatar
Shorty1968
Mitglied
Beiträge: 1894
Registriert: 08.09.2011 17:37

Re: bbcode DropDown einzeln?

Beitrag von Shorty1968 »

Danke das ist das was ich gefunden hatte,da stand aber dabei das so alle bbcode betroffen sind?
Charlie_M
Mitglied
Beiträge: 1210
Registriert: 17.07.2008 13:09
Kontaktdaten:

Re: bbcode DropDown einzeln?

Beitrag von Charlie_M »

[x] weder gelesen, ausprobiert noch verstanden

Das ist genau der Grund warum immer weniger Bock haben dir zu helfen :P

Damit allein ist es nicht getan: du willst ja dann die Custom BBCodes die im Dropdown sind nicht als Button haben, d.h. da muss man schon noch was tun.
Benutzeravatar
Shorty1968
Mitglied
Beiträge: 1894
Registriert: 08.09.2011 17:37

Re: bbcode DropDown einzeln?

Beitrag von Shorty1968 »

Das ist ja wie einem Hund einen Knochen hinwerfen und ihn dann wider weg ziehen? :o :-?

Wenn ich deine anleitung mache gehen keine bbcodes mehr egal welcher , wenn ich jetzt wüsste was ich genau noch machen soll muss dann könnte ich mir ja selber einen programmieren oder?
Benutzeravatar
BNa
Valued Contributor
Beiträge: 3169
Registriert: 12.04.2010 23:51
Kontaktdaten:

Re: bbcode DropDown einzeln?

Beitrag von BNa »

Die Sache ist ganz einfach und braucht nur in der posting_buttons.html bearbeitet zu werden

Finde diese Stelle in der Datei (Standard-Dropdown für die Schriftgröße)

Code: Alles auswählen

    <select name="addbbcode20" onchange="bbfontstyle('[size=' + this.form.addbbcode20.options[this.form.addbbcode20.selectedIndex].value + ']', '[/size]');this.form.addbbcode20.selectedIndex = 2;" title="{L_BBCODE_F_HELP}">
        <option value="50">{L_FONT_TINY}</option>
        <option value="85">{L_FONT_SMALL}</option>
        <option value="100" selected="selected">{L_FONT_NORMAL}</option>
        <!-- IF not MAX_FONT_SIZE or MAX_FONT_SIZE >= 150 -->
            <option value="150">{L_FONT_LARGE}</option>
            <!-- IF not MAX_FONT_SIZE or MAX_FONT_SIZE >= 200 -->
                <option value="200">{L_FONT_HUGE}</option>
            <!-- ENDIF -->
        <!-- ENDIF -->
    </select> 
und füge danach diesen Code ein

Code: Alles auswählen

          <span class="genmed nowrap">
          <select class="select_class" name="addbbcode_custom" class="gensmall" onchange="bbstyle(this.form.addbbcode_custom.options[this.form.addbbcode_custom.selectedIndex].value*1);this.form.addbbcode_custom.selectedIndex = 0;">
          <option selected="selected" value="">BBCodes</option>
          <!-- BEGIN custom_tags -->
          <!-- IF custom_tags.BBCODE_TAG == 'youtube' or custom_tags.BBCODE_TAG == 'myvideo' or custom_tags.BBCODE_TAG == 'yahoovideo' -->
          <option value="{custom_tags.BBCODE_ID}" onmouseover="helpline('cb_{custom_tags.BBCODE_ID}')" onmouseout="helpline('tip')" title="{custom_tags.BBCODE_HELPLINE}">{custom_tags.BBCODE_TAG}</option>
          <!-- ENDIF -->
          <!-- END custom_tags -->   
          </select>
          </span> 
In diesem Faller sind nur die drei BBCodes

youtube
myvideo
yahoovideo

zu sehen und natürlich funktioniert alles wie gehabt parallel zu den normalen BBCodes.
Auf Deutsch: An dieser Stelle erweitern oder reduzieren

Code: Alles auswählen

<!-- IF custom_tags.BBCODE_TAG == 'youtube' or custom_tags.BBCODE_TAG == 'myvideo' or custom_tags.BBCODE_TAG == 'yahoovideo' --> 
Charlie_M
Mitglied
Beiträge: 1210
Registriert: 17.07.2008 13:09
Kontaktdaten:

Re: bbcode DropDown einzeln?

Beitrag von Charlie_M »

Bei der Lösung werden ALLE Custom-BBCodes im Dropdown ausgegeben - das will der TS ja nicht.
Benutzeravatar
BNa
Valued Contributor
Beiträge: 3169
Registriert: 12.04.2010 23:51
Kontaktdaten:

Re: bbcode DropDown einzeln?

Beitrag von BNa »

Probier mal den Code bzw, lese ihn richtig, es werden in dem Falle nur 3 BBCodes ausgegeben.
Dieser Code ist natürlich getestet :wink:
Benutzeravatar
BNa
Valued Contributor
Beiträge: 3169
Registriert: 12.04.2010 23:51
Kontaktdaten:

Re: bbcode DropDown einzeln?

Beitrag von BNa »

Zusatz

Möchtest Du, das die im Dropdown befindlichen BBCodes nicht noch zusätzlich unter den normalen BBCode Buttons auftauchen, dann

finde

Code: Alles auswählen

    <!-- BEGIN custom_tags -->
        <input type="button" class="button2" name="addbbcode{custom_tags.BBCODE_ID}" value="{custom_tags.BBCODE_TAG}" onclick="bbstyle({custom_tags.BBCODE_ID})" title="{custom_tags.BBCODE_HELPLINE}" />
    <!-- END custom_tags --> 
ersetze mit

Code: Alles auswählen

    <!-- BEGIN custom_tags -->
    <!-- IF custom_tags.BBCODE_TAG !== 'youtube' or custom_tags.BBCODE_TAG !== 'myvideo' or custom_tags.BBCODE_TAG !== 'yahoovideo' --> 
        <input type="button" class="button2" name="addbbcode{custom_tags.BBCODE_ID}" value="{custom_tags.BBCODE_TAG}" onclick="bbstyle({custom_tags.BBCODE_ID})" title="{custom_tags.BBCODE_HELPLINE}" />
    <!-- ENDIF -->
    <!-- END custom_tags --> 
Wiederum hier anpassen

Code: Alles auswählen

<!-- IF custom_tags.BBCODE_TAG !== 'youtube' or custom_tags.BBCODE_TAG !== 'myvideo' or custom_tags.BBCODE_TAG !== 'yahoovideo' --> 
Bevor Fragen kommen: Man beachte das ! vor dem ==
Benutzeravatar
Shorty1968
Mitglied
Beiträge: 1894
Registriert: 08.09.2011 17:37

Re: bbcode DropDown einzeln?

Beitrag von Shorty1968 »

Danke euch so geht es wie ich es möchte.
Antworten

Zurück zu „[3.0.x] Mod Suche/Anfragen“