Announcement

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

#126 Re: User Discussion & Help » Autosave » 2010-10-14 18:50:39

function yourAutoSaveFunction()
{ 
  var html = xinha_editors.yourEditor.getHTML();
  doStuffWith(html);
}

#128 Re: User Discussion & Help » Troubles with ExtendedFileManager plugin » 2010-10-14 06:40:24

A 500 error would indicate that your server is causing an error.  Contact your web host for information (or consult the server's error log).  Often times, this can be a server which enforces certain file permissions (no write for group/other) and your file permissions are incorrect (allow write for group/other).

#129 Re: User Discussion & Help » Something cuts the IP in my Img src » 2010-10-13 18:35:25

See the following config options, particularly stripBaseHref

  // specify a base href for relative links
  /** Specify a base href for relative links<br />
   *  ATTENTION: this does not work as expected and needs t be changed, see Ticket #961 <br />
   *  Default: <code>null</code>
   *  @type String|null
   */
  this.baseHref = null;

  /** If true, relative URLs (../) will be made absolute. 
   *  When the editor is in different directory depth 
   *  as the edited page relative image sources will break the display of your images.
   *  this fixes an issue where Mozilla converts the urls of images and links that are on the same server 
   *  to relative ones (../) when dragging them around in the editor (Ticket #448)<br />
   *  Default: <code>true</code>
   *  @type Boolean
   */
  this.expandRelativeUrl = true;
  
 /**  We can strip the server part out of URL to make/leave them semi-absolute, reason for this
   *  is that the browsers will prefix  the server to any relative links to make them absolute, 
   *  which isn't what you want most the time.<br />
   *  Default: <code>true</code>
   *  @type Boolean
   */
  this.stripBaseHref = true;

#130 Re: User Discussion & Help » Xinha Web Editor Problems with Safari and Firefox » 2010-10-12 19:39:06

It's a sure bet that your HTML is not valid.

 

<table><form><tr>

and
 

<table><tr><form><td>

are not valid HTML and produce this problem, <form> can appear outside the <table> or inside the <td> nowhere else.

#131 Re: User Discussion & Help » Make own Dialog Plugin » 2010-10-12 19:01:49

CharacterMap is a very good and simple example, look at the prepareDialog method, and the addEntity method, you can't get much more simple.

You supply the HTML of your dialog to the dialog:

    this.dialog = new Xinha.Dialog(editor, html, 'CharacterMap',{width:300},{modal:false});

How you create that html, is up to you, if you have it in an external file you might do like

Xinha._getback( Xinha.getPluginDir("YourPlugin") + '/dialog.html', function(html) { /* do something with html here */ } );

(See Linker for an example).

#132 Re: User Discussion & Help » Howto translate own plugin » 2010-10-06 18:30:57

Without seeing how your plugin works, I can only speak in general terms,

var TranslatedText = Xinha._lc("English Text", 'PluginName');

translates the string "English Text" into the appropriate language, in the "PluginName" scope. 

You put your translations in
/plugins/PluginName/lang/**.js
(where ** is the lang code, "fr" for french etc)

This file must be in UTF-8 encoding (goes for everything).

An example fr.js

// I18N constants
// LANG: "fr", ENCODING: UTF-8
{
  "You must select some text before making a new link.": "Vous devez sélectionner un texte avant de créer un nouveau lien",
  "Are you sure you wish to remove this link?": "Confirmez-vous la suppression de ce lien ?",
  "Remove Link": "Supprimer",
  "URL Link": "Lien URL",
  "Ordinary Link": "Lien standard",
  "Same Window (jump out of frames)": "Même fenêtre (sort des frames)",
  "New Window": "Nouvelle fenêtre",
  "Popup Window": "Fenêtre popup",
  "Email Link": "Lien email",
  "Email Address:": "Adresse email",
  "Subject:": "Sujet",
  "Message Template:": "Message",
  "Size:": "Taille",
  "Name:": "Nom"
};

If you use the "Dialog" system (brief rundown follows) then your dialog html can be like this and the stuff in <l10n> tags and _(....) attributes will be translated automatically.

<label>
  <input type="radio" name="[type]" id="[type_url]" value="url" checked="checked" />
  <l10n>URL Link</l10n>
 </label>

<label for="[href]"><l10n>URL:</l10n> </label>
  <input type="text" name="[href]" id="[href]" style="width:100%" value="http://www.example.com/" />

<input type="button" id="[ok]"     value="_(OK)"     />

Here is a brief rundown on using dialog (see Linker/pluginMethods.js for a complete example) -- note the square brackets are required in ID's, names etc in the HTML, but you omit them in the functions below)

var myDialog = new Xinha.Dialog(theXinhaEditorObject, "html string of your 'dialog'", 'PluginName');
myDialog.show({'fieldName': 'fieldValue, 'anotherField': 'anotherValue'}); // Optional set fields when showing
var fieldValues = myDialog.hide(); // see also myDialog.getValues();

// Additional Useful Functions....
myDialog.toggle();
myDialog.collapse();
myDialog.getElementById('someID');
myDialog.getElementsByName('someName');
myDialog.getElementsByClassName('someClassName');

// See modules/Dialogs/XinhaDialog.js for more

#133 Re: User Discussion & Help » my_config.js don't work » 2010-10-06 18:05:06

Your PHP is probably not running my_config.js, call it my_config.php instead.

#134 Re: User Discussion & Help » Troubles with ExtendedFileManager plugin » 2010-10-02 18:55:05

1. Ensure that error reporting is switched on in your php.ini

2. Using Firebug, Chrome Developer Tools, a network sniffer, whatever, examing the request that results in the popup being opened, you need to see that your configuration is being passed from the browser as part of the request.

3. Add some debugging statements to ImageManager/config.inc.php , particularly you should print_r($_REQUEST) to find out what is getting through to the PHP, and you need to find out if xinha_read_passed_data() is returning an appropriate structure (see the conditional).

My next guess is that your unusual server environment is not passing post/get data to PHP correctly.

#135 Re: User Discussion & Help » Troubles with ExtendedFileManager plugin » 2010-10-01 22:29:13

I used to use EFM and Image Manager togethor, I'm not familar enough with EFM to know if it can ALSO do the IM job.

Did you configure ImageManager?

Try using IM on it's own, without EFM, and be sure you configure it.

#136 Re: User Discussion & Help » Xinha.colorPicker is not a constructor » 2010-10-01 22:27:25

You'll have to use Firebug to debug it.  Check that it's loading all files for a start.

#137 Re: User Discussion & Help » Troubles with ExtendedFileManager plugin » 2010-09-30 19:05:21

I took a look at MootoolsFileManager, but found documentation to be lacking on how to integrate it with an Xinha editor

Sorry, look in xinha/plugins/MootoolsFileManager it's right there all integrated.

we will refuse to use Flash within our applications or website

That's a shame, it allows you to do nice things like progress bars for uploads, and perhaps more importantly, multiple uploads at once.

when I click on the Insert Image button of the Xinha editor.

That's probably your problem, EFM is not for inserting images it is for inserting links to files.  You need to configure ImageManager for inserting images.  They are separate plugins. 

MFM on the other hand can do both jobs.

#138 Re: User Discussion & Help » Making Xinha events visible to the page as a whole » 2010-09-25 19:07:11

You won't be able to listen to those things directly, there is no onchange for a start when we are dealing with an iframe (this is how Xinha works).

Look at the plugins CharCounter and SaveOnBlur, and also the code in XinhaCore (somewhere) which connects up the activateEditor handler, I think if you read those things you can probably work out a way to either modify Xinha or better write a plugin which can trigger some callback function to do what you need it to do.

#139 Re: User Discussion & Help » Linker plugin link to database » 2010-09-23 20:04:22

Forget about scan.php as it is, rewrite it from scratch to do what you want.

All your new scan.php has to do is produce something like this at a minimum

[
  {
     url:   'a.html',
     title: 'A Title'
  },

  {
     url:   'b.html',
     title: 'B Title'
  }
]

#140 Re: User Discussion & Help » ContextMenu is not working » 2010-09-23 04:02:08

Indicates that an XMLHTTPRequest is failing for some reason.  Possible reasons I can think of....
1. File permissions are incorrect on remote server
2. You are trying to make a cross-domain request (page is on one domain, request is to another)

check config _editor_url is correct

#141 Re: User Discussion & Help » ContextMenu is not working » 2010-09-22 19:19:02

Clear your cache.

Then use Developer tools to see errors etc.

#142 Re: User Discussion & Help » remove toolbar button borders » 2010-09-21 02:49:08

Use your browser's developer tools to inspect a button/s and fiddle with the CSS to find out what you need to change.

#144 Re: User Discussion & Help » Troubles with ExtendedFileManager plugin » 2010-09-11 02:40:43

Check that your PHP session handling is functional, ensure the session name on both ends (inside your application, and inside the Xinha php components) is the same.

You might also want to look at MootoolsFileManager instead of ExtendedFileManager because the EFM is pretty old.

#145 Re: User Discussion & Help » ExtendedFileManager. Wrong path when edit properties. » 2010-09-11 02:37:46

Very old post.  Suggest you upgrade to latest and use MootoolsFileManager instead of ExtendedFileManager.

#146 Re: User Discussion & Help » Troubles with ExtendedFileManager plugin » 2010-09-10 01:54:06

As would

                   echo "Ending PHP Section. \n";

You would see that occuring if you open the javascript console I expect.

#147 Re: User Discussion & Help » Troubles with ExtendedFileManager plugin » 2010-09-10 01:53:29

echo "Starting PHP; \n";

I expect that breaks the resulting javascript.

#148 Re: User Discussion & Help » Can you set toolbar buttons inside the textarea? » 2010-09-10 01:38:27

xinha_config.toolbar =
  [
    ["popupeditor"],
    ["separator","formatblock","fontname","fontsize","bold","italic","underline","strikethrough"],
    ["separator","forecolor","hilitecolor","textindicator"],
    ["separator","subscript","superscript"],
    ["linebreak","separator","justifyleft","justifycenter","justifyright","justifyfull"],
    ["separator","insertorderedlist","insertunorderedlist","outdent","indent"],
    ["separator","inserthorizontalrule","createlink","insertimage","inserttable"],
    ["linebreak","separator","undo","redo","selectall","print"], (Xinha.is_gecko ? [] : ["cut","copy","paste","overwrite","saveas"]),
    ["separator","killword","clearfonts","removeformat","toggleborders","splitblock","lefttoright", "righttoleft"],
    ["separator","htmlmode","showhelp","about"]
  ];

??

#149 Re: User Discussion & Help » Troubles with ExtendedFileManager plugin » 2010-09-09 23:05:06

ImageCreate is a php function within the GD system.  You must add GD to your server.

http://nz.php.net/ImageCreate

Board footer

Powered by FluxBB