Jump to content


[Hack] IPB1.3 memberbar in MKPortal M1.1


  • You cannot reply to this topic
No replies to this topic

#1 visiblesoul

  • Administrators
  • 551 posts
  • Location:Earth
  • Texas

Posted 04 November 2005 - 02:08 PM

This hack will put the IPB 1.3 memberbar links in the header of MKPortal M1.1.


FIND in mkportal/include/functions.php (function header):
$output .= $Skin->view_logo();
REPLACE WITH:
// begin IPB memberbar links
$content = "";
	   

 $return = $this->siteurl;

	   if ( $mkportals->member['id'] )
{

$subtitle ="Logged in as: <a href="{$mkportals->forum_url}/index.php?showuser={$mkportals->member['id']}">{$mkportals->member['name']}</a>";


$pm_string  = intval($mkportals->member['new_msg']);  
 if($mkportals->member['g_access_cp'] || $this->member['g_access_cpa']) {
  $admin_panel =" .:: <b><a href="$this->mkurl/admin.php">{$this->lang['cpap']}</a></b> ";
			   }			
	 

 if($mkportals->member['g_access_cp'])
 {
 $admin_panel .=".:: <a href="{$mkportals->forum_url}/admin.php" target="_blank">Admin CP</a>";
 }
 
 if (defined("IN_MK"))
 {
				if ( ($mkportals->member['is_mod']) or ($mkportals->member['g_is_supmod'] == 1) ) {
	   $mod_panel .=".:: <b><a href="{$mkportals->forum_url}/index.php?act=modcp&forum={$mkportals->input['f']}">Mod CP</a></b>";
	  }
			}
$lpanel .="<b>$subtitle</b> ( <a href="{$mkportals->forum_url}/index.php?act=Login&CODE=03&return=$return">{$this->lang['logout']}</a>$admin_panel $mod_panel )";
$rpanel .="<b><a href="{$mkportals->forum_url}/index.php?act=UserCP">My Controls</a> :: <a href='{$mkportals->forum_url}/index.php?act=Msg'>$pm_string New Messages </a> :: <a href='{$mkportals->forum_url}/index.php?act=Search&CODE=getnew'>View New Posts</a> :: <a href="java script:buddy_pop();" title='View posts since your last visit, moderator lists and more...'>My Assistant</a></b> ";
}


else
 {
 $subtitle = $this->lang['welcome_guest'];


$lpanel .="<b>$subtitle</b> .:: <a href="{$mkportals->forum_url}/index.php?act=Login&CODE=00&return=$return">Log In</a> :: <a href="{$mkportals->forum_url}/index.php?act=Reg">{$this->lang['register']}</a> ::.";
 
$rpanel .=".:: <a href="{$mkportals->forum_url}/index.php?act=Reg&CODE=reval">Resend Validation Email</a>";
}


$output .= $Skin->view_logo($lpanel, $rpanel);
// end IPB memberbar links

// begin IPB memberbar links exclude
	   //$output .= $Skin->view_logo();
// end IPB memberbar links exclude
FIND in mkportal/templates/*/tpl_main.php (function view_header):
global $mklib, $mklib_board;
REPLACE WITH:
global $mklib, $mklib_board, $mkportals;
FIND in mkportal/templates/*/tpl_main.php (function view_header):
</head>
ADD ABOVE:
  <script type="text/javascript">
  <!--
  function buddy_pop() { window.open('{$mkportals->forum_url}/index.php?act=buddy&s={$mkportals->session_id}','BrowserBuddy','width=250,height=500,resizable=yes,scrollbars=yes'); }
  //-->
  </script>
FIND in mkportal/templates/*/tpl_main.php (function view_logo):
function view_logo() {
REPLACE WITH:
function view_logo($lpanel, $rpanel) {
Now you can put the
{$lpanel}
and
{$rpanel}
variables wherever you want the left and right memberbar sections to be within function view_logo.

Demo

Enjoy...


Please note that I offer free support on this forum in my free time. Depending on how much work I have backlogged it may take me a week or more to answer questions. I am not ignoring you. I answer everyone but please be patient. Thanks.

Disclaimer: All forum posts, including code examples, on this forum are offered for free in the hope that they will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Use code examples at your own risk.

"If at first you don't succeed, keep on suckin' til you do succeed." -Curly Howard





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users