MyBB Community Forums
Toggle theme width not working inside of the thread - Printable Version

+- MyBB Community Forums (https://community.mybb.com)
+-- Forum: Extensions (https://community.mybb.com/forum-201.html)
+--- Forum: Themes (https://community.mybb.com/forum-103.html)
+---- Forum: Theme Support (https://community.mybb.com/forum-10.html)
+---- Thread: Toggle theme width not working inside of the thread (/thread-146397.html)



Toggle theme width not working inside of the thread - daly - 2013-10-08

i have a toggle function on my theme
it works everywhere except when i open a thread

it doesnt work on the thread page

and here is my header include

<link rel="alternate" type="application/rss+xml" title="{$lang->latest_threads} (RSS 2.0)" href="{$mybb->settings['bburl']}/syndication.php" />
<link rel="alternate" type="application/atom+xml" title="{$lang->latest_threads} (Atom 1.0)" href="{$mybb->settings['bburl']}/syndication.php?type=atom1.0" />
<meta http-equiv="Content-Type" content="text/html; charset={$charset}" />
<meta http-equiv="Content-Script-Type" content="text/javascript" />
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/prototype/1.7.1.0/prototype.js"></script>
<script>
    jQuery.noConflict();
</script>


<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/prototype/1.7.1.0/prototype.js"></script>
<script>
    jQuery.noConflict();
</script>


<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/prototype/1.7.1.0/prototype.js"></script>
<script>
    jQuery.noConflict();
</script>




<!-- Theme Javascript //-->
<script type="text/javascript" src="http://code.jquery.com/jquery-2.1.0-beta1.js"></script>
<script>
    jQuery.noConflict();
</script>
<script type="text/javascript" src="{$mybb->settings['bburl']}/images/dark/js/tiptip.js"></script>
<script type="text/javascript" src="{$mybb->settings['bburl']}/images/dark/js/cookies.js"></script>
<script type="text/javascript" src="{$mybb->settings['bburl']}/images/dark/js/easing.js"></script>
<script type="text/javascript" src="{$mybb->settings['bburl']}/images/dark/js/fancycollapses.js"></script>
<script type="text/javascript" src="{$mybb->settings['bburl']}/images/dark/js/script.js"></script>
<!-- End Theme Javascript //-->

{$stylesheets}


<script type="text/javascript">
<!--
	var cookieDomain = "{$mybb->settings['cookiedomain']}";
	var cookiePath = "{$mybb->settings['cookiepath']}";
	var cookiePrefix = "{$mybb->settings['cookieprefix']}";
	var deleteevent_confirm = "{$lang->deleteevent_confirm}";
	var removeattach_confirm = "{$lang->removeattach_confirm}";
	var loading_text = '{$lang->ajax_loading}';
	var saving_changes = '{$lang->saving_changes}';
	var use_xmlhttprequest = "{$mybb->settings['use_xmlhttprequest']}";
	var my_post_key = "{$mybb->post_code}";
	var imagepath = "{$theme['imgdir']}";
// -->
</script>
{$newpmmsg}
<script type="text/javascript" src="{$mybb->settings['bburl']}/jscripts/tabcontent.js">
/***********************************************
* Tab Content script v2.2- copyright Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/
</script>
<script type="text/javascript" src="{$mybb->settings['bburl']}/jscripts/tabcontent.js">
/***********************************************
* Tab Content script v2.2- copyright Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/
</script>



RE: Toggle theme width not working inside of the thread - .m. - 2013-10-08

there are multiple loading of same script - eg. prototype.js - that should be avoided.
jQuery-2.1.0-beta1 might not work as expected. it would be better to use earlier version (eg. 1.8.2)


RE: Toggle theme width not working inside of the thread - daly - 2013-10-08

<link rel="alternate" type="application/rss+xml" title="{$lang->latest_threads} (RSS 2.0)" href="{$mybb->settings['bburl']}/syndication.php" />
<link rel="alternate" type="application/atom+xml" title="{$lang->latest_threads} (Atom 1.0)" href="{$mybb->settings['bburl']}/syndication.php?type=atom1.0" />
<meta http-equiv="Content-Type" content="text/html; charset={$charset}" />
<meta http-equiv="Content-Script-Type" content="text/javascript" />
<script type="text/javascript" src="{$mybb->settings['bburl']}/jscripts/prototype.js?ver=1400"></script>
<script type="text/javascript" src="{$mybb->settings['bburl']}/jscripts/general.js?ver=1400"></script>
<script type="text/javascript" src="{$mybb->settings['bburl']}/jscripts/popup_menu.js?ver=1400"></script>

<!-- Theme Javascript //-->
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.js"></script> 
<script type="text/javascript" src="{$mybb->settings['bburl']}/images/dark/js/tiptip.js"></script>
<script type="text/javascript" src="{$mybb->settings['bburl']}/images/dark/js/cookies.js"></script>
<script type="text/javascript" src="{$mybb->settings['bburl']}/images/dark/js/easing.js"></script>
<script type="text/javascript" src="{$mybb->settings['bburl']}/images/dark/js/fancycollapses.js"></script>
<script type="text/javascript" src="{$mybb->settings['bburl']}/images/dark/js/script.js"></script>
<!-- End Theme Javascript //-->

{$stylesheets}


<script type="text/javascript">
<!--
	var cookieDomain = "{$mybb->settings['cookiedomain']}";
	var cookiePath = "{$mybb->settings['cookiepath']}";
	var cookiePrefix = "{$mybb->settings['cookieprefix']}";
	var deleteevent_confirm = "{$lang->deleteevent_confirm}";
	var removeattach_confirm = "{$lang->removeattach_confirm}";
	var loading_text = '{$lang->ajax_loading}';
	var saving_changes = '{$lang->saving_changes}';
	var use_xmlhttprequest = "{$mybb->settings['use_xmlhttprequest']}";
	var my_post_key = "{$mybb->post_code}";
	var imagepath = "{$theme['imgdir']}";
// -->
</script>
{$newpmmsg}


still have the problem

can you please help through teamviewer?


RE: Toggle theme width not working inside of the thread - .m. - 2013-10-08

^ if you need help through team viewer then please wait for another helper.
if you can give temporary admin panel access and wait for some time then you can PM me


RE: Toggle theme width not working inside of the thread - daly - 2013-10-08

(2013-10-08, 01:38 PM).m. Wrote: ^ if you need help through team viewer then please wait for another helper.
if you can give temporary admin panel access and wait for some time then you can PM me

well by looking at your reputation , im pming u now Big Grin


RE: Toggle theme width not working inside of the thread - .m. - 2013-10-08

^ now theme width changing facility should be working as expected on your forum.
in general, jQuery and other Java Scripts should be loaded only once on a page.