eek
This commit is contained in:
parent
eb9b2b4644
commit
d12defd5a2
5 changed files with 37 additions and 3 deletions
|
@ -15,4 +15,19 @@ class Users {
|
|||
|
||||
}
|
||||
|
||||
// Get user
|
||||
public static function getUser($id) {
|
||||
|
||||
// Execute query
|
||||
$user = Database::fetch('users', false, ['id' => [$id, '=']]);
|
||||
|
||||
// Return false if no user was found
|
||||
if(empty($user))
|
||||
return false;
|
||||
|
||||
// If user was found return user data
|
||||
return $user;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -59,5 +59,7 @@ $renderData = array(
|
|||
],
|
||||
'user' => [
|
||||
'loggedin' => Users::loggedIn()
|
||||
]
|
||||
],
|
||||
'users' => Users::getUser($uid)//,
|
||||
//'groups' => Users::getGroup($gid)
|
||||
);
|
||||
|
|
16
_sakura/templates/yuuno/elements/newsPost.tpl
Normal file
16
_sakura/templates/yuuno/elements/newsPost.tpl
Normal file
|
@ -0,0 +1,16 @@
|
|||
<a href="/news/{{ newsPost.id }}" class="news-head" id="{{ newsPost.id }}">{{ newsPost.title }}</a>
|
||||
<div class="news-body">
|
||||
<a class="default" href="/u/{{ newsPost.uid }}">
|
||||
<div class="news-poster">
|
||||
<img src="/a/{{ newsPost.uid }}" alt="{{ users[newsPost.uid].username }}" class="default-avatar-setting" />
|
||||
<h1 style="color: #{{ group[users[newsPost.uid].group_main].colour }} !important; text-shadow: 0 0 7px #888; padding: 0 0 10px;">{{ users[newsPost.uid].username }}</h1>
|
||||
</div>
|
||||
</a>
|
||||
<div class="markdown">
|
||||
{{ newsPost.content }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
<div class="news-post-time">
|
||||
Posted on {{ newsPost.date|date("D Y-m-d H:i:s T") }} <a class="default" href="/news/{{ newsPost.id }}#disqus_thread">View comments</a>
|
||||
</div>
|
|
@ -73,7 +73,7 @@
|
|||
<label for="headerLoginPassword">Password:</label>
|
||||
<input type="password" id="headerLoginPassword" name="password" class="inputStyling" placeholder="Password" />
|
||||
<input type="checkbox" name="remember" id="headerLoginRemember" />
|
||||
<label for="headerLoginRemember">Remember Me</label>
|
||||
<label for="headerLoginRemember">Remember me</label>
|
||||
<input type="submit" id="headerLoginButton" name="submit" class="inputStyling small" value="Login" />
|
||||
</form>
|
||||
</div>
|
||||
|
|
|
@ -13,8 +13,9 @@
|
|||
</div>
|
||||
<div class="content-left content-column">
|
||||
<div class="head">News <a href="/news.xml" class="fa fa-rss news-rss default"></a></div>
|
||||
{{ users.1.username }}
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
<script type="text/javascript" src="//{{ sakura.urls.content }}/js/ybabstat.js"></script>
|
||||
{% include 'global/footer.tpl' %}
|
||||
{% include 'global/footer.tpl' %}
|
||||
|
|
Reference in a new issue