Hi and thanks for reading,
I've pushed through the posts about closing tags and using HTML 4.01 to find the suggestions at fixing the issues: the patch, the space before the closing slash, the adjustment of the doc type, and have done all of that, but still have the problem.
I have a custom tag that is there to provide an easy way for users that aren't familiar with PHP to add "modules" into a page. This is done through a custom content manager in FCK. I originally had it just source code, and it worked wonderfully, but it was requested that I add the WYSIWYG.
When that happened, the custom tags started being a little screwy. Basically, it's closing the custom tag even when the tag is already being closed by the " />". I have the RegEx in the PHP script ignore whatever is after the "opening" tag, so it's not a big deal, but it is printing that closing tag into the HTML and I'd rather it not be.
This is an example of what the tag looks like:
<module:news type="location" typeid="29" title="Very, Very Important News" limit="20" />
If the tag as is is put into the editor's "Source," it will re-format it as:
<p><module:news type="location" typeid="29" title="Very, Very Important News" limit="20"></module:news></p>
It also sometimes re-writes the tag and moves the attributes around. For instance, when I reload the page into the WYSIWYG, I often get:
<p><module:news title="Very, Very Important News" typeid="29" type="location" limit="20"></module:news></p>
If I turn off FCKConfig.ProcessHTMLEntities then I can save the file after re-formatting it and it will work correctly. But, if I load the page in the WYSIWYG again, the closing tags will come back and must be removed again.
Is this a bug, or just an acceptable annoyance? I can't be the first one to try to put XML/custom tags into a document.
Any advice would be appreciated.
Thanks in advance,
Colin
I've pushed through the posts about closing tags and using HTML 4.01 to find the suggestions at fixing the issues: the patch, the space before the closing slash, the adjustment of the doc type, and have done all of that, but still have the problem.
I have a custom tag that is there to provide an easy way for users that aren't familiar with PHP to add "modules" into a page. This is done through a custom content manager in FCK. I originally had it just source code, and it worked wonderfully, but it was requested that I add the WYSIWYG.
When that happened, the custom tags started being a little screwy. Basically, it's closing the custom tag even when the tag is already being closed by the " />". I have the RegEx in the PHP script ignore whatever is after the "opening" tag, so it's not a big deal, but it is printing that closing tag into the HTML and I'd rather it not be.
This is an example of what the tag looks like:
<module:news type="location" typeid="29" title="Very, Very Important News" limit="20" />
If the tag as is is put into the editor's "Source," it will re-format it as:
<p><module:news type="location" typeid="29" title="Very, Very Important News" limit="20"></module:news></p>
It also sometimes re-writes the tag and moves the attributes around. For instance, when I reload the page into the WYSIWYG, I often get:
<p><module:news title="Very, Very Important News" typeid="29" type="location" limit="20"></module:news></p>
If I turn off FCKConfig.ProcessHTMLEntities then I can save the file after re-formatting it and it will work correctly. But, if I load the page in the WYSIWYG again, the closing tags will come back and must be removed again.
Is this a bug, or just an acceptable annoyance? I can't be the first one to try to put XML/custom tags into a document.
Any advice would be appreciated.
Thanks in advance,
Colin
Re: Custom Tags and Closing Them
I use the following approach in my own CMS I wrote:
<PHP_INCLUDE>path/to/myscript.php</PHP_INCLUDE>
...which works fine.
You mentioned that you somehow got your custom tags into the WYSIWYG. I'd REALLY like to know how you did that. I'm getting many requests from my customers for that.
Many thanks,
Mark.
mark@virtualcreations.com.au
Re: Custom Tags and Closing Them
It's more a problem of getting the information out. The input is going to take whatever you want it to.
You have to use output buffering for it. ob_start() in your auto_prepend file and then get the buffer (ob_get_contents()) and close it (ob_end_clean()). From there, you can run a regular expression to pull the information from the tag and then remove it from the buffer, before printing the buffer out as regular content.
Seriously, this has never come up before, or is the question being ignored?
If it is an actual problem, could someone submit a bug report for it since I don't seem to be able to through the Source Forge site?