Toggle BBCode

Modifications for phpBB3.
Try the Mods here and share Your own Mods
Forum rules
You dont have to use ModX or make your mod AutoMod compatible. A simple textfile is fine
But if you post Mods here You also have to give support

Re: Toggle BBCode

Post by systemcrack »

;) Great Stoker now I can see the "buttons"! But it does not work ... the collapse is always displayed open .. maybe I'm wrong position in the footer .. you could show me in overall_footer.html file, the location where you put it, to see if it's me that my brain is boiled or there is a conflict of some kind.

P.S.
If I click on the "button" of Toggle bbcode, I come back to the pinnacle of the page .. may be caused by this extension?

Sorry if I asked too many questions about a subject so trivial.

Edit:
it is not caused by this extension I uninstalled it and the problem persists

Re: Toggle BBCode

Post by Stoker »

Take a look at the source code on this site. Should be enough to see where it should go.
Im loading my scripts using and event from my portal, so no edits to the core files is made.

Re: Toggle BBCode

Post by systemcrack »

Stoker wrote:Take a look at the source code on this site. Should be enough to see where it should go.
Im loading my scripts using and event from my portal, so no edits to the core files is made.
So if I understand correctly you are changing the files that make up your portal ... so you do not have entered the code in overall_footer.html .. mumble mumble Image

Re: Toggle BBCode

Post by Stoker »

Yes and no :)
Just place it after this line on overall_footer:

Code: Select all

<!-- EVENT overall_footer_after -->

Re: Toggle BBCode

Post by systemcrack »

Hi Stoker, excuse me if I return back to bother you about this nonsense, but I must tell you.. I love your bbcode and I do not resign myself to trying to make it work. Although I would not directly touch the files of the system (but I do not know how else to do), I tried as you told me, but in addition to not work, the code appears in the bottom of the page.

This is my overall_footer:

Code: Select all

		<!-- EVENT overall_footer_content_after -->
	</div>

<!-- EVENT overall_footer_page_body_after -->

<div id="page-footer">
	<!-- INCLUDE navbar_footer.html -->

	<div class="copyright">
		<!-- EVENT overall_footer_copyright_prepend -->
		{CREDIT_LINE}
		<!-- IF TRANSLATION_INFO --><br />{TRANSLATION_INFO}<!-- ENDIF -->
		<!-- EVENT overall_footer_copyright_append -->
		<!-- IF DEBUG_OUTPUT --><br />{DEBUG_OUTPUT}<!-- ENDIF -->
		<!-- IF U_ACP --><br /><strong><a href="{U_ACP}">{L_ACP}</a></strong><!-- ENDIF -->
	</div>

	<div id="darkenwrapper" data-ajax-error-title="{L_AJAX_ERROR_TITLE}" data-ajax-error-text="{L_AJAX_ERROR_TEXT}" data-ajax-error-text-abort="{L_AJAX_ERROR_TEXT_ABORT}" data-ajax-error-text-timeout="{L_AJAX_ERROR_TEXT_TIMEOUT}" data-ajax-error-text-parsererror="{L_AJAX_ERROR_TEXT_PARSERERROR}">
		<div id="darken">&nbsp;</div>
	</div>
	<div id="loading_indicator"></div>

	<div id="phpbb_alert" class="phpbb_alert" data-l-err="{L_ERROR}" data-l-timeout-processing-req="{L_TIMEOUT_PROCESSING_REQ}">
		<a href="#" class="alert_close"></a>
		<h3 class="alert_title">&nbsp;</h3><p class="alert_text"></p>
	</div>
	<div id="phpbb_confirm" class="phpbb_alert">
		<a href="#" class="alert_close"></a>
		<div class="alert_text"></div>
	</div>
</div>

</div>

<div>
	<a id="bottom" class="anchor" accesskey="z"></a>
	<!-- IF not S_IS_BOT -->{RUN_CRON_TASK}<!-- ENDIF -->
</div>


<script type="text/javascript" src="{T_JQUERY_LINK}"></script>
<!-- IF S_ALLOW_CDN --><script type="text/javascript">window.jQuery || document.write(unescape('%3Cscript src="{T_ASSETS_PATH}/javascript/jquery.min.js?assets_version={T_ASSETS_VERSION}" type="text/javascript"%3E%3C/script%3E'));</script><!-- ENDIF -->
<script type="text/javascript" src="{T_ASSETS_PATH}/javascript/core.js?assets_version={T_ASSETS_VERSION}"></script>
<!-- INCLUDEJS forum_fn.js -->
<!-- INCLUDEJS ajax.js -->

<!-- EVENT overall_footer_after -->

//Hide (Collapse) the toggle containers on load
   $(".toggle_container").hide(); 

   //Switch the "Open" and "Close" state per click then slide up/down (depending on open/close state)
   $("h2.trigger").click(function(){
      $(this).toggleClass("active").next().slideToggle("slow");
      return false; //Prevent the browser jump to the link anchor
   });
   
<!-- IF S_PLUPLOAD --><!-- INCLUDE plupload.html --><!-- ENDIF -->
{$SCRIPTS}
   
</body>
</html>