Seite 1 von 1

Schnellantwort einklappbar? / Full Quick Reply Editor

Verfasst: 30.05.2015 19:34
von JARVIS
Hallo und guten Abend.

Heute ist eine Userin an mich heran getreten mit der Bitte/Frage ob es möglich sei das bei uns eingebaute Full Quick Reply Editor so zu modifizieren, dass es ein/ausklappbar ist, da es in seinem aktuellen sichtbaren Zustand doch sehr viel Platz einnimmt.

Ich habe im entsprechenden Supportforum zwar ein Thema entdeckt, das das Einbinden eines Buttons zum ein/ausblenden beschreibt, aber die dort erwähnte Modifikation der quickreply_editor.html gemäß des Codes hat leider keinen Erfolg gebracht.

Ich würde mich freuen, wenn mir jemand diesbezüglich einen Ratschlag erteilen könnte, woran es liegt, dass die veränderte html keine Wirkung zeigt.
Natürlich wurden die Templates im ACP gecached und cache geleert.

Vielen Dank im Voraus für Ihre Rückantworten.

Mit freundlichem Gruß
J.A.R.V.I.S.

Re: Schnellantwort einklappbar? / Full Quick Reply Editor

Verfasst: 31.05.2015 22:52
von Talk19zehn
Hello, in phpBB-3.0.xx sollte das JS in Sachen "toggle" ganz gut greifen und einfach umsetzbar sein.

Nur ein Anhaltspunkt sei erwähnt: viewtopic.php?p=1076188#p1076188
Seinen Ansatz fand ich schon immer gut!! Funktioniert auch ohne Tabellen, also in Prosilver. Man braucht natürlich ein wenig Übung, Erfahrung, die ich voraussetze. :wink: Manchmal sind die einfachsten Lösungen, die ... :wink: Allerdings weiß ich nicht, ob das Teilchen der "Browser-Neuzeit" entspräche.

Bei mir funktioniert´s noch immer in 3.0.xx. Nur ein Beispiel/Denkansatz auf die Schnelle:
Um bspw. eine "Legende und die Berechtigungen in diesem Forum" ==> in der viewforum_body.html ein-, und auszublenden testete ich soeben:
Siehe Zeile 2-44 und 273-300 - https://www.phpbb.de/support/pastebin.p ... iew&s=1503
Auweia: Okay, ist nicht ganz sauber "eingerückt". :D

BTW: Wenn die angebotene Hilfe lt. deinem Eingangspost nicht funktioniert, würde ich ggf. den Autor kontaktieren.

Grüße

Re: Schnellantwort einklappbar? / Full Quick Reply Editor

Verfasst: 01.06.2015 09:25
von JARVIS
Hallo und guten Morgen, Talk19zehn.

Vielen Dank für Ihre Rückantwort.
Der Einbau hat hervorragend geklappt; der Quickreplay wird nun verborgen; ich musste ein paar kleinere Modifikationen vornehmen, aber diese sind kaum der Rede wert.

Soll ich die Modifikation hier öffentlich posten, damit eventuell auch andere Betroffene davon profitieren können?

Mit freundlichen Grüßen
J.A.R.V.I.S.

Re: Schnellantwort einklappbar? / Full Quick Reply Editor

Verfasst: 01.06.2015 09:40
von AYYILDIZLAR
Hallo,
JARVIS hat geschrieben:Soll ich die Modifikation hier öffentlich posten, damit eventuell auch andere Betroffene davon profitieren können?
Natürlich kannst du das machen, die Hilfe suchenden Mitglieder werden es dir danken.

Grüße

Re: Schnellantwort einklappbar? / Full Quick Reply Editor

Verfasst: 01.06.2015 10:05
von JARVIS
Lösung für Einklappbare Schnellantwort:

Voraussetzung:
Installation von Full Quick Reply Editor!

Zu editierende Dateien:
- overall_header.html
- quickreply_editor.html

Bitte vor Anwendung die zu ändernden Dateien sichern!!!


###################################

Öffne: styles/prosilver/theme/overall_header.html

Suche:

Code: Alles auswählen

</head>
Setze davor:

Code: Alles auswählen

<script type="text/javascript">
<!--
function _dom_toggle()
{
   return this;
}
   _dom_toggle.prototype.objref = function(id)
   {
      return document.getElementById ? document.getElementById(id) : (document.all ? document.all[id] : (document.layers ? document.layers[id] : null));
   }

   _dom_toggle.prototype.cancel_event = function()
   {
      if ( window.event )
      {
         window.event.cancelBubble = true;
      }
   }

   _dom_toggle.prototype.toggle = function(id, close_id, open_icon, close_icon)
   {
      var open_object = this.objref(id);
      var close_object = this.objref(close_id);

      if ( open_object && open_object.style )
      {
         open_object.style.display = (open_object.style.display == 'none') ? '' : 'none';
         if ( close_object && close_object.style )
         {
            close_object.style.display = (open_object.style.display == 'none') ? '' : 'none';
         }
         if ( close_object && close_object.src )
         {
            close_object.src = (open_object.style.display == 'none') ? open_icon : close_icon;
         }
      }
      this.cancel_event();
   }

// instantiate
dom_toggle = new _dom_toggle();
//-->
</script>
#############################

Öffne: styles/prosilver/theme/quickreply_editor.html

Suche:

Code: Alles auswählen

<form id="postform" method="post" action="{U_QR_ACTION}">
	<div class="panel" id="postingbox">
		<div class="inner"><span class="corners-top"><span></span></span>
		
		<h2>{L_QUICKREPLY}</h2>
		
		<fieldset class="fields2">
			<!-- IF S_SHOW_TOPIC_ICONS -->
				<dl>
					<dt><label for="icon">{L_ICON}:</label></dt>
					<dd>
						<label for="icon"><input type="radio" name="icon" id="icon" value="0" checked="checked" /> {L_NO_TOPIC_ICON}</label>
						<!-- BEGIN topic_icon --><label for="icon-{topic_icon.ICON_ID}"><input type="radio" name="icon" id="icon-{topic_icon.ICON_ID}" value="{topic_icon.ICON_ID}" {topic_icon.S_ICON_CHECKED} /><img src="{topic_icon.ICON_IMG}" width="{topic_icon.ICON_WIDTH}" height="{topic_icon.ICON_HEIGHT}" alt="" title="" /></label> <!-- END topic_icon -->
					</dd>
				</dl>
			<!-- ENDIF -->
			
			<!-- IF S_DISPLAY_USERNAME -->
				<dl style="clear: left;">
					<dt><label for="username">{L_USERNAME}:</label></dt>
					<dd><input type="text" tabindex="1" name="username" id="username" size="25" value="{USERNAME}" class="inputbox autowidth" /></dd>
				</dl>
			<!-- ENDIF -->
			
			<dl style="clear: left;">
				<dt><label for="subject">{L_SUBJECT}:</label></dt>
				<dd><input type="text" name="subject" id="subject" size="45" maxlength="64" tabindex="2" value="{SUBJECT}" class="inputbox autowidth" /></dd>
			</dl>
			
			<!-- IF CAPTCHA_TEMPLATE and S_CONFIRM_CODE -->
				<!-- DEFINE $CAPTCHA_TAB_INDEX = 3 -->
				<!-- INCLUDE {CAPTCHA_TEMPLATE} -->
			<!-- ENDIF -->
			
			<!-- INCLUDE posting_buttons.html -->
			
			<!-- IF S_SMILIES_ALLOWED and .smiley -->
				<div id="smiley-box">
					<strong>{L_SMILIES}</strong><br />
					<!-- BEGIN smiley -->
						<a href="#" onclick="insert_text('{smiley.A_SMILEY_CODE}', true); return false;"><img src="{smiley.SMILEY_IMG}" width="{smiley.SMILEY_WIDTH}" height="{smiley.SMILEY_HEIGHT}" alt="{smiley.SMILEY_CODE}" title="{smiley.SMILEY_DESC}" /></a>
					<!-- END smiley -->
					
					<!-- IF S_SHOW_SMILEY_LINK and S_SMILIES_ALLOWED-->
						<br /><a href="{U_MORE_SMILIES}" onclick="popup(this.href, 300, 350, '_phpbbsmilies'); return false;">{L_MORE_SMILIES}</a>
					<!-- ENDIF -->
				</div>
			<!-- ENDIF -->
			
			<div id="message-box" <!-- IF not S_SMILIES_ALLOWED -->style="width: 100%;"<!-- ENDIF -->>
				<textarea style="height: 9em;" name="message" rows="15" cols="76" tabindex="3" onselect="storeCaret(this);" onclick="storeCaret(this);" onkeyup="storeCaret(this);" onfocus="initInsertions();" class="inputbox"></textarea>
			</div>
		</fieldset>
		
		<span class="corners-bottom"><span></span></span></div>
	</div>
	
	<div class="panel bg2">
		<div class="inner"><span class="corners-top"><span></span></span>
		
		<fieldset class="submit-buttons">
			{S_FORM_TOKEN}
			{QR_HIDDEN_FIELDS}
			<!-- IF S_SAVE_ALLOWED --><input type="submit" accesskey="k" tabindex="6" name="save" value="{L_SAVE_DRAFT}" class="button2" />&nbsp;<!-- ENDIF -->
			<input type="submit" accesskey="f" tabindex="7" name="preview" value="{L_PREVIEW}" class="button1" onclick="document.getElementById('postform').action += '#preview';" />&nbsp;
			<input type="submit" accesskey="s" tabindex="8" name="post" value="{L_SUBMIT}" class="button1" />&nbsp;
		</fieldset>
		
		<span class="corners-bottom"><span></span></span></div>
	</div>
</form>
Überschreibe mit:

Code: Alles auswählen

<div style="text-align:left; float:left; size:120px; color:#0080FF">Schnellantwort</div>
  <div style="text-align:right;"><a href="javascript:dom_toggle.toggle('info_display','info_close');">Ausklappen</a>
</div>

<div id="info_close" style="display:visible;">
<table>
  <tr>
   <td>
  >>
  </td>
     </tr>
   </table>
</div>

<div id="info_display" style="display:none;">
<table width="100%">
  <tr>
   <td>

<form id="postform" method="post" action="{U_QR_ACTION}">
	<div class="panel" id="postingbox">
		<div class="inner"><span class="corners-top"><span></span></span>
		
		<h2>{L_QUICKREPLY}</h2>
		
		<fieldset class="fields2">
			<!-- IF S_SHOW_TOPIC_ICONS -->
				<dl>
					<dt><label for="icon">{L_ICON}:</label></dt>
					<dd>
						<label for="icon"><input type="radio" name="icon" id="icon" value="0" checked="checked" /> {L_NO_TOPIC_ICON}</label>
						<!-- BEGIN topic_icon --><label for="icon-{topic_icon.ICON_ID}"><input type="radio" name="icon" id="icon-{topic_icon.ICON_ID}" value="{topic_icon.ICON_ID}" {topic_icon.S_ICON_CHECKED} /><img src="{topic_icon.ICON_IMG}" width="{topic_icon.ICON_WIDTH}" height="{topic_icon.ICON_HEIGHT}" alt="" title="" /></label> <!-- END topic_icon -->
					</dd>
				</dl>
			<!-- ENDIF -->
			
			<!-- IF S_DISPLAY_USERNAME -->
				<dl style="clear: left;">
					<dt><label for="username">{L_USERNAME}:</label></dt>
					<dd><input type="text" tabindex="1" name="username" id="username" size="25" value="{USERNAME}" class="inputbox autowidth" /></dd>
				</dl>
			<!-- ENDIF -->
			
			<dl style="clear: left;">
				<dt><label for="subject">{L_SUBJECT}:</label></dt>
				<dd><input type="text" name="subject" id="subject" size="45" maxlength="64" tabindex="2" value="{SUBJECT}" class="inputbox autowidth" /></dd>
			</dl>
			
			<!-- IF CAPTCHA_TEMPLATE and S_CONFIRM_CODE -->
				<!-- DEFINE $CAPTCHA_TAB_INDEX = 3 -->
				<!-- INCLUDE {CAPTCHA_TEMPLATE} -->
			<!-- ENDIF -->
			
			<!-- INCLUDE posting_buttons.html -->
			
			<!-- IF S_SMILIES_ALLOWED and .smiley -->
				<div id="smiley-box">
					<strong>{L_SMILIES}</strong><br />
					<!-- BEGIN smiley -->
						<a href="#" onclick="insert_text('{smiley.A_SMILEY_CODE}', true); return false;"><img src="{smiley.SMILEY_IMG}" width="{smiley.SMILEY_WIDTH}" height="{smiley.SMILEY_HEIGHT}" alt="{smiley.SMILEY_CODE}" title="{smiley.SMILEY_DESC}" /></a>
					<!-- END smiley -->
					
					<!-- IF S_SHOW_SMILEY_LINK and S_SMILIES_ALLOWED-->
						<br /><a href="{U_MORE_SMILIES}" onclick="popup(this.href, 300, 350, '_phpbbsmilies'); return false;">{L_MORE_SMILIES}</a>
					<!-- ENDIF -->
				</div>
			<!-- ENDIF -->
			
			<div id="message-box" <!-- IF not S_SMILIES_ALLOWED --> style="width: 100%;" <!-- ENDIF --> >
				<textarea style="height: 9em;" name="message" rows="15" cols="76" tabindex="3" onselect="storeCaret(this);" onclick="storeCaret(this);" onkeyup="storeCaret(this);" onfocus="initInsertions();" class="inputbox"></textarea>
			</div>
		</fieldset>
		
		<span class="corners-bottom"><span></span></span></div>
	</div>
	
	<div class="panel bg2">
		<div class="inner"><span class="corners-top"><span></span></span>
		
		<fieldset class="submit-buttons">
			{S_FORM_TOKEN}
			{QR_HIDDEN_FIELDS}
			<!-- IF S_SAVE_ALLOWED --><input type="submit" accesskey="k" tabindex="6" name="save" value="{L_SAVE_DRAFT}" class="button2" />&nbsp;<!-- ENDIF -->
			<input type="submit" accesskey="f" tabindex="7" name="preview" value="{L_PREVIEW}" class="button1" onclick="document.getElementById('postform').action += '#preview';" />&nbsp;
			<input type="submit" accesskey="s" tabindex="8" name="post" value="{L_SUBMIT}" class="button1" />&nbsp;
		</fieldset>
		
		<span class="corners-bottom"><span></span></span>
	</div>
	</div>
</form>

</td>
  </tr>
</table>
</div>
Individuelle Anpassung:

- Schriftgröße/Farbe des Wortes "Schnellantwort"

Suche:

Code: Alles auswählen

<div style="text-align:left; float:left; size:120px; color:#0080FF">Schnellantwort</div>
Für Schriftgröße und Farbe:

Code: Alles auswählen

size:120px; color:#0080FF

anpassen.