(You can choose or or both)

Friday, January 27, 2006

TMEdit image upload front end

Cet article sera incompréhensible, non-informaticiens s'abstenir.

Sinon:

Si vous êtes arrivés ici avec Google, frustrés parce que vous êtes déjà passé par ici (comme moi), et enervé par ces programmeurs qui croient savoir mieux que vous ce que vous devez faire.

Il y a de l'espoir, c'est ici.

Au cas où vous n'y trouvez rien, le code source est ci-dessous, notez que les deux fichiers à modifier sont :
mambots\editors\tmedit\popups\insert_image_en.php
et
mambots\editors\tmedit\popups\ImageManager\images.php
(dans le deuxième il faudra mettre un ../ de plus dans les chemins d'accès)

This post will be incomprehensible, so if you're not a programmer and don't know what Mambo is, I'd give it a miss.

However, if you came here from Google - having already been here, and are thouroughly annoyed with programmers telling users what they really want to do, there is hope.

It's here.

Just in case that link doesn't work, the source code is below, note that you will have to modify the following two files:
mambots\editors\tmedit\popups\insert_image_en.php
and
mambots\editors\tmedit\popups\ImageManager\images.php
(in the second you will need to add an extra ../ to the paths)
PHP Code:



// $Id: insert_image_en.php, v 1.02en 2004/04/16 13:53:30 bpfeifer Exp $
/**
* TMEdit addon - ImageManager
* Based on Wei Zhuo's ImageManager
* @package TMEdit
* @Copyright © 2004 Bernhard Pfeifer aka novocaine
* @ All rights reserved
// Released under ThinkMambo Free Software License
* @version $Revision: 1.02en $
**/
define( "_VALID_MOS", 1 );
$base_path = "../../..";

# :::: Start pasting here

include_once ("../../../../globals.php");
require_once (
"../../../../configuration.php");
require_once (
"../../../../includes/mambo.php");

$database = new database( $mosConfig_host, $mosConfig_user, $mosConfig_password, $mosConfig_db, $mosConfig_dbprefix );
$database->debug( $mosConfig_debug );

$mainframe = new mosMainFrame( $database, $option, '../../../../' );
$mainframe->initSession();
$my = $mainframe->getUser();

:::
End of correction

if (! $my->id) {
require(
"../../../../administrator/includes/auth.php" );
}



No comments yet :