1
roh112
Re: news 1.55 and xoopseditor 1.10 hack
  • 2007/8/23 15:25

  • roh112

  • Just popping in

  • Posts: 5

  • Since: 2007/1/27


this hack is for XOOPS 2.0.16.
In case you have problems

1)Make sure you set the correct path for each editor at the include() line.
2)Open editor's class file and see what arguments you should pass to the constructor.

for example my version of koivi (/class/xoopseditor/koivi/formwysiwygtextarea.php )contains
/**
     * Constructor
     *
     * @param    array   $configs  Editor Options
     * @param    binary     $checkCompatible  true - return false on failure
     */
    
function XoopsFormWysiwygTextArea([color=00CC66]$configs[/color], $checkCompatible false)


so the line "$editor = new XoopsFormWysiwygTextArea($editor_configs);" should work.
Other versions of koivi might not use the same arguments.

Note : $editor_configs is an array of arguments defined in functions.php of news module.



2
roh112
news 1.55 and xoopseditor 1.10 hack
  • 2007/8/23 14:33

  • roh112

  • Just popping in

  • Posts: 5

  • Since: 2007/1/27


I have made a hack to use xoopseditor 1.10 package with news 1.55. //edited: is this the right section to post it? if not, apologies to the mods.

All you have to do is to locate the news_getWysiwygForm() function in modules/newsfolder/include/functions.php and edit the line for the editor you want (you can study each editor's constructor in order to see which arguments to use).

for example for FCKeditor alter
case 'fck':
            if(!
$x22) {
                if ( 
is_readable(XOOPS_ROOT_PATH '/class/fckeditor/formfckeditor.php'))    {
                    include_once(
XOOPS_ROOT_PATH '/class/fckeditor/formfckeditor.php');
                    
$editor = new XoopsFormFckeditor($caption$name$value);
                }
            } else {
                
$editor = new XoopsFormEditor($caption'fckeditor'$editor_configs);
            }
            break;

to
case 'fck':
            if(!
$x22) {
                if ( 
is_readable(XOOPS_ROOT_PATH . [color=CC3333]'/class/xoopseditor/FCKeditor/formfckeditor.php'))    {
                    include_once(
XOOPS_ROOT_PATH '/class/xoopseditor/FCKeditor/formfckeditor.php');
                    
//$editor = new XoopsFormFckeditor($caption, $name, $value);
                    
$editor = new XoopsFormFckeditor($editor_configs);[/color]
                }
            } else {
                
$editor = new XoopsFormEditor($caption'fckeditor'$editor_configs);
            }
            break;


The problem was that the default file tried to pass wrong arguments to the editor constructor, so they editor was able to load, but could not be initialized with the proper values.

I have tested koivi editor, FCKeditor and tinyeditor, under XOOPS 2.0.16. Everything went smooth.

Hope someone found that usefull.



3
roh112
Re: Koivi and WeBlog
  • 2007/5/7 11:56

  • roh112

  • Just popping in

  • Posts: 5

  • Since: 2007/1/27


Anyway, i hacked the post.php file and it seems to work.
Here it is then :

// Generate our form promatically
  
include_once XOOPS_ROOT_PATH."/class/xoopsformloader.php";
  [
color=FF0000]include_once XOOPS_ROOT_PATH."/class/wysiwyg/formwysiwygtextarea.php";[/color]
  include_once(
sprintf('%s/modules/%s/include/myformdatetime.php'XOOPS_ROOT_PATH$xoopsModule->dirname())) ;
  include_once(
sprintf('%s/modules/%s/include/myformtextdateselect.php'XOOPS_ROOT_PATH$xoopsModule->dirname())) ;
  
$blog_form = new XoopsThemeForm(_BL_POST'blogform'"post.php");
  
$blog_form->addElement(new XoopsFormHidden('user_id',$entry->getVar('user_id')));
  
$blog_form->addElement(new XoopsFormHidden('blog_id',$entry->getVar('blog_id')));
  
$blog_form->addElement($xoopsGTicket->getTicketXoopsForm__LINE__ ));
  
$blog_form->addElement(new XoopsFormLabel('',sprintf(_BL_POST_TIMEOUT$xoopsModuleConfig['GTicket_timeout'])));
  if (
$xoopsModuleConfig['minentrysize'] > 0) {
    
$blog_form->addElement(new XoopsFormLabel('',sprintf(_BL_POST_MUST_BE,
                                                         
$xoopsModuleConfig['minentrysize'])));
  }
  if( 
$xoopsModuleConfig['disable_html'] ){
    
$blog_form->addElement(new XoopsFormLabel(_BL_CAUTION_NOHTML_BL_FORBIDDEN_HTML_TAGS));
  }
  
$blog_form->addElement(new XoopsFormText(_BL_TITLE,'title',
                                           
$xoopsModuleConfig['editorwidth'],
                                           
80$entry->getVar('title''e')), true);
  
//$selbox_tray = new XoopsFromElementTray('_BL_CATEGORY', '');
  
$blog_form->addElement(new XoopsFormLabel(_BL_CATEGORY$selbox));
  [
color=009900]//$blog_form->addElement(new XoopsFormDhtmlTextArea(_BL_CONTENTS,'contents',
  //                                                  $entry->getVar('contents', 'e'),
  //                                                  $xoopsModuleConfig['editorheight'],
  //                                                  $xoopsModuleConfig['editorwidth']), true);[/color]
  
[color=FF0000]$blog_form->addElement(new XoopsFormWysiwygTextArea(_BL_CONTENTS,'contents',
                                                    
$entry->getVar('contents''e')));[/color]



4
roh112
Re: Koivi and WeBlog
  • 2007/5/6 14:06

  • roh112

  • Just popping in

  • Posts: 5

  • Since: 2007/1/27


The above link doesn't seem to work anymore. Anyone here can share this file? Thanks in advance.



5
roh112
Re: MP Manager 2.5
  • 2007/1/27 18:02

  • roh112

  • Just popping in

  • Posts: 5

  • Since: 2007/1/27


Hello all.

Really interesting module. Great work.
I had to alter the en language files and the view of some areas (mp_viewbox.html fills now my needs). I did notice a couple of things though, so here's some feedback :

1) In mp_viewbox.html template
<td align="right" class="odd"><{$lang_addcont}></td>

outputs this html:
<td align="right" class="odd"><input name='cont_userid' type='hidden' value=XXXXX><a href="javascript:;">
<
img onclick='document.prvmsg.action="contbox.php?op=envoimp";document.prvmsg.submit()' src='images/addcont.png'
 
[b][color=FF0000]title=Add this Contact[/color][/bstyle='cursor:pointer; width: 15px; height: 15px;'></a></td>


But it should be title="Add this Contact"

This resulted in "Add" as hover text instead of the full phrase "Add this contact".

Same for this line :
<td width="1%" align="right" class="odd"><{$lang_ferm}></td>


2) I got this error while testing the module, in particular when selecting the radio buttons next to my message folders.

Errordocument.getElementById("delfile"has no properties
Source File
http://mydomain/myxoopsdir/modules/mpmanager/layer.js
Line83


3) MySQL reports this warning for table "myprefix_priv_msgs"

PRIMARY and INDEX keys should not both be set for column `msg_id`
More than one INDEX key was created for column `to_userid`

Keep up the good work!




TopTop



Login

Who's Online

214 user(s) are online (130 user(s) are browsing Support Forums)


Members: 0


Guests: 214


more...

Donat-O-Meter

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

Latest GitHub Commits