GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   Quick Code Help Please? (https://gfy.com/showthread.php?t=1099279)

TheDA 02-09-2013 07:31 AM

Quick Code Help Please?
 
I have a problem with Arylia gallery builder where relative URL's for the banners on gallery pages do not display on some browsers.

As a quick fix for future gallery builds I want to mod the code to do away with relative URL and put in the absolute instead.

I think I am looking at the correct point, so where can I include http://www.domain.com instead, what is the correct syntax?

Code:

while($startPos = strpos($page, "__HTMLBANNER__")) {
                if(isset($banners[$position])) {
                        switch($bannerTypes[$position]) {
                                case "text":

                                        $page = substr_replace($page, '<a'.$sponsorBlank.' href="'.$linkCodes[$position].'"><? include $_SERVER["DOCUMENT_ROOT"]."'.$banners[$position].'" ?></a>', $startPos, 14);
                                        break;
                               
                                case "html":

                                        $page = substr_replace($page, '<? include $_SERVER["DOCUMENT_ROOT"]."'.$banners[$position].'" ?>', $startPos, 14);
                                        break;

                                default:

                                        $page = substr_replace($page, '<a'.$sponsorBlank.' href="'.$linkCodes[$position].'"><img border="0" src="'.$banners[$position].'"></a>', $startPos, 14);
                                        break;
                        }
                } else {
                        $page = substr_replace($page, '', $startPos, 14);
                }
                $position ++;
        }


NaughtyRob 02-09-2013 09:14 AM

I am just guessing, it looks like you would put it here: ["DOCUMENT_ROOT"]
But here is a bump for you if anyone knows.

TheDA 02-09-2013 09:27 AM

Quote:

Originally Posted by NaughtyRob (Post 19472322)
I am just guessing, it looks like you would put it here: ["DOCUMENT_ROOT"]
But here is a bump for you if anyone knows.

Yeah I must be getting the syntax wrong or something. Thanks.

sarettah 02-09-2013 09:54 AM

Where it says:

<img border="0" src="'.$banners[$position].'">

Change to:

<img border="0" src="http://yourdomain.com' . $banners[$position].'">

If that does not find them then view the url to see if you need a slash (http://yourdomain.com/)

.


All times are GMT -7. The time now is 06:55 AM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123