Adding attachment to faq

In this board you can talk about general questions about phpMyFAQ

Moderator: Thorsten

Post Reply
burak
Posts: 23
Joined: Tue Dec 28, 2010 1:03 pm

Adding attachment to faq

Post by burak »

Hi,

I see that it is possible to edit a faq and add attachment in the administrative menu. However, is it possible to create a new faq and adding an attachment at the same time?

Thanks,
Burak
Thorsten
Posts: 15742
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Adding attachment to faq

Post by Thorsten »

Hi,

not yet, we're working on this for 2.7

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
burak
Posts: 23
Joined: Tue Dec 28, 2010 1:03 pm

Re: Adding attachment to faq

Post by burak »

Hi,

I have seen in some previous messages that it is possible to enable TinyMCE editor for non logged users.
So I tried but could not get it work.
I just exactly did the instructions in this link.
http://goinggnu.wordpress.com/2010/12/0 ... -phpmyfaq/

However, I try to add a faq and I can not see the TinyMCE editor, instead I see form names in simple editor...
Also I had disabled captcha in spam settings, could it have some cause of this error?
I am using Turkish language, could it have some cause as well?
formnames.jpg
Thanks,
Burak
You do not have the required permissions to view the files attached to this post.
Thorsten
Posts: 15742
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Adding attachment to faq

Post by Thorsten »

Hi,

it seems your patch created a parse error for our template engine. Do you get any JavaScript errors?

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
burak
Posts: 23
Joined: Tue Dec 28, 2010 1:03 pm

Re: Adding attachment to faq

Post by burak »

Hi,

There is no javascript error, only 404 object not found error when I fill those field in the picture above ....

Burak...
Thorsten
Posts: 15742
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Adding attachment to faq

Post by Thorsten »

Hi,

which 404 error do you get?

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
burak
Posts: 23
Joined: Tue Dec 28, 2010 1:03 pm

Re: Adding attachment to faq

Post by burak »

http://localhost:8888/%7BwriteSendAdress%7D

Object not found!
url not found, reference page is not actual, (http://localhost:8888/index.php%3fsid=1 ... action=add)
( I translated above message )
Error 404
localhost
01/04/11 15:45:53
Apache/2.2.17 (Win32) PHP/5.3.4
Thorsten
Posts: 15742
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Adding attachment to faq

Post by Thorsten »

Hi,

well, without seeing what you have done exactly I can't help you. Please revert these changes and try if it is working again.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
burak
Posts: 23
Joined: Tue Dec 28, 2010 1:03 pm

Re: Adding attachment to faq

Post by burak »

What I exactly did is written in the following url, in 3 steps.
http://goinggnu.wordpress.com/2010/12/0 ... -phpmyfaq/

Problem occurs after the final step; if I remove the following code it gets back to normal, but the thing is I want to be able to use TinyMCE.
There are posts , stating that people made this change and was successfully got TinyMCE for nonlogged users when adding an entry.
Why I can not get it done? Maybe a change in version or some updates incompatible with the following change?

----------------------------------------------------------------------------------------------
File template/default/add.tpl
Add the following content In the end of the file.
<!-- tinyMCE -->



<script type="text/javascript" src="admin/editor/tiny_mce.js"></script>



<script type="text/javascript">



/*<![CDATA[*/ //<!--



tinyMCE.init({



// General options



mode : "exact",



elements : "faqcontent",



width : "400",



height : "480",



theme : "advanced",



plugins : "spellchecker,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,syntaxhl,phpmyfaq",



theme_advanced_blockformats : "p,div,h1,h2,h3,h4,h5,h6,blockquote,dt,dd,code,samp",



// Theme options



theme_advanced_buttons1 : "bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|styleselect,formatselect,fontselect,fontsizeselect",



theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,code,syntaxhl,|,forecolor,backcolor",



theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|fullscreen,help",



theme_advanced_toolbar_location : "top",



theme_advanced_toolbar_align : "left",



theme_advanced_statusbar_location : "bottom",



relative_urls : false,



convert_urls : false,



remove_linebreaks : false,



use_native_selects : true,



extended_valid_elements : "code",



// Ajax-based file manager



file_browser_callback : "ajaxfilemanager",



// Drop lists for link/image/media/template dialogs



template_external_list_url : "js/template_list.js"



});



function ajaxfilemanager(field_name, url, type, win)



{



var ajaxfilemanagerurl = "admin/editor/plugins/ajaxfilemanager/ajaxfilemanager.php";



switch (type) {



case "image":



case "media":



case "flash":



case "file":



break;



default:



return false;



}



tinyMCE.activeEditor.windowManager.open({



url : "admin/editor/plugins/ajaxfilemanager/ajaxfilemanager.php",



width : 782,



height : 440,



inline : "yes",



close_previous : "no"



},{



window : win,



input : field_name



});



}



// --> /*]]>*/



</script>



<!-- /tinyMCE -->


-----------------------------------------------------------------------------------------------------------------------
Thorsten
Posts: 15742
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Adding attachment to faq

Post by Thorsten »

Hi,

this code is not from us and it seems like it breaks the rendering of the templates. Maybe you should outsource the JavaScript code.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
burak
Posts: 23
Joined: Tue Dec 28, 2010 1:03 pm

Re: Adding attachment to faq

Post by burak »

Well I did it, it was a typing mistake in default add.tpl , it works now !

However, there is one small problem :) I type everything for the faq, when I click submit, I receive the message stating that I need to enter necessary fields, email address, category and subject and faq.
I do fill all those, but being detected as empty...

Is there anyway to set everything optional while adding a new entry? name, email, etc etc...
Post Reply