Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End ImgBrowz0r vs. WordPress (V2) Re: ImgBrowz0r vs. WordPress (V2)

#73436
tragicdog
Member

Hey guys, hope you can help me getting ImgBrowz0r to work inside of wordpress.

My index.php file for ImgBrowzer

Code:
1024; $i++)
$size /= 1024;

return round($size, 2).’ ‘.$units[$i];
}

function get_microtime($microtime=false)
{
if ($microtime === false)
$microtime = microtime();

list($usec, $sec) = explode(‘ ‘, $microtime);
return ((float)$usec + (float)$sec);
}

$start_timer = microtime();

// Include class
require ‘imgbrowz0r.php’;

// These are all settings (set to default). The settings are not validated since you have to configure everything.
// There is a chance that ImgBrowz0r stops working if you enter the wrong values.
$config = array(
// Directory settings. These are required. Without trailing slash. (required)
‘images_dir’ => dirname(__FILE__).’/images’,
‘cache_dir’ => dirname(__FILE__).’/cache’,

// Url settings. These are required. Without trailing slash. (required)
// %PATH% is replaced with the directory location and page number
‘main_url’ => ‘http://jonlilie.com/wp-content/themes/TragicTheme/gallery/index.php?q=%PATH%’,
‘images_url’ => ‘http://jonlillie.com/wp-content/themes/TragicTheme/gallery/images’,
‘cache_url’ => ‘http://jonlillie.com/wp-content/themes/TragicTheme/gallery/cache’,

// Sorting settings (optional)
‘sort_by’ => 3, // 1 = filename, 2 = extension (png, gif, etc.), 3 = inode change time of file
‘sort_order’ => false, // true = ascending, false = descending

// Thumbnail settings (optional)
‘thumbs_per_page’ => 12, // Amount of thumbnails per page
‘max_thumb_row’ => 4, // Amount of thumbnails on a row
‘max_thumb_width’ => 200, // Maximum width of thumbnail
‘max_thumb_height’ => 200, // Maximum height of thumbnail

// Time settings (optional)
‘time_format’ => ‘F jS, Y’, // Date formatting. Look at the PHP date() for help: http://nl3.php.net/manual/en/function.date.php
‘time_zone’ => 0, // Timezone. Example: 1
‘enable_dst’ => false, // Daylight saving time (DST). Set this to true to enable it.

// Misc settings (optional)
‘ignore_port’ => false, // Ignore port in url. Set this to true to ignore the port.
‘dir_thumbs’ => true, // Show a thumbnail in a category box. Default is false.
‘random_thumbs’ => false, // Use random thumbnails for categories. Default is false.
‘read_thumb_limit’ => 0 // See README for information about this setting.
);

// Start the class
$gallery = !isset( $mypath ) ? new imgbrowz0r($config) : new imgbrowz0r( $config, $mypath );

// XHTML stuff
?>




JonLillie.com|Photos



init();

// Generate navigation and statistics
$gallery_breadcrumbs = $gallery->breadcrumbs();
$gallery_pagination = $gallery->pagination();
$gallery_statistics = $gallery->statistics();

// Display description of the current directory (optional).
if (!isset( $mypath ))
echo $gallery->description();

// Display navigation
if (!isset( $mypath ))
echo ‘

‘, “nt”, $gallery_breadcrumbs, “nt”, $gallery_pagination, “nt”, $gallery_statistics, “n”, ‘

‘, “nn”;

// Display images and directories
echo $gallery->browse();

// Display navigation
if (!isset( $mypath ))
echo ‘

‘, “nt”, $gallery_pagination, “nt”, $gallery_breadcrumbs, “n”, ‘

‘, “nn”;

// Showing some stats
if (!isset( $mypath ))
echo ‘

Processing time: ‘, round(get_microtime(microtime()) – get_microtime($start_timer), 5), ‘ && Memory usage: ‘, file_size(memory_get_usage()), ‘

‘;

?>



My custom page page-gallery.php

Code:

A link to my site:

jonlillie.com/gallery

fixed the errors, but I can’t seem to click on any gallerys on the page. click the link above to see what I’m talking about.

any help would be greatly appreciated. This is one of the last steps in a site redesign and it’s bugging me.