Jarocks
08-12-2008, 02:48 PM
Is there a way to get the relative links and images to work in a custom vbulletin page outside the directory without having to go into the style and edit all the paths.
Edit: I have found a rudimentary solution to solve the image issue.
$headinclude = str_replace('images', $vbulletin->options['bburl'] . '/images', $headinclude);
$header = str_replace('images', $vbulletin->options['bburl'] . '/images', $header);
$footer = str_replace('images', $vbulletin->options['bburl'] . '/images', $footer);
should I go about doing the same for the links or is there an better way?
--------------- Added 1218559131 at 1218559131 ---------------
$headinclude = str_replace('href="', 'href="' . $vbulletin->options['bburl'] . '/', $headinclude);
$header = str_replace('href="', 'href="' . $vbulletin->options['bburl'] . '/', $header);
$footer = str_replace('href="', 'href="' . $vbulletin->options['bburl'] . '/', $footer);
$headinclude = str_replace('action="', 'action="' . $vbulletin->options['bburl'] . '/', $headinclude);
$header = str_replace('action="', 'action="' . $vbulletin->options['bburl'] . '/', $header);
$footer = str_replace('action="', 'action="' . $vbulletin->options['bburl'] . '/', $footer);
This sort of works but it seems like there should be a much simpler way to do it.
Edit: I have found a rudimentary solution to solve the image issue.
$headinclude = str_replace('images', $vbulletin->options['bburl'] . '/images', $headinclude);
$header = str_replace('images', $vbulletin->options['bburl'] . '/images', $header);
$footer = str_replace('images', $vbulletin->options['bburl'] . '/images', $footer);
should I go about doing the same for the links or is there an better way?
--------------- Added 1218559131 at 1218559131 ---------------
$headinclude = str_replace('href="', 'href="' . $vbulletin->options['bburl'] . '/', $headinclude);
$header = str_replace('href="', 'href="' . $vbulletin->options['bburl'] . '/', $header);
$footer = str_replace('href="', 'href="' . $vbulletin->options['bburl'] . '/', $footer);
$headinclude = str_replace('action="', 'action="' . $vbulletin->options['bburl'] . '/', $headinclude);
$header = str_replace('action="', 'action="' . $vbulletin->options['bburl'] . '/', $header);
$footer = str_replace('action="', 'action="' . $vbulletin->options['bburl'] . '/', $footer);
This sort of works but it seems like there should be a much simpler way to do it.