summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorStarla Insigna <hatkirby@fourisland.com>2008-12-05 15:46:29 -0500
committerStarla Insigna <hatkirby@fourisland.com>2008-12-05 15:46:29 -0500
commit6c4ea65b25b7436027385824f33a0d0afe84ea7b (patch)
tree12b945150997b1f7a4a64936542b2eaf3cd529e9
parent76d12bd65379d8345ec3e835b2c2e162c46b2f9d (diff)
downloadfourisland-6c4ea65b25b7436027385824f33a0d0afe84ea7b.tar.gz
fourisland-6c4ea65b25b7436027385824f33a0d0afe84ea7b.tar.bz2
fourisland-6c4ea65b25b7436027385824f33a0d0afe84ea7b.zip
Fixed Pingback display problem
This was only noticed when a lot of attention was put on the pingback engine when TimTam's pingback (http://tamasys.wordpress.com/2008/12/03/the-closest-book/) to
(http://fourisland.com/blog/of-books-and-memes/) failed. This in itself was not the actual problem, that being that TimTam seems to have used the incorrect URL to link
to said post, but this was also noticed as rendering the pingbacks themselves as absolutely ugly comments.
-rwxr-xr-xtheme/header.tpl4
-rwxr-xr-xxmlrpc.php18
2 files changed, 15 insertions, 7 deletions
diff --git a/theme/header.tpl b/theme/header.tpl index 36a4d10..c087f67 100755 --- a/theme/header.tpl +++ b/theme/header.tpl
@@ -17,10 +17,6 @@
17 <SCRIPT SRC="/theme/js/round_bubbles.js" TYPE="text/javascript"></SCRIPT> 17 <SCRIPT SRC="/theme/js/round_bubbles.js" TYPE="text/javascript"></SCRIPT>
18 <SCRIPT SRC="/theme/js/thickbox.js" TYPE="text/javascript"></SCRIPT> 18 <SCRIPT SRC="/theme/js/thickbox.js" TYPE="text/javascript"></SCRIPT>
19 19
20 <!--[if lt IE 8]>
21 <script src="http://ie7-js.googlecode.com/svn/version/2.0(beta3)/IE8.js" type="text/javascript"></script>
22 <![endif]-->
23
24 <!--BEGIN SPLASH--> 20 <!--BEGIN SPLASH-->
25 <SCRIPT TYPE="text/javascript"> 21 <SCRIPT TYPE="text/javascript">
26 tb_splash(); 22 tb_splash();
diff --git a/xmlrpc.php b/xmlrpc.php index 2c634d3..69990da 100755 --- a/xmlrpc.php +++ b/xmlrpc.php
@@ -58,9 +58,21 @@ function ping($xmlrpcmsg)
58 $title = $from; 58 $title = $from;
59 } 59 }
60 60
61 $text = substr($page_data,(stripos($page_data,$to)-300),700); 61 preg_match_all('/HREF="([^"]+)">([^>]+)<\/A>/i',$page_data,$matches);
62 $text = strip_tags($text); 62 for ($i=0;$i<count($matches[1]);$i++)
63 $text = str_replace("\n",' ',$text); 63 {
64 if ($matches[1][$i] == $to)
65 {
66 $find = $matches[2][$i];
67 }
68 }
69
70 $text = strip_tags($page_data);
71 $text = substr($text,(stripos($text,$find)-300),700);
72 $text = str_ireplace('<BR>',"\n",$text);
73 $text = str_ireplace('<BR />',"\n",$text);
74 $text = str_replace("\t", ' ', $text);
75 $text = preg_replace('/' . "\n" . '([ ]*)' . "\n" . '/i', '', $text);
64 76
65 $commentText = "[url=" . $from . "]" . $title . "[/url]\n\n[....] " . $text . " [....]"; 77 $commentText = "[url=" . $from . "]" . $title . "[/url]\n\n[....] " . $text . " [....]";
66 78