Hi,
I'm integrating Gallery 2 into OSCommmerce an all is going pretty well. But now I want to unhook the navigation sidebar from Gallery and place it somewhere else in my design.
I thought that something like this would do the trick, but it doesn't:
<?php echo $data['sidebarHtml']; ?>
I know Gallery starts the sidebar by calling this smarty code:
{g->theme include="sidebar.tpl"}
My knowledge of smarty is very limited and i can't seem to get it converted into normal php.
Who can help? I just need to know i can integrate the sidebar into my master php page.
Thnx, Bauke Boorsma
Posts: 8339
try that.
-s
Posts: 2
Thanks for your reply, code looks like what i need, but i can't get it working.
I'm still no expert in php, so it's probably a very simple thing that i'm missing here.
I tried to call your script this way:
$content = G2_sideBar();
But that leaves me an empty screen, nothing gets processed from that point on.
In my script i use
$data = runGallery();
to initialise my gallery (rungallery() function posted below)further down my page i call
echo $data['bodyHtml'];
to display the gallery on that location.
Now i see you using the variable $g2_data, shouldn't that be $data?
Is this correct for my script?
$ret = G2B_G2_init();
or should i call a different function, because i can't find G2B_G2_init() anywhere.
I'm using:
Gallery versie = 2.1.1 core 1.1.0.1
PHP versie = 4.3.11 apache2handler
Web server = Apache/2.0.53 (Fedora)
Database = mysql 4.1.19, lock.system=flock
Toolkits = Gd
Versnelling = none, none
Besturingssysteem = Linux server9.hosting2go.nl 2.6.12-1.1381_FC3smp #1 SMP Fri Oct 21 04:03:26 EDT 2005 i686
Standaard thema = matrix
Talen = nl_NL
Browser = Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 2.0.50727; InfoPath.2)
Posts: 8339
Here, try this one:
-s
Posts: 21
Wow suprsidr, this is just what I needed - THANK YOU! It worked perfectly.
http://www.southcoasttu.org/gallery2/g2.php
Posts: 14
COOL! Suprsidr, you just saved me a hell of a lot of work! Thanks! Thanks! Thanks!
Posts: 5
sorry....stupid question ....
what is galleryembed.php for ??
i have a website and i want to place the recent image in index... i use image block ... but its only showing 1 picture.. how can i showing 5 recent picture??
thanks
Posts: 14
In the admin area there's a setting you can change to alter the number of images that will be shown in the image block.