AnyItems - Bakery. How to display image?

Boudi

Yes!

Your last point did the trick: (V1.71 only)

Quote
Original code:

$query_images = $database->query("SELECT * FROM `".TABLE_PREFIX."mod_bakery_images` WHERE position = '1' AND active = '1'");

New code:

$query_images = $database->query("SELECT * FROM `".TABLE_PREFIX."mod_bakery_images` WHERE position = '0' AND active = '1'");

Thnx for pointing this out.  :-)
...:: Bake the Unbakable ::...

Gast

#5
i take a little look into the anyItem-Snippet Vers. 0.70 here from the Addon area

Problem 1: the include.php use for the internal links to the lightbox-files http://localhost/wb283/ instead of <?php echo WB_URL; ?>

corrected code from line 161 - 176 // file modules/anyitems/include.php
<script type="text/javascript">window.jQuery || document.write('<script src="<?php echo WB_URL?>/modules/bakery/jquery/jquery-1.7.2.min.js"><\/script>')</script>
                       <script type="text/javascript" src="<?php echo WB_URL?>/modules/bakery/lightbox2/js/lightbox.js"></script>
                       <script type="text/javascript">
                       //  Lightbox2 options
                       $(function () {
                           var lightbox, options;
                           options = new LightboxOptions;

                           options.fileLoadingImage = '<?php echo WB_URL?>/modules/bakery/lightbox2/images/loading.gif';
                           options.fileCloseImage   = '<?php echo WB_URL?>/modules/bakery/lightbox2/images/close.png';
                           options.labelImage       = 'Bild';
                           options.labelOf          = 'von';

                           return lightbox          = new Lightbox(options);
                       });
                       </script>


Problem 2: (maybe a bakery problem):
Bakery Vers. 1.71 use a 0 (zero) for the position of the main picture in the database
Vers. 1.70 use position = 1 for the main picture - this can be a problem, if you upgrade from Version 1.70 to Vers 1.71
(maybe it can be solved, if you change the picture order for every article 2x)
you have to change the value for the field position in the file modules/anyitems/include.php


Line 182
original code
$query_images = $database->query("SELECT * FROM `".TABLE_PREFIX."mod_bakery_images` WHERE position = '1' AND active = '1'");

(for bakery Vers 1.71 only)
$query_images = $database->query("SELECT * FROM `".TABLE_PREFIX."mod_bakery_images` WHERE position = '0' AND active = '1'");

Boudi

AnyItems images are gone again with Bakery 1.71.

Any update for this?
...:: Bake the Unbakable ::...

gicasso


instantflorian

Hi,

update to the newer version (0.7), because the image handling has been changed with Bakery 1.70.

gicasso

When I use 'anyItems' with Bakery, everything works ...only the image wont display!
Any suggestions how I can display  the image?

I use Bakery Anyitems 0.6 & WebsiteBaker 2.8.3 & Bakery 1.70
I use this php code in the index of my template;
<?php display_any_items(4311); ?>
I also tried this code <?php display_any_items(43111); ?>