[UberCMS] Add-ons.

Jerry

not rly active lol
Jul 8, 2013
1,956
522
Hello DevBest, I am going to release a few UberCMS add-on people may not have, some of these are based on someone else's releases. Some of them are not mine so I'll be adding credits to whoever.

Friends Online:
q4Id974.png

PHP:
<?PHP
            $query = mysql_query("SELECT * FROM messenger_friendships WHERE user_one_id = '".USER_ID."'");
            $i = 0;
            while($friends = mysql_fetch_array($query))
            {
                $getfriend = mysql_query("SELECT * FROM users WHERE id ='".$friends['user_two_id']."' AND online = '1' LIMIT 1");
                if(mysql_num_rows($getfriend) > 0)
                {
                    $i++;
                    if($i == 1)
                    {
                  
                        echo '<li class="small" id="feed-pending-members">Friend(s) online:<b><span> ';
                    }
                    $friend = mysql_fetch_array($getfriend);
echo htmlspecialchars($friend['username']).', ';
                }
            }
            if($i == 0)
                    {
                  
                        echo '<li class="small" id="feed-pending-members">You have no friends online.<b><span> ';
                    }
echo '</b>'?>
                            </li>
This could be placed around up top of the Last Signed In script in comp-me.tpl!

Newest User:
fcfEriz.png

PHP:
  <div id="habblet-container" class="column2">
                    
                <div class="habblet-container ">    
                        <div class="cbb clearfix blue ">

                            <h2 class="title">Newest User</h2>
                        <div class="habblet-container">
<?php

$getTopStats = mysql_query("SELECT * FROM users ORDER BY id DESC LIMIT 1");
while($topSpats = mysql_fetch_array($getTopStats)){
echo '</br><b><center><span style="display:block; color:#972F89; float:center; padding:0px; background:url(/images/sparkles.gif)">'.$topSpats['username'].'</b></span></center><center><img src="%www%/inc/imager.php?figure=' . $topSpats['look'] . '&size=b&action=sit,wav,crr=667&direction=2&head_direction=3&gesture=sml&size=m" align="middle"></center><hr><center>Account created: '.$topSpats['account_created'].'</center><center>Motto: '.$topSpats['motto'].'</center>';
}
?>
</div></div></div></div>
RevCMS;
Friends Online:
Code:
<?PHP
            $query = mysql_query("SELECT * FROM messenger_friendships WHERE user_one_id = '".$_SESSION['user']['id']."'");
            $i = 0;
            while($friends = mysql_fetch_array($query))
            {
                $getfriend = mysql_query("SELECT * FROM users WHERE id ='".$friends['user_two_id']."' AND online = '1' LIMIT 1");
                if(mysql_num_rows($getfriend) > 0)
                {
                    $i++;
                    if($i == 1)
                    {
                   
                        echo '<li class="small" id="feed-pending-members">Friend(s) online:<b><span> ';
                    }
                    $friend = mysql_fetch_array($getfriend);
echo htmlspecialchars($friend['username']).', ';
                }
            }
            if($i == 0)
                    {
                   
                        echo '<li class="small" id="feed-pending-members">You have no friends online.<b><span> ';
                    }
echo '</b>'?>
                            </li>

Credits:
100% for JerryCool to code Newest User.
99% for @Spartak for releasing Friends Online for Rev.
1% for JerryCool for coding Friends Online for Uber.

I'll release more add-ons soon. :D
 
Last edited:

Users who are viewing this thread

Top