Pragmatism in Code

Michael Percy AKA DeeEmm - Waxing lyrical about life the universe and everything software related...

  • Home
    Home This is where you can find all the blog posts throughout the site.
  • Categories
    Categories Displays a list of categories from this blog.
  • Tags
    Tags Displays a list of tags that has been used in the blog.
  • Login
Subscribe to this list via RSS Blog posts tagged in hide

If you want to hide advertising banners from non members - do this...

Edit

/inc/banners.inc.php

Search for

return $out;

Replace it with

if (islogged()){
   return $out;
}

Thats it!

/DM

Hits: 1796
Rate this blog entry:
0
Continue reading 0 Comments

If you would like to completely hide the menu bar from non-members, then this is the mod for you.

Edit

templates/base/scripts/BxBaseMenu.php

Find

return $this->sCode;

Change it to...

if (islogged()){
return $this->sCode;

All Done!

 

If you also want to hide the stripe that the menu bar resided in - you might want to also add this to your template...

div.sys_top_menu {
min-height:0px !important;
}

Of course YMMV depending on template etc.

 

/DM

Hits: 3896
Rate this blog entry:
0
Continue reading 6 Comments

Dolphin is not very good with permissions, as a result it is impossible to assign permissions to individual pages. So if you have created some custom pages for your site that you only want to display to logged in members, you will need the following hack...

Edit

viewPage.php

Find

$sPageName = process_pass_data( $_GET['ID'] );

Add underneath

(be sure to change YOURPAGE to the name of your page!!)

 

if ($sPageName == 'YOURPAGE' && !isMember()){
$oSysTemplate->displayAccessDenied ();
}else{

Find

} else {
   $oSysTemplate->displayPageNotFound();
}

Add Underneath

}

That's it.

 

 

Enjoy

/DM

 

Hits: 1939
Rate this blog entry:
0
Continue reading 0 Comments

If you would like to hide the flash promo from displaying to logged in members all you have to do is the following.

Edit inc/design.inc.php

Find the following line in the getPromoCode() function (it's the last line)

return $sCode;

Then add just before it:

if(isMember()) $sCode = '';

That's it! Easy huh?

/DM

 

Hits: 1804
Rate this blog entry:
0
Continue reading 4 Comments