
06-21-2009, 06:17 AM
|
 |
|
|
Join Date: Mar 2007
Posts: 463
Благодарил(а): 0 раз(а)
Поблагодарили:
0 раз(а) в 0 сообщениях
|
|
Quote:
Originally Posted by chris1979
This is a great idea. I have a similar thing on my wordpress blog and it is excellent for bringing in extra traffic.
I have a problem with my installation though. As soon as I created the plug in, my site crashed. I just got a blank white page when I went to the site.
I've disabled the plugin for now but I'm very keen to make it work.
Can you help?
This is the plugin code I am referring to:
Code:
require_once("translate.php");
// Enable UTF-8 characters
if(isset($_GET['hl']))
{
header ('Content-type: text/html; charset=utf-8');
}
// Keep remainders of <style and <script tags!
$time = time(); // Unique Tag Identifier!
preg_match_all('|<script[^>]*>(.*?)</script>|si', $output,$scripttags, PREG_SET_ORDER);
for($i=0;$i<count($scripttags);$i++)
{
$output = str_replace($scripttags[$i][0], "<a name=\"$i\"></a>",$output);
}
//preg_match_all("<style[^>]*>.*</style>",$buffer,$styletags);
preg_match_all('|<style[^>]*>(.*?)</style>|si',$output,$styletags);
for($i=0;$i<count($styletags);$i++)
{
$output = str_replace($styletags[1][$i], "<a name=\"s$i\"></a>",$output);
}
$output=callback($output);
// Place back remainders of <style and <script tags!
for($i=0;$i<count($styletags);$i++)
{
$output = str_replace("<a name=\"s$i\"></a>", $styletags[1][$i], $output);
}
for($i=0;$i<count($scripttags);$i++)
{
$output = str_replace("<a name=\"$i\"></a>",$scripttags[$i][0] ,$output);
}
//print_r($scripttags);
//die("c:".count($scripttags).":".count($styletags));
(I am using vb 3.8.)
|
You uploaded all the files too?
|