PEAK XOOPS - How to change PiCal Editor in englishin japanese

How to change PiCal Editor

  • You cannot open a new topic into this forum
  • Guests cannot post into this forum
Previous post - Next post | Parent - Children.1 | Posted on 2005/1/26 9:59
Rhomal  企霹始   Posts: 4
If I wanted to insert the koivi editor into PiCal what must I do?

The bottom line is the editor built into PiCal while nice is not a WYSIWYG and thats what I need for the interal website at work.

Any help appreciated, thank you.


Votes:35 Average:5.71
Previous post - Next post | Parent - Children.1 | Posted on 2005/3/3 0:34
divadodue  企霹始   Posts: 7
Well... I don't know how to do that, but if someone has the answer, please tell me!

I'd actually like to standardize on Koivi as a rich text editor for my whole site.

As Rhomal said, any help is very much appreciated
Votes:48 Average:5.42
Previous post - Next post | Parent - Children.1 .2 .3 | Posted on 2005/3/3 5:51
GIJOE  黎扦烦菱   Posts: 4110
Do you know XSS?

Allowing HTML means Allowing XSS.

Thus, Modules allowing WYSIWYG eidtor for everybody has XSS vulnerablity.

piCal supports bbcode.
bbcode is a secure way to decorate contents for everyone.

It's enough I believe.

And you should know my first priority is the SECURITY.
Have you installed Protector?
Votes:23 Average:6.96
Previous post - Next post | Parent - No child | Posted on 2005/3/3 9:24
divadodue  企霹始   Posts: 7
Nope, I didn't know what XSS was... And I haven't installed Protector. What does it do and where can I get it?

My point is that I would like to make things easy for relatively computer-illiterate users. Bbcode, I'm afraid, is still too unfriendly for them. I know my users, they just wouldn't know how to add malicious code into an event... And non-registered users are not allowed to post anything on my site.

Really, no way?
Votes:35 Average:6.29
Previous post - Next post | Parent - Children.1 | Posted on 2005/3/5 1:10
Rhomal  企霹始   Posts: 4
First this is a internal website I need this for, and second, isnt this really my issue if I get hacked? I am not asking YOU to replace the editor in the module, just tell me how to do it for my own uses.

And no, the current editor is VERY limited and difficult for those that need to do advanced formatting (cells) in the blocks that are not very computer savvy. A MS word type editor is what my clients need. Koivi fits the bill.

So if you could explain how to replace the editor I would appreciate it, thank you.
Votes:23 Average:7.83
Previous post - Next post | Parent - Children.1 .2 | Posted on 2005/3/6 9:30
emagin  企霹始   Posts: 2
I agree with Rhomal.

Security is the concern of the site administrator.
Site usability for your users is the primary concern.

This could be for intranets, behind registration only, etc. a million uses where security is of no consequence whatsoever.

Allow for options, make it usable, make it powerful.

See http://zonatim.com/ for the wiki wiwimod module, it has options for all the editors to be used, "at your own risk" which is fantastic.
Votes:30 Average:5.67
Previous post - Next post | Parent - No child | Posted on 2005/3/10 1:56
Rhomal  企霹始   Posts: 4
*Waits patiently for a reply*
Votes:24 Average:7.92
Previous post - Next post | Parent - Children.1 .2 | Posted on 2005/3/12 4:29
Rhomal  企霹始   Posts: 4
Well since were not apparently going to get any help here I went to the man himself. Sam who wrote Koivi, he informed me how to hack Pical to insert his editor. Here are the directions:

This is the steps for adding koivi editor to the 怕dd and 牌dit Calendar event:

Open modules/pical/class/pical.php

About line 1938 you猛l find this line:

xoopsCodeTarea("description_text",50,6);

Replace by:

include_once XOOPS_ROOT_PATH."/class/xoopsformloader.php";

include_once XOOPS_ROOT_PATH . "/class/wysiwyg/formwysiwygtextarea.php";

$wysiwyg_text_area= new XoopsFormWysiwygTextArea( '', 'description_text', $description, '100%', '400px');

echo $wysiwyg_text_area->render();
Votes:33 Average:7.58
Previous post - Next post | Parent - Children.1 | Posted on 2006/4/20 4:27
slyss79  话霹烦菱   Posts: 143
hi GIJOE i have 2 questions:

1) i have installed in my site koivi editor... but only me (admin) use it in ams articles: it's however dangerous for Xss ? users don't can use it....

2) in protector i have 'allow_url_fopen' : on because i can't modify php.ini (or i can ?) .... it's dangerous for you

thanks a lot....
Votes:22 Average:9.09
Previous post - Next post | Parent - No child | Posted on 2006/4/20 5:23
GIJOE  黎扦烦菱   Posts: 4110
hi slyss.

Please post each questions into appropriate forums separately.

Quote:
1) i have installed in my site koivi editor... but only me (admin) use it in ams articles: it's however dangerous for Xss ? users don't can use it....
I've found XSS in koivi in 2.2.3.
Though I don't know the latest koivi...

Quote:
2) in protector i have 'allow_url_fopen' : on because i can't modify php.ini (or i can ?) .... it's dangerous for you

allow_url_fopen does NOT make your XOOPS danger right now.
But some modules still have such a vulnerability.
(eg. The "remote include" vulnerability was found in XF-Section a month ago)
Votes:15 Average:8.67

none Re: How to change PiCal Editor

msg# 1.1.1.2.1.2.1
Previous post - Next post | Parent - No child | Posted on 2009/2/17 20:48 | Last modified
zorro87  惧霹始 From: France  Posts: 32
Hi!

Thank you!


In the same way, I∏m trying to add Tiny Editor to Pical (Xoops 2.3.x)

Here is what I changed to piCal/class/piCal.php

Line 1557 & 1814
//		$description = $this->textarea_sanitizer_for_show( $event->description ) ;
      $description = $event->description;


line 2084:

//		xoopsCodeTarea("description_text",50,6);
 include_once XOOPS_ROOT_PATH."/class/xoopsformloader.php";
 include_once XOOPS_ROOT_PATH . "/class/xoopseditor/tinyeditor/formtinyeditortextarea.php";
 $wysiwyg_text_area= new XoopsFormTinyeditorTextArea( '', 'description_text', $description, '100%', '400px');
 echo $wysiwyg_text_area->render();

It works: Description area appears now with Tiny Editor.
But the text is not saved.

What did I miss?

Thank you for your help!

@+
Z
Votes:15 Average:8.67

none Re: piCal with FCKeditor HOWTO

msg# 1.1.1.2.1.2.2
Previous post - Next post | Parent - Children.1 .2 | Posted on 2009/5/1 0:32
info  办霹始   Posts: 16
XSS issues aside, I wanted to be able to integrate FCKeditor into piCal. Here is how to get FCKeditor running for piCal. I used XOOPS 2.3.3, with FCKeditor 2.6.3 and piCal 0.92, but you can likely make this work with other versions.

The implementation requires two changes -- one for editing (piCal.php) and one for displaying (piCal_xoops.php), both in the module class directory.

In class/piCal.php around lines 2079-2084, find these:

ob_start();
$GLOBALS["description_text"] = $description;
xoopsCodeTarea("description_text",50,6);
$description_textarea = ob_get_contents();
ob_end_clean();

replace with:

if ( is_readable(XOOPS_ROOT_PATH . "/class/xoopseditor/fckeditor/formfckeditor.php") ) {
include_once(XOOPS_ROOT_PATH . "/class/xoopseditor/fckeditor/formfckeditor.php");
$editor_configs = array();
$editor_configs["name"] = "description_text";
$editor_configs["value"] = $description;
$editor_configs["rows"] = 35;
$editor_configs["cols"] = 60;
$editor_configs["width"] = "100%";
$editor_configs["height"] = "400px";
$editor = new XoopsFormFckeditor($editor_configs,true);
$description_textarea = $editor->render();
} else {
include_once( XOOPS_ROOT_PATH . "/include/xoopscodes.php" ) ;
ob_start();
$GLOBALS["description_text"] = $description;
xoopsCodeTarea("description_text",50,6);
$description_textarea = ob_get_contents();
ob_end_clean();
}

In class/piCal_xoops.php, around line 15 (in function textarea_sanitizer_for_show), find:

return $myts->displayTarea($data,0,1,1,1,1);

replace with:

if ( is_readable(XOOPS_ROOT_PATH . "/class/xoopseditor/fckeditor/formfckeditor.php") ) {
return $myts->displayTarea($data,1,1,1,1,0);
} else {
return $myts->displayTarea($data,0,1,1,1,1);
}

Note: you may need to edit the location of fckeditor depending on which version you have implemented, and you may want to change the size of the text box using the $editor_configs variables passed.

Many thanks for the Koivi instructions (from 2005) as they helped me get going for this. This solution "fails gracefully" in case you don't have FCKeditor installed or linked to the right FCKeditor file location.
Votes:17 Average:8.82

none Re: piCal with FCKeditor HOWTO

msg# 1.1.1.2.1.2.2.1
Previous post - Next post | Parent - Children.1 | Posted on 2009/5/3 6:38
GIJOE  黎扦烦菱   Posts: 4110
Though I don't recommend such a hack, enable postcommon_post_htmlpurify4guest.php of Protector at least before you do the hack.
Votes:14 Average:10.00

none Re: piCal with FCKeditor HOWTO

msg# 1.1.1.2.1.2.2.1.1
Previous post - Next post | Parent - No child | Posted on 2009/5/6 23:40
info  办霹始   Posts: 16
It's a good point. However, that filter is only for the anonymous user. Might need an update for registered users, too (and or some other management of users). I'm working on a modification for FCKeditor to allow different FCKeditor capabilities depending upon who they are (i.e., disabling uploads of various files, etc.)

BTW, I couldn't find a HOWTO on all the various filters in Protector, what they do, how to install, use, and configure them. Does that documentation exist?

I'd also like to see you you got rid of the "thanks for your submission/thanks for logging in" pages (something some peeps in charge of sites want to see go away).

Thanks for your excellent work and contributions!

BTW, how come you don't have notifications running on your site? It'd be nice to have instead of having to manually monitor posts/etc. Just asking. Is it a security issue?
Votes:14 Average:9.29

none Re: piCal with FCKeditor HOWTO

msg# 1.1.1.2.1.2.2.2
Previous post - Next post | Parent - Children.1 | Posted on 2009/5/15 2:23
zorro87  惧霹始 From: France  Posts: 32
@info
Thank you for "piCal with FCKeditor HOWTO"
It is perfect!


But if you have already seized a large number of events they are formatted in BBCode. How, then continue to view them properly without having to reenter all in HTML?

@+
Z
Votes:13 Average:10.00

none Re: piCal with FCKeditor HOWTO

msg# 1.1.1.2.1.2.2.2.1
Previous post - Next post | Parent - Children.1 | Posted on 2009/5/15 21:34
info  办霹始   Posts: 16
Tough question, really. I didn't do anything with the old bbcode ones. They still work, too. So, you could leave them alone and change them when they come up, or you could write some custom code into the module that determines which one to use. The bbcode text sanitizer to HTML option might be able to be employed to convert them all. But, I don't have an easy answer for you. That would be good for legacy users, of course. At this point, I'm not dealing with my legacy installations, but I have one of those coming up and will have to solve it, too. But not for another month or two.

Good luck and let us know if you come up with an answer.
Votes:13 Average:10.00

none Re: piCal with FCKeditor HOWTO

msg# 1.1.1.2.1.2.2.2.1.1
Previous post - Next post | Parent - Children.1 | Posted on 2009/5/16 1:07
zorro87  惧霹始 From: France  Posts: 32
Hi!
Thank you for your quick answer.


I think I will manually convert events.

For that I∏ve found a BBCode to HTML Converter tool here.



@+
Z
Votes:9 Average:10.00

none Re: piCal with FCKeditor HOWTO

msg# 1.1.1.2.1.2.2.2.1.1.1
Previous post - Next post | Parent - Children.1 | Posted on 2011/5/31 19:07
zorro87  惧霹始 From: France  Posts: 32
Hi!

It coulld be great to have a check box to select
bbcode or html for the text zone.

How to make it?


@+
Z
Votes:2 Average:10.00

none Re: Re: piCal with FCKeditor HOWTO

msg# 1.1.1.2.1.2.2.2.1.1.1.1
Previous post - Next post | Parent - No child | Posted on 2011/11/28 21:54
zorro87  惧霹始 From: France  Posts: 32
Hi,

It is an UP!

I would like
- to keep olds events in bbcode.
- to fill new events in HTML

How to make it?

@+
Z
Votes:1 Average:10.00

  Advanced search


Login
Username or e-mail:

Password:

Remember Me

Lost Password?

Register now!