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  

Nuke Scrolling random block?
Goto page Previous  1, 2, 3, 4  Next
 
Post new topic   Reply to topic    NukedGallery.net Forum Index » PHP-Nuke Integration » Blocks View previous topicPrinter friendly versionView next topic
Author Message
dari

Site Admin
Site Admin


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

PostPosted: Wed Feb 22, 2006 9:39 am    Post subject: Re: Nuke Scrolling random block? Reply with quote

i've made the request, the response i've gotten is to recode the imageblock and provide unit tests for the new code, something i don't have the time to do right now, but i might find a dev who has the time for it...
_________________
Back to top
Offline View user's profile Send private message Visit poster's website
AdBot
   Post subject: Re: Nuke Scrolling random block?  

Back to top
perrymsb

Beginner
Beginner


Joined: Feb 09, 2006
Posts: 12

PostPosted: Wed Feb 22, 2006 11:48 am    Post subject: Re: Nuke Scrolling random block? Reply with quote

ok thanks
fingers crossed for new dev
Smile
Back to top
Offline View user's profile Send private message
tripwire

Beginner
Beginner


Joined: Sep 27, 2005
Posts: 9

PostPosted: Sat Mar 25, 2006 1:02 am    Post subject: Re: Nuke Scrolling random block? Reply with quote

i guess there has been no new updates with this?
Back to top
Offline View user's profile Send private message
maclain

Beginner
Beginner


Joined: Mar 16, 2006
Posts: 17

PostPosted: Sun Mar 26, 2006 3:36 pm    Post subject: Re: Nuke Scrolling random block? Reply with quote

dead idea i think....
Back to top
Offline View user's profile Send private message
dari

Site Admin
Site Admin


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

PostPosted: Mon Mar 27, 2006 7:42 am    Post subject: Re: Nuke Scrolling random block? Reply with quote

not a dead idea, but still no clean way of coding this (I don't have time to recode the imageblock module) so that the images are horozontal instead of vertical.
_________________
Back to top
Offline View user's profile Send private message Visit poster's website
nomad76

Beginner
Beginner


Joined: Jan 09, 2006
Posts: 9
Location: Arizona

PostPosted: Tue May 09, 2006 11:57 am    Post subject: Re: Nuke Scrolling random block? Reply with quote

Excuse me, but.........

Did you ever accomplish this. This is definitly a needed block.

Thanks
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: Tue May 09, 2006 12:16 pm    Post subject: Re: Nuke Scrolling random block? Reply with quote

i know this is much needed, however I do not have the time to recode the module, code unit tests, etc for it. if someone else is willing to step up to the plate to add this functionality, let me know and i can put you in touch w/ the appropriate developer.
_________________
Back to top
Offline View user's profile Send private message Visit poster's website
nomad76

Beginner
Beginner


Joined: Jan 09, 2006
Posts: 9
Location: Arizona

PostPosted: Wed May 10, 2006 8:30 am    Post subject: Re: Nuke Scrolling random block? Reply with quote

I took you up on the offer. This is the code I came up with.......

Code: ›
<?php

/*
 * Gallery - a web based photo album viewer and editor
 * Copyright (C) 2000-2006 Bharat Mediratta
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or (at
 * your option) any later version.
 *
 * This program is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA  02110-1301, USA.
 */

/**
 * Gallery 2 image block for PHPNuke.
 * @version $Revision: 13543 $ $Date: 2006-04-27 13:58:37 -0500 (Thu, 27 Apr 2006) $
 * @author Dariush Molavi <dari@nukedgallery.net>
 */

/* Scrolling Mod added by Nomad76 - boss@nomad76.com
 * @version 1.0; 10 May 2006

/****************************************************************************/
/* This is your configuration section of your Gallery 2 image block.      */
/*                                                         */
/* 1. Select which blocks you want to show from the list below:            */
/*                                                         */
/* randomImage  : A random image is shown                           */
/* recentImage  : The most recent image is shown                     */
/* viewedImage  : The most popular image is shown                     */
/* randomAlbum  : The highlight from a random album is shown            */
/* recentAlbum  : The highlight from the most recent album is shown         */
/* viewedAlbum  : The highlight from the most popular album is shown      */
/* dailyImage   : A new image each day                              */
/* weeklyImage  : A new image each week                              */
/* monthlyImage : A new image each month                           */
/* dailyAlbum   : A new album highlight each day                     */
/* weeklyAlbum  : A new album highlight each week                     */
/* monthlyAlbum : A new album highlight each month                     */
/*                                                         */
    $block1 = "randomImage";
   $block2 = "recentImage";
   $block3 = "viewedImage";
   $block4 = "randomImage";
   $block5 = "dailyImage";
   
/* 2. Comment Out The Blocks You Dont Want, and don't forget to            */
/*     go down to the '$content' Section and comment out the blocks         */
/*    there, also. (labeled as $b1 - $b5)                           */   

/* 3. Select what album/image properties you want displayed, you can      */
/*    only select 'none' or 'fullSize' without breaking the block         */
/*                                                         */
/* none    : Don't show anything, just the thumbnail                  */
/* fullSize: Show the full sized item (not a thumbnail)                  */

   $display1 = "none";
 
/*   4. What size image do you want displayed? If you want the default      */
/*     thumbnail, leave this empty, otherwise, enter the max pixel size.   */
/*     IF YOU SPECIFY A SIZE LARGER THAN THE DEFAULT THUMBNAIL SIZE, YOU   */ 
/*     MUST ALSO ADD "fullSize" TO THE $display1 VARIABLE ABOVE.         */

   $maxSize='250';
   
/*   5. Configure the scroll parameters                              */
/*    "$scroll = 1" turns on the scroll; $scroll = '0' turns it off.      */
/*    $direction: 'left' , 'right', 'up', 'down'                     */ 
/*    $speed: the distance the scroll hops (makes it faster)             */
/*     $delay: the time between hops (makes it slower)                  */
/*     $scrwidth: the size of the scroll window (left to right)            */
/*     $scrheight: the size of the scroll window (top to bottom)            */
/*     $pad, $pad2: It is used to cut out the image                     */
/*           Adjusting this could make or break the block.               */
/*         A value of 23 & -7 works (respectivly).                     */

   $scroll  = 1;
   $direction = "left";
   $speed  = 3;
   $delay  = 50;
   $scrwidth = 600;
   $scrheight = 120;
   $pad = 23;
   $pad2 = -7;
   
/*   6. Add a message to be displayed in the block.                     */
/*      Otherwise, leave it blank (i.e..$message = "").                  */

   $message = "<center><h2>Check out my latest photos!</h2></center>";
   
/*    7. The Table background color is set as $bgcolor1. To change this,      */
/*     just scroll down and edit it, it is marked "Background color"        */
/*                                                         */ 
/****************************************************************************/

if (eregi("block-G2_ImageScrollBlock.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;
}


// Displays the message
$content = $message;


// 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);


//Background color
$content .="<tr bgcolor='$bgcolor1'><td align='center'>";

//Start of Scroll Code
If (($direction=="left") or ($direction=="right"))
   {
   $orientation = 1;
   }
   else
   {
   $orientation = 0;
   }
   
If ($orientation ==1)
   {
   if ($scroll==1)
      {
      $content .= " <A name= \"scrollpic\"></A><MARQUEE behavior= \"scroll\" align= \"center\" direction= \"".$direction."\" height=\"".$scrheight."\" width=\"".$scrwidth."\"scrollamount= \"".$speed."\" scrolldelay= \"".$delay."\" onmouseover='this.stop()' onmouseout='this.start()'>";
      }
      else
      {
      $content .="";
      }

   //Block Content Horizontal - Use as many as needed, comment out those you don't need.   
   $content .="<TT> --$block1--></TT>".$b1;
   $content .="<TT> --$block2--></TT>".$b2;
   $content .="<TT> --$block3--></TT>".$b3;
   $content .="<TT> --$block4--></TT>".$b4;
   $content .="<TT> --$block5--></TT>".$b5;
   
   if ($scroll==1)
      {
      $content .="</MARQUEE>";
      $content .="</td></tr>\n";
      }
      else
      {
      $content .="</td></tr>/n";
      }
   }
   else
   {
   if ($scroll==1)
      {
      $content .= " <A name= \"scrollpic\"></A><MARQUEE behavior= \"scroll\" align= \"center\" direction= \"".$direction."\" height=\"".$scrheight."\" width=\"".$scrwidth."\" scrollamount= \"".$speed."\" scrolldelay= \"".$delay."\" onmouseover='this.stop()' onmouseout='this.start()'>";
      }
      else
      {
      $content .= "";
      }

   //Block Content Vertical - Use as many as needed, comment out those you don't need.
   $content .="<center>";
   $content .="<TT> --$block1--</TT><br/>".$b1;
   $content .="<br/><br/><TT> --$block2--</TT><br/>".$b2;
   $content .="<br/><br/><TT> --$block3--</TT><br/>".$b3;
   $content .="<br/><br/><TT> --$block4--</TT><br/>".$b4;
   $content .="<br/><br/><TT> --$block5--</TT><br/>".$b5;
   $content .="</center>";
   if ($scroll==1)
      {
      $content .="</MARQUEE>";
      $content .="</td></tr>\n";
      }
      else
      {
      $content .="</td></tr>/n";
      }      
   }



?>


Doesnt have all the ticks and bells, but it works, up, down, backwards, and sideways.

My site is still under construction, but I have it installed if you want to see.

http:www.nomad76.com or link here to get: http://www.nomad76.com/downloads.html&cid=6

So far, It works in my firefox, safari, and IE 6 browsers.

I just need to figure out how to pull the block titles out or make custom titles.....But anyway how is this for a start?

Nomad!~!
Back to top
Offline View user's profile Send private message Visit poster's website
Mystral

Beginner
Beginner


Joined: May 10, 2006
Posts: 1

PostPosted: Mon May 15, 2006 11:36 am    Post subject: Re: Nuke Scrolling random block? Reply with quote

Wooow Very Happy That's a very good start ! I can not wait to see the final version !!

Good Job man !!

As soon as this block is finished I will install this gallery on my website Razz

Keep us in touch !
Back to top
Offline View user's profile Send private message
nomad76

Beginner
Beginner


Joined: Jan 09, 2006
Posts: 9
Location: Arizona

PostPosted: Wed May 24, 2006 8:29 pm    Post subject: Re: Nuke Scrolling random block? Reply with quote

This is the latest:

Scrolling vertical is pretty standard with all title options.
I'm still working on how to make the horizontal scroll look better. It works, just dont have all the title options like the vertical. Any suggestions or help?

This is the latest code:
Code: ›
<?php

/*
 * Gallery - a web based photo album viewer and editor
 * Copyright (C) 2000-2006 Bharat Mediratta
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or (at
 * your option) any later version.
 *
 * This program is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA  02110-1301, USA.
 */

/**
 * Gallery 2 image block for PHPNuke.
 * @version $Revision: 13543 $ $Date: 2006-04-27 13:58:37 -0500 (Thu, 27 Apr 2006) $
 * @author Dariush Molavi <dari@nukedgallery.net>
 */

/* Scrolling Mod added by Nomad76 - boss@nomad76.com , www.nomad76.com
 * @version 1.5; 24 May 2006
 */

/****************************************************************************/
/* This is your configuration section of your Gallery 2 image block.      */
/*                                                         */
/* 1. Select which blocks you want to show from the list below:            */
/*                                                         */
/* randomImage  : A random image is shown                           */
/* recentImage  : The most recent image is shown                     */
/* viewedImage  : The most popular image is shown                     */
/* randomAlbum  : The highlight from a random album is shown            */
/* recentAlbum  : The highlight from the most recent album is shown         */
/* viewedAlbum  : The highlight from the most popular album is shown      */
/* dailyImage   : A new image each day                              */
/* weeklyImage  : A new image each week                              */
/* monthlyImage : A new image each month                           */
/* dailyAlbum   : A new album highlight each day                     */
/* weeklyAlbum  : A new album highlight each week                     */
/* monthlyAlbum : A new album highlight each month                     */
/*                                                         */
    $block1 = "randomImage";
   $block2 = "recentImage";
   $block3 = "viewedImage";
   $block4 = "randomImage";
   $block5 = "dailyImage";
   
/* 2. Comment Out The Blocks You Dont Want, and don't forget to            */
/*     go down to the '$content' Section and comment out the blocks         */
/*    there, also. (labeled as $b1 - $b5)                           */   

/* 3. Select what album/image properties you want displayed:            */
/*    >>>Important!<<<<                                        */
/*     For Horizontal Scroll, you can only select 'none' or 'full size'      */
/*    For Vertical Scroll, you have the regular options, and you can      */
/*    display more than one, but separate them by |    (the pipe symbol)      */
/*                                                         */
/* title   : Show the title                                       */
/* views   : Show how many views the item has                        */
/* date    : Show the capture/upload date                           */
/* owner   : Show the item owner                                 */
/* heading : Show the item heading ("Random Image","Daily Image", etc)      */
/* fullSize: Show the full sized item (not a thumbnail)                  */
/* none    : Don't show anything, just the thumbnail                  */

   $display1 = "none";
 
/*   4. What size image do you want displayed? If you want the default      */
/*     thumbnail, leave this empty, otherwise, enter the max pixel size.   */
/*     IF YOU SPECIFY A SIZE LARGER THAN THE DEFAULT THUMBNAIL SIZE, YOU   */ 
/*     MUST ALSO ADD "fullSize" TO THE $display1 VARIABLE ABOVE.         */

   $maxSize='120';
   
/*   5. Configure the scroll parameters                              */
/*    "$scroll = 1" turns on the scroll; $scroll = '0' turns it off.      */
/*    $direction: 'left' , 'right', 'up', 'down'                     */ 
/*    $speed: the distance the scroll hops (makes it faster)             */
/*     $delay: the time between hops (makes it slower)                  */
/*     $scrwidth: the size of the scroll window (left to right)            */
/*     $scrheight: the size of the scroll window (top to bottom)            */
/*     $pad, $pad2: It is used to cut out the image                     */
/*           Adjusting this could make or break the block.               */
/*         A value of 23 & -7 works (respectivly).                     */

   $scroll  = 1;
   $direction = "left";
   $speed  = 3;
   $delay  = 50;
   $scrwidth = 600; // also effects block width
   $scrheight = 130; // also effects block height
   $pad = 23;
   $pad2 = -7;
   
/*   6. Add a message to be displayed in the block.                     */
/*      Otherwise, leave it blank (i.e..$message = "").                  */

   $message = "<center><h2>Check out my latest photos!</h2></center>";
   
/*    7. The Table background color is set as $bgcolor1. To change this,      */
/*     just scroll down and edit it, it is marked "Background color"        */
/*                                                         */ 
/****************************************************************************/

if (eregi("block-G2_ImageScrollBlock.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;
}


// Displays the message
$content = $message;

$pad2 = -7;
// 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);


//Background color
$content .="<tr bgcolor='$bgcolor1'><td align='center'>";

//Start of Scroll Code
If (($direction=="left") or ($direction=="right"))
   {
   $orientation = 1;
   }
   else
   {
   $orientation = 0;
   }
   
If ($orientation ==1)
   {
   if ($scroll==1)
      {
      $content .= " <A name= \"scrollpic\"></A><MARQUEE behavior= \"scroll\" align= \"center\" direction= \"".$direction."\" height=\"".$scrheight."\" width=\"".$scrwidth."\" scrollamount= \"".$speed."\" scrolldelay= \"".$delay."\" onmouseover='this.stop()' onmouseout='this.start()'>";
      }
      else
      {
      $content .="";
      }

   //Block Content Horizontal - Use as many as needed, comment out those you don't need.   
   $content .="<TT> --$block1--></TT>".$b1;
   $content .="<TT> --$block2--></TT>".$b2;
   $content .="<TT> --$block3--></TT>".$b3;
   $content .="<TT> --$block4--></TT>".$b4;
   $content .="<TT> --$block5--></TT>".$b5;
   
   if ($scroll==1)
      {
      $content .="</MARQUEE>";
      $content .="</td></tr>\n";
      }
      else
      {
      //$content .="</td></tr>/n";
      }
   }
   else
   {
   if ($scroll==1)
      {
      $content .= " <A name= \"scrollpic\"></A><MARQUEE behavior= \"scroll\" align= \"center\" direction= \"".$direction."\" height=\"".$scrheight."\" width=\"".$scrwidth."\" scrollamount= \"".$speed."\" scrolldelay= \"".$delay."\" onmouseover='this.stop()' onmouseout='this.start()'>";
      }
      else
      {
      $content .= "";
      }

   //Block Content Vertical - Use as many as needed, comment out those you don't need.
   $content .="<center>";
   $content .=$b1;
   $content .="__________".$b2;
   $content .="__________".$b3;
   $content .="__________".$b4;
   $content .="__________".$b5;
   $content .="</center>";
   if ($scroll==1)
      {
      $content .="</MARQUEE>";
      $content .="</td></tr>\n";
      }
      else
      {
      //$content .="</td></tr>\n";
      }      
   }



?>


goto mysite to view both veritcal and horizontal
Any code experts out there are welcome....
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: Fri May 26, 2006 6:56 am    Post subject: Re: Nuke Scrolling random block? Reply with quote

ah, see you're hardcoding in the number of blocks to show, and forcing them to scroll in the orientation you want. the proper method is to specify one "blocks" variable with multiple block types. when you do that, they default to vertical orientation and make the horozontal display horribly ugly.
_________________
Back to top
Offline View user's profile Send private message Visit poster's website
gas

Beginner
Beginner


Joined: Nov 10, 2006
Posts: 14

PostPosted: Tue Nov 21, 2006 6:46 pm    Post subject: Re: Nuke Scrolling random block? Reply with quote

Hello

Since I wanted to add also a crolling picture I looked into the code.
I modified the hardcoding of the blocks, the code became much smaller 44 lines to make it scroll in both vertical and horizontal Cool

But I'm having a problem for declaring my blocksType array I can't put it in the begining of code
to move the hardcoding of the blocks number I created an array blocksType where

$blocksType=array('randomImage','recentImage','randomImage','randomImage','randomImage');
in this block you add the type of pics you want to scroll

but it is taken into account only if it is after these lines
Code: ›
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.");



like it is now it is working on my web site gaslive [gaslive.free.fr]

The code
I'm not able to put it !!! it keep telling me (I tried Code,PHP,Quote tags)

The html tags you attempted to use are not allowed

How to put the code ??
Back to top
Offline View user's profile Send private message
dari

Site Admin
Site Admin


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

PostPosted: Tue Nov 21, 2006 8:03 pm    Post subject: Re: Nuke Scrolling random block? Reply with quote

email it to me, i'll check it out, and if it works well, include it in the integration (with credit to you of course) Smile
_________________
Back to top
Offline View user's profile Send private message Visit poster's website
gas

Beginner
Beginner


Joined: Nov 10, 2006
Posts: 14

PostPosted: Wed Nov 22, 2006 5:42 am    Post subject: Re: Nuke Scrolling random block? Reply with quote

I fixed the global declaration issue I'll send you the code

Thanks Mr. Green
Back to top
Offline View user's profile Send private message
StarScream159

Wizard
Wizard


Joined: Apr 08, 2006
Posts: 120

PostPosted: Wed Nov 22, 2006 7:41 pm    Post subject: Re: Nuke Scrolling random block? Reply with quote

Any way you can post the code here? I like how it looks on your site, and I'd like to play around with it on mine and see what I can do.

Thanks.
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
Goto page Previous  1, 2, 3, 4  Next

 
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