I am a silent observer of gallery2 forum since 2008 and thanks all supporter for providing needed info
I ran in to trouble and seek expert advice
I have imagablock under each photo example can be seen at
http://www.wallpaperhungama.com/Celebrities/Hollywood/Angelina_Jolie/Angelina_Jolie_a001.jpg.html
Now i want imageblock to show random image from Album "Angelina_Jolie"
i dont know what itemId i need to specify
<div class="g2imageblock">
{g->block type="imageblock.ImageBlock" blocks="randomImage|randomImage|randomImage|randomImage|randomImage|randomImage|randomImage|randomImage|randomImage|randomImage" show="none"}
</div>
please help experts
Last Run Details:
Gallery URL = http://www.wallpaperhungama.com/main.php
Gallery version = 2.3 core 1.3.0
API = Core 7.54, Module 3.9, Theme 2.6, Embed 1.5
PHP version = 5.2.17 cgi
Webserver = Apache
Database = mysqlt 5.0.95-community, lock.system=flock
Toolkits = ArchiveUpload, Gd, Getid3, LinkItemToolkit, SquareThumb, Thumbnail, ImageMagick
Acceleration = none, none
Operating system = Linux accord.host-care.com 2.6.18-308.1.1.el5 #1 SMP Wed Mar 7 04:16:51 EST 2012 x86_64
Default theme = matrixad
gettext = enabled
Locale = en_US
Browser = Mozilla/5.0 (Windows NT 6.1; WOW64; rv:12.0) Gecko/20100101 Firefox/12.0
Rows in GalleryAccessMap table = 127
Rows in GalleryAccessSubscriberMap table = 48816
Rows in GalleryUser table = 116
Rows in GalleryItem table = 48798
Rows in GalleryAlbumItem table = 397
Rows in GalleryCacheMap table = 0
Posts: 8339
would be easier to do with mediaBlock:
-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2
Posts: 20
Error loading initial item:Error (ERROR_MISSING_OBJECT) : Missing object for 0
in modules/core/classes/GalleryStorage/GalleryStorageExtras.class at line 2054 (GalleryCoreApi::error)
in modules/core/classes/GalleryStorage/GalleryStorageExtras.class at line 98 (GalleryStorageExtras::_identifyEntities)
in modules/core/classes/GalleryStorage.class at line 313 (GalleryStorageExtras::loadEntities)
in modules/core/classes/helpers/GalleryEntityHelper_simple.class at line 71 (GalleryStorage::loadEntities)
in modules/core/classes/GalleryCoreApi.class at line 2361 (GalleryEntityHelper_simple::loadEntitiesById)
in mediaBlock.php at line 995 (GalleryCoreApi::loadEntitiesById)
in mediaBlock.php at line 1079
Array
Posts: 20
m currently using
<div class="g2imageblock">
{g->block type="imageblock.ImageBlock" blocks="randomImage|randomImage|randomImage|randomImage|randomImage|randomImage|randomImage|randomImage|randomImage|randomImage" show="none" itemId=$theme.parent.id}
</div>
but will love to switch to mediablock
Posts: 20
also would like to show the album name with simple text
More Images from the Album "Album Name"
{if $theme.pageType == 'album'}
{php}@readfile('http://www.wallpaperhungama.com/mediaBlock.php?g2_itemId={$theme.item.id}&mode=dynamic&g2_view=dynamicalbum.RandomAlbum&limit=10&useThumb=1&column=10{/php}
{else if $theme.pageType == 'photo'}
{php}@readfile('http://www.wallpaperhungama.com/mediaBlock.php?g2_itemId={$theme.parent.id}&mode=dynamic&g2_view=dynamicalbum.RandomAlbum&limit=10&useThumb=1&column=10{/php}
{/if}
Posts: 8339
try:
and you must have the dynamic albums module installed/active
-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2
Posts: 8339
Just tested this code, forgot to close those statements.
This works:
using useMicro to control the size for the space example
-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2
Posts: 20
worked like a charm...thanks will consider a small donation
a small help
how to embed php code in blogger sidebar
Posts: 20
giving some errors om dynamic albums pages
http://www.wallpaperhungama.com/main.php?g2_view=dynamicalbum.UpdatesAlbum
Other items from the Recent Updates album
Error loading initial item:Error (ERROR_BAD_PARAMETER)
in modules/core/classes/helpers/GalleryEntityHelper_simple.class at line 39 (GalleryCoreApi::error)
in modules/core/classes/GalleryCoreApi.class at line 2361 (GalleryEntityHelper_simple::loadEntitiesById)
in mediaBlock.php at line 995 (GalleryCoreApi::loadEntitiesById)
in mediaBlock.php at line 1079
Posts: 8339
you'd need to check for dynamic albums as they have no id.
from:
to:
you could also have a default id for dynamic albums
-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2
Posts: 20
actually i m not using if then and simply added ur code in album.tpl so adding GalleryDynamicAlbum wont make any difference
my question is where should i put if then else statement in theme.tpl to have the random images from parent album below image as it is now shown
Posts: 8339
I'd add it where you want it to appear.
just above <div id="gsFooter"> for what you're doing on your site.
-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2
Posts: 20
in my site i have put random images above gsfooter
and want images from current album under photos which must be defined in photo.tpl