Announcement

Do not use the forums to submit bug reports, feature requests or patches, submit a New Ticket instead.

#26 2007-10-18 03:35:45

kroesss
Xinha Community Member
Registered: 2007-10-15
Posts: 16

Re: new plugin: SaveSubmit or The Advanced Save Button

Hi ray,

Thanks for the quick reply! Where do I put this code? In the xinhacore-file or in the config-file?

Offline

#27 2007-10-18 04:21:21

ray
Xinha Administrator
From: Germany
Registered: 2005-03-23
Posts: 521
Website

Re: new plugin: SaveSubmit or The Advanced Save Button

put it in the config below this line

 xinha_config = xinha_config ? xinha_config() : new Xinha.Config();

Offline

#28 2007-10-18 13:22:01

kroesss
Xinha Community Member
Registered: 2007-10-15
Posts: 16

Re: new plugin: SaveSubmit or The Advanced Save Button

That worked like a charm, exactly what I wanted!

Thanks!

Offline

#29 2008-04-20 10:34:54

PapaBearPW
New member
From: Germany
Registered: 2008-04-20
Posts: 4
Website

Re: new plugin: SaveSubmit or The Advanced Save Button

Hi,

Sorry to bump and old thread, but I figured it was better than starting a new one on the same subject.

Perhaps I'm just a bit thick-skulled, but, I still can't figure out how to utilize this plug-in. I have uploaded Xinha (Release: 0.95 RC2 (Mo, 04 Feb 2008 18:28:42 +0100)) and tested it with IE 7 and FF 2.0.0.14. Everything works great! What I can't figure out is...using this SaveSubmit plug-in. I see the icon change to a red dot when I edit the field, then, when I click the button, I get only "Saving...in progress" and that's where it stays...it just never goes away. So, after reading through this Thread, I realized it is sending the page (textarea) in a submit function. But, I don't know how it is doing it, nor where it is trying to send the data to. I know how to create a php page that will field the data so that I can use it however I see fit. Still, without being able to determine where the data is going, I'm stuck.

I'm a bit of a noob when it comes to javascript, so I get easily lost trying to scan through the code in save-submit.js. And I'm not even sure that is where I should be looking. Any help would be greatly appreciated. If this can be explained in a way that a pure html/php guy like me can understand, that would be great.

So far though, this is easily the best/most feature rich, cross-browser editor I have found on the web. Perhaps someday I will understand it enough to make a contribution of my own. wink

Offline

#30 2008-04-21 16:33:33

PapaBearPW
New member
From: Germany
Registered: 2008-04-20
Posts: 4
Website

Re: new plugin: SaveSubmit or The Advanced Save Button

Sorry to have bothered you...after some much needed sleep, the cobwebs have cleared and I was able to figure it out. I think....lol. At least now there is a response when I click the save button. I'll do some more testing and let you know if it works out. Thanks again for this great tool. smile

Offline

#31 2008-04-22 13:30:24

PapaBearPW
New member
From: Germany
Registered: 2008-04-20
Posts: 4
Website

Re: new plugin: SaveSubmit or The Advanced Save Button

Ok...it took a while to work out some of the bugs I was having (my own fault). But it seems to be working just fine now. Here is a sample of the html and php files I am using.

html file I am editing:

<html>
<head>
  <script type="text/javascript">
    _editor_url  = "/wysiwyg/xinha/"  // (preferably absolute) URL (including trailing slash) where Xinha is installed
    _editor_lang = "de";      // And the language we need to use in the editor.
    _editor_skin = "silva";   // If you want use a skin, add the name (of the folder) here
  </script>
  <script type="text/javascript" src="/wysiwyg/xinha/XinhaCore.js"></script>
  <script type="text/javascript" src="/wysiwyg/xinha/my_config.js"></script>
</head>
<body bgcolor="blue">
<form name="newbiearea1" id="newbiearea1" method="post" action="savesubmit.php">
<textarea id="newbiearea1" name="newbiearea1" rows="10" cols="50" style="width: 100%">

</textarea>
</form>
</body>
</html>

php file that fields the data and returns it in html code display:

<?php

$mycode = "<xmp>" . $_POST['newbiearea1'] . "</xmp>";
$mycode = stripslashes($mycode);
echo $mycode;

?>

Just thought I'd post this in case anyone else is having the same trouble understanding how it works as I was.


Now I'm off to figure out how to set this all up in a way my wife will be able to use it. wink

Last edited by PapaBearPW (2008-04-22 13:31:59)

Offline

Board footer

Powered by FluxBB