21
assniok
Re: could you help me with koivi editor ?
  • 2004/12/9 7:55

  • assniok

  • Just popping in

  • Posts: 15

  • Since: 2002/9/13


hi

i have an other problem with koivi editor

i have modified wfsection for using koivi with this module while i have a syntaxe problem...

you can find an example on this page of wfsection in comments, i have this

[b]<p>[/b]salut a tous,[b]<br />p><p><br />[/b]


have you an idea ?

thanks for advance for your help

@+

22
samuels
Re: could you help me with koivi editor ?
  • 2004/12/9 10:30

  • samuels

  • Quite a regular

  • Posts: 249

  • Since: 2003/10/30


This is because only admins have privileges to check "Enable HTML code" in comments.
If you want to change it you must edit xoops/include/comment_form.php

In line 79,80,81 you'll see the following code:
$html_checkbox = new XoopsFormCheckBox('''dohtml'$dohtml);
$html_checkbox->addOption(1_CM_DOHTML);
$option_tray->addElement($html_checkbox);


You need to move it out of the if clause, for example before line 85:
$smiley_checkbox = new XoopsFormCheckBox('''dosmiley'$dosmiley);



The resultant code will be like this:
}
}
$html_checkbox = new XoopsFormCheckBox('''dohtml'$dohtml);
$html_checkbox->addOption(1_CM_DOHTML);
$option_tray->addElement($html_checkbox);
$smiley_checkbox = new XoopsFormCheckBox('''dosmiley'$dosmiley);
$smiley_checkbox->addOption(1_CM_DOSMILEY);
...


But remember, you don't need to use the default toolbar with all buttons everywhere.
You can build your own or use the 'small' one:
$wysiwyg_text_area= new XoopsFormWysiwygTextArea_MD_CONTENTC'content'$value'100%''400px','small');

23
russtik
Re: could you help me with koivi editor ?
  • 2004/12/9 11:37

  • russtik

  • Just popping in

  • Posts: 70

  • Since: 2004/8/13


Thanks noisia !

That works so far as the wysiwyg appears when I try and edit an existing news item, but not if I want to submit a new news article.

Is this the same situation with you? Ideally I'd like to replace the DHTML editor sitewide with the Koivi wysiwyg.


24
assniok
Re: could you help me with koivi editor ?
  • 2004/12/9 15:37

  • assniok

  • Just popping in

  • Posts: 15

  • Since: 2002/9/13


hi,

i have an other question

I would like use koivi with xoopsfaq but i don't understand how to practice modification because i think that it need to modify contentform.php but it seems no working

have you an idea ?

@+

25
samuels
Re: could you help me with koivi editor ?
  • 2004/12/9 19:58

  • samuels

  • Quite a regular

  • Posts: 249

  • Since: 2003/10/30


This module is a little bit different cause it doesn't use xoopsform, but no problem just open:

xoopsfaq/admin/contentsform.php.

Comment lines 41 and 42:
//xoopsCodeTarea("contents_contents", 60, 20);
//xoopsSmilies("contents_contents");


And add the following:
include_once XOOPS_ROOT_PATH."/include/xoopscodes.php";
include 
XOOPS_ROOT_PATH "/class/xoopsformloader.php";
include 
XOOPS_ROOT_PATH "/class/wysiwyg/formwysiwygtextarea.php";
$wysiwyg_text_area= new XoopsFormWysiwygTextArea'''contents_contents'$contents_contents'100%''400px','');
echo 
$wysiwyg_text_area->render();


All done

26
silver74
Re: could you help me with koivi editor ?
  • 2004/12/11 9:35

  • silver74

  • Just popping in

  • Posts: 21

  • Since: 2004/4/2 2


Hello,

i would like to add koivi in mydownloads pro,i have changed some lines.But i don't now why dos it works.Can you help me please.

Quote:
include_once XOOPS_ROOT_PATH . "/class/xoopstree.php" ;
include XOOPS_ROOT_PATH . "/class/xoopsformloader.php";
include_once XOOPS_ROOT_PATH."/class/wysiwyg/formwysiwygtextarea.php";$sform = new XoopsThemeForm( _MD_SUBMITCATHEAD, "storyform", xoops_getenv( 'PHP_SELF' ) );

$sform->addElement( new XoopsFormText( _MD_FILETITLE, 'title', 50, 80 ), true );

$mytree = new XoopsTree( $xoopsDB->prefix( "mydownloads_cat " ), "cid ", "pid" );

$sform->addElement( new XoopsFormText( _MD_DLURL, 'URL', 50, 80, "http://" ), false );
//$sform->addElement( new XoopsFormFile( _MD_DLURL, 'imgfile', 2000000 ), false );

ob_start();
//echo "";
echo "";
echo "";
//echo "";
$sform->addElement( new XoopsFormLabel( _MD_CATEGORYC, ob_get_contents() ) );
ob_end_clean();


ob_start();
$sform->addElement( new XoopsFormHidden( 'cid', '' ) );
$mytree->makeMySelBox( "title ", "cid" );
$sform->addElement( new XoopsFormLabel( _MD_CATEGORYC, ob_get_contents() ) );
ob_end_clean();



$sform->addElement( new XoopsFormText( _MD_HOMEPAGEC, 'homepage', 50, 80 ), false );
$sform->addElement( new XoopsFormText( _MD_VERSIONC, 'version', 10, 20 ), false );
$sform->addElement( new XoopsFormText( _MD_FILESIZEC, 'size', 10, 20 ), false );
$sform->addElement( new XoopsFormText( _MD_PLATFORMC, 'platform', 50, 80 ), false );
//$sform->addElement( new XoopsFormDhtmlTextArea( _MD_DESCRIPTION, 'message', '', 15, 60 ), true );
$sform->addElement(new XoopsFormWysiwygTextArea( _AM_EXTEXT, 'bodytext', $bodytext, '100%', '400px',''), true);
$option_tray = new XoopsFormElementTray( _MD_OPTIONS, '
' );

$notify_checkbox = new XoopsFormCheckBox( '', 'notifypub' );
$notify_checkbox->addOption( 1, _MD_NOTIFYAPPROVE );
$option_tray->addElement( $notify_checkbox );

$sform->addElement( $option_tray );
$button_tray = new XoopsFormElementTray( '', '' );
$button_tray->addElement( new XoopsFormButton( '', 'submit', _SUBMIT, 'submit' ) );
$sform->addElement( $button_tray );
$sform->display();

?>

27
noisia
Re: could you help me with koivi editor ?
  • 2004/12/11 12:23

  • noisia

  • Not too shy to talk

  • Posts: 123

  • Since: 2004/8/24


Hi All,

It seems that many of us are struggling over and over again to get the Koivi editor working in the various modules.

Wouldn't it be better if all the koivi patches for the various modules were deposited somewhere, so we just download and overwrite the patches for the various modules?

I don't know where is a good place to deposit these kind of patches, but perhaps someone can advice how to organise this

28
samuels
Re: could you help me with koivi editor ?
  • 2004/12/11 13:27

  • samuels

  • Quite a regular

  • Posts: 249

  • Since: 2003/10/30


I'm trying to collect all patches here and put them into Koivi docs.
But remember, in newer versions of XOOPS users will be able to change the default dhtml editor for other one (not only koivi, but spaw, htmlarea, fckeditor e.t.c), without hacking any file.

The problem here is that a lot of people need this functions now, including me.

So, this hacks are only a temporal solution.

@silver74
You have commented this line

//$sform->addElement( new XoopsFormDhtmlTextArea( _MD_DESCRIPTION, 'message', '', 15, 60 ), true );


So the koivi editor must be call as:
$sform->addElement(new XoopsFormWysiwygTextArea_MD_DESCRIPTION'message',' ''100%''400px',''), true);


The way to call koivi editor is really similar to XoopsFormDhtmlArea.

29
morris
Re: could you help me with koivi editor ?
  • 2004/12/12 21:17

  • morris

  • Just popping in

  • Posts: 54

  • Since: 2003/9/25


Hi Samuels,

First, thank you for this great editor. I used to use spaw but this one is more what I need. (at least now I can say goodbey to IE!)

I have one question: Where can I change the default font and fontsize?

Morris.

30
samuels
Re: could you help me with koivi editor ?
  • 2004/12/13 11:18

  • samuels

  • Quite a regular

  • Posts: 249

  • Since: 2003/10/30


By now there is not css file attached to the editor's iframe, so you can't change the default fontsize and font.
The browser applies their default values.

It's like making a table with border 1, in iexplore and gecko it's different because they apply their default borders.

In next version you'll be able to attach a css file to the editor's iframe, just wait about a week.

Login

Who's Online

328 user(s) are online (296 user(s) are browsing Support Forums)


Members: 0


Guests: 328


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits