Home » Forum
NoNumber!

Joomla!® Websites & Extensions
development  -  support  -  consultancy

I try to respond within 48 hours (excluding weekends).
If I haven't responded by then, feel free to post a reminder or bug me via email.

My last reply was: 2 Hours, 30 Minutes ago.

Welcome, Guest
Please Login or Register.    Lost Password?

Can't figure out what I'm doing wrong
(1 viewing) (1) Guest
Go to bottomPage: 1
TOPIC: Can't figure out what I'm doing wrong
#5106
Can't figure out what I'm doing wrong 2 Years, 3 Months ago  
Hi,

I can't seem to figure out why Sourcerer is not working for me.

I downloaded and installed Sourcerer and went into the plugin manager to make sure that it's enabled overall. Also made sure that it is enabled for articles in the parameters panel.

I went to the article in which I'd like to include some javascript, inserted my cursor at the top of the article, clicked the sourcerer button and pasted my code between the {source}{/source} tags. I'm using JCE as my editor and I tried using both regular <> and also [[ ]] to enclose my tags.

No matter what I do, when I check the source code of my page there is no script in place.

Please help.

Thanks.
mebner
Posts: 3
User OfflineClick here to see the profile of this user
The administrator has disabled public write access.
 
#5111
Can't figure out what I'm doing wrong 2 Years, 3 Months ago  
So what is the code (including the {source} tags) you have in your article?

What do you see in the html output source of you site where you expect the script?
Peter van Westen
Admin
Posts: 9169
User Online NowClick here to see the profile of this user
The administrator has disabled public write access.
Need to contact me directly? Go to my contact page.
If you use any NoNumber! extensions, please post a rating and a review at the Joomla! Extensions Directory.
Are you happy with the support? Please consider buying a License Code to help me to continue development and support.
 
#5119
Can't figure out what I'm doing wrong 2 Years, 3 Months ago  
Thanks for the reply but I figured out what was going on.

Partly I was using Sourcerer a little bit wrong by including {source}{/source} tags in the Sourcerer window instead of placing my insertion point between the {source}{/source} tags in the article code. The other remedy was to remove all commenting from the script which for some reason seems to be problematic.

One more question. Using Sourcerer, is there a way to insert a script in the head section of a single article?

Thanks for the help. I appreciate it.
mebner
Posts: 3
User OfflineClick here to see the profile of this user
The administrator has disabled public write access.
 
#5121
Can't figure out what I'm doing wrong 2 Years, 3 Months ago  
Try this:
{source}<?php
    $script = 'your script...';
    $doc =& JFactory::getDocument();
    $doc->addScriptDeclaration( $script );
?>{/source}

Peter van Westen
Admin
Posts: 9169
User Online NowClick here to see the profile of this user
The administrator has disabled public write access.
Need to contact me directly? Go to my contact page.
If you use any NoNumber! extensions, please post a rating and a review at the Joomla! Extensions Directory.
Are you happy with the support? Please consider buying a License Code to help me to continue development and support.
 
#5131
Can't figure out what I'm doing wrong 2 Years, 3 Months ago  
Thanks so much. It worked beautifully!
mebner
Posts: 3
User OfflineClick here to see the profile of this user
The administrator has disabled public write access.
 
Go to topPage: 1
Moderators: Peter van Westen
hosting joomla
Open Source Training | Online Joomla! Training and Support
MaxCDN | Content Delivery Network | Accelerate your site to the max