Jump to content
MakeWebGames

Fanatic

Members
  • Posts

    36
  • Joined

  • Last visited

Fanatic's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Does this mean that the old forum will come back online? Cause there was many great modifications there.
  2. How can I in PHP check if a MySQL row exist? and then return true or false? I tried this: // Does a game with that url-name exist? public function nameExist() { return $this->db->execute('SELECT COUNT(*) FROM `main_games` WHERE `url`=?', array($this->getSubdomain())); }   Here is the source of the class: http://pastebin.com/p17gUEPA And here is the source of the hook where I run this class from: http://pastebin.com/WjSNLCMd Hope someone might be able to help me figure this out.
  3. What this Guild Module must include: - create guild. Users can make their own guild. - guilds list. A complete list of all guilds. - guilds page. Guild Masters should be able to set up some pages for their guild. - members list. A list of all members in the guild. - recruting/join system. Should be accepted by the Guild Master. - remove members. Guild Master should be able to remove members. - guild aliance. Should be able to have alliance with other guilds. - guild wars. Should be able to fight other guilds. - guild leveling system. The guild should also gain exp and level from their users. - guild info page. (for non members and for members only) - members functions. Functions that members can do like: (add gold to guild bank, add diamonds to guild bank, leave guild, chat with guild, put things into the warehouse/storage.) - guild tax system. It costs to have the guild, but should it costs to be in the guild? Modified by Guild Master. - guild warehouse/storage. Also called a guild store. - guild headquarter I will need a lot of updates in future for this. Which means more paid work for you. Hope someone can make it.
  4. Can someone help me to do so that I can use this code in the tpl templates? Cause i want to show how long time untill next energy refill.   // get the current minutes $c_mins = date('i'); $c_secs = date('s'); // take the current minutes from 60 (60 minutes in an hour) $l_mins = 60 - $c_mins; $l_secs = 60 - $c_secs; // Now we set up the message to be shown. $time_left = 'There are ' . $l_mins . 'minutes and ' . $l_secs . 'left until ' . $n_hour . $m; // echo the message we setup above echo $time_left; ?>
  5. I need a Avatar module, where users can upload a image to the site and put it as their avatar. - There should be a default avatar for everyone which doesn't have one. - When chancing their avatar it should need a admin approval before the new avatar will be shown in their profile - Admin should be able to approve it, or disapprove it, and give a reason why it have been disapproved. - The admin should be able to specify the size and the types of avatars allowed. - When the avatar have been approved it should change the users avatar and delete the old one. - The user should get a message in their log about when this is approved or not. Hope someone can do this somehow.
  6. I need a Biography Module where users can insert something about themself. It should be raw text only, but there should also be few BB codes for it. Like the [b] tag should make it Bold. Also users should only be able to have 120 signs inside their biography. But it should be possible to upgrade it for each user. So it have to runs trought the database, so that each user can have difference limits. Hope someone can do this somehow.
  7. It is in line 95. But should I put this somewhere else? like in the start of the script? BTW: Are you the owner of w3theory?
  8. How do I make it global?
  9. Does anyone have any ideas why I get those errors: Notice: Undefined variable: minlevel in /home/damdomy/trankia.com/modules/FindPlayer/index.php on line 94 Warning: array_fill() [function.array-fill]: Wrong data type for start key in /home/damdomy/trankia.com/lib/db.mysql.php on line 133 ezRPG Error: DbException! Query: SELECT username, level FROM players WHERE level > ?,50 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '?,50' at line 3   Source code: http://pastebin.com/eMg4mRwG
  10. Yea. Thanks a lot. I got it to work :D
  11. Thanks Nickson! You are the best! Now I will code the rest :D Hopefully no more errors will come, cause now I am using a better program to code in. Before I was coding in notepad.
  12. Thanks a lot. I am now using komodoedit, makes it easier to see. I found out where I missed a "{" :D Well, but know I get this error, which I can't find out why: Parse error: syntax error, unexpected T_CLASS in /home/damdomy/trankia.com/modules/FindPlayer/index.php on line 9   Source: <?php //This file cannot be viewed, it must be included defined('IN_EZRPG') or exit; * /* **Class: Module_FindPlayer **Shows a list of members. */ class Module_FindPlayer extends Base_Module { ****/* ******Function: start ******Displays the members list page. *****/ ****public function start() ****{ ********//Require login ********requireLogin(); * ********if (isset($_GET['username'])) { ************$username = ($_GET['username']); ************if (isset($_GET['maxlevel'])) { ****************$maxlevel = ($_GET['maxlevel']); ****************// if username, maxlevel and minlevel is set ****************if (isset($_GET['minlevel'])) { ********************echo "find function"; * ****************// if username and maxlevel is set ****************} ****************else { ********************echo "find function"; ****************} ************} ************* ************// if username and minlevel is set ************elseif (isset($GET['minlevel'])) { ****************echo "find function"; ************} ************* ************// if username is set ************else { ****************echo "find function"; ************} ********} ********* ********elseif (isset($_GET['maxlevel'])) { ************$maxlevel = ($_GET['maxlevel']); * ************// if maxlevel and minlevel is set ************if (isset($_GET['minlevel'])) { ****************$minlevel = ($_GET['minlevel']); ****************echo "find function"; ************} ************* ************// if maxlevel is set ************else { ****************echo "find function"; ************} ********} ********* ********// if minlevel is set ********if (isset($_GET['minlevel'])) { ************$minlevel = ($_GET['minlevel']); ************$query = $this->db->execute('SELECT `username`, `level` FROM `<ezrpg>players` WHERE `level` > ?, * ORDER BY `id` ASC LIMIT ?,50', array($minlevel), array($page * 50)); ********} ********// if nothing is set ********else { ************echo "search page"; ********} } } * function find() { * ****if (isset($_GET['page'])) { ********$page = (intval($_GET['page']) > 0) ? intval($_GET['page']) : 0; ****} ***** ****else { ********$page = 0; ****} * ****$members = $this->db->fetchAll($query); ********* ****$prevpage = (($page - 1) >= 0) ? ($page - 1) : 0; ********* ****$this->tpl->assign('nextpage', ++$page); ****$this->tpl->assign('prevpage', $prevpage); ****$this->tpl->assign('members', $members); ****$this->tpl->display('findplayer.tpl'); } ?>   EDIT: For some reason it nows put "*" in where I before had spaces?? It is only when I upload the code here too.??
  13. Actually it is closing:   if (isset($_GET['maxlevel'])) { $maxlevel = ($_GET['maxlevel']); // if username, maxlevel and minlevel is set if (isset($_GET['minlevel'])) { echo "find function"; // if username and maxlevel is set } else { echo "find function"; } }   Any other ideas?
  14. Thanks a lot. Now I just get the following error: Parse error: syntax error, unexpected ';', expecting T_FUNCTION in /home/damdomy/trankia.com/modules/FindPlayer/index.php on line 91   SOURCE: <?php //This file cannot be viewed, it must be included defined('IN_EZRPG') or exit; /* Class: Module_FindPlayer Shows a list of members. */ class Module_FindPlayer extends Base_Module { /* Function: start Displays the members list page. */ public function start() { //Require login requireLogin(); if (isset($_GET['username'])) { $username = ($_GET['username']); if (isset($_GET['maxlevel'])) { $maxlevel = ($_GET['maxlevel']); // if username, maxlevel and minlevel is set if (isset($_GET['minlevel'])) { echo "find function"; // if username and maxlevel is set } else { echo "find function"; } } // if username and minlevel is set elseif (isset($GET['minlevel'])) { echo "find function"; } // if username is set else { echo "find function"; } } elseif (isset($_GET['maxlevel'])) { $maxlevel = ($_GET['maxlevel']); // if maxlevel and minlevel is set if (isset($_GET['minlevel'])) { $minlevel = ($_GET['minlevel']); echo "find function"; } // if maxlevel is set else { echo "find function"; } } // if minlevel is set if (isset($_GET['minlevel'])) { $minlevel = ($_GET['minlevel']); $query = $this->db->execute('SELECT `username`, `level` FROM `<ezrpg>players` WHERE `level` > ?, ORDER BY `id` ASC LIMIT ?,50', array($minlevel), array($page * 50)); } // if nothing is set else { echo "search page"; } } function find() { if (isset($_GET['page'])) { $page = (intval($_GET['page']) > 0) ? intval($_GET['page']) : 0; } else { $page = 0; } $members = $this->db->fetchAll($query); $prevpage = (($page - 1) >= 0) ? ($page - 1) : 0; $this->tpl->assign('nextpage', ++$page); $this->tpl->assign('prevpage', $prevpage); $this->tpl->assign('members', $members); $this->tpl->display('findplayer.tpl'); } ?>
  15. I got it fixed :D Now I get the following error:   Parse error: syntax error, unexpected T_VARIABLE in /home/damdomy/trankia.com/modules/FindPlayer/index.php on line 64   My code is now this: <?php //This file cannot be viewed, it must be included defined('IN_EZRPG') or exit; /* Class: Module_FindPlayer Shows a list of members. */ class Module_FindPlayer extends Base_Module { /* Function: start Displays the members list page. */ public function start() { //Require login requireLogin(); if (isset($_GET['username'])) { $username = ($_GET['username']); if (isset($_GET['maxlevel'])) { $maxlevel = ($_GET['maxlevel']); // if username, maxlevel and minlevel is set if (isset($_GET['minlevel'])) { echo "find function"; // if username and maxlevel is set } else { echo "find function"; } } // if username and minlevel is set elseif (isset($GET['minlevel'])) { echo "find function"; } // if username is set else { echo "find function"; } } elseif (isset($_GET['maxlevel'])) { $maxlevel = ($_GET['maxlevel']); // if maxlevel and minlevel is set if (isset($_GET['minlevel'])) { $minlevel = ($_GET['minlevel']); echo "find function"; } // if maxlevel is set else { echo "find function"; } } // if minlevel is set if (isset($_GET['minlevel'])) { $minlevel = ($_GET['minlevel']) $query = $this->db->execute('SELECT `username`, `level` FROM `<ezrpg>players` WHERE `level` > ?, ORDER BY `id` ASC LIMIT ?,50', array($minlevel), array($page * 50)); } // if nothing is set else { echo "search page"; } } function find() { if (isset($_GET['page'])) { $page = (intval($_GET['page']) > 0) ? intval($_GET['page']) : 0; } else { $page = 0; } $members = $this->db->fetchAll($query); $prevpage = (($page - 1) >= 0) ? ($page - 1) : 0; $this->tpl->assign('nextpage', ++$page); $this->tpl->assign('prevpage', $prevpage); $this->tpl->assign('members', $members); $this->tpl->display('findplayer.tpl'); } ?>
×
×
  • Create New...