Hide Content if user is not logged in.

Does anyone know the script I should use to hide content on a page if a user is not logged it. What I mean is, when a user is not logged in, some blocks can be hidden as well as some nav tabs. I am trying to use that same system to hide content on an entirely different .php page on my website. This page was not made with the page creator in the Admin panel, but a page I coded my self.

Thanks! Please comment if you need anything else.

Quote · 26 Feb 2012

For the custom page, did you use a base Dolphin page template? If you did you can just add the following after the require_once statements:

$logged['member'] = member_auth( 0 );

In some cases, you can also use:
check_logged();
Updating my BoonexNerd.net site.
Quote · 26 Feb 2012

where would I put that in the html? And I have included the default dolphin header in the page and thats it.

Quote · 26 Feb 2012

he he hee..yeah, I know that one. Sometimes knowing the code is one thing but then, where to put it?

Ok, first of all, your page shouldn't be an .html page unless you've configured your server to also accept PHP tags within an html page.

Secondly, I would need to see how you built your page. If you don't want it public, you can PM me.

For most Dolphin pages, it starts something like this:

require_once( './inc/header.inc.php' );
require_once( BX_DIRECTORY_PATH_INC . 'design.inc.php' );
require_once( BX_DIRECTORY_PATH_INC . 'admin.inc.php' );

require_once( BX_DIRECTORY_PATH_INC . 'db.inc.php' );
require_once( BX_DIRECTORY_PATH_INC . 'utils.inc.php' );
require_once( BX_DIRECTORY_PATH_CLASSES . 'BxDolPageView.php' );

 

 

/*--jt note force a login--------------------*/  
$logged['member'] = member_auth( 0 );

...all other code below...

 

 

Updating my BoonexNerd.net site.
Quote · 26 Feb 2012

Lol, it is a .php page, sorry. And heres the Code:

 

<script language="javascript">

$(document).ready( function() {

$('#keyword').blur(function() {

$('#keyword').removeClass();

$('#keyword').addClass('input_main');

if ('' == $('#keyword').val())

$('#keyword').val('Search');

}

);

$('#keyword').focus(function() {

$('#keyword').removeClass();

$('#keyword').addClass('input_focus');

if ('Search' == $('#keyword').val())

$('#keyword').val('');

}

);

});

</script>

<!-- <li>

<div id="gse_search">

<form action="searchKeyword.php" method="get" name="SearchForm">

<input type="text" name="keyword" id="keyword" value="Search" class="input_main"/>

</form>

</div>

<div class="clear_both"></div>

</li> -->

 

<html>

 

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<title>Action Games | My Cabinet</title>

<link rel="stylesheet" type="text/css" href="http://my-cabinet.com/games/categories/templates/style.css" />

<meta http-equiv='Content-Type' content='text/html; charset=UTF-8' />

    <script type='text/javascript' src='http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js?ver=1.3.2'></script>

   <script src=http://my-cabinet.com/games/categories/templates/js/jquery.color-RGBa-patch.js'></script>

    <script src='http://my-cabinet.com/games/categories/templates/js/example.js'></script>

<link rel='stylesheet' href='http://my-cabinet.com/games/categories/templates/css/style.css'>

<link rel="icon" 

      type="image/png" 

      href="http://my-cabinet.com/templates/base/images/icons/favicon.ico">

      <meta property="og:image" content="href="http://my-cabinet.com/images/M2.png" />

      <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">

<meta name="keywords" content="Cabinet, Games, Videos, Quizzes, Music, Apps, Store, Pictures, Full Screen Games, FulScreen, Cabinet Games, Action Games, Adventure, Arcade, Puzzle, Sport, Sparta, Wood, Cabinets, Cabinetry, Social, Networks, Connect, Friends, Chat, Player">

<meta name="description" content="My Cabinet is a new social world that lets you play games, watch videos, connect with people, and do many more things. Things not even the top websites in the industry can do.">

 

<meta property="fb:app_id" content="129167200501421" />

<meta property="og:site_name" content="My Cabinet" />

 

 

 

 

<script language="javascript" type="text/javascript" src="http://my-cabinet.com/plugins/jquery/jquery.js"></script><script language="javascript" type="text/javascript" src="http://my-cabinet.com/plugins/jquery/jquery.jfeed.js"></script><script language="javascript" type="text/javascript" src="http://my-cabinet.com/plugins/jquery/jquery.dimensions.js"></script><script language="javascript" type="text/javascript" src="http://my-cabinet.com/inc/js/functions.js"></script><script language="javascript" type="text/javascript" src="http://my-cabinet.com/inc/js/jquery.dolTopMenu.js"></script><script language="javascript" type="text/javascript" src="http://my-cabinet.com/inc/js/jquery.dolRSSFeed.js"></script><script language="javascript" type="text/javascript" src="http://my-cabinet.com/inc/js/jquery.float_info.js"></script><script language="javascript" type="text/javascript" src="http://my-cabinet.com/inc/js/jquery.webForms.js"></script><script language="javascript" type="text/javascript" src="http://my-cabinet.com/plugins/jquery/jquery.form.js"></script><script language="javascript" type="text/javascript" src="http://my-cabinet.com/inc/js/jquery.dolPopup.js"></script><script language="javascript" type="text/javascript" src="http://my-cabinet.com/inc/js/common_anim.js"></script><script language="javascript" type="text/javascript" src="http://my-cabinet.com/inc/js/login.js"></script><script language="javascript" type="text/javascript" src="http://my-cabinet.com/inc/js/ie7_flash_fix.js"></script><script language="javascript" type="text/javascript" src="http://my-cabinet.com/inc/js/classes/BxDolVoting.js"></script><script language="javascript" type="text/javascript" src="http://my-cabinet.com/inc/js/user_status.js"></script><script language="javascript" type="text/javascript" src="http://my-cabinet.com/inc/js/view_edit.js"></script><script language="javascript" type="text/javascript" src="http://my-cabinet.com/flash/modules/global/js/swfobject.js"></script><script language="javascript" type="text/javascript" src="http://my-cabinet.com/modules/boonex/messenger/js/invite.js"></script>

 

    <script type="text/javascript" language="javascript">var aDolImages = {'clock': 'http://my-cabinet.com/templates/base/images/icons/clock.png','wf_plus': 'http://my-cabinet.com/templates/base/images/icons/action_fave.png','wf_minus': 'http://my-cabinet.com/templates/base/images/icons/action_block.png','wf_other': 'http://my-cabinet.com/templates/base/images/icons/folder_add.png','more': 'http://my-cabinet.com/templates/base/images/icons/more.png','collapse_open': 'http://my-cabinet.com/templates/base/images/icons/toggle_down.png','collapse_closed': 'http://my-cabinet.com/templates/base/images/icons/toggle_right.png','loading': 'http://my-cabinet.com/templates/tmpl_uni/images/loading.gif'};</script>

 

    <script type="text/javascript" language="javascript">var aDolLang = {'_Counter': 'Counter','_PROFILE_ERR': 'Error!\nYour username or password was incorrect. Please try again.'};</script>

 

    <script type="text/javascript" language="javascript">var aDolOptions = {'sys_user_info_timeout': '3'};</script>

 

    <script type="text/javascript" language="javascript">

 

var site_url = 'http://my-cabinet.com/';

 

        var aUserInfoTimers = new Array();

 

$(document).ready( function() {

 

$( 'div.RSSAggrCont' ).dolRSSFeed();

 

} );

 

</script>

 

    <!--[if lt IE 7.]>

 

<script defer type="text/javascript" src="inc/js/pngfix.js"></script>

 

<![endif]-->

 

 

 

 

 

 

 

    <script type="text/javascript">

 

        var oBxUserStatus = new BxUserStatus();

 

        oBxUserStatus.userStatusInit('http://my-cabinet.com/', false);

 

    </script>

 

 

 

<script>

  var _gaq = _gaq || [];

 

  _gaq.push(['_setAccount', 'UA-25241819-1']);

 

  _gaq.push(['_trackPageview']);

 

 

 

  (function() {

 

    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;

 

    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';

 

    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);

 

  })();</script>

<script type="text/javascript" language="javascript" src="http://my-cabinet.com/games/categories/templates/script.js"></script>

 

 

 

</head>

 

<body>

<center>

<div class="mainwrap2">

<p style="font-size:25px; font-family: 'Fresca', sans-serif; color:#ffffff;margin:2px">Action Games</p></div><!--[if IE]>

<head><link id="fw_template_file" rel="stylesheet" type="text/css" href="http://www.games.my-cabinet.com/templates/base/scripts/gamepages.css" media="screen"></head>

 

 

 

<p><div id="ie-nav-top">

<div id="ie-nav">

<a class="fw-button fw-button-big"   href="http://games.my-cabinet.com/home.php?redirect%20time=0.0s&url=index&&source=hp&q=hflkd&pbx=1&oq=hflkd&aq=f&aqi=g-l2g-ls1g-l1&aql=&gs_sm=3&gs_upl=17198l17303l0l17541l5l2l0l0l0l0l133l209l1.1l2l0&bav=on.2,or.r_gc.r_pw.r_cp.,cf.osb&fp=2ea555e16508ec1f&biw=1366&bih=643"  >< Back To My Cabinet</a>

<a class="fw-button fw-button-big"   href="http://games.my-cabinet.com/index.php"  >Home</a>

<a class="fw-button fw-button-big"   href="http://games.my-cabinet.com/action/"  >Action</a>

<a class="fw-button fw-button-big"   href="http://games.my-cabinet.com/adventure/"  >Adventure</a>

<a class="fw-button fw-button-big"   href="http://games.my-cabinet.com/arcade"  >Arcade</a>

<a class="fw-button fw-button-big"   href="http://games.my-cabinet.com/sport"  >Sport</a>

<a class="fw-button fw-button-big"   href="http://games.my-cabinet.com/puzzle"  >Puzzle</a>

 

</div></div>

 

 </p><style>.nav-wrap {display:none;} #ie-nav-top {margin:6px;} #ie-nav {margin:1px;} </style><p></p><p></p><![endif]-->

 

<style>

#id-hideCSS {display:none;}

.mainwrap {width:784px;}

.mainwrap2 {width:784px;}

.footer {margin-top:15px;font-family:arial black;border-top:2px solid #ffffff;border-bottom:2px solid #ffffff; background: #000000 ;width:100%;position:fixed;bottom:0px;}

</style><div id="id-hideCSS">

 

 

<div class="nav-wrap">

 

<ul class="group" id="example-one">

            <li class="current_page_item">

            <a href="#">< Back To My Cabinet</a>

            </li>

            

        </ul>

        

    </div>

</div>

        

    <div class="nav-wrap">   

        

        <ul class="group" id="example-two">

            <li><a rel="#993300" href="http://games.my-cabinet.com/home.php?redirect%20time=0.0s&url=index&&source=hp&q=hflkd&pbx=1&oq=hflkd&aq=f&aqi=g-l2g-ls1g-l1&aql=&gs_sm=3&gs_upl=17198l17303l0l17541l5l2l0l0l0l0l133l209l1.1l2l0&bav=on.2,or.r_gc.r_pw.r_cp.,cf.osb&fp=2ea555e16508ec1f&biw=1366&bih=643">< Back To My Cabinet</a></li>

<li><a rel="#993300" href="../index.php">Home</a></li>

            <li class="current_page_item_two"><a rel="#FF0000" href="http://games.my-cabinet.com/action/">Action</a></li>

<li><a rel="#00FF00" href="http://games.my-cabinet.com/adventure/">Adventure</a></li>

            <li><a rel="#00CCFF" href="http://games.my-cabinet.com/arcade/">Arcade</a></li>

            <li><a rel="#FFFF00" href="http://games.my-cabinet.com/sport/">Sport</a></li>

            <li><a rel="#CC0099" href="http://games.my-cabinet.com/puzzle/">Puzzle</a></li>

            

        </ul>

        

    </div>

</p>

 

 

<div class="mainwrap">

<div id="gamebuttonwidget" class="widget widget-74 rounded">

<a href="http://games.my-cabinet.com/gibbets3.php"><p><span class="hotspot" onmouseover="tooltip.show('<strong>Gibbets 3</strong><br/>Shoot the ropes to save the innocent people from being hanged in the latest installlment to the hit Gibbets series.');" onmouseout="tooltip.hide();"><img class="imagesinbuttons" src="http://www.my-cabinet.com/games/images/gibbets3.png" width="172px"/></p><p>Gibbets 3</span></p></a>

</div>

 

<div id="gamebuttonwidget" class="widget widget-74 rounded">

<a href="http://games.my-cabinet.com/raze2.php"><p><span class="hotspot" onmouseover="tooltip.show('<strong>Raze 2</strong><br/>You are part of the elite Raze task force. Take down zombies and aliens alike in action-packed sequel to the smash-hit game Raze.');" onmouseout="tooltip.hide();"><img class="imagesinbuttons" src="http://www.my-cabinet.com/games/images/raze-2.jpg" width="172px"/></p><p>Raze 2</span></p></a>

</div>

 

<div id="gamebuttonwidget" class="widget widget-74 rounded">

<a href="http://games.my-cabinet.com/raze.php"><p><span class="hotspot" onmouseover="tooltip.show('<strong>Raze</strong><br/>A futuristic action-packed shooter in which you must complete objectives in order to save the earth from aliens, robots and zombies!');" onmouseout="tooltip.hide();"><img class="imagesinbuttons" src="http://www.my-cabinet.com/games/images/raze-mycabinet.jpg" width="172px"/></p><p>Raze</span></p></a>

</div>

 

<div id="gamebuttonwidget" class="widget widget-74 rounded">

<a href="http://games.my-cabinet.com/electricman2.php"><p><span class="hotspot" onmouseover="tooltip.show('<strong>Electric Man 2</strong><br/>Bash enemy creatures through multiple rounds of combat. See game for full controls.');" onmouseout="tooltip.hide();"><img class="imagesinbuttons" src="http://www.my-cabinet.com/games/images/electriceman2mycabinet.JPG" width="172px"/></p><p>Electric Man 2</span></p></a>

</div>

 

<div id="gamebuttonwidget" class="widget widget-74 rounded">

<a href="http://games.my-cabinet.com/earntodie.php"><p><span class="hotspot" onmouseover="tooltip.show('<strong>Earn To Die</strong><br/>Upgrade your car and drive your way through hordes of zombies in order to reach your destination... alive.');" onmouseout="tooltip.hide();"><img class="imagesinbuttons" src="http://www.my-cabinet.com/games/images/earntodiemycabinet.png" width="172px"/></p><p>Earn To Die</span></p></a>

</div>

 

<div id="gamebuttonwidget" class="widget widget-74 rounded">

<a href="http://games.my-cabinet.com/feedus2.php"><p><span class="hotspot" onmouseover="tooltip.show('<strong>Feed Us 2</strong><br/>The piranha is back and hungrier than ever! Complete various tasks, often at the expense of those peacefully enjoying the waterway...');" onmouseout="tooltip.hide();"><img class="imagesinbuttons" src="http://www.my-cabinet.com/games/images/feed-us-2.jpg" width="172px"/></p><p>Feed Us 2</span></p></a>

</div>

 

<div id="gamebuttonwidget" class="widget widget-74 rounded">

<a href="http://games.my-cabinet.com/feedus.php"><p><span class="hotspot" onmouseover="tooltip.show('<strong>Feed Us</strong><br/>Play as a killer piranha and devour anyone that tries to cross a once peaceful waterway in this violent and gruesome game. ');" onmouseout="tooltip.hide();"><img class="imagesinbuttons" src="http://www.my-cabinet.com/games/images/feed_us_250x250.jpg" width="172px"/></p><p>Feed Us</span></p></a>

</div>

 

<div id="gamebuttonwidget" class="widget widget-74 rounded">

<a href="http://games.my-cabinet.com/tacticalassassin3.php"><p><span class="hotspot" onmouseover="tooltip.show('<strong>Tactical Assassin 3</strong><br/>You are the Conductor of an Electronic Symphony. Build defensive towers to keep the music from getting out of control. Each tower responds to a particular piece of the song, and the enemies spawn to the beat! You better think quick - this is a very fast-paced Tower Defense game!');" onmouseout="tooltip.hide();"><img class="imagesinbuttons" src="http://my-cabinet.com/games/images/tactical-assassin-3.jpg" width="172px"/></p><p>Tactical Assassin 3</span></p></a>

</div>

 

<div id="gamebuttonwidget" class="widget widget-74 rounded">

<a href="http://games.my-cabinet.com/mafiadriver2.php"><p><span class="hotspot" onmouseover="tooltip.show('<strong>Maifa Driver 2</strong><br/>Infilitrate the mob by becoming their trusted driver! Drive to different destinations around town as you are given directions from the mafia boss. Play Mafia Driver now and see if you can bring down the mob!');" onmouseout="tooltip.hide();"><img class="imagesinbuttons" src="http://www.awcade.com/files/image/mafia-driver2.jpg" width="172px"/></p><p>Mafia Driver 2</span></p></a>

</div>

 

<div id="gamebuttonwidget" class="widget widget-74 rounded">

<a href="http://games.my-cabinet.com/unfortunateaccidents.php"><p><span class="hotspot" onmouseover="tooltip.show('<strong>Unfortunate Accidents</strong><br/>These mobsters need to learn a lesson. But it has to look like an accident, see? Use gravity and falling objects to punish these mooks!');" onmouseout="tooltip.hide();"><img class="imagesinbuttons" src="http://www.my-cabinet.com/games/images/unfortunate-accidents-gamesamurai-net.jpg" width="172px"/></p><p>Unfortunate Accidents</span></p></a>

</div>

 

<div id="gamebuttonwidget" class="widget widget-74 rounded">

<a href="http://games.my-cabinet.com/ultimateassassin3.php"><p><span class="hotspot" onmouseover="tooltip.show('<strong>Ultimate Assassin 3</strong><br/>Be an Ultimate Assassin in this exciting game. Your mission is to assassinate the target then escape from the place. You have two special abilities; speed and invisibility. You should be calm and think fast to succeed. ');" onmouseout="tooltip.hide();"><img class="imagesinbuttons" src="http://www.my-cabinet.com/games/images/ultimate-assassin-3-hack1p.png" width="172px"/></p><p>Ultimate Assassin 3</span></p></a>

</div>

 

 

<div id="gamebuttonwidget" class="widget widget-74 rounded">

<a href="http://games.my-cabinet.com/theinfection.php"><p><span class="hotspot" onmouseover="tooltip.show('<strong>The Infection</strong><br/>An action-platformer where you investigate (with weapons of course) a science lab in which a mysterious infection has taken over.');" onmouseout="tooltip.hide();"><img class="imagesinbuttons" src="http://www.my-cabinet.com/games/images/the-infection-game.jpg" width="172px"/></p><p>The Infection</span></p></a>

</div>

 

<div id="gamebuttonwidget" class="widget widget-74 rounded">

<a href="http://games.my-cabinet.com/crushthecastle.php"><p><span class="hotspot" onmouseover="tooltip.show('<strong>Crush The Castle</strong><br/>The King has ordered you to crush all resistance in order for his kingdom to survive. Crush castle after castle by wiping out all of it&#8217;s inhabitants with a powerful Trebuchet and an arsenal of 8 different projectiles.');" onmouseout="tooltip.hide();"><img class="imagesinbuttons" src="http://www.my-cabinet.com/games/images/crush-the-castle-icon-1.jpg" width="172px"/></p><p>Crush The Castle</span></p></a>

</div>

 

<div id="gamebuttonwidget" class="widget widget-74 rounded">

<a href="http://games.my-cabinet.com/crushthecastle2.php"><p><span class="hotspot" onmouseover="tooltip.show('<strong>Crush The Castle 2</strong><br/>Even after crushing and capturing Arcturia, the Redvonian King was still longing for more castles to crush. Rumor has it that King Blutias has built sturdier castles in his cluster of islands known as Crushtania the Redvonian King wants them...');" onmouseout="tooltip.hide();"><img class="imagesinbuttons" src="http://www.my-cabinet.com/games/images/crush-the-castle-2-game.png" width="172px"/></p><p>Crush The Castle 2</span></p></a>

</div>

 

<div id="gamebuttonwidget" class="widget widget-74 rounded">

<a href="http://games.my-cabinet.com/flakboy2.php"><p><span class="hotspot" onmouseover="tooltip.show('<strong>Flakboy 2</strong><br/>Flakboy is back and he&#8217;s tougher than ever! This is the sequel to 2009&#8217;s Game of The Year (Dutch Game Awards). New game modes, weapons, challenges and all the blood you&#8217;ll ever need.');" onmouseout="tooltip.hide();"><img class="imagesinbuttons" src="http://www.my-cabinet.com/games/images/flakboy-2100X.png" width="172px"/></p><p>Flakboy 2</span></p></a>

</div>

 

<div id="gamebuttonwidget" class="widget widget-74 rounded">

<a href="http://games.my-cabinet.com/bridgetactics.php"><p><span class="hotspot" onmouseover="tooltip.show('<strong>Bridge Tactics</strong><br/>Blow up the bridge and get points for destroying stuff on it. A physics puzzle game, developed in-house by Spil Games!');" onmouseout="tooltip.hide();"><img class="imagesinbuttons" src="http://my-cabinet.com/games/images/bridge-tactics-icon-1.png" width="172px"/></p><p>Bridge Tactics</span></p></a>

</div>

 

<div id="gamebuttonwidget" class="widget widget-74 rounded">

<a href="http://games.my-cabinet.com/toytankarena.php"><p><span class="hotspot" onmouseover="tooltip.show('<strong>Toy Tank Arena</strong><br/>Blow up the bridge and get points for destroying stuff on it. A physics puzzle game, developed in-house by Spil Games!');" onmouseout="tooltip.hide();"><img class="imagesinbuttons" src="http://my-cabinet.com/games/images/Toy-Tank-Arena100X.png" width="172px"/></p><p>Toy Tank Arena</span></p></a>

</div>

 

 

<div id="gamebuttonwidget" class="widget widget-74 rounded">

<a href="http://games.my-cabinet.com/interactivebuddy.php"><p><span class="hotspot" onmouseover="tooltip.show('<strong>Interactive Buddy</strong><br/>The more you jiggle it, the happier it gets. Better than playing with yourself, I guess. How much money can you make from this loveable character&#8217;s smile?');" onmouseout="tooltip.hide();"><img class="imagesinbuttons" src="http://my-cabinet.com/games/images/interactive-buddy100X.gif" width="172px"/></p><p>Interactive Buddy</span></p></a>

</div>

 

 

 

<div id="gamebuttonwidget" class="widget widget-74 rounded">

<a href="http://games.my-cabinet.com/plazmaburst.php"><p><span class="hotspot" onmouseover="tooltip.show('<strong>Plazma Burst</strong><br/>A physics platform shooter with smart enemies, crazy explosions and weapons.');" onmouseout="tooltip.hide();"><img class="imagesinbuttons" src="http://my-cabinet.com/games/images/plazma-burst-forward-to-the-past_v1.jpg" width="172px"/></p><p>Plazma Burst</span></p></a>

</div>

 

<div id="gamebuttonwidget" class="widget widget-74 rounded">

<a href="http://games.my-cabinet.com/plazmaburst2.php"><p><span class="hotspot" onmouseover="tooltip.show('<strong>Plazma Burst 2</strong><br/>Shoot your way through a series of enemy filled levels in this action-packed sequel to Plazma Burst 2: Forward To The Past');" onmouseout="tooltip.hide();"><img class="imagesinbuttons" src="http://my-cabinet.com/games/images/plazma-burst2.jpg" width="172px"/></p><p>Plazma Burst 2</span></p></a>

</div>

 

<div id="gamebuttonwidget" class="widget widget-74 rounded">

<a href="http://games.my-cabinet.com/ultimateassassin2.php"><p><span class="hotspot" onmouseover="tooltip.show('<strong>Ultimate Assassin 2</strong><br/>Be an Ultimate Assassin in this exciting game. Your mission is to assassinate the target then escape from the place. You have two special abilities; speed and invisibility. You should be calm and think fast to succeed.');" onmouseout="tooltip.hide();"><img class="imagesinbuttons" src="http://my-cabinet.com/games/images/ultimate-assassin-2-game.jpg" width="172px"/></p><p>Ultimate Assassin 2</span></p></a>

</div>

 

<div id="gamebuttonwidget" class="widget widget-74 rounded">

<a href="http://games.my-cabinet.com/effingworms.php"><p><span class="hotspot" onmouseover="tooltip.show('<strong>Effing Worms</strong><br/>Don&#8217;t you wish you were a giant worm? Dig fast tunnels, and surprise hippies, cops, cows and pedestrians from below! Feed the beast, baby!');" onmouseout="tooltip.hide();"><img class="imagesinbuttons" src="http://my-cabinet.com/games/images/Effing-Worms.jpg" width="172px"/></p><p>Effing Worms</span></p></a>

</div>

 

<div id="gamebuttonwidget" class="widget widget-74 rounded">

<a href="http://games.my-cabinet.com/freewayfury.php"><p><span class="hotspot" onmouseover="tooltip.show('<strong>Freeway Fury</strong><br/>Speed down the highway and score points by jumping between cars!');" onmouseout="tooltip.hide();"><img class="imagesinbuttons" src="http://my-cabinet.com/games/images/freeway-fury-6623.JPG" width="172px"/></p><p>Freeway Fury</span></p></a>

</div>

 

 

 

 

</div>

 

</div>

 

</div>

<div class="footer" style="font-family: 'Fresca', sans-serif;">

<p><b>

<span style="position:fixed;left:2px;">Cabinet Action Games</span><!--[if IE]><span> - </span><![endif]--><span>Copyright &copy; 2012 <a href="http://my-cabinet.com/index.php">My Cabinet</a> & <a href="http://my-cabinet.com/kody">Kody Ahrens</a></span>

</p>

</div>

</body>

 

</html>

 

</body>

</html>

Quote · 26 Feb 2012

Ah ok, the part you'll need are the initial require_once calls.

Here's an example page you can download.

Here's the test page.

It's as basic as it gets. It doesn't make use of the Dolphin template system. I've included all of the includes calls, though some you may not need.

To get the most out of it, you should use the page template so that your page looks like it's a seamless part of your site. From what I can see, your page is a standalone page right now.

 

 

Updating my BoonexNerd.net site.
Quote · 26 Feb 2012

Okay, just two more things. I really appreciate all your help with this.

1. How would I put this on a file in the directory /games/action/index.php if the php code calls things as if the file was in the directory /games/index.php. That is the only error I am finding. I know that if you do ./inc/file.php then it goes back a directory, but when I use ../inc/file.php and .../inc/file.php it doesnt work. Any suggestions. Thanks

2. Where do i put the content of my page in the example page you gave me? I see you have text in the echo and that is shown only if a user is logged in, so would i paste all the contents in that echo line? Thanks again! And I might take your advice about using one template, I just need to figure out how I'm going to implement that into my games idea.

Quote · 27 Feb 2012

     

Quote · 27 Feb 2012

For your first question, you can use the absolute path to your header.inc.php file or whatever file you want.

Your second question takes a bit more to answer as it requires a tour of what makes up a Dolphin page that uses internal templates and keys.

This might be something I will do a tutorial on one day, but for now, open up one of the current standalone pages and you'll see a function that looks something like this:

function PageCompPageMainCode()

There are other variations of that, but that function is what returns the content for the page that in turn assigns a value to a defined key such as:

page_main_code

That key is used in this way:

$_page_cont[$_ni]['page_main_code'] = PageCompPageMainCode();

The above will assign the page_main_code key with the returned value derived from the function PageCompPageMainCode().


Updating my BoonexNerd.net site.
Quote · 28 Feb 2012

Thanks for your help! So your saying that i could do 

require_once( 'http://boonexsite.com/inc/header.inc.php' ); 

?

And after studying more into php, I found this works,

 

<?php

 

/***************************************************************************

*                            Dolphin Smart Community Builder

*                              -----------------

*     begin                : Mon Mar 23 2006

*     copyright            : (C) 2006 BoonEx Group

*     website              : http://www.boonex.com/

* This file is part of Dolphin - Smart Community Builder

*

* Dolphin is free software. This work is licensed under a Creative Commons Attribution 3.0 License. 

* http://creativecommons.org/licenses/by/3.0/

*

* Dolphin is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;

* without even the implied warranty of  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

* See the Creative Commons Attribution 3.0 License for more details. 

* You should have received a copy of the Creative Commons Attribution 3.0 License along with Dolphin, 

* see license.txt file; if not, write to marketing@boonex.com

***************************************************************************/

 

require_once( '../inc/header.inc.php' );

require_once( BX_DIRECTORY_PATH_INC . 'design.inc.php' );

require_once( BX_DIRECTORY_PATH_INC . 'admin.inc.php' );

 

require_once( BX_DIRECTORY_PATH_INC . 'db.inc.php' );

require_once( BX_DIRECTORY_PATH_INC . 'utils.inc.php' );

require_once( BX_DIRECTORY_PATH_CLASSES . 'BxDolPageView.php' );

 

//or

 

/*--jt note force a login--------------------*/  

$logged['member'] = member_auth( 0 );

 

if(condition){

 

?>

 

<?php include("templates/base/scripts/allgames/2ddrivingsimulator.php"); ?>

 

 <html>

 <head>

<?php include("templates/base/header.html"); ?>

</head>

 

<body>

 

<center>

<?php include("templates/base/gamebase.php"); ?>

 

<?php include("templates/base/actions.php"); ?>

 </body></html>

 

<?

 

}

 

?>

All the HTML is in the darker red. Thanks again for all your help! If I Plused you!

 

Quote · 28 Feb 2012

You're welcome :D

Updating my BoonexNerd.net site.
Quote · 28 Feb 2012
 
 
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.