DirectPHP - FAQs, Troubleshoot and Tips & Techniques |
| Written by kksou | ||
| Thursday, 03 September 2009 | ||
|
This is the FAQ for the DirectPHP plugin. Troubleshooting
A: Did you enable the plugin? Go to Plugin Manager and make sure the plugin is enabled. A: Have you applied the following tip: How to enter HTML tags, javascript and PHP codes in Joomla 1.5.8? A: Do not use the "source button" in TinyMCE. Just type the codes right inside TinyMCE in the default WYSIWIG (what-you-see-is-what-you-get) mode. Plugin ConflictsIf you've tried all of the above, and it still does not work, it might be because of conflicts with some other plugins or modules. To ascertain this,
|
||
| < Prev |
|---|





Comments
Are you saying that the PHP codes are working, but not the HTML and javascript?
Regards,
/kksou
If it's standard PHP, it should work.
What is the code that you are trying to run? What is the error messages that you see on the screen?
Regards,
/kksou
this is a great tool, which works really good for me! I just have problems getting javascript working.
The function need to be within and echo"", correct? Otherwise it displays the javasscript code, but doesn't run.
How do I need to place the javascript code correctly in order to be recognized as such by phpdirect? And how can I call the functions?
Thanks a lot!
Sorry, it dropped the php tags in the post. I meant:
The function needs to be within and php start and end tags and 'echo " "', correct?
All the events have been entered in the calendar and are visible on the website, but i can't get the php file to work in html. Am i using the right one, if so what am i doing wrong?
I installed DirectPHP on my Joomla! 1.5.22 site and tried it. Unfortunately it doesn't work. When I save the article, the is converted to ?-->. I activated the plugin and checked the TinyMCE settings to match the advised settings but still it doesn't work. How can I resolve this?
I installed DirectPHP on my Joomla! 1.5.22 site and tried it. Unfortunately it doesn't work. When I save the article, the "" is converted to "?-->". I activated the plugin and checked the TinyMCE settings to match the advised settings but still it doesn't work. How can I resolve this?
Hope anyone can help
Hope my question is clear.....
please can anybody help me
I want to add some php code to new module but after adding the php code I see only THE CODE itself. What am i doing wrong?
Based on your description, looks like you've only installed the DirectPHP module.
For the module to work, it needs the DirectPHP plugin available here: http://www.kksou.com/php-gtk2/Joomla/DirectPHP-plugin.php
Please install the plugin and test the plugin by creating a new article and entering the PHP code in the article. (please follow the instructions as outlined in the article where you download the plugin).
Once the plugin is working correctly, you can then test your code in the module.
Please give it a try one more time and let me know if it works, ok?
Regards,
/kksou
I am also experiencing this problem. Is there a workaround?
You can solve this by selecting "No Editor" in the Joomla General settings. Put the php-code in the article and save the article. Afterwards you can select TinyMCE again. But if you edit the page with php-code you must select "No Editor" again.
I edit my articles at the backend, and for most PHP code, if I embed it in an article and press save, it makes the backend crash. However, the article was saved correctly: it displays on the web and the and the embedded PHP works right.
I get the feeling that the process of saving the article is attempting to execute the embedded PHP snippets at that very moment, instead of just saving them as HTML or text. Could this be happening?
If it helps, I am using editor CodeMirror (code only, no WYSIWYG).
As a test, can you switch back to the default editor that comes with standard Joomla installation and see if it's the same problem.
This will allow you to see if it's just CodeMirror giving the problem.
Does CodeMirror has a forum? If yes, maybe you can post the question there. Maybe there are already some solutions for that.
Regards,
/kksou
What happens is this:
- I copy the text to the input box
- I press save
- The page becomes blank
- I can still press "back" on the browser, and I get to continue working at the backend
- If I go to the web and see the article, it displays and its embedded PHP worked as expected.
If you need any more details, feel free to ask (maybe through email?)
Please do one more test:
1) Uninstall DirectPHP
2) Enter some PHP codes in editor
3) Click save
Does it give any error?
If yes, it means there's nothing to do with DirectPHP. It's the editor problem.
Regards,
/kksou
It seems it only happens when DirectPHP is active.
At the beginning of onContentPrepar e function I have added the following 2 lines:
if( !JFactory::getA pplication()->isSite() )
return true;
This restricts PHP code evaluation to the site (and not the backend). So it seems that my intuition was right here: PHP was getting evaluated when saving the article! Hope you can fix it for next versions. And thanks for your help.
www.knowledgeexplained.com
Thanks much for sharing this!
It's strange, because no other users have encountered this before. You can try this on a standard Joomla template. Don't think by default the editor will run the plugins. DirectPHP is a content plugin. It should run only with content articles.
In any case, this is still useful knowledge to know. It will benefit other users if they encounter similar situation.
Thanks and Regards,
/kksou
But I may be wrong, of course. Just letting you know my thoughts on the crash.
RSS feed for comments to this post