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)

#69681
Denys
Member

Thank you for answering. At this time I can’t give a external link only source file.
PHP version 5.2.11, WordPress 2.8.6
My test gallery have 2 pages.When I entered in gallery everything is fine but when Im going to the second page I see this error on blank page

Code:
Fatal error: Call to undefined function get_header() in /home/user/public_html/wp-content/themes/hi/gallery.php on line 6

This error showing only at gallery page.
Source code:

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__).’/gallery’,
‘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://mysite.com/wp-content/themes/mytheme/gallery.php?q=%PATH%’,
‘images_url’ => ‘http://mysite.com/wp-content/themes/mytheme/gallery’,
‘cache_url’ => ‘http://mysite.com/wp-content/themes/mytheme/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
?>

Gallery


Thanks!