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 ...
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 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 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;
}
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.
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.
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?