Welcome Guest, Not a member yet? Register   Sign In
Do this code for most functions
#10

[eluser]_Smilie_[/eluser]
So this is the top of my view file:
Code:
<?php
class MasterHeader {
  private $CI;  //variable to hold CI object

  function __construct($settings = array())
  {
    //parent::__construct($settings);

    $this->CI =& get_instance(); //bring the CI object into your library
    
   if ($this->CI->ipbwi->member->isLoggedIn())
    {
      $loggedin = TRUE;
  $member = $this->CI->ipbwi->member->info();
  $accountName = $member['members_display_name'];
  $lastVisit = $member['last_visit'];
    }
    else
    {
      $loggedin = FALSE;
    }
  }
  
  function returnTrue(){
   return true;
  }
}
  
new MasterHeader();  
?>

How do I call the returnTrue method from below (among all the html), or how do I access the variable $loggedin Smile


Messages In This Thread
Do this code for most functions - by El Forum - 04-23-2012, 10:31 AM
Do this code for most functions - by El Forum - 04-23-2012, 11:23 AM
Do this code for most functions - by El Forum - 04-23-2012, 11:53 AM
Do this code for most functions - by El Forum - 04-23-2012, 11:56 AM
Do this code for most functions - by El Forum - 04-23-2012, 12:39 PM
Do this code for most functions - by El Forum - 04-23-2012, 12:46 PM
Do this code for most functions - by El Forum - 04-23-2012, 01:01 PM
Do this code for most functions - by El Forum - 04-23-2012, 01:26 PM
Do this code for most functions - by El Forum - 04-23-2012, 01:34 PM
Do this code for most functions - by El Forum - 04-23-2012, 01:54 PM
Do this code for most functions - by El Forum - 04-23-2012, 02:16 PM



Theme © iAndrew 2016 - Forum software by © MyBB