View Single Post
  #3  
Old 06-17-2014, 04:54 PM
Kyttias's Avatar
Kyttias Kyttias is offline
Premium Member
 
Join Date: Jan 2014
Posts: 857
Gender: Unknown/Other
Credits: 91,254
Kyttias is on a distinguished road
Default

I've still yet to get it to work completely.

Let's start with what I've successfully done -
In class_template.php's assignTemplateVars() function I've added:
Code:
$mysidia = Registry::get("mysidia");
$this->assign("logged_in",$mysidia->user->isloggedin);
$this->assign("username",$mysidia->user->username);
$this->assign("cash",$mysidia->user->getcash());
$this->assign("currency",$mysidia->settings->cost);
And in template.tpl:
Code:
{if $logged_in}
Welcome, <a href="{$home}profile/view/{$username}"><b>{$username}</b></a>! 
<br/>
You have {$cash} <b>{$currency}</b>. 
{else}
Please sign up or log in~! 
{/if}
And this displays the correct outcome! Yay!

However, using -
Code:
$this->assign("group",$mysidia->user->getusergroup());
Results in a blank white page.

I'm as of yet unsure how or if the messages work, but I'd like it to just display a number of unread messages a user has, and possibly 0 if there is none? I have no messages, so nothing appears. It looked like it would display more than just a number, but information about the messages. I don't think I need that, but a number next to an envelope icon is floating in my head as a pleasant sight.

Also, thank you very much!

Last edited by Kyttias; 11-05-2014 at 02:11 PM.
Reply With Quote