Differences between revisions 13 and 14
Revision 13 as of 2005-12-22 04:05:29
Size: 10478
Editor: t-indiv10-220
Comment:
Revision 14 as of 2005-12-22 13:03:14
Size: 11367
Editor: t-indiv10-220
Comment:
Deletions are marked like this. Additions are marked like this.
Line 2: Line 2:
Line 7: Line 6:
Line 10: Line 8:
Code: {{{ Code:

{{{
Line 13: Line 13:
to Code: {{{
to Code:

{{{
Line 22: Line 25:
change  {{{
 
if($zoom->_mambotype == 2) {
  require_once($mosConfig_absolute_path.'/includes/database.php');
 } else {
  
require_once($mosConfig_absolute_path.'/classes/database.php');
 }
}}}
change

{{{
        
if($zoom->_mambotype == 2) {
                require_once($mosConfig_absolute_path.'/includes/database.php');
        } else {
                
require_once($mosConfig_absolute_path.'/classes/database.php');
        }
}}}
Line 31: Line 36:
Line 33: Line 39:
 if($zoom->_mambotype == 2) {
  require_once($mosConfig_absolute_path.'/includes/database.php');
 } else {
  require_once($mosConfig_absolute_path.'/classes/database.php');
 }
        if($zoom->_mambotype == 2) {
                require_once($mosConfig_absolute_path.'/includes/database.php');
        } else {
                require_once($mosConfig_absolute_path.'/classes/database.php');
        }
Line 48: Line 54:
Line 53: Line 60:
Line 56: Line 64:
in components / com_zoom / lib / zoom.class.php to remove footer.
and
components / com_zoom / www / admin / admin.php to remove credits on the management pages.
in components / com_zoom / lib / zoom.class.php to remove footer. and components / com_zoom / www / admin / admin.php to remove credits on the management pages.

=== Update from 2.5beta3 to 2.5RC1 ===
Method number one is the recommended way to upgrade. There were no database changes since version 2.5 beta3. That makes life a lot easier, doesn't it?

In other words: replace ALL the existing (and older) files in your '{joomlaroot}/components/com_zoom' and '{joomlaroot}/administrator/components/com_zoom' with the newer files from the archive.
IMPORTANT: before you overwrite any files, please write your current configuration on a piece of paper. After upgrading, update your settings again.

The Changelog file hasn't been updated for a while indeed...if you want to know more about the changes since the previous version, use the CVS DIFF command...
Line 61: Line 75:
Line 63: Line 76:
to use community builder registration
some registered content gives a link pointing to, for read more...
index.php?option=com_registration&task=register

I need it to point to
index.php?option=com_comprofiler&task=registers
to use community builder registration some registered content gives a link pointing to, for read more... index.php?option=com_registration&task=register

I need it to point to index.php?option=com_comprofiler&task=registers
Line 73: Line 83:
file: components / com_comprofiler / plugin / user / plug_cbzoomtab / zoom.php :
line 81:
file: components / com_comprofiler / plugin / user / plug_cbzoomtab / zoom.php : line 81:
Line 78: Line 88:
Line 79: Line 90:
Line 81: Line 93:
  if(file_exists('components/com_zoom/etc/zoom_config.php')){
   include_once('components/com_zoom/etc/zoom_config.php');
   $ZoomPath = $zoomConfig['imagepath'];
  }
                if(file_exists('components/com_zoom/etc/zoom_config.php')){
                 include_once('components/com_zoom/etc/zoom_config.php');
                 $ZoomPath = $zoomConfig['imagepath'];
                }
Line 88: Line 100:
Line 91: Line 104:
Line 92: Line 106:
Line 94: Line 109:
}}}  }}}
Line 97: Line 112:
Line 100: Line 116:
Line 101: Line 118:
Line 106: Line 124:
Line 108: Line 125:

Install mambelfish component, module and search bot but do not apply patch.
Install this attachment:bot_mbf_language_system.zip and publish it.
Install mambelfish component, module and search bot but do not apply patch. Install this attachment:bot_mbf_language_system.zip and publish it.
Line 118: Line 133:
As said before I did not really solve it but prevented it from throwing a warning.
I just added this line before line 164

As said before I did not really solve it but prevented it from throwing a warning. I just added this line before line 164
Line 123: Line 139:
The solution is deeper because that function 'translateList' is called with no $rows specified. I did not investigate the cause that. Since mbf did work OK.
There are several liitle flaws within mambelfish as you may have found in the forum. PHP version problems
Even the lttle mbf search bot has a flaw. The search results are returned twice. Just by adding DISTINCT right after the SELECT statement will correct it.

The solution is deeper because that function 'translateList' is called with no $rows specified. I did not investigate the cause that. Since mbf did work OK. There are several liitle flaws within mambelfish as you may have found in the forum. PHP version problems Even the lttle mbf search bot has a flaw. The search results are returned twice. Just by adding DISTINCT right after the SELECT statement will correct it.
Line 129: Line 144:
I did not go that far and only solved the things that bothered me.
For that reason I made the mbf system bot and I use already a different version to be prepared for Joomla.1.1
But for some reason I would be more happy if it was released by Alex to tighten the gap between MBF and Joomla.
In general mambelfish works OK
I did not go that far and only solved the things that bothered me. For that reason I made the mbf system bot and I use already a different version to be prepared for Joomla.1.1  But for some reason I would be more happy if it was released by Alex to tighten the gap between MBF and Joomla. In general mambelfish works OK
Line 135: Line 147:
Line 141: Line 152:
Line 257: Line 269:

TableOfContents

zOOm Media Library

The lightbox and eCards functions do not work. Disable them at the backend.

User cant upload. only Admin

All i did after trying everyones hacks is went to line number 209 on the zoom_class.php file and changed:

Code:

 if (!isset($my->gid)) {

to Code:

 if (isset($my->gid)) {

This is on version 2.5b3

Drap n Drop Java applet doest not work

version 2.5b3 on Joomla

change

        if($zoom->_mambotype == 2) {
                require_once($mosConfig_absolute_path.'/includes/database.php');
        } else {
                require_once($mosConfig_absolute_path.'/classes/database.php');
        }

to

        /*
        if($zoom->_mambotype == 2) {
                require_once($mosConfig_absolute_path.'/includes/database.php');
        } else {
                require_once($mosConfig_absolute_path.'/classes/database.php');
        }
        */
        require_once($mosConfig_absolute_path.'/includes/database.php');

Java Upload - default image name

here's a quick fix for providing the real name

goto 'save_dnd.php' line 109 and comment it

should look like this:

//if(isset($setFilename))
$name = $realName;
.......

that way you force zoom to take the real name

in components / com_zoom / lib / zoom.class.php to remove footer. and components / com_zoom / www / admin / admin.php to remove credits on the management pages.

Update from 2.5beta3 to 2.5RC1

Method number one is the recommended way to upgrade. There were no database changes since version 2.5 beta3. That makes life a lot easier, doesn't it?

In other words: replace ALL the existing (and older) files in your '{joomlaroot}/components/com_zoom' and '{joomlaroot}/administrator/components/com_zoom' with the newer files from the archive. IMPORTANT: before you overwrite any files, please write your current configuration on a piece of paper. After upgrading, update your settings again.

The Changelog file hasn't been updated for a while indeed...if you want to know more about the changes since the previous version, use the CVS DIFF command...

Community Builder

to use community builder registration some registered content gives a link pointing to, for read more... index.php?option=com_registration&task=register

I need it to point to index.php?option=com_comprofiler&task=registers

apparently needs to be changed in com_content.html.php

zOOm Plugin can not find images after zOOm changes its default image directory

file: components / com_comprofiler / plugin / user / plug_cbzoomtab / zoom.php : line 81:

$ZoomPath = "/images/zoom/";

change to

                $ZoomPath = "images/zoom/";
                if(file_exists('components/com_zoom/etc/zoom_config.php')){
                    include_once('components/com_zoom/etc/zoom_config.php');
                    $ZoomPath = $zoomConfig['imagepath'];
                }

line 99:

$imgsize=getimagesize($mosConfig_absolute_path.$ZoomPath.$photo->catdir."/".$photo->imgfilename);

change to

$imgsize=getimagesize($mosConfig_absolute_path."/".$ZoomPath.$photo->catdir."/".$photo->imgfilename);

line 106

."<img src=\"images/zoom/$photo->catdir$thumbpath$thumbphoto\" border=\"0\" alt=\"\" title=\"".htmlentities(stripslashes($photo->imgdescr))."\" />"

change to

."<img src=\"$ZoomPath$photo->catdir$thumbpath$thumbphoto\" border=\"0\" alt=\"\" title=\"".htmlentities(stripslashes($photo->imgdescr))."\" />"

MambelFish

Installation

Install mambelfish component, module and search bot but do not apply patch. Install this attachment:bot_mbf_language_system.zip and publish it.

Search warnings

Warning: array_keys(): The first argument should be an array in /vol/www2/vcwi/htdocs/new/components/com_mambelfish/classes/mambelfish.class.php on line 164

Warning: Invalid argument supplied for foreach() in /vol/www2/vcwi/htdocs/new/components/com_mambelfish/classes/mambelfish.class.php on line 164

As said before I did not really solve it but prevented it from throwing a warning. I just added this line before line 164

if (!isset($rows)) return;

The solution is deeper because that function 'translateList' is called with no $rows specified. I did not investigate the cause that. Since mbf did work OK. There are several liitle flaws within mambelfish as you may have found in the forum. PHP version problems Even the lttle mbf search bot has a flaw. The search results are returned twice. Just by adding DISTINCT right after the SELECT statement will correct it.

The following thread goes deeper into the problems and solutions http://forum.joomla.org/index.php/topic,8785.0.html

I did not go that far and only solved the things that bothered me. For that reason I made the mbf system bot and I use already a different version to be prepared for Joomla.1.1 But for some reason I would be more happy if it was released by Alex to tighten the gap between MBF and Joomla. In general mambelfish works OK

I assumed that this is for the Mambo 4.5.2 and MambleFish 1.5 Released version. Next time include your version please. I works also for Joomla 1.0.4

You have to modify two files to make this work. com_weblinks/weblinks.php and com_weblinks/weblinks.html.php.

1. change entire function listWeblinks in com_weblinks/weblinks.php with these codes:

function listWeblinks( $catid ) {
global $mainframe, $database, $my;
global $mosConfig_shownoauth, $mosConfig_live_site, $mosConfig_absolute_path;
global $cur_template, $Itemid;
// MAMBLEFISH FIX BY AB ZAHRI AB AZIZIS - TRANSLATION GLOBAL VARIABLES
global $mosConfig_lang, $mosConfig_mbf_content;
// END MAMBLEFISH FIX BY AB ZAHRI AB AZIZIS - TRANSLATION GLOBAL VARIABLES

/* Query to retrieve all categories that belong under the web links section and that are published. */
// MAMBLEFISH FIX BY AB ZAHRI AB AZIZIS - MODIFY THE QUERY
//$query = "SELECT *, COUNT(a.id) AS numlinks FROM #__categories AS cc"
$query = "SELECT cc.*, COUNT(a.id) AS numlinks FROM #__categories AS cc"
// END MAMBLEFISH FIX BY AB ZAHRI AB AZIZIS - MODIFY THE QUERY
. "\n LEFT JOIN #__weblinks AS a ON a.catid = cc.id"
. "\n WHERE a.published='1' AND a.approved='1' AND section='com_weblinks' AND cc.published='1' AND cc.access <= '$my->gid'"
. "\n GROUP BY cc.id"
. "\n ORDER BY cc.ordering"
;
$database->setQuery( $query );
$categories = $database->loadObjectList();
// MAMBLEFISH FIX BY AB ZAHRI AB AZIZIS - TRANSLATING THE CATEGORIES
if( $mosConfig_mbf_content ) { $categories = MambelFish::translateList( $categories, 'categories', $mosConfig_lang); }
// END MAMBLEFISH FIX BY AB ZAHRI AB AZIZIS - TRANSLATING THE CATEGORIES

$rows = array();
$currentcat = NULL;
if ( $catid ) {
// url links info for category
$query = "SELECT id, url, title, description, date, hits, params FROM #__weblinks"
. "\nWHERE catid = '$catid' AND published='1' AND approved='1' AND archived=0"
. "\nORDER BY ordering"
;
$database->setQuery( $query );
$rows = $database->loadObjectList();

// current cate info
// MAMBLEFISH FIX BY AB ZAHRI AB AZIZIS - MODIFY THE QUERY
//$query = "SELECT name, description, image, image_position FROM #__categories"
$query = "SELECT * FROM #__categories"
// END MAMBLEFISH FIX BY AB ZAHRI AB AZIZIS - MODIFY THE QUERY
. "\n WHERE id = '$catid'"
. "\n AND published = '1'"
;
$database->setQuery( $query );
$database->loadObject( $currentcat );
// MAMBLEFISH FIX BY AB ZAHRI AB AZIZIS - TRANSLATING THE CURRENT CATEGORIES
if( $mosConfig_mbf_content ) { $currentcat = MambelFish::translate( $currentcat, 'categories', $mosConfig_lang); }
// END MAMBLEFISH FIX BY AB ZAHRI AB AZIZIS - TRANSLATING THE CURRENT CATEGORIES
}

// Parameters
$menu =& new mosMenu( $database );
$menu->load( $Itemid );
$params =& new mosParameters( $menu->params );
$params->def( 'page_title', 1 );
$params->def( 'header', $menu->name );
$params->def( 'pageclass_sfx', '' );
$params->def( 'headings', 1 );
$params->def( 'hits', $mainframe->getCfg( 'hits' ) );
$params->def( 'item_description', 1 );
$params->def( 'other_cat_section', 1 );
$params->def( 'other_cat', 1 );
$params->def( 'description', 1 );
$params->def( 'description_text', _WEBLINKS_DESC );
$params->def( 'image', '-1' );
$params->def( 'weblink_icons', '' );
$params->def( 'image_align', 'right' );
$params->def( 'back_button', $mainframe->getCfg( 'back_button' ) );

if ( $catid ) {
$params->set( 'type', 'category' );
} else {
$params->set( 'type', 'section' );
}

// page description
$currentcat->descrip = '';
if( ( @$currentcat->description ) <> '' ) {
$currentcat->descrip = $currentcat->description;
} else if ( !$catid ) {
// show description
if ( $params->get( 'description' ) ) {
$currentcat->descrip = $params->get( 'description_text' );
}
}

// page image
$currentcat->img = '';
$path = $mosConfig_live_site .'/images/stories/';
if ( ( @$currentcat->image ) <> '' ) {
$currentcat->img = $path . $currentcat->image;
$currentcat->align = $currentcat->image_position;
} else if ( !$catid ) {
if ( $params->get( 'image' ) <> -1 ) {
$currentcat->img = $path . $params->get( 'image' );
$currentcat->align = $params->get( 'image_align' );
}
}

// page header
$currentcat->header = '';
if ( @$currentcat->name <> '' ) {
$currentcat->header = $currentcat->name;
} else {
$currentcat->header = $params->get( 'header' );
}

// used to show table rows in alternating colours
$tabclass = array( 'sectiontableentry1', 'sectiontableentry2' );

HTML_weblinks::displaylist( $categories, $rows, $catid, $currentcat, $params, $tabclass );
}

2. Change entire function showCategories in com_weblinks/weblinks.html.php with these codes:

function showCategories( &$params, &$categories, $catid ) {
global $mosConfig_live_site, $Itemid;
?>
<ul>
<?php
foreach ( $categories as $cat ) {
// MAMBLEFISH FIX BY AB ZAHRI AB AZIZIS - MODIFY IF STATEMENTS [ catid column has been removed from query ]
//if ( $catid == $cat->catid ) {
if ( $catid == $cat->id ) {
// END MAMBLEFISH FIX BY AB ZAHRI AB AZIZIS - MODIFY IF STATEMENT
?>
<li>
<b>
<?php echo $cat->name;?>
</b>
&nbsp;
<span class="small">
(<?php echo $cat->numlinks;?>)
</span>
</li>
<?php
} else {
// MAMBLEFISH FIX BY AB ZAHRI AB AZIZIS - MODIFY LINK [ catid column has been removed from query ]
//$link = 'index.php?option=com_weblinks&catid='. $cat->catid .'&Itemid='. $Itemid;
$link = 'index.php?option=com_weblinks&catid='. $cat->id .'&Itemid='. $Itemid;
// MAMBLEFISH FIX BY AB ZAHRI AB AZIZIS - END MODIFY LINK
?>
<li>
<a href="<?php echo sefRelToAbs( $link ); ?>" class="category<?php echo $params->get( 'pageclass_sfx' ); ?>">
<?php echo $cat->name;?>
</a>
&nbsp;
<span class="small">
(<?php echo $cat->numlinks;?>)
</span>
</li>
<?php
}
}
?>
</ul>
<?php
}

3. Save both files (upload) and you are done.

Alex I have commented this modification please review and include it as your patch files.

JunHu: JunHu/Memo/JoomlaTipsAndTricks/MambelFish (last edited 2008-10-03 20:20:08 by localhost)