Accoring to the tutorial,I've modified all listed .php files.And I also modified the modules/4images/global.php as the following.
if (getenv("QUERY_STRING")) {
$self_url .= "?".getenv("QUERY_STRING");
$self_url = preg_replace(array("/([?|&])action=[^?|&]*/", "/([?|&])mode=[^?|&]*/", "/([?|&])phpinfo=[^?|&]*/", "/([?|&])printstats=[^?|&]*/", "/[?|&]".URL_ID."=[^?|&]*/", "/[?|&]l=[^?|&]*/", "/[&?]+$/"), array("", "", "", "", "", "", ""), $self_url);
}
else {
if (preg_match("/details/", $self_url) && !preg_match("/[?|&]".URL_IMAGE_ID."=[^?|&]*/", $self_url) && $image_id) {
$self_url .= "?".URL_IMAGE_ID."=".$image_id;
}
elseif (preg_match("/categories/", $self_url) && !preg_match("/[?|&]".URL_CAT_ID."=[^?|&]*/", $self_url)) {
$self_url .= "?".URL_CAT_ID."=".$cat_id;
}
if (isset($show_result) && $show_result) {
$self_url .= preg_match("/\?/", $self_url) ? "&" : "?";
$self_url .= "show_result=1";
}
if ($page && $page != 1) {
$self_url .= preg_match("/\?/", $self_url) ? "&" : "?";
$self_url .= URL_PAGE."=".$page;
}
}
One thing different to the tutorial is that I make a directory below the modules named 4images not gallery.But when use browser to view my 4images,the 4images index and control panel page could be reached.But I tried to access the catagories page the error message appeared.
Warning: Failed opening 'modules/4images/global.php' for inclusion (include_path='.:/usr/share/pear') in /var/www/html/nuke/modules/4images/categories.php on line 30
Fatal error: Failed opening required 'modules/4images/includes/sessions.php' (include_path='.:/usr/share/pear') in /var/www/html/nuke/modules/4images/categories.php on line 31
Any assitance will be highly appreciated.