Mambo scroll Mambo scroll
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Mambo scroll

Started by nikolas, October 09, 2005, 10:53:36 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

nikolas

I use a coppermine in mambo ( www.mplampla.net ) the problem is that when i click on an image to redirect it in the coppermine page that hold that image
<?php
//Coppermine Thumbnail Scroller

/**************************************
 * File: mod_cpgscroller.php
 * Coppermine Gallery Thumbnail Scroller
 **************************************
 * @package Mambo Open Source
 * @ Mambo Open Source is Free Software
 * @ Released as freeware
 * @ version 0.1
 * @ Module based on:
 * @    AKO Gallery Thumbnail Scroller
 * @    RS Gallery Thumbnail Scroller
 * @    Coppermine bridge file 
 **************************************/

defined'_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );


 
/**********************************************************************
  *
  * Mandatory parameters :
  * 
  * Name Desc                     choose Default
  * ----------- ---------------------------- ------------- ---------
  * cpgDB            Coppermine database db bname  cpg
  * cpgHost          CPG DB server db server  localhost
  * cpgUser  CPG username  cpg Username  admin
  * cpgPicTable CPG Picture table name  cpg tabel name   cpg131_pictures
  * cpgPassword  Password connect to cpg db cpg password     password
  * ------------------------------------------------------------------------------
  * ThumbPrefix CPG Thumbnails  prefix  .. thumb_
  * cpgDir  CPG Images Root directory  ... /cpg/albums/
  * 
  * Most important config:
  * ------------------------------------------------------------------------------
  * Name Desc                     choose Default
  * ----------- ---------------------------- ------------- ---------
  * ScrollOwner Display Owner info       true / false        true
  * ScrollDirection  Scroll up or down        up / down  up
  * ScrollHeight  Height of scroll window  ...  150
  * ScrollDelay Scroll speed             ... 50
  * ScrollAlign Place of component       center/left/right  center
  *                             
  *  
  * Place in Parameters field like:
  * ScrollOwner = false
  **********************************************************************/

$params mosParseParams$module->params );

// database configuration
// The name of the database used by Coppermine
$CPG_DB_NAME = @$params->cpgDB $params->cpgDB 'mplampla_mamb1';

// The name of the database server
$CPG_DB_HOST = @$params->cpgHost $params->cpgHost 'localhost'

// The username to use to connect to the database
$CPG_DB_USERNAME = @$params->cpgUser $params->cpgUser 'mplampla_copp1';

// The Picture table name 
$CPG_PIC_TABLE = @$params->cpgPicTable $params->cpgPicTable 'cpg_pictures';

// The password to use to connect to the database
$CPG_DB_PASSWORD = @$params->cpgPassword $params->cpgPassword 'wtNLN[btBXUv';

$CPG_THUMB = @$params->ThumbPrefix $params->ThumbPrefix 'thumb_';      
$CPG_DIR = @$params->cpgDir $params->cpgDir '/gallery/albums/';


// [Mammeter ScrollOwner]
$NFS_OWNER =  @$params->ScrollOwner $params->ScrollOwner 'true';
// [Mammeter ScrollDirection]
$NFS_DIRECTION =  @$params->ScrollDirection $params->ScrollDirection 'up';
// [Mammeter ScrollHeight]
$NFS_HEIGHT =  @$params->ScrollHeight $params->ScrollHeight '150';
// [Mammeter ScrollAmount]
$NFS_AMOUNT =  @$params->ScrollAmount $params->ScrollAmount '2';
// [Mammeter ScrollDelay]
$NFS_DELAY =  @$params->ScrollDelay $params->ScrollDelay '50';
// [Mammeter ScrollAlign]
$NFS_ALIGN =  @$params->ScrollAlign $params->ScrollAlign 'center';

// -----------------CSS Override-----------------
// [Mammeter ScrollCSSOverride]
$NFS_CSS_OVERRIDE =  @$params->ScrollCSSOverride $params->ScrollCSSOverride 'false';
// [Mammeter ScrollTextAlign]
$NFS_TEXTALIGN =  @$params->ScrollTextAlign $params->ScrollTextAlign 'justify';
// [Mammeter ScrollTextWeight]
$NFS_TEXTWEIGHT =  @$params->ScrollTextWeight $params->ScrollTextWeight 'normal';
// [Mammeter ScrollTextSize]
$NFS_TEXTSIZE =  @$params->ScrollTextSize $params->ScrollTextSize '11';
// [Mammeter ScrollTextColor]
$NFS_TEXT_COLOR =  @$params->ScrollTextColor $params->ScrollTextColor '#000000';
// [Mammeter ScrollBGColor]
$NFS_BG_COLOR =  @$params->ScrollBGColor $params->ScrollBGColor 'transparent';
// [Mammeter ScrollMargin]
$NFS_MARGIN =  @$params->ScrollMargin $params->ScrollMargin '4';
// [Mammeter ScrollBorderBottom]
$NFS_BORDERBOTTOM =  @$params->ScrollBorderBottom $params->ScrollBorderBottom '1';
// [Mammeter ScrollBorderTop]
$NFS_BORDERTOP =  @$params->ScrollBorderTop $params->ScrollBorderTop '1';
// [Mammeter ScrollBorderLeft]
$NFS_BORDERLEFT =  @$params->ScrollBorderLeft $params->ScrollBorderLeft '1';
// [Mammeter ScrollBorderRight]
$NFS_BORDERRIGHT =  @$params->ScrollBorderRight $params->ScrollBorderRight '1';
// [Mammeter ScrollBorderColor]
$NFS_BORDERCOLOR =  @$params->ScrollBorderColor $params->ScrollBorderColor '#AFAFAF';
// [Mammeter ScrollBorderOff]
$NFS_BORDEROFF =  @$params->ScrollBorderOff $params->ScrollBorderOff 'false';
// [Mammeter ScrollBorderSetAll]
$NFS_BORDERSETALL =  @$params->ScrollBorderSetAll $params->ScrollBorderSetAll 'false';


// Connect to Coppermine database if necessary
// ------------------------------------------------------------------------- //
 
$CPG_DB_LINK_ID = @mysql_connect($CPG_DB_HOST$CPG_DB_USERNAME$CPG_DB_PASSWORD);
 if (!
$CPG_DB_LINK_ID) die("<b>Mambo error</b>:<br />Unable to connect to the Coppermine database !<br /><br />MySQL said: <b>" mysql_error() . "</b>");

$db_selected mysql_select_db($CPG_DB_NAME$CPG_DB_LINK_ID);
if (!
$db_selected) {
   die (
'Can\'t use coppermine : ' mysql_error());
}
// ------------------------------------------------------------------------- //

// Load Pictures
// ------------------------------------------------------------------------- //
$query "SELECT * FROM $CPG_PIC_TABLE  ORDER BY RAND() LIMIT 10";
//$result =  mysql_query('SELECT * FROM cpg131_pictures ORDER BY RAND() LIMIT 15');



$result =  mysql_query($query);

if(
$NFS_CSS_OVERRIDE == 'true') {
$NFS_TEXTSIZE.='px';
$NFS_MARGIN.='px';
if(
$NFS_BORDERSETALL != 'false') {
$NFS_BORDERBOTTOM=$NFS_BORDERSETALL;
$NFS_BORDERTOP=$NFS_BORDERSETALL;
$NFS_BORDERLEFT=$NFS_BORDERSETALL;
$NFS_BORDERRIGHT=$NFS_BORDERSETALL;
}
if(
$NFS_BORDEROFF=='true') {
$NFS_BORDERBOTTOM=0;
$NFS_BORDERTOP=0;
$NFS_BORDERLEFT=0;
$NFS_BORDERRIGHT=0;
}
$NFS_BORDERBOTTOM.='px';
$NFS_BORDERTOP.='px';
$NFS_BORDERLEFT.='px';
$NFS_BORDERRIGHT.='px';

echo 
"<div align=$NFS_ALIGN 
              style=\" background-color: 
$NFS_BG_COLOR;
              color: 
$NFS_TEXT_COLOR;
              border-bottom: 
$NFS_BORDERBOTTOM $NFS_BORDERCOLOR ridge;
              border-top: 
$NFS_BORDERTOP $NFS_BORDERCOLOR solid;
              border-left: 
$NFS_BORDERLEFT $NFS_BORDERCOLOR solid;
              border-right:  
$NFS_BORDERRIGHT $NFS_BORDERCOLOR ridge;\">
              <marquee behavior=\"scroll\" 
              align=\"center\"  
              direction=\"
$NFS_DIRECTION\"  
              height=\"
$NFS_HEIGHT\" 
              scrollamount=\"
$NFS_AMOUNT\" 
              scrolldelay=\"
$NFS_DELAY\" 
              style=\"text-align: 
$NFS_TEXTALIGN;
              font-weight: 
$NFS_TEXTWEIGHT;
              font-size:  
$NFS_TEXTSIZE
              margin: 
$NFS_MARGIN $NFS_MARGIN $NFS_MARGIN $NFS_MARGIN; \"
              truespeed onmouseover=this.stop() onmouseout=this.start() >"
;
} else {
echo 
"<div align=$NFS_ALIGN>
              <marquee behavior=\"scroll\" 
              align=\"center\"  
              direction=\"
$NFS_DIRECTION\"  
              height=\"
$NFS_HEIGHT\" 
              scrollamount=\"
$NFS_AMOUNT\" 
              scrolldelay=\"
$NFS_DELAY\" 
              truespeed onmouseover=this.stop() onmouseout=this.start() >"
;

}
// Display Thumbnail Scroller
echo "<a href=\"/gallery\">";


while (
$row mysql_fetch_object($result)) {

echo 
"<hr width=\"100%\"> $row->title <br/>"
echo 
"<img src=\"$CPG_DIR$row->filepath$CPG_THUMB$row->filename\" border=\"0\">";

if (($NFS_DIRECTION=='left') || ($NFS_DIRECTION=='right'))
{
echo "&nbsp;&nbsp;&nbsp;";
}
else
{
echo "<br/>";
}
}
echo 
"</a>";
echo 
"</marquee></div>";

?>


What i have to change ?

e.g when i click the image i want to take me to http://www.mplampla.net/gallery/displayimage.php?album=random&cat=0&pos=-12
Please Visit
www.mplampla.com

nikolas

also if i check the page from ie the images are not loaded in middle
Please Visit
www.mplampla.com

Joachim Müller

we have no idea about mambo code. I suggest asking this question on the site where you got the script you're using from.

nikolas

#3
The problem is in this code

Quote// Display Thumbnail Scroller
echo "<a href=\"/gallery\">";


while ($row = mysql_fetch_object($result)) {

echo "<hr width=\"100%\"> $row->title <br/>";
echo "<img src=\"$CPG_DIR$row->filepath$CPG_THUMB$row->filename\" border=\"0\">";

if (($NFS_DIRECTION=='left') || ($NFS_DIRECTION=='right'))
{
echo "&nbsp;&nbsp;&nbsp;";
}
else
{
echo "<br/>";
}
}
echo "</a>";
echo "</marquee></div>";

?>
i have to change the bold to the address of the coppermine but i am not sure what to change
Please Visit
www.mplampla.com

Joachim Müller

nor do I have an idea. This is mambo stuff, ask the mambo people.