-
AuthorPosts
-
March 8, 2010 at 6:19 pm #149304
i have ja seleni template installed and i need to disable mootools in order to work parainvite component from simbunch… i followed the instructions from their forum, i inserted script in component.php and inserted a code in “layouts/blocks/head.php” disabled usertools but still no effect…
i tested with other template “rhuk_milkyway” and “beez” and it works…tested also with JA Purity and is not working… anyway, i need it to work with ja seleni template.
the link: http://starbisnov.ro/en/profil/pukana-drugare
ThanksAnonymous ModeratorJA Developer
- Join date:
- September 2014
- Posts:
- 9914
- Downloads:
- 207
- Uploads:
- 152
- Thanks:
- 1789
- Thanked:
- 2008 times in 1700 posts
March 10, 2010 at 2:38 am #335546Hi augustinovp
The mootools.js file is the default of joomla. You could not remove it because i will have a lot of errors in your site.
March 10, 2010 at 8:49 pm #335681yes i agree but i wonder if i could disable mootools only when viewing that page…
i found on their forums the folowing code wich temporary disables mootools[PHP] <?php
JHTML::_( ‘behavior.mootools’ );
$simbunch = ($option == ‘com_parainvite’ || $option == ‘com_simgallery’ || $option == ‘com_simanswers’) ? true : false;
$document =& JFactory::getDocument();
if ($simbunch) {
$parameter_script = ‘scripts’;
$headerstuff = $document->getHeadData();
reset($headerstuff[$parameter_script]);
foreach ($headerstuff[$parameter_script] as $key=>$value){
if (substr_count($key, ‘mootools’) > 0)
unset($headerstuff[$parameter_script][$key]);
}
$document->setHeadData( $headerstuff );
}
?>
<jdoc:include type=”head” />
[/PHP]and they say to insert in index.php above JHTML::_( ‘behavior.mootools’ ); code… but is not working
i had before ja_teline1 template and i inserted that code and it worked without problems, only now with ja_seleni i can’t figure out where to insert that code…. tried in templatedir/layouts/blocks/head.php and/or component.php but still no effect
Anonymous ModeratorJA Developer
- Join date:
- September 2014
- Posts:
- 9914
- Downloads:
- 207
- Uploads:
- 152
- Thanks:
- 1789
- Thanked:
- 2008 times in 1700 posts
March 12, 2010 at 4:06 am #335899Hi you
I am not sure about this issue.
Please kindly contact with the author of component for more detail. I am sorry for not being of much help in the case.
mmckeen Friendmmckeen
- Join date:
- April 2006
- Posts:
- 112
- Downloads:
- 27
- Uploads:
- 12
- Thanks:
- 15
- Thanked:
- 5 times in 1 posts
May 3, 2010 at 12:11 pm #342475<em>@augustinovp 168752 wrote:</em><blockquote>yes i agree but i wonder if i could disable mootools only when viewing that page…
i found on their forums the folowing code wich temporary disables mootools[PHP] <?php
JHTML::_( ‘behavior.mootools’ );
$simbunch = ($option == ‘com_parainvite’ || $option == ‘com_simgallery’ || $option == ‘com_simanswers’) ? true : false;
$document =& JFactory::getDocument();
if ($simbunch) {
$parameter_script = ‘scripts’;
$headerstuff = $document->getHeadData();
reset($headerstuff[$parameter_script]);
foreach ($headerstuff[$parameter_script] as $key=>$value){
if (substr_count($key, ‘mootools’) > 0)
unset($headerstuff[$parameter_script][$key]);
}
$document->setHeadData( $headerstuff );
}
?>
<jdoc:include type=”head” />
[/PHP]and they say to insert in index.php above JHTML::_( ‘behavior.mootools’ ); code… but is not working
I had before ja_teline1 template and i inserted that code and it worked without problems, only now with ja_seleni i can’t figure out where to insert that code…. tried in templatedir/layouts/blocks/head.php and/or component.php but still no effect</blockquote>
Were you every able to get this resolved? I have the same problem (I have SimGallery/SimAnswers/SimParainvite) so I really need a solution also. I also added a comment on Mike’s forum but he hasn’t answered yet. I may go ahead and try posting a support ticket with him but wanted to check with you to see if you solved the issue first.
Thanks!
May 3, 2010 at 12:27 pm #342479try this solution:
open the file:
/templates/<your template>/layouts/blocks/head.phpfind this code:
[PHP] <jdoc:include type=”head” />
<?php JHTML::_(‘behavior.mootools’); ?>[/PHP]replace with:
[PHP] <?php
JHTML::_( ‘behavior.mootools’ );
$option = JRequest::getVar(‘option’, ”);
$simbunch = ($option == ‘com_parainvite’ || $option == ‘com_simgallery’ || $option == ‘com_simanswers’) ? true : false;
$document =& JFactory::getDocument();
if ($simbunch) {
$parameter_script = ‘scripts’;
$headerstuff = $document->getHeadData();
reset($headerstuff[$parameter_script]);
foreach ($headerstuff[$parameter_script] as $key=>$value){
if (substr_count($key, ‘mootools’) > 0)
unset($headerstuff[$parameter_script][$key]);
}
$document->setHeadData( $headerstuff );
}
?>
<jdoc:include type=”head” />[/PHP]see if it works
mmckeen Friendmmckeen
- Join date:
- April 2006
- Posts:
- 112
- Downloads:
- 27
- Uploads:
- 12
- Thanks:
- 15
- Thanked:
- 5 times in 1 posts
May 3, 2010 at 5:41 pm #342523I think I have located part of the problem. Your change worked (it stopped the loading for mootools) however the T3 framework uses some css styling that conflicts with css styling in the template. The SimAnswers and SimGallery dropdowns don’t work correctly and I can see things like list bullets in the formating… not sure how to fix it however… looks like some or all of it is in the addons.css file in the template
mmckeen Friendmmckeen
- Join date:
- April 2006
- Posts:
- 112
- Downloads:
- 27
- Uploads:
- 12
- Thanks:
- 15
- Thanked:
- 5 times in 1 posts
May 4, 2010 at 12:47 am #342556Further investigation shows that it is a problem with the .column ul li class in the templates.css file. SimGallery and SimAnswers has a dropdown list and for some reason the .column ul li class from the template is being used. It messes up the dropdown causing it not to work. I’m not sure how to rename the class…
toymaker Friendtoymaker
- Join date:
- April 2010
- Posts:
- 123
- Downloads:
- 0
- Uploads:
- 5
- Thanks:
- 10
- Thanked:
- 45 times in 32 posts
May 4, 2010 at 1:18 am #342557You can try making the path to your module styles more specific so it only affects your module and not the menu.
For example:
In your module configuration, add a module class suffix (” mymod” for example – remember to use a blank space at the begining) and then modify your style path to include that class.Before:
.column ul li { bla bla bla }
After:
.mymod .column ul li { bla bla bla }
This new style definition will only affect the elements that contain both classes.
Hope it helps.
Peace,
Gabrielmmckeen Friendmmckeen
- Join date:
- April 2006
- Posts:
- 112
- Downloads:
- 27
- Uploads:
- 12
- Thanks:
- 15
- Thanked:
- 5 times in 1 posts
May 4, 2010 at 1:25 am #342558thank you very much for the quick reply! The problem is actually with two components that are using the default template.css styling. Not sure how to go about styling the component to ignore the template.css .column class
toymaker Friendtoymaker
- Join date:
- April 2010
- Posts:
- 123
- Downloads:
- 0
- Uploads:
- 5
- Thanks:
- 10
- Thanked:
- 45 times in 32 posts
May 4, 2010 at 1:50 am #342559When configuring a module, you usually have the option to add a module class suffix. (see attached capture). Here you can specify a new class that will be APPENDED to the module container DIV.
so.. here you have a proof of concept code…
<style>
.column ul li { color:#f00; }
.mymodule.column ul li { color:#00f; }
</style><div class="column">
<ul>
<li>item 1</li>
<li>item 2</li>
<li>item 3</li>
</ul>
</div>
<div class="column mymodule">
<ul>
<li>item 1</li>
<li>item 2</li>
<li>item 3</li>
</ul>
</div>
As you can see, both share the same .column ul li structure, but by appending a new class suffix to the second module, you can apply inheritance of a new rule only to that second module.
Peace,
Gabriel-
1 user says Thank You to toymaker for this useful post
mmckeen Friendmmckeen
- Join date:
- April 2006
- Posts:
- 112
- Downloads:
- 27
- Uploads:
- 12
- Thanks:
- 15
- Thanked:
- 5 times in 1 posts
May 4, 2010 at 1:59 am #342560Thanks again … I guess I’m not being clear about the issue. The problem isn’t with any of my modules I have on the site or the site in general. I have two additional components. One is a photogallery and the other is a question and answer component. All the modules work fine. No issue with them. It is the components that do not work correctly. I only need to fix the problem for the two components, not for any of the modules… thank you again very much for your help… 🙂
toymaker Friendtoymaker
- Join date:
- April 2010
- Posts:
- 123
- Downloads:
- 0
- Uploads:
- 5
- Thanks:
- 10
- Thanked:
- 45 times in 32 posts
May 4, 2010 at 2:06 am #342562Dont really follow you on the definitions. For me, in most cases, a component works on the backend and relates itself to the data in the database and several administrative tasks. On the other hand, a module represents a “view” of the component’s data inside the site.
Please, check/mark the ADMIN/MOD HELP option and provide url link and login information in the post so I can provide further assistance to your specific scenario.
mmckeen Friendmmckeen
- Join date:
- April 2006
- Posts:
- 112
- Downloads:
- 27
- Uploads:
- 12
- Thanks:
- 15
- Thanked:
- 5 times in 1 posts
May 4, 2010 at 2:14 am #342564I’ll open a ticket and see if they can help … and I agree … a module is something like the login module or the poll module. A component is something like a forum, a photogallery, JomSocial, … something like that. The two components giving me the trouble are SimGallery and SimAnswers. I have contacted Mike at Simbunch for help also … thanks again!
AuthorPostsViewing 14 posts - 1 through 14 (of 14 total)This topic contains 14 replies, has 4 voices, and was last updated by mmckeen 14 years, 7 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum
disable mootools in ja seleni
Viewing 14 posts - 1 through 14 (of 14 total)