htmlArea

A directory of browser-based WYSIWYG editors

  MAIN
INDEX
SEARCH
POSTS
WHO'S
ONLINE
LOG
IN

Home: htmlArea 3 (beta): htmlArea 2 & 3 archive (read only): htmlArea v3.0 - Add-Ons:
Image Manager - using different Base-Directories


The htmlArea 2 & 3 editors have been discontinued.

We've made these forums available as a read-only reference and knowledge-base for people using or developing editors based on htmlArea 2 or 3.

Anyone who is interested in taking over version 2 or 3 is free to do so. All we ask is that you choose a new name that doesn't have "htmlarea" in it to avoid confusion with this site. We'll even give you a link in the directory to make it easier for people to find you. If you are developing or hosting an htmlArea based-editor under a new name, please submit it to our directory.

 


dynamicvision
New User

Jul 18, 2004, 8:35 AM

Post #1 of 6 (8070 views)
Shortcut
Image Manager - using different Base-Directories Can't Post

Hello together!

At first: Very fine product - Everthing works fine, HTMLArea and the Image Manager. But now i want to give different Users of my Software the oppertunity to load their Pics in different directories.

In Order to do this i must get the Image Manager realized the Id of the current User. How can i do that? I only want to use for Example "$memnum" from the Software using HTMLArea in the Configurationfile of the Imagemanager.

Thanks a lot

Bye from Germany,

Bastian Groth


dynamicvision
New User

Jul 20, 2004, 9:00 AM

Post #2 of 6 (8043 views)
Shortcut
Re: [dynamicvision] Image Manager - using different Base-Directories [In reply to] Can't Post

Come on!

I only need to know how to carry a value from the HTML-File which holds the HTMLArea to the configurationfile of the Imagemanager.

There must be a solution

Thx


adam2003w
Novice

Jul 21, 2004, 10:56 AM

Post #3 of 6 (8011 views)
Shortcut
Re: [dynamicvision] Image Manager - using different Base-Directories [In reply to] Can't Post

I too, would like the image manager to do this, but don't know how to do this at the moment.


web design http://www.paradigmprint.com
my blog http://www.adamwebguy.com
fishing travel http://www.travelinangler.com
fishing rodshttp://www.kistlerrods.com
construction equipment http://www.sumner.com


wei
User

Jul 22, 2004, 8:28 PM

Post #4 of 6 (7916 views)
Shortcut
Re: [dynamicvision] Image Manager - using different Base-Directories [In reply to] Can't Post

which Image Manager are you referring to?

If you are using http://www.zhuo.org/htmlarea/

then in the config.inc.php file,

include your user permission file, e.g.
include_once('/path/to/files/users.php');

You should have some function or otherwise to determine the directory for each of your users.

Then, for each user, you would just need to change $IMConfig['base_dir'] and $IMConfig['base_url'] to the appropriate directories.

So, for example, suppose that your usernames are unique, then you can use the username as directory names.

Remember that the directories need to exist and writable before the user access it.

Hope that helps abit.

Cheers, Wei.


zap
New User

Nov 13, 2004, 2:26 PM

Post #5 of 6 (7042 views)
Shortcut
Re: [wei] Image Manager - using different Base-Directories [In reply to] Can't Post

Hello wei,
your solution turned out to be not so simple after all, because the "users.php" you include, which has the usersetting function, must itself include other files, in order to be able to dynamically determine the proper user directory. And how are &_POST[] variables passed, for example? I couldn't figure it out so easy, and i didn't want to spent more than an hour on that simple on first sight problem. And i nowhere found an implemented solution for the problem on the forums or on google. So i decided to make it really simple, although a little ugly maybe, but i don't care, as long as it works :) Just before the place where i call the replaceAll function with the body onload function, i create a new .php file containing only two instructions: Setting a custom variable, for example $userpath, to the desired value. Hence, i write the folowing code:


Code
.......... 
<?php
$fd = fopen("userpath.php", "w+");
fputs($fd, "<?php\n\$user_path = ".getuserpath().";\n?>");
fputs($fd, "<?php\n\$user_url = ".getuserurl().";\n?>");
fclose($fd);
?>
..........
<body onload='HTMLArea.replaceAll();'>


And in the config.inc.php i include the just created userpath.php file:


Code
..... 
include ('{mydir}userpath.php'); //where mydir is the path to the userpath.php file
.....
$IMConfig['base_dir'] = $user_path;
.....
$IMConfig['base_url'] = $user_url;


Works just fine for me!
It's really simple and i hope i helped some people having the same problem.
Thank you for your attention !!!
Cool


Ecco
Novice

Nov 20, 2004, 3:03 PM

Post #6 of 6 (6803 views)
Shortcut
Re: [zap] Image Manager - using different Base-Directories [In reply to] Can't Post

Hi Zap,

this works for me. I have the document which calls HtmlArea start with


Code
  

<?
session_start();

$_SESSION['base_dir'] = $_SERVER["DOCUMENT_ROOT"].'/images/';

$_SESSION['base_url'] = 'http://mydomain.com/images/';

?>



And I changed config.inc.php to


Code
  

session_start();

...

$IMConfig['base_dir'] = $_SESSION['base_dir'];

...

$IMConfig['base_url'] = $_SESSION['base_url'];



Cheers,
Ecco

 
 
 


Search for (options)