IImage Browser

From The Lyceum Wiki

Jump to: navigation, search

version 1.5

[IImagebrowser] is a convenient image upload and management interface for WordPress/Lyceum I've got this working by making the following changes (paths were all wrong in a number of places)

iimage-browser-plugin.php

line 68 from

window.open("../wp-admin/iimage-browser.php", "IImageBrowser", "width=700,height=600,scrollbars=yes");

to

window.open("../admin/iimage-browser.php", "IImageBrowser", "width=700,height=600,scrollbars=yes");

iimage-browser.php

in the if preceded by "// include the WP base functions"
an additional require is needed to establish PRIVATEROOT
add a line around line 18

require_once('../private.php');

//path to the "upload" directory
//relative to iimage-browser.php
line 34 from

$ib_settings['real_path'] = './../wp-content/';

to

$ib_settings['real_path'] = './../wp-content/blogs/' . $blogdata->id; 

(establishes the blogs own file space as the place for uploading the graphics)

//URI of that directory relative to your blog installation URI
line 37 from

$ib_settings['real_url'] = '/wp-content';

to

$ib_settings['real_url'] = '/wp-content/blogs/'. $blogdata->id;

and finally
line 49 from

$ib_settings['path_to_iib'] = $_SERVER['PHP_SELF'];// path to iimage-browser.php - edit this when $_SERVER['PHP_SELF'] returns strange value

to

$ib_settings['path_to_iib'] = '/blogs/'.$blogdata->slug.'/admin/iimage-browser.php';

This last one has to be according to your setup. In my case I have a sub-directory called blogs under my main domain where all lyceum stuff is living.

These are the changes that worked for me...your mileage may vary

Personal tools