Forums  ›  Dolphin 6.1  ›  General
 

removing links and blocks from member page

Hi,

 

I stumbled upon your site while googling some dolphin related stuff. This seems like a greattt site. I am glad I found it. I am presently trying to customize dolphin for a client. He did not want quite a few things from the original look and feel. I managed to handle some of those by modifying the scripts. 

 

A couple of things needed to be hidden like the 'My Presence' link on top, the 'My Guestbook' link and the 'Music Box' in the member page. I am not sure which script I need to modify, can anyone please help me with that??

 

Thanks in advance.

Hello Buzz,

Thanks for joining. Some things in Dolphin can be changed quite easily, while others day some exploring.

The ones you are referring to one of the easier more common ones to track down.

The "My Presence" Link you see in the top right after logging in you will find in the functions.php file located here:
/templates/tmpl_uni/scripts/functions.php

If you are using another template besides the default dolphin template replace tmpl_uni with the name of your template folder/directory. You might want to back up the original file just in case. It's a small file and not too much to it but you never know.

Then look for:

<div class="topMemberBlock">
<?= get_member_icon( $memberID, 'right' ) ?>
<div class="hello_member"><?= _t( '_Hello member', getNickName( $memberID ) ) ?></div>

<div class="hello_actions">
<span><a href="<?= $site['url'] ?>member.php"><?= _t('_My account') ?></a></span>
<span><a href="<?= $site['url'] ?>mail.php?mode=inbox"><?= _t('_My Mail') ?></a><?=' '.$sNewLet;?></span>
<span><a href="<? echo getProfileLink( $memberID ) ?>"><?= _t('_My Profile') ?></a></span>
<span><a href="javascript:void(0);"
onclick="window.open( '<?= $site['url'] ?>presence_pop.php' , 'Presence', 'width=224,height=600,toolbar=0,directories=0,menubar=0,status=0,location=0,scrollbars=0,resizable=1');"
><?= _t('_RayPresence') ?></a></span>

<span><a href="<?= $site['url'] ?>logout.php?action=member_logout"><?= _t('_Log Out2') ?></a></span>
</div>
</div>

Then you can just remove the referrence to "Presence" like so:

<div class="topMemberBlock">
<?= get_member_icon( $memberID, 'right' ) ?>
<div class="hello_member"><?= _t( '_Hello member', getNickName( $memberID ) ) ?></div>

<div class="hello_actions">
<span><a href="<?= $site['url'] ?>member.php"><?= _t('_My account') ?></a></span>
<span><a href="<?= $site['url'] ?>mail.php?mode=inbox"><?= _t('_My Mail') ?></a><?=' '.$sNewLet;?></span>
<span><a href="<? echo getProfileLink( $memberID ) ?>"><?= _t('_My Profile') ?></a></span>
<span><a href="<?= $site['url'] ?>logout.php?action=member_logout"><?= _t('_Log Out2') ?></a></span>
</div>
</div>


"My Guestbook" Link in the top navigation menu can be hidden in your dolphin admin panel. "Builders", then find "Navigation Menu Builder" You will find a bunch of blocks. You can simply drag and move them around to other areas. Move them down to the bottom menu "inactive" Create a "New Item/link".

Probably the best solution is to find it in the menu..."My Profile" and "Profile View" columns. Then, simply click on the center of the block and uncheck visible for "guest" "member" and save the changes. This way if you want to make if visible in the future you just go back and make it visible for them.

The "Music Box" on the member page you can do in your Dolphin Admin Panel. Find the "Builders" then "Pages Builder" When the page loads up in the center of the page you will see classifieds, homepage, account, etc...Choose "Account" When the blocks load up, find your desired block "My Music Gallery" click on the center of the block and uncheck visible for again, and save the changes. You can do the same to profile page in the "Page Builder" too. The music on the Profile also has profile music which is a different player than music gallery.

Most boxes can be hidden, or you can make visible for members but not guests. Even the other way around if you had a box with an add or something that everyone sees (guest), but when logged in it disappears. Things like that.

If you do not see the blocks in the builders you will need to use another web browser like Firefox.

Hello gameutopia,

 

Thanks a lotttt for your reply. I made the required change and it works just the way I wanted :) 

 

As for the other links I wanted to hide them too, however not through the admin panel but again by making changes in the script. Any suggestion on that?

 

Earlier I tried changing field values in table 'TopMenu' from Active='1' to Active='0' to hide the concerned link, but it din't work.

 

Then I realised there was a cached page '/inc/db_cached/MenuContent.inc' where the link info was stored in an array form.

 

So to hide the music box I just said visible => "" and now its no more visible : 

63 => array(

    'Type'      => "custom",

    'Caption'   => "_Profile Music",

    'Link'      => "javascript:void(0);",

    //'Visible'   => "memb",

    'Visible'   => "",

    'Target'    => "",

    'Onclick'   => "openRayWidget('mp3', 'editor', '{memberID}', '{memberPass}');",

    'Check'     => "",

    'Strict'    => "0",

    'Parent'    => "4",

  )

 

I have used the same technique to hide a lot of other links/ blocks that I didnot need.

Do you think this will have any implications elsewhere in the application?

 

Cheers.

If you are looking to do this by means of editing the code I would open up the file/page you are trying to change in this case member.php

Near the top of the php file you will find the references to the other files like:

require_once( 'inc/header.inc.php' );
require_once( BX_DIRECTORY_PATH_INC . 'design.inc.php' );
require_once( BX_DIRECTORY_PATH_INC . 'profiles.inc.php' );
require_once( BX_DIRECTORY_PATH_INC . 'members.inc.php' );
require_once( BX_DIRECTORY_PATH_INC . 'news.inc.php' );
require_once( BX_DIRECTORY_PATH_INC . 'utils.inc.php' );
require_once( BX_DIRECTORY_PATH_INC . 'sharing.inc.php' );

require_once( BX_DIRECTORY_PATH_CLASSES . 'BxDolClassifieds.php' );
require_once( BX_DIRECTORY_PATH_CLASSES . 'BxDolEvents.php' );
require_once( BX_DIRECTORY_PATH_CLASSES . 'BxDolGroups.php' );
require_once( BX_DIRECTORY_PATH_CLASSES . 'BxDolPageView.php' );
require_once( BX_DIRECTORY_PATH_CLASSES . 'BxDolSharedMedia.php' );


Then you can inspect member.php as well as each of these files for what you might be looking for. Some times this narrows it down quite a bit for you.

These files will be found in /inc and /inc/classes folders/directories.

Then just start looking for what you want to change or remove. Most are pretty self-explanatory. design.inc.php and header.inc.php are the main 2 files you see often. Since you are talking about member.php and audio I would look at members.inc.php, sharing.inc.php, BxDolSharedMedial.php for starters.

Sometimes when looking at these other files they will also include or require_once other files so your exploration can often lead you to other files too.

templates/base/scripts folder/directory you will find files shared regardless of the template you use that are sometimes handy to peek at too.

Hii again,

 

Thanks for replying. Well, I did go through the concerned script files, and I must admit, it wasn't easy to keep up with the flow of control. But did manage to understand a lil bit. I also realized that there was no point in making changes in the cache files to hide certain blocks and links I dint want. Since the admin could simply go into the  'Builders' menu and reset the changes to original.

 

Would it be somehow possible to allow the admin to only have partial rights over the site's look and feel and other functionalities? For eg, suppose I need to show only a few builder blocks to the admin and allow him to play around with just those few and also ensure that on hitting 'Reset Page' the settings are rollbacked only to the extent I need them to and not back to the factory state? Is this viable? Your inputs are highly appreciated.

 

Many thanks.

The only thing you could potentially do is download a backup database and files before you let someone play with things and restore them if necessary. This is not a very efficient or friendly method though.

If you want someone to play around with the admin area, but are afraid they will mess something a sort of training type of thing. You could always install the free dolphin in a subfolder yourdomain.com/test or similar. Let them play with whatever they want and check in with them or their progress and such. You can also easily limit a test area like this to only your ip and their ip so the rest of the internet world don't find or see it if necessary using simple .htaccess.

Right now there isn't much you can do to limit a second admin rights and access. Which is a real bummer. So many other scripts do have a much more advanced system of assigning additional privileges and exactly what they can and cannot do.

I am hoping in the next new release, due out soon this will be one of the things the implement.

A while back I setup a mysite.com/admin2 type of thing and messed with changing all kinds of things to prevent access to areas for a second admin.

They were to login at mysite.com/admin2, they had a different username/password and were not allowed to see things that I could. But this was a lot of code editing and changing. I ended up scrapping the project as it was just consuming too much of my time, but it was working.

Each new version the put out has been improved dramatically, so my fingers are crossed about many things.

Hello,

 

Thanks for all your help, really appreciate it.

 

I eventually commented out the unwanted things in the database dumps itself. So now even if someone says "restore factory settings", it would only restore it back to a certain point and not entirely.

 

Will definitely try dolphin7 for my next project :)

 

Cheers.

Glad you got it squared away. Dolphin 7 should be interesting and a nice start to the new year.

Forums  ›  Dolphin 6.1  ›  General