Saturday, August 29, 2009

Add Group Delete Function for Dolphin 6.x

/ group_actions.php

case 'delmem':
if( $arrGroup['creatorID'] == $memberID )
$mem = (int)$_REQUEST['mem'];
if( $mem )
if( $mem != $memberID )
$oGroups->resignGroupMember( $mem, $groupID );
Header( "Location: {$site['url']}grp.php?action=mygroups" );
$_page['header'] = _t( "_Group member delete error" );
$_page['header_text'] = _t( "_Group member delete error" );
$_page_cont[$_ni]['page_main_code'] = MsgBox(_t( "_You cannot delete yourself from group because you are group creator" ));
$_page['header'] = _t( "_Group member delete error" );
$_page['header_text'] = _t( "_Group member delete error" );
$_page_cont[$_ni]['page_main_code'] = MsgBox(_t( "_You cannot delete group member because you are not group creator" ));


case 'delgrp': // start delete group function
if( $arrGroup['creatorID'] == $memberID )
// put delete function here
$sql = "DELETE FROM `Groups` WHERE `ID` = '".$groupID."' ";
db_res ( $sql);
$sql = " DELETE FROM `GroupsGallery` WHERE `groupID` = '".$groupID."' ";
db_res ( $sql) ;
Header( "Location: {$_SERVER['HTTP_REFERER']}" );
Header( "Location: {$site['url']}grp.php" );

$_page['header'] = _t( "_Group member delete error" );
$_page['header_text'] = _t( "_Group member delete error" );
$_page_cont[$_ni]['page_main_code'] = MsgBox(_t( "_You cannot delete group because you are not group creator" ));
break; // end delete group

OPEN :::
FIND :::
if ( $aGroupInfo['creatorID'] == $iMemberID ){
$sRetHtml .= $this->genGroupActionBtn( 'Edit group', "{$this->sCurrFile}?action=edit&ID={$iGroupID}" );

if ( $aGroupInfo['creatorID'] == $iMemberID ){
$sRetHtml .= $this->genGroupActionBtn( 'Delete group', "group_actions.php?a=delgrp&ID={$iGroupID}", true );
$sRetHtml .= $this->genGroupActionBtn( 'Edit group', "{$this->sCurrFile}?action=edit&ID={$iGroupID}" );

Friday, August 14, 2009

Dolphin version 7 (Remove Boonex Footer)

UPDATED:: February 21, 2011
Thanks to GLCNATION.COM -- the files had changed... this post now reflects the working version to remove Boonex Footers

First of all: I do not condone, or encourage the use of the following tip. I provide it only to avoid answering the question 1,000 times.

The following steps will remove the Boonex footers from Dolphin 7.

Step One: Run the following MySQL (using phpMyAdmin)

UPDATE `sys_options` SET `VALUE` = '' WHERE CONVERT( `sys_options`.`Name` USING utf8 ) = 'sys_template_cache_enable' LIMIT 1 ;

UPDATE `sys_options` SET `VALUE` = '' WHERE CONVERT( `sys_options`.`Name` USING utf8 ) = 'sys_template_cache_css_enable' LIMIT 1 ;
Step Two: Open /templates/tmpl_uni/_sub_footer.html


Replace with:

<style type="text/css">


div.main_footer_block {

visibility: hidden;





<span style="visibility:hidden; height:0px;"> __boonex_footers__ </span>

Step Three: Delete the contents of the following 2 directories.
Refresh your home page to ensure removal of the Boonex links on your dolphin community.

Again: I cannot stress enough, supporting Boonex by purchasing a license is the only way to ensure future development. Support open source software and pay for the removal of the dolphin copyright at the bottom of your site!

Saturday, August 8, 2009

Automatic Login after Dolphin Join

Many of the dolphin sites I have been involved with, as a freelancer, have requested that the visitor be automatically logged in after they join.

Here is the simple changes needed to log the new member in, automatically after they complete the Dolphin join form.

Open :: /join.php

Find ::

echo _t( '_Join complete' );
echo '
echo _t( $sStatusText );

Just above it paste the following:::

// automatically log the user in after join process
$sql = " SELECT * FROM Profiles WHERE `ID` = '".$iMemID."'";
$new_info = db_res( $sql );
$the_user = mysql_fetch_assoc( $new_info );
setcookie( "memberID", $the_user['ID'], 0, '/' );
setcookie( "memberPassword", $the_user['Password'], 0, '/' );
// end auto login

This will log them into the Dolphin community without requesting username and password.

Thursday, August 6, 2009

Adding a page to Dolphin Site.

I have been asked many times "How do I add a new page to my Dolphin Community Site?"

Other than using the Page Builder, in your admin area - which has some limitations, there is another simple way to add a page to your site.

First: Open /faq.php and save it as something new (like detailed_info.php)

Then look for the following code.

function PageCompPageMainCode()
global $oTemplConfig;

$ret = _t( "_FAQ_INFO" );

return DesignBoxContent(_t( "_FAQ_H1", $site['title'] ), $ret, $oTemplConfig -> PageCompThird_db_num );

Notice the line -> $ret = _t( "_FAQ_INFO" );
<- this tells the dolphin script to get that key from the language table.

Now change the _FAQ_H1 to _MORE_INFO (or anything else you'd like to use, and resave the file.

Go into your dolphin admin area, click on language settings, then Add New and enter the key ( _MORE_INFO (or whatever you named it) and enter the value for each language your site has available.

Done. Now just link to that file, by adding a link to the navigation menu, or anywhere.

Just a quick post and simple instructions, I know - but let me know if you need any further description on how to add a page to your Dolphin web site.


Dolphin Version 7

Had some time today, in wait for a client to deliver some required material.

So... I jumped into the latest version of Dolphin, version 7. Altho I love the interface and the new features - it seems they managed to steal much of the 'Modules' ideas from us developers.

Sure these items are a great part of the core dolphin community application, but isn't using them going to step on the toes of developers who have supported this open source community site?

At any rate - it is extremely well put together and the Boonex team deserves some cudos for this app - well done, my friends!

My initial thoughts on Dolphin version 7 - " WOW! "

I will be spending most of the day, seeing what it takes to replace their 'Profile Customizer' function with mine. I have already had a number of requests to do this and am sure I will continue to get more.

It seems they still use the same basic profile view function, but some changes are needed in the genProfileCSS() function, as well as in the update function. Depending on what is involved, I am hoping to make it a free upgrade for owners of the customizer MOD for dolphin.

I will let you know :)


Tuesday, August 4, 2009

Dolphin webmasters, worst of the breed!

Freelancing means dealing with 'know-it-all' "webmasters" - in most cases it's the 'weekend-webmaster'. The worst of the breed!

This past weekend, a holiday weekend here in Toronto, I took 2 days off - the Sunday and the Monday. I don't get too many days off in my business, which I guess is a good thing, means I am a busy freelancer.

When I returned to my desk Tuesday morning, I was met with angry emails from a MOD sale, the profile customizer for Dolphin MOD.

Why do these people, who spend on average $120 on mod with me, why do they feel they own me. Where do they get off threatening me with PayPal chargebacks, just because I took a couple of days off - especially when its a HOLIDAY WEEKEND???

I just dont understand these dolphin webmasters - drive a guy nuts! Needless to say, he will not be getting a refund, and his threats of negative feedback, may make there way to the Dolphin community. Frankly - I couldnt care less! More power to him and all the other weekend webmasters before him that resort to threats when I am not immediately available for their emails.

Just had to vent, figured - where better than the blog?

Webmasters should realize that geeks have lives and families too - that we deserve a day or two off from time to time, especially considering the long nights and weekends we usually work for them. For pennies I might add. Perhaps I will change my pricing back to the industry standard - then I might not be so upset over threats resulting from a simple two-day holiday with my family.

Since I rarely take time off -- I wont run into this again for a while, but for gosh sakes! Give a guy a break. A day off from time to time is not that much to ask. Is it?