Testseite mit Galerie Plugins

Ein CMSimple Support Forum für deutsch sprechende Nutzer und Entwickler
Ralf H.
Posts: 495
Joined: Sun Feb 16, 2014 1:45 pm
Location: Münsterland
Contact:

Re: Testseite mit Galerie Plugins

Post by Ralf H. » Fri Nov 19, 2021 1:04 pm

cmb wrote:
Thu Nov 18, 2021 10:23 pm
PHP upload_max_filesize und post_max_size stehen auf Online-Server = 8 MB
Soll ich die trotzdem hochsetzen (geht bis 64 MB), auch wenn hier nicht die Ursache?
Bei memory_limit=16MB würde ich mal darauf tippen, dass das das Problem ist. Damit dürfte CMSimple_XH auch ohne Bildbearbeitung schon ziemlich am Limit sein.
Habe ich hochgesetzt auf 256 MB. Upload von großen Bildern klappt jetzt in den Plugins!
Getestet mit Imgalbum und Pictures. ;)
Badminton Individual-/Gruppentraining im Münsterland:
http://www.badminton-tips.de (deutsch)

cmb
Posts: 14225
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

Re: Testseite mit Galerie Plugins

Post by cmb » Fri Nov 19, 2021 2:20 pm

Ralf H. wrote:
Fri Nov 19, 2021 1:04 pm
cmb wrote:
Thu Nov 18, 2021 10:23 pm
PHP upload_max_filesize und post_max_size stehen auf Online-Server = 8 MB
Soll ich die trotzdem hochsetzen (geht bis 64 MB), auch wenn hier nicht die Ursache?
Ich würde sie nur so hoch setzen, wie nötig. Das sind eigentlich Sicherheitseinstellungen, die verhindern, das übermäßig große Datenmengen an PHP gesendet werden können (kostet Zeit, diese zu verarbeiten). 8 MB erscheint großzügig.
Ralf H. wrote:
Fri Nov 19, 2021 1:04 pm
Bei memory_limit=16MB würde ich mal darauf tippen, dass das das Problem ist. Damit dürfte CMSimple_XH auch ohne Bildbearbeitung schon ziemlich am Limit sein.
Habe ich hochgesetzt auf 256 MB. Upload von großen Bildern klappt jetzt in den Plugins!
Getestet mit Imgalbum und Pictures. ;)
:D
Christoph M. Becker – Plugins for CMSimple_XH

lck
Posts: 2967
Joined: Wed Mar 23, 2011 11:43 am
Contact:

Re: Testseite mit Galerie Plugins

Post by lck » Fri Nov 19, 2021 6:00 pm

cmb wrote:
Thu Nov 18, 2021 10:23 pm
lck wrote:
Thu Nov 18, 2021 12:39 pm
Imgalbum
Backend > Galerieübersicht

Klickt man hier auf das zweite und nachfolgende Image zum Editieren, so erscheint folgende Meldung (nur beim ersten Bild nicht):
Debug-Mode wrote:WARNING: Undefined array key 2
D:\...\xh175\plugins\imgalbum\libs\gallery_adminfunctions.php:336
WARNING: Undefined array key 3
D:\...\xh175\plugins\imgalbum\libs\gallery_adminfunctions.php:336
gallery_adminfunctions.php steht (Zeile 334 - 337)

Code: Select all

for ($i=0; $i<sizeof($extra); $i++) {
	$o.= '<tr><td class="plugincf"><a href="#" class="pl_tooltip"><img src = "'.(isset($pth['folder']['corestyle'])?$pth['folder']['corestyle']:$pth['folder']['plugins'].'pluginloader/css/') . 'help_icon.png" alt="" class="helpicon" />  <span>'.$plugin_tx[$plugin]['adm_info'].'</span></a>';
	$o.='<label for="extra_'.$i.'" class="'.$plugin.'_label">'.((isset($extra_label[$i]) && ($extra_label[$i]!=""))?$extra_label[$i]:$extra[$i]).'</label>'.tag('input type="text" name="extra[]" value="'.$extra_info[$i].'" id="extra_'.$i.'"').'</td></tr>';
}
Wo liegt da der Hund begraben :? .
In der Plugin-Konfiguration und -Spracheinstellung. Schau mal nach extrainfo_fields; das gibt es in der Konfiguration und der Sprachdatei; bei sollten gleich viele Einträge (durch Komma getrennt) enthalten.
Leider nein, das ändert nichts. Auch wenn ich das eins zu eins eintrage oder nichts oder nur den Titel.

Nochmal eine neue Galerie angelegt. In der Galerieübersicht tritt das Problem bei doch allen Bildern auf.
Aber, speichert man hier die "Edit image information" (hier ist von Haus aus nur der Titel eingetragen), so verschwinden die Debug-Warnings.

Ursache scheint die Erstellung der Extra-Info Text-Dateien zu sein die im Galerie-Ordner beim ersten Aufruf der Galerie erstellt werden. Darin steht nur der Titel gefolgt von einen Strichpunkt. Beispiel:

Code: Select all

03-img.jpg;
Nach dem speichern der "Edit image information" im Backend wird die Text-Datei geändert zu:

Code: Select all

03-img.jpg;;;
Der "Hund" scheint mir hier begraben zu sein:
gallery_adminfunctions.php Zeile 256 bis 270

Code: Select all

		//Create extra info
		if (isset($_GET['info'])) {
			$data_file=preg_replace("/.jpg/i",".txt",$img);
			if ($dfh=fopen($path.$data_file,"w")) {
				$count=count($_POST['extra']);
				$fields="";
				foreach ($_POST['extra'] as $field) {
					$fields.=trim($field).';';
				}
				if ($fields!="")
					$fields=substr($fields, 0, -1); // cut last ;
				fwrite($dfh,$fields);
				fclose($dfh);
			}
		}
:? evtl. bei $fields.=trim($field).';';
„Bevor du den Pfeil der Wahrheit abschießt, tauche die Spitze in Honig!“   👉 Ludwig's XH-Templates for MultiPage & OnePage

olape
Posts: 2746
Joined: Fri Mar 13, 2015 8:47 am
Contact:

Re: Testseite mit Galerie Plugins

Post by olape » Fri Nov 19, 2021 8:55 pm

lck wrote:
Fri Nov 19, 2021 6:00 pm
:? evtl. bei $fields.=trim($field).';';
Immer noch nur nach dem, was ich hier sehe.

Nein, das sieht eigentlich aus wie es soll.
Ich würde mal vor der Schleife per var_dump $_POST ausgeben lassen um zu sehen, was in $_POST['extra'] drin steht.
Gruß Olaf, Plugins for CMSimple_XH

Ich habe schon lange den Verdacht, dass so viele so eifrig auf Gender, Trans und Queer machen:
Weil sie für das Fachliche ganz einfach zu doof sind.

Ralf H.
Posts: 495
Joined: Sun Feb 16, 2014 1:45 pm
Location: Münsterland
Contact:

Re: Testseite mit Galerie Plugins

Post by Ralf H. » Sat Nov 20, 2021 1:16 pm

Imgalbum:

Online wird durch eine Sortieränderung (none, alpha, random or alpharandom) keine solche umgesetzt.
Mit "none" müssten die 2cv-Bilder zuletzt eingereiht werden.

In Xampp wird die Reihenfolge entsprechend umgesetzt.
Badminton Individual-/Gruppentraining im Münsterland:
http://www.badminton-tips.de (deutsch)

lck
Posts: 2967
Joined: Wed Mar 23, 2011 11:43 am
Contact:

Re: Testseite mit Galerie Plugins

Post by lck » Sat Nov 20, 2021 1:19 pm

olape wrote:
Fri Nov 19, 2021 8:55 pm
Ich würde mal vor der Schleife per var_dump $_POST ausgeben lassen um zu sehen, was in $_POST['extra'] drin steht.
Dazu bräuchte ich eine detaillierte Anleitung. Meine Versuche brachten keine Ausgabe.
„Bevor du den Pfeil der Wahrheit abschießt, tauche die Spitze in Honig!“   👉 Ludwig's XH-Templates for MultiPage & OnePage

cmb
Posts: 14225
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

Re: Testseite mit Galerie Plugins

Post by cmb » Sat Nov 20, 2021 4:01 pm

lck wrote:
Thu Nov 18, 2021 12:39 pm
Imgalbum
Backend > Galerieübersicht

Klickt man hier auf das zweite und nachfolgende Image zum Editieren, so erscheint folgende Meldung (nur beim ersten Bild nicht):
Debug-Mode wrote:WARNING: Undefined array key 2
D:\...\xh175\plugins\imgalbum\libs\gallery_adminfunctions.php:336
WARNING: Undefined array key 3
D:\...\xh175\plugins\imgalbum\libs\gallery_adminfunctions.php:336
gallery_adminfunctions.php steht (Zeile 334 - 337)

Code: Select all

for ($i=0; $i<sizeof($extra); $i++) {
	$o.= '<tr><td class="plugincf"><a href="#" class="pl_tooltip"><img src = "'.(isset($pth['folder']['corestyle'])?$pth['folder']['corestyle']:$pth['folder']['plugins'].'pluginloader/css/') . 'help_icon.png" alt="" class="helpicon" />&nbsp; <span>'.$plugin_tx[$plugin]['adm_info'].'</span></a>';
	$o.='<label for="extra_'.$i.'" class="'.$plugin.'_label">'.((isset($extra_label[$i]) && ($extra_label[$i]!=""))?$extra_label[$i]:$extra[$i]).'</label>'.tag('input type="text" name="extra[]" value="'.$extra_info[$i].'" id="extra_'.$i.'"').'</td></tr>';
}
Wo liegt da der Hund begraben :? .
Das Problem ist tatsächlich, dass die drei Arrays unterschiedlich lang sein können. Ob das beabsichtigt ist, weiß ich nicht, aber ich denke man kann sie einfach mit leeren Zeichenketten auffüllen:

Code: Select all

--- D:/Users/cmb/Downloads/imgalbum/libs/gallery_adminfunctions.php	Mon Feb  5 20:03:36 2018
+++ D:/Users/cmb/wwwroot/xh175a/plugins/imgalbum/libs/gallery_adminfunctions.php	Sat Nov 20 15:40:00 2021
@@ -329,6 +329,8 @@
 		}
 		$extra=explode(',',$plugin_cf[$plugin]['extrainfo_fields']);
 		$extra_label=explode(',',$plugin_tx[$plugin]['extrainfo_fields']);
+		$extra_info=array_pad($extra_info, count($extra), "");
+		$extra_label=array_pad($extra_label, count($extra), "");
 		$o.='<table>';
 		
 		for ($i=0; $i<sizeof($extra); $i++) {
Vor PHP 8 waren diese Warnings übrigens noch Notices; würde mich nicht wundern, wenn es unter PHP 9 Fehler sind. Sollte man also am besten bald beheben.
Ralf H. wrote:
Sat Nov 20, 2021 1:16 pm
Imgalbum:

Online wird durch eine Sortieränderung (none, alpha, random or alpharandom) keine solche umgesetzt.
Mit "none" müssten die 2cv-Bilder zuletzt eingereiht werden.

In Xampp wird die Reihenfolge entsprechend umgesetzt.
Verzeichnisauflistungen sind unter Windows/NTFS immer alphabetisch sortiert; unter Linux aber nicht. Mir scheint, dass Imgalbum_XH gar nicht alphabetisch sortiert. Das könnte man wohl so machen:

Code: Select all

--- D:/Users/cmb/Downloads/imgalbum/index.php	Wed Jan 10 10:15:06 2018
+++ D:/Users/cmb/wwwroot/xh175a/plugins/imgalbum/index.php	Sat Nov 20 15:17:59 2021
@@ -137,10 +137,13 @@
 		if (stristr($plugin_cf[$plugin]['thumb_paginate_position'],"top") || stristr($plugin_cf[$plugin]['thumb_paginate_position'],"both")) {
 			$t.=$t_paginator;
 		}
+		if (stristr($plugin_cf[$plugin]['thumb_sort_order'],"alpha")) {
+			natcasesort($img_array);
+		}
 		if (intval($thumb_paginate_thumbs_page) >= sizeof($img_array)) {
 			if (stristr($plugin_cf[$plugin]['thumb_sort_order'],"random")) {
  				skshuffle($img_array);	
- 			} 
+ 			}
 		}
     $t.='<div class="'.$css_class.'" >';
 		if (stristr($plugin_cf[$plugin]['thumb_table'],"true")) {
Es ist halt zu beachten, dass none und alpha unter Windows keinen Unterschied machen. Vielleicht sollte man das dokumentieren.

Übrigens konnte ich mich über eine Stunde lang nicht ins Forum einloggen. Das Problem ist bekannt, aber da es in den letzten Wochen bei mir wieder öfter auftrat, sollte man sich der Sache vielleicht doch einmal annehmen.
Christoph M. Becker – Plugins for CMSimple_XH

Ralf H.
Posts: 495
Joined: Sun Feb 16, 2014 1:45 pm
Location: Münsterland
Contact:

Re: Testseite mit Galerie Plugins

Post by Ralf H. » Sat Nov 20, 2021 4:40 pm

cmb wrote:
Sat Nov 20, 2021 4:01 pm
Verzeichnisauflistungen sind unter Windows/NTFS immer alphabetisch sortiert; unter Linux aber nicht. Mir scheint, dass Imgalbum_XH gar nicht alphabetisch sortiert. Das könnte man wohl so machen:

Code: Select all

 		if (stristr($plugin_cf[$plugin]['thumb_paginate_position'],"top") || stristr($plugin_cf[$plugin]['thumb_paginate_position'],"both")) {
 			$t.=$t_paginator;
 		}
+		if (stristr($plugin_cf[$plugin]['thumb_sort_order'],"alpha")) {
+			natcasesort($img_array);
+		}
 		if (intval($thumb_paginate_thumbs_page) >= sizeof($img_array)) {
 			if (stristr($plugin_cf[$plugin]['thumb_sort_order'],"random")) {
  				skshuffle($img_array);	
- 			} 
+ 			}
 		}
     $t.='<div class="'.$css_class.'" >';
 		if (stristr($plugin_cf[$plugin]['thumb_table'],"true")) {
Habe versucht, Zeilen 137-146 mit deinem Code zu ersetzen.
Die komplette index.php sieht dann so aus:

Code: Select all

<?php
/***********************************************************
============================================================
    Gallery Collection Image Album - CMSimple plugin - Commercial version
============================================================
Version:    1.4.0
Copyright:  © simpleSolutions 2012
Website:    simpleSolutions.dk
License:    view file license.txt and https://simpleSolutions.dk  
 
Supported lightboxes: Lightbox version 2.04 and prettyPhoto 

Unzip downloaded file and move imgalbum folder to plugin folder of your CMSimple website.
To activate insert #CMSimple $output.= imgalbum('/path/to/your/gallery/folder');# somewhere on your page  or in template.

Disclaimer : No warranties at all, use on your own risk !
Requirements : PH5, The Plugin-Loader must be installed and working ! , 
History
version 1.0.0   (Marts. 2012)
version 1.1.0   (Marts 2012)
	added random thumbs 
	added run from template
	added function change_table_cols($count); to change a number of colons on a page.
versin 1.1.1    (April 2012)
	removed fuction parameters expcept gallery_path
	function change_table_cols removed and replaced by function imgalbum_cofig(..))	
versin 1.2.0    (September 2012)
added class parameter on function call 
	bug fix in multilanguage admin
	added target on links in image text fields	
	added textarea styles for plugins alternate styesheet
	added class parameter on function call imgalbum($path, $css_class=null)
	$plugin_cf['imgalbum']['thumb_random'] replaced by $plugin_cf['imgalbum']['thumb_sort']
	added alphabetical sorting by image file names in the galleries, unless randomly selected in plugins configuration.
	added option to rename images file names to manipulate alphabetical sorting order.
version 1.2.1
	compatibility with CMSimple_XH ver 1.6
version 1.3.0
  added integration with cmsimplemobile plugin. Images are resized by cmsimplemobile plugin. On mobile devices, with installed simplesolutions plugin cmsimplemobile, the class parameter (both the defualt (ie imgalbum) and passed to the imgalbum function) is appended the suffix "_mobile". 
 New lightbox Image Lightbox is used as default on mobile devices
 Added config to show or not show description with thumbs, If extrainfo_under_thumbs = false then description is only visble in lightbox
version 1.4.0
 php 7 ready
 bug fixes
 
version 1.5.0 (not released)
fixed >/div> bug when no images are found
fixed bug fileupload creates now the watermark defined in configuration.
removed Svarrer gallery compatibility (ie tn_imgName)
CMSimple XH 1.7 ready
remvoed on the fly reconfiguration option due to removed functionality in CMSimpe XH 1.7 
***********************************************************/
global $pth, $hjs, $plugin_cf;

//echo "[".$plugin_cf['cmsimplemobile']['lightbox']."]";

$plugin = basename(dirname(__FILE__), "/"); 
if (stristr($plugin_cf[$plugin]['template'],"true")) {	// inititlize plugin header to run from template 
	if (!function_exists('simplesolutions_gallery')){
 			include_once($pth['folder']['plugins'].$plugin."/libs/gallery_functions.php");		
 	}
  $css_class=$plugin;
  $lightbox=$plugin_cf[$plugin]['lightbox'];  
  if (function_exists('is_mobile_device')) {
    if (is_mobile_device()) {
      $css_class.="_mobile";
      if (trim($lightbox)!="" and trim($plugin_cf['cmsimplemobile']['lightbox'])!="") {      
        $lightbox=$plugin_cf['cmsimplemobile']['lightbox']; //replace lightbox
      }
    }
  }
	imgalbum_scripts('', $css_class ,$plugin_cf['imgalbum']['thumb_effect_mouseover'], $plugin_cf['imgalbum']['thumb_effect_mouseout'], $plugin_cf['imgalbum']['thumb_effect_onload']);	
	sgallery_load_lightbox($lightbox, $css_class);
}	

function imgalbum($path, $css_class=null, $thumb_paginate_thumbs_page=null) {
	global $plugin_cf, $plugin_tx, $plugin, $pth, $hjs, $cf;
  static $serialno=0;
  
 	$plugin = basename(dirname(__FILE__), "/");
  $lightbox=$plugin_cf[$plugin]['lightbox'];  
  $lightbox_group = $plugin.(string) $serialno++;		
	$thumb_width=intval($plugin_cf[$plugin]['thumb_width']);
	$thumb_height=intval($plugin_cf[$plugin]['thumb_height']);
	$effect_onload=$plugin_cf['imgalbum']['thumb_effect_onload'];
	$effect_mouseover=$plugin_cf['imgalbum']['thumb_effect_mouseover'];
	$effect_mouseout=$plugin_cf['imgalbum']['thumb_effect_mouseout'];
  $path=trim($path);
	
	$t='<!-- Gallery Collection: Image Album (c) simpleSolutions.dk -->';
	if (!is_dir($path)) {
		if (!mkdir($path,0777,true)) {
			die($plugin_tx[$plugin]['dir_fail']);
		}
	}
	if (!is_dir($path ."/thumb")) {
		if (!mkdir($path ."/thumb")) {
			$t.='<p class="'.$plugin.'_error_msg">'.$path."/thumb: ".$plugin_tx[$plugin]['thumb_dir_fail'].'</p>';	
		}
	}
	if ($css_class==null) {
		$css_class=$plugin;
	}
  if (function_exists('is_mobile_device')) {
    if (is_mobile_device()) {
      if (trim($plugin_cf[$plugin]['lightbox'])!="" and trim($plugin_cf['cmsimplemobile']['lightbox'])!="") {      
        $lightbox=$plugin_cf['cmsimplemobile']['lightbox']; //replace lightbox
      } 
      $css_class.="_mobile";
    }
  }
  
 	if (!function_exists('simplesolutions_gallery')){
 		include_once($pth['folder']['plugins'].$plugin."/libs/gallery_functions.php");		
 	}
 	$img_array=sgallery_read_images($path);
 	
 	if (sizeof($img_array)>0) {
		$thumb_prefix="tn_";
		
		if (!stristr($plugin_cf[$plugin]['thumb_use_gallery'],"true")) {
			$thumb_prefix=$plugin."_";
		}
		$cols=0;
		$t_paginator="";
    if (!isset($thumb_paginate_thumbs_page)) {
      $thumb_paginate_thumbs_page = $plugin_cf[$plugin]['thumb_paginate_thumbs_page'];
    }    
		if (!stristr($plugin_cf[$plugin]['thumb_paginate'],"true")) {
			$thumb_paginate_thumbs_page=sizeof($img_array);
		} 
		require_once $pth['folder']['plugins'].$plugin."/libs/pagination/pagination.php";
		$totall_content=sizeof($img_array);
		$current_page=(isset($_GET['page']) && is_numeric($_GET['page']))?$_GET['page']:1;
		$cat=new pagination($totall_content, intval($thumb_paginate_thumbs_page), $current_page, (ceil($totall_content/intval($thumb_paginate_thumbs_page))+2) );
		$t_paginator.=$cat->Show_Pagination(curPageURL(),'page','pagination');
 		if (stristr($plugin_cf[$plugin]['thumb_paginate_position'],"top") || stristr($plugin_cf[$plugin]['thumb_paginate_position'],"both")) {
 			$t.=$t_paginator;
 		}
+		if (stristr($plugin_cf[$plugin]['thumb_sort_order'],"alpha")) {
+			natcasesort($img_array);
+		}
 		if (intval($thumb_paginate_thumbs_page) >= sizeof($img_array)) {
 			if (stristr($plugin_cf[$plugin]['thumb_sort_order'],"random")) {
  				skshuffle($img_array);	
- 			} 
+ 			}
 		}
     $t.='<div class="'.$css_class.'" >';
 		if (stristr($plugin_cf[$plugin]['thumb_table'],"true")) {
			$t.='<table border="0"><tr>';
		}
		$imgcount=1;
		foreach($img_array as $file) {
			if ($imgcount>(($current_page-1)*intval($thumb_paginate_thumbs_page)) && ($imgcount<=(($current_page-1)*intval($thumb_paginate_thumbs_page) + intval($thumb_paginate_thumbs_page)))) {
			if (stristr($plugin_cf[$plugin]['thumb_table'],"true")) {
				$t.='<td class="thumb_container">';
			}
			else {
				$t.='<span class="thumb_container">';
			}
			if (!file_exists($path.'/thumb/'.$thumb_prefix.$file)) {
				sgallery_create_thumb($path,$file,$thumb_prefix, $thumb_width, $thumb_height, $plugin_cf[$plugin]['thumb_crop']);
			}
			$t.= sgallery_lightbox_code($path, $file, $thumb_prefix, $lightbox, $lightbox_group, null, (stristr($plugin_cf[$plugin]['extrainfo_under_thumbs'],'true')?true:false));
			if (stristr($plugin_cf[$plugin]['thumb_table'],"true")) {	
				$t.='</td>';
			}
			else {
				$t.='</span>';
			}
			if (++$cols==intval($plugin_cf['imgalbum']['thumb_table_cols'])) {
				if (stristr($plugin_cf[$plugin]['thumb_table'],"true")) {
					$t.='</tr><tr>';
				}
				$cols=0;
			}
			}
			$imgcount++;
		}
		
		if (stristr($plugin_cf[$plugin]['thumb_table'],"true")) {
			for ($in=$cols; ($in<$plugin_cf['imgalbum']['thumb_table_cols']) && ($cols!=0) ;$in++) { 
				$t.='<td></td>';
			}
			$t.='</tr></table>';
		}
		if (stristr($plugin_cf[$plugin]['thumb_paginate_position'],"bottom") || stristr($plugin_cf[$plugin]['thumb_paginate_position'],"both")) {
				$t.=$t_paginator;
			}
		//$t.=$tmp;
		if (!stristr($plugin_cf[$plugin]['template'],"true")) {
			imgalbum_scripts($path, $css_class, $effect_onload, $effect_mouseover, $effect_mouseout);
			sgallery_load_lightbox($lightbox, $css_class);	
		}
	}
	else {
		$t.='<div><p class="'.$plugin.'_error_msg">'.$plugin_tx[$plugin]['err_no_images'];
	}
	
	$t.='</p>'; 
	$t.='</div>';
  //DO NOT REMOVE. To hide buy a license at http://simplesolutions.dk/?License
	$t.='<p class="'.$plugin.'_credits">CMSimple plugin: Gallery Collection Image Album'.tag('br').'&copy; <a href="http://simplesolutions.dk"><span style="color: #aaa;">simple</span><span style="color:red";>Solutions</span></a></p>';
	//DO NOT REMOVE. To hide buy a license at http://simplesolutions.dk

	$t.='<!-- Image Album (c) simpleSolutions.dk -->';
	return $t;
}

function imgalbum_scripts($path, $css_class, $effect_onload, $effect_mouseover, $effect_mouseout) {	
	global $hjs, $pth, $cf, $plugin, $plugin_cf, $jQueryPlugins;
	 
	include_once($pth['folder']['plugins'].'jquery/jquery.inc.php');
	include_jQuery();
	include_jQueryUI();
	
	if (file_exists($path.'/css/stylesheet.css') && stristr($plugin_cf[$plugin]['local_stylesheet'],'true')) { 
 		$hjs.=tag('link rel="stylesheet" href="'.$path.'/css/stylesheet.css" type="text/css"');
	}
	$hjs.='
	<script type="text/javascript">
		/* <![CDATA[ */
		(function($) {
    	$(document).ready(function() {';
    if ($effect_onload!=null && $effect_onload!="") {
    	$hjs.='
			$(".'.$css_class.' .thumb").'.$effect_onload.';';
   	}
   	if ($effect_mouseover!=null && $effect_mouseover!="") {
      $hjs.='
			$(".'.$css_class.' .thumb").mouseover(function(){ $(this).'.$effect_mouseover.'; });';
    }
    if ($effect_mouseout!=null && $effect_mouseout!="") {
      $hjs.='
			$(".'.$css_class.' .thumb").mouseout(function(){ $(this).'.$effect_mouseout.'; });';
    }
		$hjs.='
		}) 
		})(jQuery);
		/* ]]> */
   </script>';
   /*
   show("explode", { pieces: 16		 }, 1000);
   effect( "highlight", {color: "#ffffff"}, 1000 );
    $(this).animate({ backgroundColor: "black" }, 1000); 
   $(this).effect("bounce", { times:12 }, 300); 
   $(".thumb").hide("fade", {}, 1000);
   $(".thumb").show("fade", {}, 5000);
   */
	}
	
	/*******************************************************
	// Change configuration
	*******************************************************/
  /*  
	function imgalbum_config($cf, $value) {
		global $plugin, $plugin_cf;
	
		$plugin_cf['imgalbum'][$cf]=$value;
		return;
	}	
  */
	function curPageURL() {
	 $pageURL = 'http';
	 //if ($_SERVER["HTTPS"] == "on") {$pageURL .= "s";}
   if ( isset( $_SERVER["HTTPS"] ) && strtolower( $_SERVER["HTTPS"] ) == "on" ) {
    $pageURL .= "s";
   }
	 $pageURL .= "://";
	 if ($_SERVER["SERVER_PORT"] != "80") {
	  $pageURL .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"];
	 } else {
	  $pageURL .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];
	 }
	 $pageURL=explode("&page",$pageURL);
	 return $pageURL[0];
	}
?>
Die erezeugt dann folgenden debugfehler:
syntax error, unexpected 'if' (T_IF) in D:\xampp\htdocs\MWM\plugins\imgalbum\index.php on line 140
Badminton Individual-/Gruppentraining im Münsterland:
http://www.badminton-tips.de (deutsch)

lck
Posts: 2967
Joined: Wed Mar 23, 2011 11:43 am
Contact:

Re: Testseite mit Galerie Plugins

Post by lck » Sat Nov 20, 2021 4:47 pm

cmb wrote:
Sat Nov 20, 2021 4:01 pm
Das Problem ist tatsächlich, dass die drei Arrays unterschiedlich lang sein können. Ob das beabsichtigt ist, weiß ich nicht, aber ich denke man kann sie einfach mit leeren Zeichenketten auffüllen:

Code: Select all

--- D:/Users/cmb/Downloads/imgalbum/libs/gallery_adminfunctions.php	Mon Feb  5 20:03:36 2018
+++ D:/Users/cmb/wwwroot/xh175a/plugins/imgalbum/libs/gallery_adminfunctions.php	Sat Nov 20 15:40:00 2021
@@ -329,6 +329,8 @@
 		}
 		$extra=explode(',',$plugin_cf[$plugin]['extrainfo_fields']);
 		$extra_label=explode(',',$plugin_tx[$plugin]['extrainfo_fields']);
+		$extra_info=array_pad($extra_info, count($extra), "");
+		$extra_label=array_pad($extra_label, count($extra), "");
 		$o.='<table>';
 		
 		for ($i=0; $i<sizeof($extra); $i++) {
Super. Warnings sind verschwunden! :)
„Bevor du den Pfeil der Wahrheit abschießt, tauche die Spitze in Honig!“   👉 Ludwig's XH-Templates for MultiPage & OnePage

cmb
Posts: 14225
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

Re: Testseite mit Galerie Plugins

Post by cmb » Sat Nov 20, 2021 5:24 pm

Ralf H. wrote:
Sat Nov 20, 2021 4:40 pm
Habe versucht, Zeilen 137-146 mit deinem Code zu ersetzen.
Oh, ich hätte vielleicht erklären sollen, dass Zeilen mit einem Minus (-) am Anfang entfernt, und Zeilen mit einem Plus (+) am Anfang hinzugefügt werden sollen (aber ohne das +).
Christoph M. Becker – Plugins for CMSimple_XH

Post Reply