Welcome to the RaGEZONE - MMORPG development forums.

[Knowledge Base] UberCMS Tweak/Knowledge Thread

This is a discussion on [Knowledge Base] UberCMS Tweak/Knowledge Thread within the Habbo Tutorials forums, part of the Habbo Hotel category; UberCMS Tweak/Knowledge Thread I don't know why I am releasing/supporting this, but enjoy. Some of you know there are some ...

LyncusMU
Results 1 to 10 of 10
  1. #1
    Banned
    Rank
    Banned
    Join Date
    Jun 2010
    Location
    Canada
    Posts
    307
    Liked
    101

    Support [Knowledge Base] UberCMS Tweak/Knowledge Thread

    Tabo Hotel
    UberCMS Tweak/Knowledge Thread

    I don't know why I am releasing/supporting this, but enjoy. Some of you know there are some issues with UberCMS since Meth0d did not complete the development on it, so here are a few tweaks/tricks/guides/knowledge.

    NOTE: More small tweaks/tricks/guides/knowledge will come just give me a few days to write them up. If you have some, post them here and I will add them with credits.

    ----------
    MySQL Queries [Credits: TheJacob + Others]
    ----------

    Spoiler:

    When using any of the queries below, anything inside the following tags < > must be edited. For example, <user column> would be "users" (without "") if "users" was your user column in your database.


    -------------------------
    Update Queries
    -------------------------

    //Update users email
    UPDATE <user table> SET <email column> = '<email>' WHERE <username column> = '<username>'

    //Update users rank
    UPDATE <user table> SET <rank column> = '<rank>' WHERE <username column> = '<username>'

    //Update users motto
    UPDATE <user table> SET <motto column> = '<motto>' WHERE <username column> = '<username>'

    //Sets a user a specific amount of activity points (pixels)
    UPDATE <user table> SET <activity_points column> = '<pixel amount>' WHERE <username column> = '<username>'

    //Gives a user a specific amount of activity points (pixels)
    UPDATE <user table> SET <activity_points column> = <activity_points column> + '<pixel amount>' WHERE <username column> = '<username>'

    //Sets a user a specific amount credits
    UPDATE <user table> SET <credits column> = '<credit amount>' WHERE <username column> = '<username>'

    //Gives a user a specific amount credits
    UPDATE <user table> SET <credits column> = <credits column> + '<credit amount>' WHERE <username column> = '<username>'

    //Sets all users a specific amount of credits
    UPDATE <user table> SET <credits column> = '<credit amount>'

    //Gives all users a specific amount of credits
    UPDATE <user table> SET <credits column> = <credits column> + '<credit amount>'


    -------------------------
    Insert Queries
    -------------------------

    //Insert ban
    INSERT INTO <ban table> SET (<bantype>,<username column>,<reason column>,<expire column>,<added by column>, <added date column>,<appeal state column>) VALUES ('<user or ip>','<reason for the ban>','<expire date>','<added by username>','<added date>','<0-1-2>')

    //Insert badge (give a specific user a badge)
    INSERT INTO <user badge table> SET (user_id,badge_id,badge_slot) VALUES ('<user id>','<badge id/name>','<0-1-2-3-4-5-6>')


    ----------
    Tweak #1 (Last Signed In) [Credits: TheJacob]
    ----------

    Spoiler:

    If you register a new account, it shows "Last Signed In: <blank>". To fix/complete this, open "class.user.php" and find the following;

    Code:
    function GetUserVar($id, $var, $allowCache = true) //Modified by Jacob Pollack
    	{
    		if ($allowCache && isset($this->userCache[$id][$var]))
    		{
    			if ($var == "last_online")
    			{
    				if ($var == "")
    				{
    				return "<i>Never</i>";
    				}
    				else
    				{
    				return $this->userCache[$id][$var];
    				}
    			} 
    			else
    			{
    			return $this->userCache[$id][$var];
    			}
    		}
    Replace the highligthed code in red above with the highligthed green code below;

    Code:
    function GetUserVar($id, $var, $allowCache = true) //Modified by Jacob Pollack
    	{
    		if ($allowCache && isset($this->userCache[$id][$var]))
    		{
    			if ($var == "last_online")
    			{
    			return "<i>Never</i>";
    			} 
    			else
    			{
    			return $this->userCache[$id][$var];
    			}
    		}
    		
    		$val = @mysql_result(dbquery("SELECT " . $var . " FROM users WHERE id = '" . $id . "' LIMIT 1"), 0);
    		$this->userCache[$id][$var] = $val;
    		return $val;
    	}


    ----------
    Tweak #2 (Habbo's online) [Credits: TheJacob]
    ----------

    Spoiler:

    I noticed that not a lot, if any hotels know how to change it from "Habbo's online" to "<something else>'s online". To do so, open "inc/class.core.php" and find;

    Code:
    public static function GetSystemStatusString($statsFig)
    	{
    		switch (uberCore::getSystemStatus())
    		{
    			case 2:
    			case 0:
    			
    				return "Sorry, the hotel is offline.";
    				
    			case 1:
    			
    				if (!$statsFig)
    				{
    					return uberCore::GetUsersOnline() . ' habbo(s) online';
    				}
    				else
    				{
    					return '<span class="stats-fig">' . uberCore::GetUsersOnline() . '</span> habbo(s) online!';
    				}
    		
    			default:
    			
    				return "Unknown";
    		}
    	}
    Edit the highlighted code in red to what ever you would like it to be.


    ----------
    Tweak #3 (Hotel Restart CMS) [Credits: TheJacob]
    ----------

    Spoiler:

    Third Party Applications

    For this to work, you will need an executable restart application. I suggest using RastaLulz application. The download link is below:

    Download Restart Application: reboot_app.rar

    Instructions

    Step 1

    Open me.php in the root directory. Find the following green highlighted text below;

    Code:
    //Column 1
    Add the following red highlighted code above it;

    Code:
    //Content
    $reboot_app = 'C:\Users\sexonabeach\Desktop\reboot_app.bat';
    $restart = @$_POST['restart'];
    
    if (isset($restart))
    {
    	
    	if (!file_exists($reboot_app))
    	{
    	header("Location: ?action=reboot&result=failed&why=application_url_invalid");
    	}
    	else
    	{
    	exec($reboot_app);
    	header("Location: ?action=reboot&result=success");
    	}
    
    }
    Next look for the following green highlighted code;

    Code:
    // Column 3
    $tpl->AddGeneric('generic-column3');
    Replace it ALL with the following red highlighted code;

    Code:
    switch (uberCore::getSystemStatus())
    {
    	
    	case (0):
    	case (2):
    		$hotelRestart = new Template('comp-restart');
    		$hotelRestart->SetParam('restart', $restart);
    		$tpl->AddTemplate($hotelRestart);
    		break;
    	
    	default:
    		$tpl->AddGeneric('generic-column3');
    		break;
    			
    }
    Step 2

    Make a file called "comp-restart.tpl" in the "inc/tpl/" directory. Paste all the following red highlighted code into the file;

    Code:
    <div id="column3" class="column">
    	<div class="habblet-container ">		
    		<div class="cbb clearfix red"> 
    			<h2 class="title">Restart Hotel</h2> 
    
    			<div id="habboclub-info" class="box-content">
    			
    			<img src="http://habbogallery.net/img/figures/habbos/Figure%20(97).gif" align="left">
    			<p>Oops, it appears the hotel is offline!</p>
    			<div align="center">
    			<form method="post" action="">
    			<p><input type="submit" name="restart" value="Restart Hotel"></p>
    			</form>
    			</div>
    			
    			</div>  
    		</div>
    	</div>
    	<script type="text/javascript">if (!$(document.body).hasClassName('process-template')) { Rounder.init(); }</script>
    </div>
    Last edited by TheJacob; 07-11-10 at 07:53 PM.

  2. HostKey.com: Unmetered Dedicated servers in the Netherlands
  3. #2
    Wink Wink ;)
    Rank
    Member +
    Join Date
    Nov 2009
    Location
    Wales
    Posts
    1,074
    Liked
    169

    Re: UberCMS Tweak Thread

    In the Tut section a while ago I released a massive thread about how to fix things I don't think this really belongs in the release section its a bit of both, Feel free to add to my thread "UberCMS Tips And Setup" Its got loads of tips and tricks in it, Tbh its out of date now not sure if it will work as well.

  4. #3
    RaGEZONER
    Rank
    Newbie
    Join Date
    Oct 2010
    Posts
    86
    Liked
    1

    Re: UberCMS Tweak Thread

    Thank you jacob.

  5. #4
    Daiguren Hyōrinmaru
    Rank
    Member +
    Join Date
    Jul 2010
    Location
    Michigan, US
    Posts
    1,434
    Liked
    49

    Re: UberCMS Tweak Thread

    this is good lwts keep it alive

  6. #5
    Hey :D!
    Rank
    Subscriber
    Join Date
    Jun 2009
    Posts
    933
    Liked
    212

    Re: UberCMS Tweak Thread

    Thanks Jacob (;

  7. #6
    Banned
    Rank
    Banned
    Join Date
    Jun 2010
    Location
    Canada
    Posts
    307
    Liked
    101

    Re: UberCMS Tweak Thread

    Quote Originally Posted by Seano2o6 View Post
    In the Tut section a while ago I released a massive thread about how to fix things I don't think this really belongs in the release section its a bit of both, Feel free to add to my thread "UberCMS Tips And Setup" Its got loads of tips and tricks in it, Tbh its out of date now not sure if it will work as well.
    Can you give me the URL and which guides/releases you'd like me to add?

  8. #7
    i didnt do this.
    Rank
    Moderator
    Join Date
    Jul 2007
    Posts
    4,813
    Liked
    555

    Re: UberCMS Tweak/Knowledge Thread

    Moved to tutorial section (thats what it is? :P) and stickied :)

  9. #8
    Banned
    Rank
    Banned
    Join Date
    Jun 2010
    Location
    Canada
    Posts
    307
    Liked
    101

    Re: UberCMS Tweak/Knowledge Thread

    Quote Originally Posted by Donkjam View Post
    Moved to tutorial section (thats what it is? :P) and stickied :)
    Cheers.

    If anyone has suggestions/ideas/guides/tutorials post them here. I will be adding a lot more shortly, just give me some time.

  10. #9
    Newbie
    Rank
    Newbie
    Join Date
    Dec 2010
    Posts
    2
    Liked
    0

    Re: [Knowledge Base] UberCMS Tweak/Knowledge Thread

    nice yacob!

  11. #10
    Alpha
    Rank
    Member
    Join Date
    Oct 2007
    Location
    N/A
    Posts
    136
    Liked
    0

    Re: [Knowledge Base] UberCMS Tweak/Knowledge Thread

    Does the server reboot thing show for all users or just for admins?

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •