Changeset 603099
- Timestamp:
- 09/24/2012 01:37:52 PM (14 years ago)
- Location:
- site-slideshow/trunk
- Files:
-
- 3 edited
-
readme.txt (modified) (1 diff)
-
site-slideshow.php (modified) (1 diff)
-
slideshow-gallery-generate.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
site-slideshow/trunk/readme.txt
r521733 r603099 68 68 <li>2.1.1 Fixing minor bugs</li> 69 69 <li>2.2.0 Serious bug in context of encapsulation a fixed. Sometimes it caused error messages during image uploading </li> 70 <li>2.3.0 A bug wasting memory is fixed </li> 70 71 71 72 </ul> -
site-slideshow/trunk/site-slideshow.php
r521733 r603099 7 7 Author URI: http://internetdienste-berlin.de 8 8 Description: Site Slideshow as a sidebar widget represents for any article or page one image of the standard gallery, but it is not repeated any image when it is used by different posts and we show only the first image of every post. Klicking on the slide leads to the article/page the image stems from. There are some options for adapting the slideshow for your purposes. Further information look at http://www.internetdienste-berlin.de/2011/01/artikel-und-seiten-ubergreifende-slideshow-gallery-als-plugin/ 9 Version: 2. 2.49 Version: 2.3.0 10 10 */ 11 11 -
site-slideshow/trunk/slideshow-gallery-generate.php
r521278 r603099 5 5 6 6 global $runflag; 7 $runflag=0; 7 /*$runflag=0;*/ 8 8 9 9 /*Ganz gewiss ist diese brutale Umsetzung eines sql-Programms in ein php-Programms nicht vom feinsten und mit vielen 10 10 unnötigen Aktionen belastet, aber wenn ich mal schlauer sein sollte, mach ich es auch schlauer, hoff ich*/ 11 class dk_slideshow_update extends GaleriePlugin{ 11 add_action ('save_post','dk_slideshow_update'); 12 /*add_action ('plugins_loaded','dk_slideshow_update');*/ 12 13 function dk_slideshow_update(){ 13 14 global $wpdb; 14 15 $prefix = $wpdb -> prefix; 15 16 global $runflag; /*der Hook 'save_post' verursacht einen zweimaligen Durchlauf, durch diesen Flag wird das verhindert*/ 16 if ($runflag==1)return; 17 add_action ('save_post',array(&$this,'dk_slideshow_update')); 18 add_action ('plugins_loaded',array(&$this,'dk_slideshow_update')); 19 $pre = $this -> pre; 20 $limit =get_option($pre . 'limit') ; 17 /*if ($runflag==1)return;*/ 18 19 $limit =get_option('Galerielimit') ; 21 20 $wpdb->query($wpdb->prepare("DROP TABLE if EXISTS $prefix" . "site_slides")); 22 21 $wpdb->query($wpdb->prepare("CREATE TABLE IF NOT EXISTS $prefix" . "site_slides ( … … 50 49 $rows = mysql_num_rows($result); 51 50 for($j = 0; $j< $rows; ++$j){ 52 $ngg=0; 51 $ngg=-1; 52 $src=-1; 53 53 $id =mysql_result($result,$j,'ID'); 54 54 $images = get_children($id,'ARRAY_A'); … … 69 69 $image_url=''; 70 70 } 71 elseif ($src> 0) {71 elseif ($src>-1) { 72 72 if (stripos ($content,'.jpg',$src +5)){$ende=stripos($content,'.jpg',$src+5); 73 73 $leng=$ende+1 - $src; … … 77 77 $image_url='';} 78 78 } 79 elseif ($ngg> 0){79 elseif ($ngg>-1){ 80 80 $ende = stripos($content,']',$ngg); if (($ende-$ngg <18)){ 81 81 $galida=stripos($content,'=',$ngg)+1; … … 100 100 $wpdb->query($wpdb->prepare("DROP TABLE $prefix" . "site_slides")); 101 101 $wpdb->query($wpdb->prepare("RENAME TABLE hilfstabellexyz TO $prefix" . "site_slides")); 102 $runflag=1; 102 103 103 } 104 } 105 $Table = new dk_slideshow_update(); 104 105 106 106 107 ?>
Note: See TracChangeset
for help on using the changeset viewer.