Changeset 117772
- Timestamp:
- 05/14/2009 02:15:29 AM (17 years ago)
- File:
-
- 1 edited
-
articles2sidebar/trunk/article2sidebar.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
articles2sidebar/trunk/article2sidebar.php
r114916 r117772 5 5 Plugin URI: http://www.modulaweb.fr/blog/wp-plugins/article2sidebar/ 6 6 Description: Puts in side bar the excerpt of articles posted in a category called the same as the curent page or posted in the same category than the displayed page. Place en sidebar les articles placés dans une catégorie homonyme avec la page affichée ou de la même catégorie. 7 Version: 1 7 Version: 1.1 8 8 Author: Jean-François VIAL 9 9 Author URI: http://www.modulaweb.fr/ … … 54 54 $result = preg_match('/width="([0-9]*)" height="([0-9]*)"/', $postOutput, $matches); 55 55 if ($result) { 56 $pagestring = $matches[0]; 57 $postOutput = str_replace($pagestring, "", $postOutput); 58 } 59 if($postOutput != "<p>") { echo str_replace('<img','<img width="45"',$postOutput); } 56 if ($matches[1]>45 || $matches[2]>45) { 57 $pagestring = $matches[0]; 58 $postOutput = str_replace($pagestring, "", $postOutput); 59 } 60 } 61 if($postOutput != "<p>") { 62 if (($options['link']>0 || $display_link>0) && (!$display_link == 0)) 63 echo '<a href="' . $a2spost->post_name . '">'; 64 if ($matches[1]>45 || $matches[2]>45) { 65 echo preg_replace('/height="([0-9]*)"/i','',str_replace('<img','<img width="45"',$postOutput)); 66 } else { 67 echo $postOutput; 68 } 69 if (($options['link']>0 || $display_link>0) && (!$display_link == 0)) 70 echo '</a>'; 71 } 60 72 echo $a2spost->post_excerpt; 61 73 if (($options['link']>0 || $display_link>0) && (!$display_link == 0)) … … 78 90 $result = preg_match('/width="([0-9]*)" height="([0-9]*)"/', $postOutput, $matches); 79 91 if ($result) { 80 $pagestring = $matches[0]; 81 $postOutput = str_replace($pagestring, "", $postOutput); 82 } 83 if($postOutput != "<p>") { echo str_replace('<img','<img width="45"',$postOutput); } 92 if ($matches[1]>45 || $matches[2]>45) { 93 $pagestring = $matches[0]; 94 $postOutput = str_replace($pagestring, "", $postOutput); 95 } 96 } 97 if($postOutput != "<p>") { 98 if (($options['link']>0 || $display_link>0) && (!$display_link == 0)) 99 echo '<a href="' . $a2spost->post_name . '">'; 100 if ($matches[1]>45 || $matches[2]>45) { 101 echo preg_replace('/height="([0-9]*)"/i','',str_replace('<img','<img width="45"',$postOutput)); 102 } else { 103 echo $postOutput; 104 } 105 if (($options['link']>0 || $display_link>0) && (!$display_link == 0)) 106 echo '</a>'; 107 } 84 108 echo $content; 85 109 if (($options['link']>0 || $display_link>0) && (!$display_link == 0))
Note: See TracChangeset
for help on using the changeset viewer.