WYSIWYG editor also in Add FAQ page for non logged users
Moderator: Thorsten
Re: WYSIWYG editor also in Add FAQ page for non logged users
Hi,
Zend_Filter uses the same code like out filter class.
bye
Thorsten
Zend_Filter uses the same code like out filter class.
bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
amazon.de Wishlist
-
- Posts: 5
- Joined: Wed Dec 01, 2010 6:11 pm
Re: WYSIWYG editor also in Add FAQ page for non logged users
Hi,
I need the WYSIWYG editor in the front for all users logged in and not, this site is not open for public access, so security is not an issue.
I have setup phpMyFAQ 2.7.0 and like it very much, I can not find save.php to make changes.. Can anyone help plz ?
Thanks
I need the WYSIWYG editor in the front for all users logged in and not, this site is not open for public access, so security is not an issue.
I have setup phpMyFAQ 2.7.0 and like it very much, I can not find save.php to make changes.. Can anyone help plz ?
Thanks
Re: WYSIWYG editor also in Add FAQ page for non logged users
Hi,
you can add the TinyMCE component in add.tpl
bye
Thorsten
you can add the TinyMCE component in add.tpl
bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
amazon.de Wishlist
Re: WYSIWYG editor also in Add FAQ page for non logged users
Thanks for the reply Thorsten, but I need more help... Anyone ?
Re: WYSIWYG editor also in Add FAQ page for non logged users
Hi,
just take a look at the HTML code in the admin backend, you can use the same code in the frontend.
bye
Thorsten
just take a look at the HTML code in the admin backend, you can use the same code in the frontend.
bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
amazon.de Wishlist
Re: WYSIWYG editor also in Add FAQ page for non logged users
I was using this solution: http://goinggnu.wordpress.com/2010/12/0 ... -phpmyfaq/
and everything was working fine on phpMyFAQ 2.7.1. But now I updated to phpMyFAQ 2.7.3 and made same changes:
in ajaxservice.php changed
$answer = PMF_Filter::filterInput(INPUT_POST, 'answer', FILTER_SANITIZE_STRIPPED) to FILTER_UNSAFE_RAW
in \template\default\add.tpl added <!-- tinyMCE --> section (from last step of http://goinggnu.wordpress.com/2010/12/0 ... -phpmyfaq/]) to the end of file with
elements : "faqcontent" changed to "answer".
Problem is that every FAQ article created from public homepage is saved with empty content - only caption is saved, anything written in wysiwyg window of tinymce is lost.
Can anybody please tell me why it is not working and how to fix it?
and everything was working fine on phpMyFAQ 2.7.1. But now I updated to phpMyFAQ 2.7.3 and made same changes:
in ajaxservice.php changed
$answer = PMF_Filter::filterInput(INPUT_POST, 'answer', FILTER_SANITIZE_STRIPPED) to FILTER_UNSAFE_RAW
in \template\default\add.tpl added <!-- tinyMCE --> section (from last step of http://goinggnu.wordpress.com/2010/12/0 ... -phpmyfaq/]) to the end of file with
elements : "faqcontent" changed to "answer".
Problem is that every FAQ article created from public homepage is saved with empty content - only caption is saved, anything written in wysiwyg window of tinymce is lost.
Can anybody please tell me why it is not working and how to fix it?
Re: WYSIWYG editor also in Add FAQ page for non logged users
I updated to phpMyFAQ 2.7.4 and again followed all steps from
http://goinggnu.wordpress.com/2010/12/0 ... -phpmyfaq/
and I am still unable to get wysiwyg working for non logged users.
What I have found out during many attempts -
I can see and use whole tinyMCE interface on public site even for non logged users, I can write new faq and click on submit, then there is message with red background "Required fields are your name, your email address, category, question, your Record and, when requested, the Captcha code!" which makes no sense, because I have all required fields filled, and when I click submit again new record is stored sucesfully. Why do I have to click "submit" button twice?
I think that when I click submit for the first time, there is no text in "answer" field even though I can see text written in tinyMCE window. Then, after first submit attempt, content of "answer" is correctly handled and so second "submit" works well.
Another problem (connected with this) is that I need to use predefined text in "answer" window of tinyMCE, so I am adding my text to add.tpl file
with this modification, when I go to public "Add FAQ" I can see tinyMCE window with predefined text, add any text to it and then click submit - new record is stored (and I am not required to click "submit" twice), but it contains ONLY my predefined text from add.tpl, NOT my added text. I think that the problem is that when first clicking submit, there is in fact only predefined text - which was empty before I defined my own predefined text, so it made error and required seccond "submit", but now it is happy with just my predefined text so it submits and all my freshly added text is ignored.
Again, please, could anybody help me with this? I am willing to do any experiments.
As a side-note, I really cant see the point about not creating administrator choice to turn on WYSIWYG for public "Add FAQ". If it is about security...you are basically forcing me to either make everybody administrator (to let them make FAQ records in admin interface) or to make custom modifications from some guides found on google, where is security in any of these???
http://goinggnu.wordpress.com/2010/12/0 ... -phpmyfaq/
and I am still unable to get wysiwyg working for non logged users.
What I have found out during many attempts -
I can see and use whole tinyMCE interface on public site even for non logged users, I can write new faq and click on submit, then there is message with red background "Required fields are your name, your email address, category, question, your Record and, when requested, the Captcha code!" which makes no sense, because I have all required fields filled, and when I click submit again new record is stored sucesfully. Why do I have to click "submit" button twice?
I think that when I click submit for the first time, there is no text in "answer" field even though I can see text written in tinyMCE window. Then, after first submit attempt, content of "answer" is correctly handled and so second "submit" works well.
Another problem (connected with this) is that I need to use predefined text in "answer" window of tinyMCE, so I am adding my text to add.tpl file
Code: Select all
<label for="answer">{msgNewContentArticle}</label>
<textarea cols="37" rows="10" name="answer" id="answer" required="required" />My Custom Predefined Text</textarea>
Again, please, could anybody help me with this? I am willing to do any experiments.
As a side-note, I really cant see the point about not creating administrator choice to turn on WYSIWYG for public "Add FAQ". If it is about security...you are basically forcing me to either make everybody administrator (to let them make FAQ records in admin interface) or to make custom modifications from some guides found on google, where is security in any of these???
Re: WYSIWYG editor also in Add FAQ page for non logged users
OK, more than month and no reply, thanks indeed 

Re: WYSIWYG editor also in Add FAQ page for non logged users
Hi,
it's 2 weeks, not a month. You changed the code of phpMyFAQ and don't even provide your exact changes. It's almost impossible to help you if I have no informations.
bye
Thorsten
it's 2 weeks, not a month. You changed the code of phpMyFAQ and don't even provide your exact changes. It's almost impossible to help you if I have no informations.
bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
amazon.de Wishlist
Re: WYSIWYG editor also in Add FAQ page for non logged users
My first post about my problem, in this very topic, is from Sun Feb 05, 2012, but I think it doesn't really matter how old it is. It's just lack of any interest that made me sad. I believe I had provided quite long and descriptive explanations of what I am trying to achieve and what steps I performed. Not to mention I have provided link with a guide (from this topic) which I was following as closely as possible and everything is described there as well, step by step, with pieces of code provided. I am more than happy to provide any (or all) file(s) from my PhpMyFAQ installation or to give anyone full access to web - just tell me what can I do.
Any answer would be perfect - stating that guide from http://goinggnu.wordpress.com/2010/12/0 ... -phpmyfaq/ is working for someone without problems or that it is outdated and cannot work, providing me any other means how to make public wysiwyg possible, telling my that there is some other and more correct way how to predefine parts of FAQ content, or just some hints like "you should try this..." or "problem could be with..." or "these things will newer work and we won't support it"
Thanks for your response.
Any answer would be perfect - stating that guide from http://goinggnu.wordpress.com/2010/12/0 ... -phpmyfaq/ is working for someone without problems or that it is outdated and cannot work, providing me any other means how to make public wysiwyg possible, telling my that there is some other and more correct way how to predefine parts of FAQ content, or just some hints like "you should try this..." or "problem could be with..." or "these things will newer work and we won't support it"
Thanks for your response.
Re: WYSIWYG editor also in Add FAQ page for non logged users
Hi,
I'm working on phpMyFAQ only in my free time. Your given link can't work in 2.7, we changed a lot of code compared the used 2.6 version: I would add this as a new feature for 2.8 if that's okay, a hack for 2.7 would be too much work.
bye
Thorsten
I'm working on phpMyFAQ only in my free time. Your given link can't work in 2.7, we changed a lot of code compared the used 2.6 version: I would add this as a new feature for 2.8 if that's okay, a hack for 2.7 would be too much work.
bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
amazon.de Wishlist
Re: WYSIWYG editor also in Add FAQ page for non logged users
I totally understand that this is your hobby and you are giving your precious free time to it. From my experience it is very good feeling when some spare-time project is working and helping and not only working for you but for other people as well. I think that phpMyFaq is great product and for me it only lacks these features I am seeking to somehow "hack". I would understand if you decide not to implement something, all I wanted was some response.
It would be perfect if you add these features for 2.8 version.
Just to be clear:
First thing - I want to be able to enable WYSIWYG editor for public users in "add FAQ". I understand that there are security concerns, but in my opinion there is nothing wrong about providing choice to administrator to enable such feature when he is properly warned about possible consequences. I would be OK with it as I plan to use it only in LAN for internal use only, perform frequent backups and running on VM with no other services etc...
Second thing - It would be perfect to make possible to predefine some text to FAQ content, I would use it to predefine some captions and paragraphs. I know this "document" structure cannot be enforced as user can erase it, but thats OK for me.
Thank you very much for this project and your time to respond. Looking forward for future 2.8 releases
It would be perfect if you add these features for 2.8 version.
Just to be clear:
First thing - I want to be able to enable WYSIWYG editor for public users in "add FAQ". I understand that there are security concerns, but in my opinion there is nothing wrong about providing choice to administrator to enable such feature when he is properly warned about possible consequences. I would be OK with it as I plan to use it only in LAN for internal use only, perform frequent backups and running on VM with no other services etc...
Second thing - It would be perfect to make possible to predefine some text to FAQ content, I would use it to predefine some captions and paragraphs. I know this "document" structure cannot be enforced as user can erase it, but thats OK for me.
Thank you very much for this project and your time to respond. Looking forward for future 2.8 releases

Re: WYSIWYG editor also in Add FAQ page for non logged users
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
amazon.de Wishlist