Support Forums | Demo Gallery [1.x] [2.x] | Downloads | News | Site Map ]
Nuked Gallery
  Create a FREE account or Login   As a guest, you don't have access to our FULL navigation system.
 Forum FAQForum FAQ   StatisticsStatistics   SearchSearch   UsergroupsUsergroups   FavoritesFavorites  

Multiple Images in Block when in center

 
Post new topic   Reply to topic    NukedGallery.net Forum Index » PHP-Nuke Integration » Blocks View previous topicPrinter friendly versionView next topic
Author Message
Nitronic

Beginner
Beginner


Joined: Jan 01, 2007
Posts: 4

PostPosted: Sat Jan 06, 2007 5:56 pm    Post subject: Multiple Images in Block when in center Reply with quote

Hiya there!

First up thanks for the integration files!

Am currently using the block in the center of the page and would like more then one picture. Can any one help me out? I'm a bit of a noob when it comes to PHP etc so everything I have tried has ended up with either no effect or just killed the block.

Any help would be appreciated


----
Gallery 2 URL [nitronick.co.uk].
Back to top
Offline View user's profile Send private message Visit poster's website
AdBot
   Post subject: Multiple Images in Block when in center  

Back to top
StarScream159

Wizard
Wizard


Joined: Apr 08, 2006
Posts: 120

PostPosted: Tue Jan 09, 2007 3:45 am    Post subject: Re: Multiple Images in Block when in center Reply with quote

In the block documention (in the file it's self) there are instructions on how to make it show more then one image.

Example, show; a random image and the most recent album. Fine the line inside the block php file and change it to what you want to show.
PHP: › <?php $blockType "randomImage|recentAlbum"?>
Back to top
Offline View user's profile Send private message
Nitronic

Beginner
Beginner


Joined: Jan 01, 2007
Posts: 4

PostPosted: Fri Jan 12, 2007 4:13 pm    Post subject: Re: Multiple Images in Block when in center Reply with quote

Thanks!

I have been able to get more then one picture up but they are aligned Verticaly and I want them side by side. Can anyone help there?

Thanks
Back to top
Offline View user's profile Send private message Visit poster's website
Nitronic

Beginner
Beginner


Joined: Jan 01, 2007
Posts: 4

PostPosted: Sat Jan 13, 2007 7:42 am    Post subject: Re: Multiple Images in Block when in center Reply with quote

OK sorted this out by adapting the scolling script.

Code: › if (eregi("block-G2_ImageBlock.php", $_SERVER['SCRIPT_NAME'])) {
Header("Location: index.php");
die();
}

global $admin, $user, $cookie, $db, $prefix;

define("_G2_EMBED_PHP_FILE","embed.php");
define("_G2_CONFIGURATION_NOT_DONE","The module has not yet been configured.");

$g2result = $db->sql_query("SELECT * FROM ".$prefix."_g2config");
list($embedUri, $g2Uri, $activeUserId, $cookiepath, $showSidebar, $g2configurationDone, $embedVersion) = $db->sql_fetchrow($g2result);

if ($g2configurationDone != 1) {
$content = _G2_CONFIGURATION_NOT_DONE;
return;
}

preg_match("/^(.*)?(modules\/.*)/i", $g2Uri, $matches);
require_once($matches[2]._G2_EMBED_PHP_FILE);

if (is_admin($admin)) {
$uid='admin';
}
else {
if (is_user($user)) {
cookiedecode($user);
$uid='';
if (is_user($user)) {
$uid = $cookie[0];
}
}
}

$ret = GalleryEmbed::init(array(
'embedUri' => $embedUri,
'g2Uri' => $g2Uri,
'activeUserId' => "$uid",
'fullInit' => true));

//if ($showSidebar) {
//$content = "The Gallery2 sidebar is enabled.<br>You should disable it before using this block.";
// return true;
//}

list($ret, $modulestatus) = GalleryCoreApi::fetchPluginStatus('module');
if($modulestatus['imageblock']['active'] != '1') {
$content = 'You need to install and/or activate the ImageBlock module in Gallery 2 before using this block';
return true;
}

$g2moddata = GalleryEmbed::handleRequest();
if(intval($maxSize) > 0) {
list($ret,$html1, $head) = GalleryEmbed::getImageBlock(array('blocks'=>$block1, 'show'=>$display1,'itemFrame'=>'solid','albumFrame'=>'solid','maxSize' => $maxSize));
list($ret,$html2, $head) = GalleryEmbed::getImageBlock(array('blocks'=>$block2, 'show'=>$display1,'itemFrame'=>'solid','albumFrame'=>'solid','maxSize' => $maxSize));
list($ret,$html3, $head) = GalleryEmbed::getImageBlock(array('blocks'=>$block3, 'show'=>$display1,'itemFrame'=>'solid','albumFrame'=>'solid','maxSize' => $maxSize));
list($ret,$html4, $head) = GalleryEmbed::getImageBlock(array('blocks'=>$block4, 'show'=>$display1,'itemFrame'=>'solid','albumFrame'=>'solid','maxSize' => $maxSize));
list($ret,$html5, $head) = GalleryEmbed::getImageBlock(array('blocks'=>$block5, 'show'=>$display1,'itemFrame'=>'solid','albumFrame'=>'solid','maxSize' => $maxSize));
}
else {
list($ret,$html1, $head) = GalleryEmbed::getImageBlock(array('blocks'=>$block1, 'show'=>$display1,'itemFrame'=>'solid','albumFrame'=>'solid'));
list($ret,$html2, $head) = GalleryEmbed::getImageBlock(array('blocks'=>$block2, 'show'=>$display1,'itemFrame'=>'solid','albumFrame'=>'solid'));
list($ret,$html3, $head) = GalleryEmbed::getImageBlock(array('blocks'=>$block3, 'show'=>$display1,'itemFrame'=>'solid','albumFrame'=>'solid'));
list($ret,$html4, $head) = GalleryEmbed::getImageBlock(array('blocks'=>$block4, 'show'=>$display1,'itemFrame'=>'solid','albumFrame'=>'solid'));
list($ret,$html5, $head) = GalleryEmbed::getImageBlock(array('blocks'=>$block5, 'show'=>$display1,'itemFrame'=>'solid','albumFrame'=>'solid'));
}

if (!isset($g2moddata['isDone'])) {
echo 'isDone is not defined, something very bad must have happened.';
exit;
}

if ($g2moddata['isDone']) {
exit;
}


// This Code Extracts the Image & Link
$b1 = substr($html1,$pad,$pad2);
$b2 = substr($html2,$pad,$pad2);
$b3 = substr($html3,$pad,$pad2);
$b4 = substr($html4,$pad,$pad2);
$b5 = substr($html5,$pad,$pad2);

$content ="\n<center> <i>Selection Of Pictures From The Gallery</i> <br \>";
$content .="<table><tr><td>".$b1;
$content .="</td><td>".$b2;
$content .="</td><td>".$b3;
$content .="</td><td>".$b4;
$content .="</td><td>".$b5;

$content .="</td></tr></table></center>"

 

?>
Back to top
Offline View user's profile Send private message Visit poster's website
dari

Site Admin
Site Admin


Joined: Mar 03, 2003
Posts: 6284
Location: Washington Township, NJ, USA

PostPosted: Wed Jan 17, 2007 7:33 am    Post subject: Re: Multiple Images in Block when in center Reply with quote

unfortunately, right now, the core g2 code that returns the imageblock has them aligned vertically, not horozontally. it's not on the radar for a fix, either Sad
_________________
Back to top
Offline View user's profile Send private message Visit poster's website
Nitronic

Beginner
Beginner


Joined: Jan 01, 2007
Posts: 4

PostPosted: Wed Jan 17, 2007 1:03 pm    Post subject: Re: Multiple Images in Block when in center Reply with quote

dari wrote: › unfortunately, right now, the core g2 code that returns the imageblock has them aligned vertically, not horozontally. it's not on the radar for a fix, either Sad


Tis fixed. Well It works on my site. Take a look at My Site [nitronick.co.uk]

[/url]
Back to top
Offline View user's profile Send private message Visit poster's website
FeraTechInc

Beginner
Beginner


Joined: Feb 14, 2007
Posts: 3

PostPosted: Tue Feb 27, 2007 7:41 pm    Post subject: Re: Multiple Images in Block when in center Reply with quote

I took the code and it does not work. I looked it over and I am not sure why.
Back to top
Offline View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    NukedGallery.net Forum Index » PHP-Nuke Integration » Blocks View previous topicPrinter friendly versionView next topic

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours

Powered by phpBB © phpBB Group



Sponsors: Web HostingDedicated ServersDomain NamesDomain Name RegistrationDedicated Web HostingSEO Search Engine OptimisationSEOWeb Design New YorkSEO Web DesignWeb hosting AustraliaCheap Web Design

6th year online! 2003-2009
Legal • Use of this site consitutes agreement to the Acceptable Use Policy
Hosted by Implosion WorksSourceForge.net Logo • Theme by TonicMedia