Announcement

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

#401 Re: User Discussion & Help » Check If Textarea Filled » 2006-09-22 09:43:06

ray

Yeah, that's right.
Then it would probably be better to strip out br's and p's specifically

if (preg_replace('/\s| |<\/?p>|<br \/>/','',$_POST['newstext']) =='') {

#402 Re: User Discussion & Help » Check If Textarea Filled » 2006-09-21 13:45:52

ray

That's because in most cases even if theres apparently notthing in the WYSIWYG area, the return is not really empty.
Unfortunately there are  a bunch of different things that can be inserted there, ranging from a simple linebreak to a <br /> or a empty paragraph with a nonbreaking space, so it's a not too trivial task to check epmty.
I have quickly put this together for a starter, but no guarantee that it works in 100% of cases

if (preg_replace('/\s| /','',strip_tags($_POST['newstext'])) =='') {

#404 Re: User Discussion & Help » ImageManager Upload problem » 2006-09-18 11:37:17

ray

I think neither Verdana nor Tahoma are available by default on macs (they are original MS fonts).

Also the input field is much wider, it had better have a width assigned to rule browser differences out.

May be it would fit more secure if the fields were in a table, not a div

#406 Re: User Discussion & Help » Problem with Xinha Linker plugin » 2006-09-03 18:47:30

ray

Easiest is to use the first option as described in the wiki page.
Note that you have to edit the php file plugins/Linker/scan.php in order to get anything else as the Xinha directory (e.g. set $dir = $_SERVER['DOCUMENT_ROOT'] to get all files on  your document root)

#408 Re: User Discussion & Help » image upload directory » 2006-08-30 09:08:40

ray

If there's any more need for discussion, please write here http://xinha.gogo.co.nz/punbb/viewtopic.php?id=573 to keep things together

#409 Re: User Discussion & Help » Set Path for ImageManager? » 2006-08-30 09:02:56

ray

Looks a bit like xinha_config.stripBaseHref = true

#410 Re: User Discussion & Help » Xinha using Ajax » 2006-08-30 05:47:37

ray

Have a look at this plugin I made some time ago. http://xinha.python-hosting.com/ticket/628

SaveSubmit for Xinha
____________________

Registers a button for submiting the Xinha form using asynchronous
postback for sending the data to the server

Usage: This should be a drop-in replacement for a normal submit button.
While saving a message is displayed to inform the user what's going on.
On successful transmission the output of the target script is shown, so it should print some information
about the success of saving.

#411 Re: User Discussion & Help » TextArea lost focus when working with Firefox! » 2006-08-24 11:17:26

ray

yes, but thats the way it is...

/*
* EDITOR ACTIVATION NOTES:
*  when a page has multiple Xinha editors, ONLY ONE should be activated at any time (this is mostly to
*  work around a bug in Mozilla, but also makes some sense).  No editor should be activated or focused
*  automatically until at least one editor has been activated through user action (by mouse-clicking in
*  the editor).
*/
(pasted from htmlarea.js)

#412 Re: User Discussion & Help » Variable for different folders in Image Manager or Extended File Manag » 2006-08-24 08:31:16

ray

OK,
in your /ee/index.php

session_start(); //If not already
$_SESSION['weblog_id'] = $_GET['weblog_id']; //This strores your variable in the session

in EFM cinfig.inc.php

session_start(); //Important, otherwise it won't work
//then like before
$IMConfig['images_dir'] = $_SERVER['DOCUMENT_ROOT'].'/pathToYourImages/weblogimages_'.$_SESSION['weblog_id'].'/';
$IMConfig['images_url'] = '/pathToYourImages/weblogimages_'.$_SESSION['weblog_id'].'/';

#413 Re: User Discussion & Help » Variable for different folders in Image Manager or Extended File Manag » 2006-08-23 07:23:43

ray

oh, of course you are right, the parameter isn't available in the url of the popup. So you'd have to cache it somehow, e.g in a session variable. If you don't know how php sessions work, write again.
Best wishes

#414 Re: User Discussion & Help » Variable for different folders in Image Manager or Extended File Manag » 2006-08-22 12:05:44

ray

As ImageManager and EFM are configured through a php file (config.inc.php in the plugin directory) it should be no problem to use something like

$IMConfig['images_dir'] = $_SERVER['DOCUMENT_ROOT'].'/pathToYourImages/weblogimages_'.$_GET['weblog_id'].'/';
$IMConfig['images_url'] = '/pathToYourImages/weblogimages_'.$_GET['weblog_id'].'/';

#416 Re: User Discussion & Help » xinha processing code » 2006-08-21 13:20:37

ray

Geoffrey,
<a href="xxx"></a> is indeed not correct. a + href is a hyperlink that is supposed to be clickable and thus cannot be empty. An anchor is usually a + name

#418 Re: User Discussion & Help » xinha blanks post variables? » 2006-07-28 05:09:00

ray

There is surely something you overlook. If you give link to your page, I can have a look at it. maybe i see something you didn't

#419 Re: User Discussion & Help » Area not replaced by Xinha control - followed newbie instructions. » 2006-07-28 05:02:49

ray

If you post  a link to your page we can understand your problem better

#420 Re: User Discussion & Help » Manipulating the DOM of editable code » 2006-07-26 05:38:55

ray

You can also access the content document as a property of the xinha object via

xinha_editors.youreditor._doc

This is basically the same as you wrote, but you don't have to dig after the iframe object itself

#421 Re: User Discussion & Help » Restricting editable sections » 2006-07-26 05:09:07

ray

This is surely something loads of people want.

Dortamur wrote:

I thought I'd seen this implemented before, probably in another editor similar to Xinha.

If you find out which editor this was I'd be greatly interested in how they did it

#422 Re: User Discussion & Help » New ExtendedFileManager (EFM) :) » 2006-07-12 18:58:29

ray

Hi koto,
great work, just wanted to thank you!

#423 Re: User Discussion & Help » insertsnippet plugin PHP not working » 2006-07-12 14:50:40

ray

Ok, the problem is that your html  contains linebreaks which is not possible in js variables. This should normally be taken care of by the str_replace("\n",'\n'... thing.
Maybe you have a different coding for the linebreaks (probably \r\n which is windows standard).
try it this way

print "snippets[i]['HTML'] = '".str_replace(array("\n","\r"),'\n',addcslashes($html,"'"))."';\n";

or

print "snippets[i]['HTML'] = '".preg_replace("/\r|\n/s",'\n',addcslashes($html,"'"))."';\n";

#424 Re: User Discussion & Help » insertsnippet plugin PHP not working » 2006-07-12 12:46:07

ray

Hi,
I can't tell what the problem is from what I see, I'd have to have a look at the page.
is there any error report in the js console?

#425 Re: User Discussion & Help » How do I customize the templates? » 2006-07-04 09:37:02

ray

Hi,
unfortunately the Template plugin makes it almost impossible to edit the templates. Try InsertSnippet.

Board footer

Powered by FluxBB