Fixing Events added by Admin - Dolphin 6.1.4

Hi everyone,

I'm a newbie and have been testing dolphin for about 1 month now.  I'll either master dolphin....or end up bald from pulling all my hair.

I'm aware that some of the "Events" features are not working. In my case, while I add a new event as an Administrator a few things happen:

1) The recently added event won't show up at all in the "Events" page or "Latest/Random" Event box; only member added events show up.

2) The event finally shows up but there is no thumbnail picture.

3) The is no icon picture in the calendar of events.

Well, I managed to find a fix for these three problems.

First fix = Event's not showing up in Event box "Latest/Random", only member created events do.

Go to your "dolphin/inc/classes" folder and open the "BXDolEvents.php file".

Locate this line:

INNER JOIN `Profiles` ON `Profiles`.`ID` = `SDatingEvents`.`ResponsibleID`

and replace it with this:

LEFT JOIN `Profiles` ON `Profiles`.`ID` = `SDatingEvents`.`ResponsibleID`

Save your changes and Close.

Second Fix:

In the original script, the 'getThumbNameByPictureName' formula creates the Thumbnail filename, however a correction needs to be made and  the formula for creating an Icon  image was left out of the script (??????)

Keep this in mind; a formula is not even needed to fix this but I'm just trying to keep everything consistent, so here it goes:

Go to your "dolphin/inc" folder and open the "sdating.inc.php" file.
Locate the line where the 'getThumbNameByPictureName' starts.

In this line, change this section:

$bVer2=FALSE

to

$bVer2=TRUE

Now copy this into to your file and put it right below this line "define( 'SDATING_ERROR_PHOTO_PROCESS', 4);"



/**
* Retrieves icon name by specified picture name
*
* @param string $pictureName                - name of original picture
*
* @return string                             - name of thumbnail for specified picture
*
*
*/
function getIconNameByPictureName( $pictureName, $bVer2=TRUE )
{
$dotPos = strrpos( $pictureName, '.' );

// if dot not found then return original name
if ( $dotPos === false )
return $pictureName;

$basePart = substr( $pictureName, 0, $dotPos );
$ext = substr( $pictureName, $dotPos, strlen($pictureName) - $dotPos );

$sRet = ($bVer2) ? 'icon_' . $basePart . $ext : $basePart . '_icon' . $ext;
return $sRet;
}



Save and close your file.

Now, go to 'dolphin/admin' and open 'sdating_admin.php'.
Locate this line: "$thumbName = getThumbNameByPictureName( $pictureName );". Now add the following right below:

$iconName = getIconNameByPictureName( $pictureName );

Now Locate this line: "// if width and height specified then resize picture". Add a few blank lines BEFORE  this line.

In that empty space Paste the following:

// resize for icon
$res = imageResize( $dir['tmp'] . $pictureName, $dir['sdatingImage'] . $iconName, $sdatingThumbWidth, $sdatingThumbHeight );
if ( $res != IMAGE_ERROR_SUCCESS )
return SDATING_ERROR_PHOTO_PROCESS;


If anyone has questions, contact me :)

I realize that my writing might not look that organized.

Thanks,

Ozzie


Quote · 16 Oct 2008

For future 6.2 was done next tickets:

http://www.boonex.com/trac/dolphin/ticket/515

http://www.boonex.com/trac/dolphin/ticket/508

http://www.boonex.com/trac/dolphin/ticket/523

Wink

thanks for cooperation.

Quote · 17 Oct 2008

I was asked if there was a way of changing the image size of both the icon and thumbnail images with my fix.

Simply go to: dolphin/inc/sdating.inc.php.

Find the line that says "// SpeedDating photo thumbnail size".


Right below, you'll see these two variables:

$sdatingThumbWidth = 50;
$sdatingThumbHeight = 50;


Change the number "50" to whatever you like.  This is the new image width and height that will be used by thumbnail and icon formulas.

Hope it helps

Oswaldo

Quote · 5 Jan 2009

Hi ufologo,

I made the modifications you suggested, now old admin events are showing up Laughing but when I try to add a new event I get this error message

Fatal error: Call to undefined function: geticonnamebypicturename() in /home/millemil/public_html/admin/sdating_admin.php on line 77

Could you help?

Quote · 11 Apr 2009
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.