mkurnath Posted June 26, 2011 Share Posted June 26, 2011 Hello, Everything works great with these 2 things (Information Pages Unlimited v1.0 and TinyMCE w/ Image Upload) However, just this 1 thing. When I upload an Image using TinyMCE and AjaxFileUpload it successfully uploads and store it in a folder. However the output file (information.php) that used with the Add-On "Information Pages Unlimited v1.0" calls the image from a folder thats not where I uploaded it. Folder where I uploaded image w/ AjaxFileUpload is ColtonHomeCare_2/catalog/uploaded/Pricing.png --------------------------------------- Output Page (information.php) where it calls uploaded image file is ColtonHomeCare_2/uploaded/Pricing.png (This is the dir) The Page "information.php" looks like this (which is from the add-on "Information Pages Unlimited v1.0") /* $Id$ Module: Information Pages Unlimited File date: 2007/02/17 Based on the FAQ script of adgrafics Adjusted by Joeri Stegeman (joeri210 at yahoo.com), The Netherlands Modified by [email protected] for OSC v2.3.1 osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright © 2010 osCommerce Released under the GNU General Public License */ require('includes/application_top.php'); // Added for information pages if (!isset($_GET['info_id']) || !tep_not_null($_GET['info_id']) || !is_numeric($_GET['info_id'])) { $title = 'Sorry. Page Not Found.'; $breadcrumb->add($INFO_TITLE, tep_href_link(FILENAME_INFORMATION, 'info_id=' . $_GET['info_id'], 'NONSSL')); } else { $info_id = intval($_GET['info_id']); $information_query = tep_db_query("SELECT information_title, information_description FROM " . TABLE_INFORMATION . " WHERE visible='1' AND information_id='" . $info_id . "' AND language_id='" . (int)$languages_id ."'"); $information = tep_db_fetch_array($information_query); $title = stripslashes($information['information_title']); $page_description = stripslashes($information['information_description']); // Added as noticed by infopages module if (!preg_match("/([\<])([^\>]{1,})*([\>])/i", $page_description)) { $page_description = str_replace("\r\n", "<br>\r\n", $page_description); } $breadcrumb->add($title, tep_href_link(FILENAME_INFORMATION, 'info_id=' . $_GET['info_id'], 'NONSSL')); } require(DIR_WS_INCLUDES . 'template_top.php'); ?> <h1><?php echo $title; ?></h1> <div class="contentContainer"> <div class="contentText"> <?php echo $page_description; ?> </div> <div class="buttonSet"> <span class="buttonAction"><?php echo tep_draw_button(IMAGE_BUTTON_CONTINUE, 'triangle-1-e', tep_href_link(FILENAME_DEFAULT)); ?></span> </div> </div> <?php require(DIR_WS_INCLUDES . 'template_bottom.php'); require(DIR_WS_INCLUDES . 'application_bottom.php'); ?> Why is it doing this? Where can I change the output page to call the proper image upload dir? Im not a beginner, so please explain accordingly. If easier to call. Please do @ 1-705-279-2954 If I have left out something, please let me know Thank-you So Much In Advance Quote Link to comment Share on other sites More sharing options...
SLiCK_303 Posted June 26, 2011 Share Posted June 26, 2011 IPU doesn't do anything with images, it just reads the info given to it, the problem is with your TinyMCE w/ Image Upload mod. I don't know what that is, but I assume there is some configuration as to where the images go..... Quote Link to comment Share on other sites More sharing options...
mkurnath Posted June 26, 2011 Author Share Posted June 26, 2011 IPU doesn't do anything with images, it just reads the info given to it, the problem is with your TinyMCE w/ Image Upload mod. I don't know what that is, but I assume there is some configuration as to where the images go..... Hi There and Thanks For Reply This is the config file the Ajax File Manager Plugin <?php /** * sysem base config setting * @author Logan Cai (cailongqun [at] yahoo [dot] com [dot] cn) * @link www.phpletter.com * @since 1/August/2007 * */ error_reporting(E_ALL); //error_reporting(E_ALL ^ E_NOTICE); //Access Control Setting /** * turn off => false * by session => true */ define('CONFIG_ACCESS_CONTROL_MODE', false); define("CONFIG_LOGIN_USERNAME", 'sdfgdfgdfgdgfdgsdfsdfg3454dsfb5e'); define('CONFIG_LOGIN_PASSWORD', 'ASDF@#%JHGSDFGasdkjfh3812764ksdjfbhkjxcf'); define('CONFIG_LOGIN_PAGE', 'ajax_login.php'); //the url to the login page //SYSTEM MODE CONFIG /** * turn it on when you have this system for demo purpose * that means changes made to each image is not physically applied to it * and all uploaded files/created folders will be removed automatically */ define('CONFIG_SYS_DEMO_ENABLE', false); define('CONFIG_SYS_VIEW_ONLY', false); //diabled the system, view only define('CONFIG_SYS_THUMBNAIL_VIEW_ENABLE', true);//REMOVE THE thumbnail view if false //User Permissions define('CONFIG_OPTIONS_DELETE', true); define('CONFIG_OPTIONS_CUT', true); define('CONFIG_OPTIONS_COPY', true); define('CONFIG_OPTIONS_NEWFOLDER', true); define('CONFIG_OPTIONS_RENAME', true); define('CONFIG_OPTIONS_UPLOAD', true); // define('CONFIG_OPTIONS_EDITABLE', true); //disable image editor and text editor //FILESYSTEM CONFIG /* * CONFIG_SYS_DEFAULT_PATH is the default folder where the files would be uploaded to and it must be a folder under the CONFIG_SYS_ROOT_PATH or the same folder these two paths accept relative path only, don't use absolute path */ define('CONFIG_SYS_MY_DOCROOT', $_SERVER['DOCUMENT_ROOT'] . implode('/',array_slice(explode('/',$_SERVER['PHP_SELF']),0,-6))); define('CONFIG_SYS_DEFAULT_PATH', CONFIG_SYS_MY_DOCROOT.'/uploaded/'); //accept relative path only define('CONFIG_SYS_ROOT_PATH', CONFIG_SYS_MY_DOCROOT.'/uploaded/'); //accept relat define('CONFIG_SYS_FOLDER_SHOWN_ON_TOP', true); //show your folders on the top of list if true or order by name define("CONFIG_SYS_DIR_SESSION_PATH", 'session/'); define("CONFIG_SYS_PATTERN_FORMAT", 'list'); //three options: reg ,csv, list, this option define the parttern format for the following patterns /** * reg => regulare expression * csv => a list of comma separated file/folder name, (exactly match the specified file/folders) * list => a list of comma spearated vague file/folder name (partially match the specified file/folders) * */ //more details about regular expression please visit http://nz.php.net/manual/en/function.eregi.php define('CONFIG_SYS_INC_DIR_PATTERN', ''); //force listing of folders with such pattern(s). separated by , if multiple define('CONFIG_SYS_EXC_DIR_PATTERN', 'CVS'); //will prevent listing of folders with such pattern(s). separated by , if multiple define('CONFIG_SYS_INC_FILE_PATTERN', ''); //force listing of fiels with such pattern(s). separated by , if multiple define('CONFIG_SYS_EXC_FILE_PATTERN', ''); //will prevent listing of files with such pattern(s). separated by , if multiple define('CONFIG_SYS_DELETE_RECURSIVE', 1); //delete all contents within a specific folder if set to be 1 //UPLOAD OPTIONS CONFIG define('CONFIG_UPLOAD_MAXSIZE', 5000 * 1024 ); //by bytes //define('CONFIG_UPLOAD_MAXSIZE', 2048); //by bytes //define('CONFIG_UPLOAD_VALID_EXTS', 'txt');// define('CONFIG_EDITABLE_VALID_EXTS', 'txt,htm,html,xml,js,css'); //make you include all these extension in CONFIG_UPLOAD_VALID_EXTS if you want all valid define('CONFIG_OVERWRITTEN', false); //overwirte when processing paste define('CONFIG_UPLOAD_VALID_EXTS', 'gif,jpg,png,bmp,tif,zip,rar,gz,tar,mov,mpg,avi,asf,mpeg,wmv,aif,aiff,wav,mp3,swf,ppt,rtf,doc,pdf,txt');// // //define('CONFIG_UPLOAD_VALID_EXTS', 'gif,jpg,png,bmp,tif,zip,sit,rar,gz,tar,htm,html,mov,mpg,avi,asf,mpeg,wmv,aif,aiff,wav,mp3,swf,ppt,rtf,doc,pdf,xls,txt,xml,xsl,dtd');// define("CONFIG_VIEWABLE_VALID_EXTS", 'gif,bmp,txt,jpg,png,tif,html,htm,js,css,xml,xsl,dtd,mp3,wav,wmv,wma,rm,rmvb,mov,swf'); //define('CONFIG_UPLOAD_VALID_EXTS', 'gif,jpg,png,txt'); // define('CONFIG_UPLOAD_INVALID_EXTS', ''); //Preview define('CONFIG_IMG_THUMBNAIL_MAX_X', 100); define('CONFIG_IMG_THUMBNAIL_MAX_Y', 100); define('CONFIG_THICKBOX_MAX_WIDTH', 700); define('CONFIG_THICKBOX_MAX_HEIGHT', 430); /** * CONFIG_URL_PREVIEW_ROOT was replaced by CONFIG_WEBSITE_DOCUMENT_ROOT since v0.8 * Normally, you don't need to bother with CONFIG_WEBSITE_DOCUMENT_ROOT * Howerver, some Web Hosts do not have standard php.ini setting * which you will find the file manager can not locate your files correctly * if you do have such issue, please change it to fit your system. * so what should you to do get it * 1. create a php script file (let's call it document_root.php) * 2. add the following codes in in * <?php * echo dirname(__FILE__); * ?> * 3. upload document_root.php to you website root folder which will only be reached when you visit http://www.domain-name.com or http://localhost/ at localhost computer * 4. run it via http://www.domain-name.com/document_root.php or http://localhost/docuent_root.php if localhost computer, the url has to be exactly like that * 5. the value shown on the screen is CONFIG_WEBSITE_DOCUMENT_ROOT should be * 6. enjoy it * */ define('CONFIG_WEBSITE_DOCUMENT_ROOT', ''); //theme related setting /* * options avaialbe for CONFIG_EDITOR_NAME are: stand_alone tinymce fckeditor */ //CONFIG_EDITOR_NAME replaced CONFIG_THEME_MODE since @version 0.8 define('CONFIG_EDITOR_NAME', (CONFIG_QUERY_STRING_ENABLE && !empty($_GET['editor'])?secureFileName($_GET['editor']):'tinymce')); define('CONFIG_THEME_NAME', (CONFIG_QUERY_STRING_ENABLE && !empty($_GET['theme'])?secureFileName($_GET['theme']):'default')); //change the theme to your custom theme rather than default define('CONFIG_DEFAULT_VIEW', (CONFIG_SYS_THUMBNAIL_VIEW_ENABLE?'detail':'detail')); //thumnail or detail define('CONFIG_DEFAULT_PAGINATION_LIMIT', 10); define('CONFIG_LOAD_DOC_LATTER', false); //all documents will be loaded up after the template has been loaded to the client //General Option Declarations //LANGAUGAE DECLARATIONNS define('CONFIG_LANG_INDEX', 'language'); //the index in the session define('CONFIG_LANG_DEFAULT', (CONFIG_QUERY_STRING_ENABLE && !empty($_GET['language']) && file_exists(DIR_LANG . secureFileName($_GET['language']) . '.php')?secureFileName($_GET['language']):'en')); //change it to be your language file base name, such en ?> I've bolded where it defines the folder where the image upload goes. Now if TinyMCE is responsible. Is the output folder being called somewhere in Ajax or another plugin? Im using TinyMCE 3.2.1.1 Thanks in advance my friend I truly appreciate this Michael Quote Link to comment Share on other sites More sharing options...
SLiCK_303 Posted June 26, 2011 Share Posted June 26, 2011 (edited) I'm not 100% sure, but I would guess that both of those defines that you bolded, should have catalog/ before the uploaded part.... So... define('CONFIG_SYS_DEFAULT_PATH', CONFIG_SYS_MY_DOCROOT.'/catalog/uploaded/'); //accept relative path only define('CONFIG_SYS_ROOT_PATH', CONFIG_SYS_MY_DOCROOT.'/catalog/uploaded/'); //accept relat I'm guessing that your actual DOCUMENT_ROOT is in /, not /catalog. /catalog is just were you decided to install osc. Edited June 26, 2011 by SLiCK_303 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.