1
mikemago
koivi editor now working within AMS with 2.2.4
  • 2006/4/13 14:04

  • mikemago

  • Just popping in

  • Posts: 1

  • Since: 2006/4/13


after weeks and weeks of searching,lirking,editing,hacking and so on...
I finally got koivi editor working on AMS article module under 2.2.4

I searched lots of forums but never found a really working code, so here is mine:

file is : AMS/include/storyform.inc.php
if ($xoopsModuleConfig['editor'] == "koivi" && file_exists(XOOPS_ROOT_PATH."/class/xoopseditor/koivi/formwysiwygtextarea.php")) {
    include_once 
XOOPS_ROOT_PATH."/class/xoopseditor/koivi/formwysiwygtextarea.php";

    
$text $story->hometext("Edit");
    
$text .= $story->bodytext("Edit") != ""  "[extend]".$story->bodytext("Edit") : "";
    
$mikeform = new XoopsFormWysiwygTextArea(_AMS_NW_THESCOOP'hometext'$text'100%''200px''hiddenHometext');
    
$mikeform->setName('hometext');
    
$mikeform->setValue($text);
    
$sform->addElement($mikeformfalse);
    
//$sform->addElement(new XoopsFormWysiwygTextArea(_AMS_NW_THESCOOP, 'hometext', $story->hometext("Edit"), '100%', '200px', ''), false);
    //$sform->addElement(new XoopsFormWysiwygTextArea(_AMS_AM_EXTEXT, 'bodytext', $story->bodytext("Edit"), '100%', '200px', ''), false);
}
else {
    
$text $story->hometext("Edit");
    
$text .= $story->bodytext("Edit") != ""  "[extend]".$story->bodytext("Edit") : "";
    
$sform->addElement(new XoopsFormDhtmlTextArea(_AMS_NW_THESCOOP'hometext'$text1560'hiddenHometext'));
}


with the correct path in the starting includes and the two methods setValue and setName now i got anything to work!!!!!

Now I can write new aricles with working preview and edit old one correctly.

finally...

hope not to foind anything wrong, let me know if it works for anyone!

Login

Who's Online

357 user(s) are online (55 user(s) are browsing Support Forums)


Members: 0


Guests: 357


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