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.

Javascript include

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

Hello!
I am working on: www.iidevelopment.com/instyprintscheektowaga/

I need to include a form from PagePath, MyOrderDesk.com.
www.myorderdesk.com/SkinRedirectToFrame.asp

I have included the file into the media/system/js directory.
www.iidevelopment.com/instyprintscheektowaga/media/system/js/cSkinService.js

I have turned off the editor.
I have created a custom module and entered t.his code:
<?php
$document = &JFactory::getDocument();
$document->addScript( '/media/system/js/cSkinService.js' );
?>

Is this the correct method? I know I am missing placement of some code?

Can you help?
www.joomlabamboo.com/components/com_kunena/template/default_ex/images/english/emoticons/angry.png
Thank you in advance.

Sabina
  • Sabina Ramsey's Avatar
  • Sabina Ramsey
  • 6 Month Developer
  • 85 posts
  • Karma: 0
The administrator has disabled public write access.
Hi Sabina,

I may be a little out of my depth here however there is a module called Jumi which is a set of native extensions for Joomla! 1.5.x.and is designed to inject stored code or written code into Joomla!. Either as a separate page (via Jumi component) or into the articles (via Jumi plugin) or into modules position

If I understand you correctly this may help in injecting your code into Joomla via a module

Until Anthony awakens, I hope that gives you some help

Cheers Craig ;)
  • Craig's Avatar
  • Craig
  • 12 Month Developer
  • 2G rocks
  • 418 posts
  • Karma: 17
The administrator has disabled public write access.
Hi Craig and Happy New Year!

Thanks for letting me know about the Jumi module.I have installed the Jumi module and explored the different parts, but am still struggling. Maybe you have some ideas?

This is what I have done so far.
1. The javascript file has been placed where all the other javascripts file are placed on the server.
2. Jumi module is installed.
3. See (www.iidevelopment.com/instyprintscheektowaga/)

Problem
I have two parts of the code, one part that belong in the "header" and the other part that belongs on the page. (www.myorderdesk.com/SkinFrame.asp). Where do I place these sets of codes?

Do I place the bottom part in the component section and the top part in the plugin section?

Thank you in advance.

Sabina
  • Sabina Ramsey's Avatar
  • Sabina Ramsey
  • 6 Month Developer
  • 85 posts
  • Karma: 0
The administrator has disabled public write access.
Hi Sabina,

Im pretty sure you have to call global $mainframe; first.

So it would look like :

<?php
global $mainframe;
$document =& JFactory::getDocument();
$document->addScript( '/media/system/js/cSkinService.js' );
?>

Hope that works.

Anthony
  • Anthony Olsen's Avatar
  • Anthony Olsen
  • LIfetime Developer - Big Bamboo
  • 23925 posts
  • 788 Thanks
  • Karma: 433
The administrator has disabled public write access.
Thanks for quick response Anthony.

Do I place this code in the plugin? S :unsure:

Regards,
  • Sabina Ramsey's Avatar
  • Sabina Ramsey
  • 6 Month Developer
  • 85 posts
  • Karma: 0
The administrator has disabled public write access.
I havent used Jumi for a while - I just know you have to declare the global mainframe to get those scripts to work.

If I were doing this I would probably just use the banner module or a module you arent using and replace the code in the tmpl/default.php file with the code you are using. But that might get a little messy as time goes on.

Cheers Anthony
  • Anthony Olsen's Avatar
  • Anthony Olsen
  • LIfetime Developer - Big Bamboo
  • 23925 posts
  • 788 Thanks
  • Karma: 433
The administrator has disabled public write access.
Thanks for the tips!

I will explore... and see if I can solve it.

S
  • Sabina Ramsey's Avatar
  • Sabina Ramsey
  • 6 Month Developer
  • 85 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