2012-08-06, 05:08 PM
Pages: 1 2
2012-08-06, 05:10 PM
Do you have this in your page?
// set the path to your forums directory here (without trailing slash)
$forumdir = "./mybb";
// end editing
$change_dir = "./";
if(!@chdir($forumdir) && !empty($forumdir))
{
if(@is_dir($forumdir))
{
$change_dir = $forumdir;
}
else
{
die("\$forumdir is invalid!");
}
}
global $theme;
$theme['imgdir'] = $forumdir.'/'.substr($theme['imgdir'],0);
2012-08-06, 05:29 PM
Thanks for all the replies. One other thing I should note, is that this custom page is going to be part of a plugin. So setting the image directory to an absolute link in ACP is not going to work as a plugin as opposed to just modifying my own forum to fix that issue.
2012-08-06, 05:34 PM
<img scr="path" />
He only said a few images as the rest of forum is fine
(2012-08-06, 04:55 PM)ToJ Wrote: [ -> ](2012-08-06, 04:50 PM)Ted B Wrote: [ -> ]You can just put an image folder in new folder and put just those images you need in it.
I would use that as a last resort. Not only does it take time to sort all images you're going to need. Copying images simply wastes server space.
He only said a few images as the rest of forum is fine
2012-08-06, 05:48 PM
(2012-08-06, 05:10 PM)Leefish Wrote: [ -> ]Do you have this in your page?
// set the path to your forums directory here (without trailing slash) $forumdir = "./mybb"; // end editing $change_dir = "./"; if(!@chdir($forumdir) && !empty($forumdir)) { if(@is_dir($forumdir)) { $change_dir = $forumdir; } else { die("\$forumdir is invalid!"); } } global $theme; $theme['imgdir'] = $forumdir.'/'.$theme['imgdir'];
hey, that looks familiar!
actually if you are always to be using a subfolder in the forum root then using a mix of the above and polarbear's solution is easiest. just global $theme first
global $theme;
if(strpos($theme['imgdir'], '://' === false && substr($theme['imgdir'],0,1) != '/')
{
$theme['imgdir'] = '../'.$theme['imgdir'];
}
basically if the path is not starting with a protocol (//:) and not already an absolute path (starts with /) then prefix the path with the relative parent (../)
2012-08-06, 06:10 PM
Yes Pavemen, I got it from your portal as home page set up. Sorry for not crediting.
It worked well for me, thank you.
It worked well for me, thank you.
2012-08-06, 07:48 PM
not an issue. the main bit of code is in the portal already by default, my only edit is the theme update.
Pages: 1 2