Hello,
I am running phpNuke6.0, and gallery 1.3.3 (just updated) I've never used this random block but it would be usefull ...
Now i am getting 4 diffent kinds of errors ... These are on top of the page...
:???:
Warning: fopen("", "r") - No error in C:apache-serverhtdocsthemes3D-Fantasytheme.php on line 220
Warning: fread(): supplied argument is not a valid File-Handle resource in C:apache-serverhtdocsthemes3D-Fantasytheme.php on line 221
Warning: fclose(): supplied argument is not a valid File-Handle resource in C:apache-serverhtdocsthemes3D-Fantasytheme.php on line 222
The Readme file that was with the random block indicated that i had to add the following code at the top of the themesidebox() function:
if (@file_exists($content)) {
$fp = fopen ($content, "r");
$content = fread($fp, filesize($content));
fclose ($fp);
$content = "?>$content<?";
$content = eval($content);
} else if (eregi("^http", $content)) {
$fp = fopen ($content, "r");
$content = fread($fp, 65535);
fclose ($fp);
}
Then there is one error where the block has to be...
Fatal error: Failed opening required 'init.php' (include_path='.; apacheincludes;apachehtdocs;apachehtdocsphpmyadmin') in C:apache-serverhtdocsblocksblock-random.php on line 41
Anyone an idea ?
:smile:
Posts: 524
you need pay close attention to the way you add that.....it needs to be added just like this:
function themesidebox($title, $content) {
if (@file_exists($content)) {
$fp = fopen ($content, "r");
$content = fread($fp, filesize($content));
fclose ($fp);
$content = "?>$content<?";
$content = eval($content);
} else if (eregi("^http", $content)) {
$fp = fopen ($content, "r");
$content = fread($fp, 65535);
fclose ($fp);
}
also,do not copy and paste this code,manually add what you see so as not to create any unneccesary end-of-line feeds
Posts: 6
Hey,
thankx for the advice ... allthough i don't get the messages anymore, but the page only loads my header.html file ..... weird huh ?
Posts: 6
Nevermind ... my fault ..... Now that i have added the block succesfull i get another message when i implement the block in the html, (administration)
These are the warnings i get,
Warning: main(init.php) [function.main]: failed to create stream: No such file or directory in c:apache-serverhtdocsblocksblock-random.php on line 41
Fatal error: main() [function.main]: Failed opening required 'init.php' (include_path='.; apacheincludes;apachehtdocs;apachehtdocsphpmyadmin') in c:apache-serverhtdocsblocksblock-random.php on line 41
It has to do with a directory setting ... but i still haven't figured out on how to change that ...
Posts: 524
The 'block-random.php' file does not go in your nuke /blocks directory it goes in your /modules/Gallery directory :grin:
Posts: 6
DOH!! :lol: