WBCE CMS – Way Better Content Editing.
Du bist nicht angemeldet.
Seiten: 1
Hi. I have updated a Baker 2.8.3 site to WBCE. The module Lightbox2 does not work properly anymore. Is therea fix or a new download? thank you.
Offline
PHP7.2 - Fatal error: Uncaught Error: Call to undefined function eregi() in /modules/lightbox2/view.php:69 Stack trace: #0 /framework/frontend.functions.php(308): require() #1 /templates/folgeseite/index.php(118): page_content(1) #2
Offline
The module loads an lightbox script from the stone age which causes issues with the colorbox and jquery scripts which are included in WBCE.
So remove the lines
echo '<link rel="stylesheet" type="text/css" href="' . WB_URL . '/modules/lightbox2/frontend.css" media="screen" />';
echo '<script src="' . WB_URL . '/modules/lightbox2/js/prototype.js" type="text/javascript"></script>' . "\n";
echo '<script src="' . WB_URL . '/modules/lightbox2/js/scriptaculous.js?load=effects" type="text/javascript"></script>' . "\n";
echo '<script src="' . WB_URL . '/modules/lightbox2/js/lightbox.js" type="text/javascript"></script>' . "\n";in the view.php completely.
Then, change
echo '<a href="' . WB_URL . $gallery_path . $img_list[$img_count] . '" class="lb_image_link" rel="lightbox[' . $gallery_name . ']" title="' . $gallery_name . '"><img class="lb_image" src="' . WB_URL . $thumb_path . $img_list[$img_count] . '" border="0" /></a>';to
echo '<a href="' . WB_URL . $gallery_path . $img_list[$img_count] . '" class="colorbox" rel="lightbox[' . $gallery_name . ']" title="' . $gallery_name . '"><img class="lb_image" src="' . WB_URL . $thumb_path . $img_list[$img_count] . '" border="0" /></a>';Replace the line
if (eregi($pattern, $file) && $image_info = getimagesize($WB_PATH.$gallery_path.$file)) {with
if (preg_match('%'.$pattern.'%', $file) && $image_info = getimagesize($WB_PATH.$gallery_path.$file)) {Beitrag geändert von florian (20.07.2018 08:44:16)
Offline
Thanks Florian. After the changes the page is empty. No pictures displayed. Could you recommend a better module and replace lightbox2?
Offline
After the changes the page is empty. No pictures displayed
i would like to fix this error first before recommending any other module.
Does the frontend template of the site include the lines
<?php
if (function_exists('register_frontend_modfiles')) {
register_frontend_modfiles('css');
register_frontend_modfiles('jquery');
register_frontend_modfiles('js');
} ?>in the <head> ?
Offline
The line with jquery was missing and I have added it to the template. But there is still no content displayed, with PHP 5.6 and PHP 7.2...
Offline
Sorry, I had a copy & paste error in my answer above. The line
if (eregi($pattern, $file) && $image_info = getimagesize($WB_PATH.$gallery_path.$file)) {should be changed to
if (preg_match('%'.$pattern.'%', $file) && $image_info = getimagesize($WB_PATH.$gallery_path.$file)) {Offline
still empty, no pictures displayed...
Offline
Well, then forget it, it's a crappy, outdated module anyway.
Use MiniGallery.
Offline
Thanks 
Offline
Another option is the Brax Highslide Gallery Module
https://addons.wbce.org/pages/addons.ph … em&item=63
it looks exactly the same (like the LB2 module) in the backend and you don't need to upload the images again.
Beitrag geändert von florian (20.07.2018 08:55:15)
Offline
Thank you. What is the better approach: 1. Update all galleries in WB2.8.3 or 2. update to WBCE first and then start changing the galleries?
Offline
I would always update/migrate the core first and then the modules, so you could do a complete rollback if necessary (assuming you have a backup).
Offline
stefanek
Seiten: 1