Some Themes Don't Load All Images - NBS






 

 

Some Themes Don't Load All Images - NBS

View Full Version : Some Themes Don't Load All Images


BMR777
27-Jun-2006, 08:06 PM
Hello,

This keeps happening to me. Some themes work fine while others don't load all of the images. For instance:

Demo Forum:
http://webringamerica.com/phpbbx/wa2/

There is an "X" where the banner should be.
The file for the banner is on the web server at this filepath:
http://webringamerica.com/phpbbx/templates/iCGstation/images/banner.jpg

If I manually move the file "banner.jpg" to the directory http://webringamerica.com/phpbbx/wa2/templates/iCGstation/images/banner.jpg and refresh the page, the banner shows up and the forum looks normal. This, however, will on a dump of the browser cache cause the forum to not show up and rather show a directory listing of that directory.

Some themes load perfectly, while others don't have any images. Some load a few of the images but leave the rest blank.

I have tried reinstalling twice to fix the problem. I am running PHPBB 2.21, PHP 4.4.2 and MySQL 4.0.27-standard.

BMR777

Derek
27-Jun-2006, 08:23 PM
Hmm it looks like some images are causing the script to have errors. If you open up http://webringamerica.com/phpbbx/wa2/templates/iCGstation/images/banner.jpg you can see the error. I will take a look at the handler.php file to see what I can do to fix this.

Thanks,
Derek

Derek
28-Jun-2006, 02:28 PM
Hey, can you download and attach the picture thats not loading so I can use it to try and fix the Multi-Forums script?

Thanks,
Derek

BMR777
28-Jun-2006, 02:44 PM
Your forum won't let me attach it.

Here is the URL to the image:
http://www.webringamerica.com/phpbbx/templates/iCGstation/images/banner.jpg
You can save as to download.

Thanks!
BMR777

Derek
28-Jun-2006, 02:46 PM
Ok, Thanks!

Derek

Derek
28-Jun-2006, 02:56 PM
Ok, try this:

Open handler.php (in phpBB root directory).

Find:

include($script);


Replace With:

if (substr($script, 0, 5) == 'admin')
{
chdir('admin');
}
if (substr($script, -3) == 'gif' OR substr($script, -3) == 'jpg' OR substr($script, -3) == 'png' OR substr($script, -4) == 'jpeg')
{
$contents = file_get_contents($script);
echo $contents;
}
else
{
include($script);
}



Close & Save handler.php.

That should fix it, let me know if you will have problems with it.

Thanks,
Derek

BMR777
28-Jun-2006, 08:31 PM
Dude! That worked perfectly!

I'm going to go through the rest of my themes now and see if any others still have symptoms, but it looks to me like that fixed it!

Thanks!
BMR777

BMR777
28-Jun-2006, 08:34 PM
Ok, now I can't get into Admin CP:


Warning: chdir(): No such file or directory (errno 2) in /home/rusnak/public_html/phpbbx/handler.php on line 69

Warning: Cannot modify header information - headers already sent by (output started at /home/rusnak/public_html/phpbbx/handler.php:69) in /home/rusnak/public_html/phpbbx/includes/functions.php on line 941

BMR777

Derek
28-Jun-2006, 10:04 PM
Which Admin CP? The phpBB one, or the Multi-Forums one?

BMR777
28-Jun-2006, 10:06 PM
PHPBB Admin CP

Derek
28-Jun-2006, 10:07 PM
Ok, I'll take a look.

Derek

Derek
28-Jun-2006, 10:10 PM
Does the phpBB admin directory exist?

BMR777
28-Jun-2006, 11:10 PM
Yes. The admin CP worked fine before making the cahnges to the handler.php file.

BMR777

Derek
28-Jun-2006, 11:42 PM
Ok, I'll see if I can fix it.

Derek

Derek
06-Jul-2006, 01:20 AM
Sorry, I still haven't had time to get it fixed. I will have it fixed ASAP. It probably won't be for a few days because I am going on vacation tomorrow and won't be back till Sunday. I might be able to get it fixed tonight. I will reply back if I can get it fixed.

Thanks,
Derek

BMR777
06-Jul-2006, 02:46 PM
Don't worry about it. I have also been testing other Multiforums scripts.

Derek
14-Jul-2006, 05:01 PM
Try this code...

Open handler.php.

Find:

if (substr($script, 0, 5) == 'admin')
{
chdir('admin');
}
if (substr($script, -3) == 'gif' OR substr($script, -3) == 'jpg' OR substr($script, -3) == 'png' OR substr($script, -4) == 'jpeg')
{
$contents = file_get_contents($script);
echo $contents;
}
else
{
include($script);
}


Replace With:

if (substr($script, 0, 5) == 'admin')
{
chdir('admin');
include($script);
}
else
{
if (substr($script, -3) == 'gif' OR substr($script, -3) == 'jpg' OR substr($script, -3) == 'png' OR substr($script, -4) == 'jpeg')
{
$contents = file_get_contents($script);
echo $contents;
}
else
{
include($script);
}
}


Close and Save.

BMR777
14-Jul-2006, 05:12 PM
That fixed it! Thanks.
BMR777

Derek
15-Jul-2006, 12:03 AM
No Problem. Thanks for confirming. I will include the fix in the CVS respository, so it will be included in the next version.

Derek