11
jlm69
Re: Koivi and mxdirectory or xdirectory?
  • 2005/5/8 14:02

  • jlm69

  • Module Developer

  • Posts: 719

  • Since: 2002/7/19


I notice this also, you have

$TZdescription = new XoopsFormDhtmlTextArea

it should be

new XoopsFormWysiwygTextArea

let me know if that's it.

and change $description to description

John

12
tzvook
Re: Koivi and mxdirectory or xdirectory?
  • 2005/5/8 14:11

  • tzvook

  • Just can't stay away

  • Posts: 875

  • Since: 2003/2/1 2


Hi John
I changed the descriptuion to $description, and results were like I posted b4
but, take a look in here:https://xoops.org/modules/newbb/viewtopic.php?topic_id=31122&forum=15&post_id=152138#forumpost152138
I'm using this hack, which means all I need to do in order to use kiovi, is calling the XoopsFormDhtmlTextArea, orelse I'll include it twice
or shouldn't I include XOOPS forms and just include the wysiwg?

13
jlm69
Re: Koivi and mxdirectory or xdirectory?
  • 2005/5/8 14:48

  • jlm69

  • Module Developer

  • Posts: 719

  • Since: 2002/7/19


I'm not familiar with the site wide version, as you could tell. But what you could do is add a file called

/class/xoopsformloader2.php and make it the original version of the xoopsformloader.php before you made hacks.

then call it as

include XOOPS_ROOT_PATH . "/class/xoopsformloader2.php";

then you can use it the code I did and it won't be looking for the file you already hacked.

Not probably what your looking for but it would be an easy fix.

let me know how you make out.

John

14
jlm69
Re: Koivi and mxdirectory or xdirectory?
  • 2005/5/8 15:09

  • jlm69

  • Module Developer

  • Posts: 719

  • Since: 2002/7/19


Another thought after reading the sitewide hack post.
The hack says to change render to _render so maybe if you try to change

$xoopsTpl->assign('xoops_codes', $TZdescription->render());

to

$xoopsTpl->assign('xoops_codes', $TZdescription->_render());

I have no idea if it will work but it's worth a try. If not my last post should do the trick.

15
tzvook
Re: Koivi and mxdirectory or xdirectory?
  • 2005/5/8 15:46

  • tzvook

  • Just can't stay away

  • Posts: 875

  • Since: 2003/2/1 2


the _render thing don't help too, and the solution to call the original XoopsFormDhtmlTextArea is problematic too, because the hack's changes are in /class/xoopsform/formdhtmltextarea.php ... so too many double files will be there.
I figured out a few things though: when it sends the data without the "empty description field" warnings - it's simply because the data didn't enter the field from the database in the first place (which is the reason that same record is waiting for approval @ the admin)
and when I change it back to:
XoopsFormDhtmlTextArea(_MD_DESCRIPTIONC, $description, $description, 10, 60,'');
it loads the data from the database, but don't save it like it should - due to the fact that the "NAME" of the field is not the right name, and it sends the "description with no data....

so the only weird thing is why it loads data only if it's "$description" and not "description" .....

16
tzvook
Koivi + mxdirectory + xdirectory ..... HELP !!! :-)
  • 2005/5/9 9:11

  • tzvook

  • Just can't stay away

  • Posts: 875

  • Since: 2003/2/1 2


Kinda lost it all
It seems that whatever I put instead the first "description" which has a $ sign in it, brings the value to the form field... but then of cours is not the right "name" for the field.

My logic don't work here, I certainly need pro help here (not a shrink .. though it's getting close to ... )
Tripmon ... anybody ... it's a call for help .... I must have the kiovi (or even the XOOPS dhtml editor) into there ... kinda weird to have the textarea on the template

17
tzvook
Koivi + mxdirectory + xdirectory at last a solution !!!
  • 2005/5/9 14:16

  • tzvook

  • Just can't stay away

  • Posts: 875

  • Since: 2003/2/1 2


How many times were you fighting something and you found out that the problem is not what you was fighting

I found the solution and I realy want to save sombody's time (I was tring to solve it for 3 long days !!!!

it turns out that Mr. Kiovi simply dont like fields name to be "description"
IE - don't try to use it on a field like
<textarea name="description">

so the solution in the case of the xdirectory or the mxdirectory is like this:

in the templates dir open xphns_modlink.html and replace the table row that includes the textarea to:
<tr>
   <
td align="right" valign="top"
              <
div align="left"><b><{$lang_description}></b></div>
            </
td>
            <
td>
            <{
$xoops_codes}></td>
  </
tr>


then open modlink.php in the root of xdir/mxdir

change:
// Check if Description exist
       
if ($HTTP_POST_VARS['description']=="") {
           
$eh->show("1008");
       }


to:
// Check if Description exist
       
if ($HTTP_POST_VARS['TZZdescription']=="") {
           
$eh->show("1008");
       }


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


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


then look for this:
$xoopsOption['template_main'] = 'xphns_modlink.html';
    include 
XOOPS_ROOT_PATH."/header.php";


and right after it enter a new line to call XOOPS form (which turnes to kiovi's site-wide hack)
// Tzvook hack 4 kiovi //
    
include XOOPS_ROOT_PATH "/class/xoopsformloader.php";
    
// // Tzvook hack 4 kiovi //


and the last thing ... look for this lines
$myts->htmlSpecialChars($description), 'adminlink' => $adminlink'hits' => $hits'votes' => $votestring));


and right after it put this:
// Tzvook hack 4 kiovi site-wide hack //
    
$TZdescription = new XoopsFormDhtmlTextArea(_MD_DESCRIPTIONC'TZZdescription'$description1060,'');
    
$xoopsTpl->assign('xoops_codes',  $TZdescription->render());
// end Tzvook hack 4 kiovi site-wide hack //


That's it ... now users can edit a record (suggested editing) with kiovi's help
it can of course be iplemented to sending a record too, but I'm lasy to do what I don't need to ....

foooo ........... got me tired, and my kids forgot who I am .... hate those things

John
10x for tring to solve it with me, your last PM made me give it a few more trys

18
surlung
Re: Koivi + mxdirectory + xdirectory at last a solution !!!
  • 2005/8/4 7:04

  • surlung

  • Just popping in

  • Posts: 1

  • Since: 2005/3/15


Thanks, jlm69 & tzvook

I also manage to make it work, but I am facing with one more problem. It looks like we need to update singlelink.php file to use Koivi but I have no idea how to modify the code.

Can you please kindly take a look at it and advise me where to fix?

Thanks,
surlung.

19
jlm69
Re: Koivi + mxdirectory + xdirectory at last a solution !!!
  • 2005/8/4 10:30

  • jlm69

  • Module Developer

  • Posts: 719

  • Since: 2002/7/19


surlung,

In the singlelink.php file there is only one change, it is in the readme file of my original hack. It is as follows:

All changes are commented as Koivi Editor Hack except singlelink.php the only change to it is (description,0) was changed to (description)
to allow html in the description.

It is on about line 77.

Hope that helps,

John

20
tchi59
Re: Koivi + mxdirectory + xdirectory at last a solution !!!
  • 2007/11/4 20:16

  • tchi59

  • Just popping in

  • Posts: 1

  • Since: 2007/11/4


Hello,


I use tinyeditor and mxdirectory 3.0.1, I replaced the description, 0 by description, and the html code appears forever.

An idea ?
Thanks

Login

Who's Online

187 user(s) are online (116 user(s) are browsing Support Forums)


Members: 0


Guests: 187


more...

Donat-O-Meter

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

Latest GitHub Commits