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, 25 Minutes ago.

Welcome, Guest
Please Login or Register.    Lost Password?

[SOLVED] Code disappears when using JCE
(1 viewing) (1) Guest
Go to bottomPage: 1
TOPIC: [SOLVED] Code disappears when using JCE
#68
[SOLVED] Code disappears when using JCE 3 Years, 7 Months ago  
Hi,

We are using sourcer on a Joomla 1.5.3 site with JCE editor. The code that we put into a content item between the {source}{/source} tags disappear when we save the content item and go back into it. The code is still there, as it shows up on the front end, just not in the content item.

The code we are using in the content item is:
{source}<?php include($_SERVER['DOCUMENT_ROOT']."/templates/username/includes/form.php"); ?>{/source}

When you go back into the content item all you see is:
{source}{/source}

But the form is showing on the front end of the website on the content page.

We have used runphp and klphp on Joomla 1.0 site and never had this problem.

Any ideas what the problem might be?

Thanks.
ljk
Posts: 7
User OfflineClick here to see the profile of this user
The administrator has disabled public write access.
 
#70
[SOLVED] Code disappears when using JCE 3 Years, 7 Months ago  
Some editors - like JCE - interpret html tags even though you paste them into the WYSIWYG editor. So it wil also strip unwanted code (like scripts). This is very irritating, but anyway.

For that reason, Sourcerer! supports the double bracket syntax. All you need to do in your code, is (for tags) replace all '<' with '[[' and all '>' with ']]'.

So your code should look like this:
{source}[[?php include($_SERVER['DOCUMENT_ROOT']."/templates/username/includes/
form.php"); ?]]{/source}

It is no problem to use enters within the Sourcerer! tags, because it interprets all like source code. So for readability you can also do this:
{source}
  [[?php
    include($_SERVER['DOCUMENT_ROOT']."/templates/username/includes/form.php");
  ?]]
{/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.
 
Go to topPage: 1
Moderators: Peter van Westen
MaxCDN | Content Delivery Network | Accelerate your site to the max
hosting joomla
Open Source Training | Online Joomla! Training and Support