Third Party Plugins to CMSimple - how to install, use and create plugins
Moderator: Tata
-
cmb
- Posts: 14225
- Joined: Tue Jun 21, 2011 11:04 am
- Location: Bingen, RLP, DE
-
Contact:
Post
by cmb » Fri Jun 19, 2015 11:04 am
Please post the code around line 109 of the mentioned index.php (and mark or point out line 109). In the original Imagescroller_XH 1beta1 line 109 is supposed to be:
Code: Select all
.tag('img src="'.$fn.'" alt="" width="'.$width.'" height="'.$height.'"')
but this line can't cause thes notices.
-
Korvell
- Posts: 93
- Joined: Thu May 22, 2008 10:33 pm
Post
by Korvell » Fri Jun 19, 2015 11:12 am
Code: Select all
107 function imagescroller_image_li($img, $width, $height) {
108 if (is_array($img)) {
109 list($fn, $url, $title, $desc) = $img;
110 } else {
111 $fn = $img; $url = $title = $desc = NULL;
112 }
113 $o = '<li>'
114 .(!empty($url) ? '<a href="'.$url.'" target="_blank">' : '')
115 .tag('img src="'.$fn.'" alt="" width="'.$width.'" height="'.$height.'"')
116 .(!empty($url) ? '</a>' : '');
117 if (!empty($title) || !empty($desc)) {
118 $o .= '<div class="imagescroller_info">'
119 .'<h6>'
120 .(!empty($url) ? '<a href="'.$url.'">' : '')
121 .$title
122 .(!empty($url) ? '</a>' : '')
123 .'</h6>'
124 .'<p>'.$desc.'</p>'
125 .'</div>';
126 }
127 $o .= '</li>'."\n";
128 return $o;
129 }
-
cmb
- Posts: 14225
- Joined: Tue Jun 21, 2011 11:04 am
- Location: Bingen, RLP, DE
-
Contact:
Post
by cmb » Fri Jun 19, 2015 11:31 am
Ah! It seems that you use a file for the imagescroller which contains only the filenames (no additional info). If that is the case, the notice is to be expected and harmless (well, actually it is sloppy programming, and I should fix it).
A quick hack to silence the notice:
Code: Select all
@list($fn, $url, $title, $desc) = $img;
-
Korvell
- Posts: 93
- Joined: Thu May 22, 2008 10:33 pm
Post
by Korvell » Fri Jun 19, 2015 1:09 pm
Indeed - a few of the images in the data files have no further information/link...
Your fix fixed it
- Thanks!
-
cmb
- Posts: 14225
- Joined: Tue Jun 21, 2011 11:04 am
- Location: Bingen, RLP, DE
-
Contact:
Post
by cmb » Fri Jun 19, 2015 1:14 pm
Korvell wrote:Your fix fixed it
It's not really a fix, but rather the @ suppresses the notices. It's a bit like saying: yeah, I know it's not quite right, but don't tell me about it.
-
cmb
- Posts: 14225
- Joined: Tue Jun 21, 2011 11:04 am
- Location: Bingen, RLP, DE
-
Contact:
Post
by cmb » Mon Nov 20, 2017 11:05 am
Hi everybody!
Imagescroller_XH 1.0beta3 has just been released.
Some minor bugs have been fixed, and a lot of enhancements have been made. Especially note, that the plugin is now compatible with CMSimple_XH 1.7, but requires
Pfw_XH and PHP ≥ 5.4.0. Also note that the info format has been changed, as well as the folders where the images and info files are expected. See the
changelog for details.
Enjoy!