TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

May 02, 2024, 01:52:30 AM

Login with username, password and session length
Members
  • Total Members: 3,885
  • Latest: Growner
Stats
  • Total Posts: 195,176
  • Total Topics: 21,220
  • Online today: 120
  • Online ever: 3,540 (September 03, 2022, 01:38:54 AM)
Users Online
  • Users: 1
  • Guests: 97
  • Total: 98

whizzypic

Started by Assistance, July 30, 2006, 01:30:17 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Assistance

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

Assistance

$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


agridoc

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.
  For Greek aeromodellers and our friends around the world  - Greek Button sets for SMF

Assistance

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

agridoc

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).
  For Greek aeromodellers and our friends around the world  - Greek Button sets for SMF

Assistance

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

IchBin

If you view it as a security issue, then switch back to one of the editors that don't do that.

agridoc

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.
  For Greek aeromodellers and our friends around the world  - Greek Button sets for SMF

Assistance

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)

agridoc

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 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.
  For Greek aeromodellers and our friends around the world  - Greek Button sets for SMF