1
jlm69
Koivi and mxdirectory or xdirectory?
  • 2005/4/21 18:05

  • jlm69

  • Module Developer

  • Posts: 719

  • Since: 2002/7/19


I have installed the Koivi editor in the mxdirectory module, I can do everything it is supposed to do, but when I post it all I get is code in the description area. Is there anyway to allow html in the description section? Any help would be great. This also happens in some other modules.
Thanks in advance.

John

2
tripmon
Re: Koivi and mxdirectory or xdirectory?
  • 2005/4/21 18:37

  • tripmon

  • Module Developer

  • Posts: 462

  • Since: 2004/2/28


I really don't know enough about kovi to even post, but perhaps it has to do with how the description field is being passed.

$description $myts->makeTareaData4Save($HTTP_POST_VARS["description"]);


should be called on the desc. var prior to passing/saving the result and returned with

$myts->makeTareaData4Show($description,0)


The post var name may be different than "description in some sections. (EG> in the submit.php file the assigned POST val is "message")

Don't know if that will help one bit, but it's where I'd start if you are not already doing so.

I just realized you were talking about HTML and not xoopscodes..

You may actuall need to REMOVE the $myts->makeTareaData4Show

I'll check and post back.

3
jlm69
Re: Koivi and mxdirectory or xdirectory?
  • 2005/4/21 19:02

  • jlm69

  • Module Developer

  • Posts: 719

  • Since: 2002/7/19


I found a fix, all I did was go to singlelink.php and changed

(description,0) to (description)

and now it works.

tripmon, if you are interested, When I complete the code I can give it to you. Thanks again for the updated module.

John

4
tripmon
Re: Koivi and mxdirectory or xdirectory?
  • 2005/4/21 19:06

  • tripmon

  • Module Developer

  • Posts: 462

  • Since: 2004/2/28


right on!

Is your realestate module dependent on globals as of now?

Thanks

5
jlm69
Re: Koivi and mxdirectory or xdirectory?
  • 2005/4/21 20:05

  • jlm69

  • Module Developer

  • Posts: 719

  • Since: 2002/7/19


No, The module works with the protactor module activated. It still needs some work before it can be released. I am not a coder plus don't have alot of spare time to spend on it. I mainly work on things I need or want, I do use the module myself but not ready for distibution.

6
tzvook
Re: Koivi and mxdirectory or xdirectory?
  • 2005/5/8 0:34

  • tzvook

  • Just can't stay away

  • Posts: 875

  • Since: 2003/2/1 2


I have hard times getting the koivi into the module
since I use the site-wide solution, I put that code in modlink.php:

include XOOPS_ROOT_PATH "/class/xoopsformloader.php";


and
$TZdescription = new XoopsFormDhtmlTextArea(_MD_DESCRIPTIONC$description$description1060);
    
$xoopsTpl->assign('xoops_codes',  $TZdescription->render());


and in the template: xphns_modlink.html
<tr>
   <
td align="right" valign="top"
              <
div align="left"><b><{$lang_description}>b>div>
            td>
            <
td>
            <{
$xoops_codes}>td>
  tr>


I get the textarea+Koivi this way, with the data inside, but since I have to use
(_MD_DESCRIPTIONC$description$description1060);

to get the data to the editor, it brings it to also the too...


How would I get field name and data too?
I really don't like the way the form is handle here ... inside the template .... help is definatly needed

jlm69
I wonder how you got over the error I get about the "description" field which stays empty

7
jlm69
Re: Koivi and mxdirectory or xdirectory?
  • 2005/5/8 12:24

  • jlm69

  • Module Developer

  • Posts: 719

  • Since: 2002/7/19


to tzvook,


First in the modlink.php you also need to add

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

then you have this

_MD_DESCRIPTIONC, $description, $description, 10, 60)

it should be like this

_MD_DESCRIPTIONC, description, $description, 10, 60,'')

and if you are getting code in the textarea then look at a few posts back to remove the ,0 like in the example.


I think that should do it, let me know.

John

8
tzvook
Re: Koivi and mxdirectory or xdirectory?
  • 2005/5/8 13:08

  • tzvook

  • Just can't stay away

  • Posts: 875

  • Since: 2003/2/1 2


10x John
but it's not working, I'm using the xdir, not the MXdir (though supposed to be the same here) ...
I don't need to include this:
include XOOPS_ROOT_PATH . "/class/wysiwyg/formwysiwygtextarea.php";
because I use the "site-wide" kiovi hack, which is already in xoopsformloader.php
I tried your code:
_MD_DESCRIPTIONC, description, $description, 10, 60,'')
but it's not getting the data into the textarea, then when I type new text, it brings the old one for approval (I do the "edit" as a user)
the textarea gets it's correct name="description" so it must be something else.
I tryed b4 to put the _MD_DESCRIPTIONC, $description, $description, 10, 60)
because it brought the data into the textarea, but, yep, brought it into the "name=......." too
any ideas ?

9
jlm69
Re: Koivi and mxdirectory or xdirectory?
  • 2005/5/8 13:18

  • jlm69

  • Module Developer

  • Posts: 719

  • Since: 2002/7/19


So you are saying that if you edit as a user it works but when you go into admin to approve it, it's not right? If that is right the problem is in your admin/index.php page. with a little more info I will be able to figure it out, I remember the problem but not sure how I got around it. But it is a small fix.

10
tzvook
Re: Koivi and mxdirectory or xdirectory?
  • 2005/5/8 13:35

  • tzvook

  • Just can't stay away

  • Posts: 875

  • Since: 2003/2/1 2


Yep, the problem is 2 things:
1. if I write description (and not $description) It don't brings the record's description from the database.
2. when I try to save new content, and go to approove it as admin, it gives me the old content as a "suggested content"

And for the "0" that makes the html code apearing ... yep - I had my share of fights with it, till I found the simple answere ... but it was on another module (when you use the site-wide koivi solution, you might end up with quite a few of those

Login

Who's Online

404 user(s) are online (323 user(s) are browsing Support Forums)


Members: 0


Guests: 404


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