TinyPortal

Development => Support => Older SMF versions => Topic started by: Assistance on July 30, 2006, 01:30:17 AM

Title: whizzypic
Post by: Assistance on July 30, 2006, 01:30:17 AM
currently when a member wishes to submit an article and they go to the image icon
and click browse, they get my root directory. 

can someone help me change this so they can only access a folder called Images in my root
( or in my smf directory )


ty
Title: Re: whizzypic
Post by: Assistance on July 30, 2006, 03:20:14 AM
$self = $_SERVER['SCRIPT_NAME'];
$docpath = $_REQUEST['d'] ? $_REQUEST['d'] : '/images';
$d = $_SERVER['DOCUMENT_ROOT'] . '/' . $docpath;
$d = str_replace('//','/',$d);
if (!is_dir($d)) $d = $_SERVER['DOCUMENT_ROOT'];
$dir = opendir($d);
while ($file = readdir($dir)){
  $files[] = $file;
}


something to do with that ?
I've added a folder named images allmost everywhere and it still goes to the root

Title: Re: whizzypic
Post by: agridoc on July 30, 2006, 07:08:57 AM
This is corrected in TP 0.9, no full solution for TP 0.8.6.

The directory will be /tp-images/Image under SMF/TP dir.

Until next version will be available, I would suggest renaming whizzypic.php to something else. Members will not be able to browse pictures and you will get a "404, Page not found" error when trying to browse the server for images.
Title: Re: whizzypic
Post by: Assistance on July 30, 2006, 07:21:45 AM
Quote4 You can specify the start directory for the image browse:
  imageBrowse = "whizzypic.php?d=/public/pictures";
if no start directory is given it tries "/images", then the root directory.

the solution is there, I just dont understand it
Title: Re: whizzypic
Post by: agridoc on July 30, 2006, 07:48:30 AM
This must be from Whizzywig discussion board.

The script is changed a bit for use with TP, also the directories. It' s not enough to change the dir in the TP template. It needed some work and testing to solve.

Bloc and Feline have worked more with the code. I doubt that Bloc will have time for this, as it is solved and editor is extended in new version. He is now concentrated in debugging and releasing it (the solution is present in the new version).
Title: Re: whizzypic
Post by: Assistance on July 30, 2006, 10:47:55 AM
yes it was, seeing as this is a security issues I thought I would try to fix it
guess I will have to wait for new version or create a new easypic

ty for your quick replies
Title: Re: whizzypic
Post by: IchBin on July 30, 2006, 05:13:04 PM
If you view it as a security issue, then switch back to one of the editors that don't do that.
Title: Re: whizzypic
Post by: agridoc on July 30, 2006, 05:37:53 PM
That' s why I suggested renaming whizzypic.php until 9.5 will be ready. That' s what I have done in my site.

You have many WYSIWYG features except browsing.
Title: Re: whizzypic
Post by: Assistance on July 30, 2006, 09:12:06 PM
Quote from: IchBinâââ,¬Å¾Ã,¢ on July 30, 2006, 05:13:04 PM
If you view it as a security issue, then switch back to one of the editors that don't do that.
I never had a different one to start with

I've done what  agridoc suggested  (kinda)
Title: Re: whizzypic
Post by: agridoc on July 30, 2006, 09:32:45 PM
IchBinâââ,¬Å¾Ã,¢ refers to 0.9.5  :laugh:, there will be Tiny MCE, Whizzywhig (with image upload by Feline and corrected dirs) and as an option FCK as add on by Feline.

If you install her Blog (http://www.tinyportal.net/smf/index.php?topic=6662.0) you will see the new Whizzywhig editor but the dirs are the same. Try to ask her to fix them, she had done most work with Whizzywhig.
Title: Re: whizzypic
Post by: IchBin on July 30, 2006, 11:26:19 PM
I thought TinyMCE was part of 0.86.....
Title: Re: whizzypic
Post by: Assistance on August 11, 2006, 06:01:20 AM
Quote from: agridoc on July 30, 2006, 09:32:45 PM
If you install her Blog (http://www.tinyportal.net/smf/index.php?topic=6662.0) you will see the new Whizzywhig editor but the dirs are the same. Try to ask her to fix them, she had done most work with Whizzywhig.

the image directory is fixed in 1.1RC2
and now I have the problem with the blogs

so can anyone else help or atleast tell which two files to compare
the articles use: wysiwyg/whizzypic.php
and blogs use: wysiwyg/whizzypic.php?d=wysiwyg/upload
Title: Re: whizzypic
Post by: G6Cad on August 11, 2006, 06:39:05 AM
Felines site (http://www.xyfrauen.com) with any possible error with the Blog she have the support for it on here site.
Title: Re: whizzypic
Post by: Assistance on August 11, 2006, 07:28:44 AM
that would depend if she thinks its an error

its resolved on 1.1RC2

all I am asking is which two files do I need to compare


Edit*

sorry its not resolved in 1.1RC2
Title: Re: whizzypic
Post by: IchBin on August 11, 2006, 06:00:50 PM
You would have to ask her that.