Support Forum

Please note that this forum is only available to you in read only mode. In order to contribute to this conversation you will need to renew your subscription.

Script addition question

zentoolsIf you use Zentools please post a review at the Joomla! Extensions Directory.

Hey guys!

I am using the ZGF with default template under Joomla 1.6 and Zoo. I need to add a script to limit some access to frontend submissions. I'm no PHP expert but looking at the index.php for the default template it looks like I will need to add the code to the ZGF index.php. Before I go mucking around in the default I thought I'd ask!!!

So, do I need to add it in the ZGF framework index.php or can I add it somewhere to the ZGFdefault index.php? I have included a screenshot of the code and instructions for more clarity.

Thanks Guys!!!
Betty
Attachments:
  • babray's Avatar
  • babray
  • 6 Month Developer
  • 39 posts
  • Karma: 0
The administrator has disabled public write access.
Hi Betty,

There is a much easier way; you can simply add the script in the template settings, under 'scripts and extras' and the framework will insert it.

I would advise against modding the framework, as it makes it difficult to update.
  • Seth's Avatar
  • Seth
  • Moderator
  • 8358 posts
  • 225 Thanks
  • Karma: 202
The administrator has disabled public write access.
Hi Seth,

I have tried adding the script above both ways to no avail under the extra script panel. In looking at the source code the script is there but no wrapped in the script tags, so I would "assume" (probably incorrectly it is not executing.

Here's the piece from the source code:
[end script tag from previous script]


jQuery(document).ready(function(jQuery) {
jQuery('fieldset.administration div.width50:first-child div.element input#state0').removeAttr('checked','checked');
jQuery('fieldset.administration div.width50:first-child div.element input#state1').attr('checked','checked');
jQuery('fieldset.administration div.width50:first-child').hide();
jQuery('fieldset.administration div#tag-area').hide();
});
[last style tag]

</head>

In reading the documentation on extra scripts I think I may need to make some changes there, maybe!
"In order to maintain any jQuery scripts running in noconflict mode please ensure that you replace any $ elements with "jQuery". Also please do not load the jQuery library or even the mootools library in this option as jQuery is loaded via the JB LIbrary plugin while mootools loads in Joomla by default."

Currently, jQuery source is set to Google, no conflict is enabled, remove all instance is yes, and moo tools are no. Do I need to change these?
Thanks for all the assistance to the jQuery conflict newbie!
B
  • babray's Avatar
  • babray
  • 6 Month Developer
  • 39 posts
  • Karma: 0
The administrator has disabled public write access.

zentoolsIf you use Zentools please post a review at the Joomla! Extensions Directory.

Happy Campers