Fix For Broken Image |
This topic is about Fix For Broken Image, the author, bramburn, wrote about: Here is a simple fix for the images that are not shown on none-standardised templates. Go to modules/minerva/tools/include.php find: CODE$this->html = str_replace('<link rel= ... To read more just scroll down
![]() ![]() |
Fix For Broken Image |
Apr 27 2008, 11:26 AM
Post
#1
|
|
![]() Administrator ![]() ![]() ![]() Group: Root Admin Posts: 905 Joined: 25-June 07 From: London Member No.: 1 |
Here is a simple fix for the images that are not shown on none-standardised templates.
Go to modules/minerva/tools/include.php find: CODE $this->html = str_replace('<link rel="shortcut icon" href="favicon.ico" />', '<link rel="shortcut icon" href="'.$this->ipsclass->vars['board_url'].'/favicon.ico" />', $this->html); $this->html = preg_replace('#src=([\'"])jscripts/(.+?)[\'"]#is', "src=\\1".$this->ipsclass->vars['board_url']."/jscripts/\\2\\1", $this->html); $this->html = preg_replace('#src=([\'"])cache/(.+?)[\'"]#is', "src=\\1".$this->ipsclass->vars['board_url']."/cache/\\2\\1", $this->html); $this->html = preg_replace('#href=([\'"])lofiversion/(.+?)[\'"]#is', "href=\\1".$this->ipsclass->vars['board_url']."/lofiversion/\\2\\1 rel=\\1NOFOLLOW\\1", $this->html); Add after: CODE $this->html = preg_replace('#src=([\'"])(?!http:\/\/)(.+?)[\'"]#is', "src=\\1".$this->ipsclass->vars['board_url']."/\\2\\1 ", $this->html); it should be under function replace_url() -------------------- Remember to please use the bug tracker for all bugs and errors, it is more organised that way.
Support in french and english If I reply in French please excuse my spelling & grammar, i haven't written in french for a long time. DO NOT PM ME TO ASK ME TO GO ON MSN, post the query on the support forums! |
|
|
|
![]() ![]() |
|
Lo-Fi Version | Sitemap | SEO by MinervaSEO © Icelabz.net | Time is now: 2nd December 2008 - 07:52 PM |