Jump to content
MakeWebGames

TheMasterGeneral

Members
  • Posts

    182
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by TheMasterGeneral

  1. Can't get into the BIOS? When I do repairs for work, its usually ESC, Delete, F2, or F8. From the moment I turn it on, I spam press the buttons. Usually ensures I can get into the BIOS! Lol. Hope it helps.
  2. I'm not what I'd consider a high quality coder, so I won't charge ya. If NSC manages to derp somewhere (I highly doubt that, he's pretty good at what he does!) Hit me up :P
  3. When I had a game running, I had a second gym. It required you to have a pass to train at. It gave you 4X the stat boost, but consumed the scroll. The only way to get a scroll was to be active around the site, and even then, you could only get 5-10 per day, dependent on how active you were.
  4. I'm not familiar with Dave's mod, but a lot of it should be already be able to be done yourself. Look at where it credits the items. Set the pack numbers and use the item_add() function to add items and whatnot. If not, best of luck. :D
  5. This week on Fox News: NSA stops possible terrorist attack hinted on an online forum. MCCodes suddenly regained popularity. Dog in Texas was stuck in a tree and was later rescued. Obviously, no one tunes into Fox news so it appeals to no one :D And on the crashing of the towers.. I personally don't care if he says such things, but I do know others DO care.
  6. EatingPopcorn.gif Perfect waste of a 100th post :(
  7. Well, the latest MCCv2 requires pretty minimum effort to setup, and has a large selection of mods. Its an easy, n00b friendly engine.
  8. I thought about getting another monitor, but my card only has one DVI-I port, one HDMI, and one DP. I haven't got monitors of those types laying around, and I don't feel much like buying a shoddy Chinese-made "converter" off of Amazon. On topic, I'm downloading PHP Storm to give it a shot. Their website made it seem like it was a nice, dark theme, so that's a plus. (Secretly cheers on his 3Mbit line)
  9. Or good ol' Notepad++ *Crickets*
  10. This mod has no REAL good use, outside of just knowing what your playerbase is using in terms of OS, Browser, etc.. I suppose you could use it to see if someone's being a bad multi and whatnot, but even then, you'd have to have some more incriminating evidence other than "Shared exact User Agent". Nonetheless... CREATE TABLE IF NOT EXISTS `user_uagent` ( `userid` int(11) unsigned NOT NULL, `agent` text NOT NULL, PRIMARY KEY (`userid`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1; Open globals.php Add after: global $jobquery, $housequery; //Insert/Update User Agent $rname2=$db->query("SELECT * FROM `user_uagent` WHERE `userid` = {$userid}"); $ua = $_SERVER['HTTP_USER_AGENT']; $ua = $db->escape( str_replace("\n", "<br />", strip_tags(stripslashes($ua)))); if($db->num_rows($rname2)) { $db->query("UPDATE `user_uagent` SET `agent`='{$ua}' WHERE `userid` = {$userid}"); } else { $db->query("INSERT INTO `user_uagent` (`userid`, `agent`) VALUES ({$userid}, '{$ua}');"); } Now, in your house, job, and user queries, add: INNER JOIN `user_uagent` AS `ua` ON `u`.`userid`=`ua`.`userid` Save it up! Now open your viewuser.php Change your queries section to: SELECT u.*,us.*,c.*,h.*,g.*,f.*,ua.* FROM users u LEFT JOIN userstats us ON u.userid=us.userid LEFT JOIN cities c ON u.location=c.cityid LEFT JOIN houses h ON u.maxwill=h.hWILL LEFT JOIN gangs g ON g.gangID=u.gang LEFT JOIN fedjail f ON f.fed_userid=u.userid LEFT JOIN user_uagent ua ON ua.userid=u.userid WHERE u.userid={$_GET['u']} Scroll down to your staff area, paste in at the bottom of it: <br />User Agent: {$r['agent']} Save and upload. Things should work then! :) Screeny! [ATTACH]2133[/ATTACH] I suppose one COULD make this much more intuitive, like... if contains Windows 6.1, echo out that its Windows 7, or something.
  11. I believe he means 30+ active players.
  12. Payday 2 is great! Got it on PC though. :P
  13. Ace, just use "timestamp crons". There's a few topics laying around, but me personally, I used [MENTION=65371]sniko[/MENTION] 's timestamp crons. :) (Mainly because I was lazy. >_>)
  14. I'm not sure how, specifically, but I believe its aJax what you need to look into.   --- YOU BEAT ME KYLE! I HATE YOU! :P
  15. Oh lordy, Kyle's fix worked wonderfully. Thanks to each both of you! :D
  16. Hey guys, I've asked around for a fix on the battletent. (It simply won't input the completed challenge into the table! Probably a logic bomb in the code somewhere) The NPC code is: if ($r['user_level'] == 0) { $q = $db->query( "SELECT `cb_money` FROM `challengebots` WHERE `cb_npcid` = {$r['userid']}"); if ($db->num_rows($q) > 0) { $cb = $db->fetch_row($q); $qk = $db->query( "SELECT COUNT(`npcid`) FROM `challengesbeaten` WHERE `userid` = $userid AND `npcid` = {$r['userid']}"); if ($db->fetch_single($qk) > 0) { $m = $cb['cb_money']; $db->query( "UPDATE `users` SET `money` = `money` + $m WHERE `userid` = $userid"); echo "<br /> You gained " . money_formatter($m) . " for beating the challenge bot {$r['username']}"; $db->query( "INSERT INTO `challengesbeaten` VALUES($userid, {$r['userid']})"); } $db->free_result($qk); } $db->free_result($q); }   (Its the stock MCCV2 attack beat/lost/take pages.) The queries executed: SELECT * FROM `users` WHERE `userid` = 9 UPDATE `users` SET `exp` = `exp` + 0, `money` = `money` + 3127 WHERE `userid` = 1 UPDATE `users` SET `hp` = 1, `money` = `money` - 3127, `hospital` = 31, `hospreason` = 'Mugged by CID Admin' WHERE `userid` = 9 INSERT INTO `events` VALUES(NULL, 9, 1434921252, 0, 'CID Admin mugged you and stole 3,127 Copper Coins.') UPDATE `users` SET `new_events` = `new_events` + 1 WHERE `userid` = 9 INSERT INTO `attacklogs` VALUES(NULL, 1, 9, 'won', 1434921252, 3127, '1. Using her Soul Stealer CID Admin hit Trainee Guard doing 6728 damage (-6178) \n') UPDATE `users` SET `kills` = `kills` + 1 WHERE userid=1 UPDATE `users` SET `hp` = `maxhp`, `hospital` = 0 WHERE `userid` = 9 SELECT `gangRESPECT`, `gangID` FROM `gangs` WHERE `gangID` = 5 SELECT COUNT(`warDECLARER`) FROM `gangwars` WHERE (`warDECLARER` = 1 AND `warDECLARED` = 5) OR (`warDECLARED` = 1 AND `warDECLARER` = 5) SELECT `cb_money` FROM `challengebots` WHERE `cb_npcid` = 9 SELECT COUNT(`npcid`) FROM `challengesbeaten` WHERE `userid` = 1 AND `npcid` = 9   I know the userid 9 IS an NPC, so this baffles me. Anyone care to share something about it? =/
  17. Well, if I'm being honest, it comes down to its execution.
  18. Looks great!
  19. You're not running the latest MCCodes V2 build, are you?
  20. This armory mod allows your users to donate items to their gang. Features: -Logged donations. (No panel yet.) -Gang events for when a user gives/donates an item. -Gang Staff can give items to users. SQL CREATE TABLE IF NOT EXISTS `tmg_gangarmory` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT, `gangID` int(11) unsigned NOT NULL, `item` int(11) unsigned NOT NULL, `quantity` int(11) unsigned NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=0 ; CREATE TABLE IF NOT EXISTS `tmg_gangarmory_logs` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT, `time` int(11) unsigned NOT NULL, `type` enum('Donation','Give') NOT NULL COMMENT 'Donation is when a user donates, give is when the guild gives the item out.', `user` int(11) unsigned NOT NULL, `gang` int(11) unsigned NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=6 ; lib/tmg/tmg_lib.php <?php //Version 1.0 //Useful stuffz for mods I have made. //TheMasterGeneral //Probably something else important, later on. //Inventory drop-down //Creates a dropdown menu of the user's inventory. function inventory_dropdown($connection, $ddname = "inventory", $selected = -1) { global $db,$userid; $ret = "<select name='$ddname' type='dropdown' required min='1' />"; $q = $db->query( "SELECT iv.*,i.*,it.* FROM inventory iv LEFT JOIN items i ON iv.inv_itemid=i.itmid LEFT JOIN itemtypes it ON i.itmtype=it.itmtypeid WHERE iv.inv_userid={$userid}"); while ($r = $db->fetch_row($q)) { $ret .= "\n<option value='{$r['itmid']}'"; if ($selected == $r['itmid']) { $ret .= " selected='selected'"; $first = 1; } $ret .= ">{$r['itmname']} (X {$r['inv_qty']})</option>"; } $db->free_result($q); $ret .= "\n</select>"; return $ret; } function armory_item_dropdown($connection, $ddname = "inventory", $selected = -1) { global $db,$gangdata; $ret = "<select name='$ddname' type='dropdown' required min='1' />"; $q = $db->query( "SELECT iv.*,i.*,it.* FROM `tmg_gangarmory` iv LEFT JOIN items i ON iv.item=i.itmid LEFT JOIN itemtypes it ON i.itmtype=it.itmtypeid WHERE iv.gangID={$gangdata['gangID']}"); while ($r = $db->fetch_row($q)) { $ret .= "\n<option value='{$r['itmid']}'"; if ($selected == $r['itmid']) { $ret .= " selected='selected'"; $first = 1; } $ret .= ">{$r['itmname']} (X {$r['quantity']})</option>"; } $db->free_result($q); $ret .= "\n</select>"; return $ret; } //Allows us to remove items from the guild. //For Gang Armories. function gang_item_remove($guild, $itemid, $qty) { global $db; $q = $db->query( "SELECT `id`, `quantity` FROM `tmg_gangarmory` WHERE `gangID` = {$guild} AND `item` = {$itemid} LIMIT 1"); if ($db->num_rows($q) > 0) { $r = $db->fetch_row($q); if ($r['quantity'] > $qty) { $db->query( "UPDATE `tmg_gangarmory` SET `quantity` = `quantity` - {$qty} WHERE `id` = {$r['id']}"); } else { $db->query( "DELETE FROM `tmg_gangarmory` WHERE `id` = {$r['id']}"); } } $db->free_result($q); } function gang_item_add($guild, $itemid, $qty) { global $db; $q = $db->query( "SELECT `id` FROM `tmg_gangarmory` WHERE `gangID` = {$guild} AND `item` = {$itemid} LIMIT 1"); if ($db->num_rows($q) > 0) { $r = $db->fetch_row($q); $db->query( "UPDATE `tmg_gangarmory` SET `quantity` = `quantity` + {$qty} WHERE `id` = {$r['id']}"); } else { $db->query( "INSERT INTO `tmg_gangarmory` (`item`, `gangID`, `quantity`) VALUES ({$itemid}, {$guild}, {$qty})"); } $db->free_result($q); } function gang_member_dropdown($connection, $ddname = "user", $selected = -1) { global $db,$gangdata; $ret = "<select name='$ddname' type='dropdown'>"; $q = $db->query( "SELECT `userid`, `username` FROM `users` WHERE `gang` = {$gangdata['gangID']} ORDER BY `userid` ASC"); if ($selected == -1) { $first = 0; } else { $first = 1; } while ($r = $db->fetch_row($q)) { $ret .= "\n<option value='{$r['userid']}'"; if ($selected == $r['userid'] || $first == 0) { $ret .= " selected='selected'"; $first = 1; } $ret .= ">{$r['username']} [{$r['userid']}]</option>"; } $db->free_result($q); $ret .= "\n</select>"; return $ret; } *Edits in yourgang.php* Find: require_once('globals.php'); Add under: require('lib/tmg/tmg_lib.php'); Find: default: gang_index(); break; Paste above: case "armory": gang_armory(); break; case "donateitem": gang_donateitem(); break; Find the end of the gang_index() function, paste after: function gang_armory() { global $db,$ir,$userid,$gangdata; ?> <i>These are the items currently in your guild's armory. Donate an item by clicking <a href='?action=donateitem'>here</a>.</i><hr /> <table width='50%' cellspacing='1' class='table' border='1'> <?php $inv = $db->query( "SELECT `quantity`, `itmsellprice`, `itmid`, `item`, `itmname`, `weapon`, `armor`, `itmtypename` FROM `tmg_gangarmory` AS `ga` INNER JOIN `items` AS `i` ON `ga`.`item` = `i`.`itmid` INNER JOIN `itemtypes` AS `it` ON `i`.`itmtype` = `it`.`itmtypeid` WHERE `ga`.`gangID` = {$gangdata['gangID']} ORDER BY `i`.`itmtype` ASC, `i`.`itmname` ASC"); if ($db->num_rows($inv) == 0) { echo "<b>Your guild has no items!</b>"; } else { while ($i = $db->fetch_row($inv)) { if (!isset($lt)) { $lt = $i['itmtypename']; echo "\n<tr> <td colspan='4'> <font size=3><font face='timefont'><font color=white><b>{$lt}</b></font></font></font> </td> </tr>"; } if ($lt != $i['itmtypename']) { $lt = $i['itmtypename']; echo "\n<tr> <td colspan='4'> <font size=3><font face='timefont'><font color=white><b>{$lt}</b></font></font></font> </td> </tr>"; } if ($i['weapon']) { $i['itmname'] = "<span style='color: red;'>*</span>" . $i['itmname']; } if ($i['armor']) { $i['itmname'] = "<span style='color: green;'>*</span>" . $i['itmname']; } echo "<tr> <td><a href='iteminfo.php?ID={$i['itmid']}'><b>{$i['itmname']}</a>"; if ($i['quantity'] > 1) { echo " x{$i['quantity']}"; } echo "</b></font></td> <td>" . money_formatter($i['itmsellprice']) . " <img src='/images/statusbars/coppercoin.png' title='Copper Coins' height='11' width='11' /></td> <td>"; echo" " . money_formatter($i['itmsellprice'] * $i['quantity']) . " <img src='/images/statusbars/coppercoin.png' title='Copper Coins' height='11' width='11' />"; echo "</td> </tr>"; } ?> </table> <?php } } function gang_donateitem() { global $db,$ir,$userid,$gangdata; //Required stuff for stuffz. if (!isset($_POST['item'])) { ?> <i>You are currently donating an item to your guild.<hr /></i> Fill in the required fields.<br /> <form method='post'> <?php echo"Items: " . inventory_dropdown(NULL, "item"); ?> <br /> Quantity: <input type='number' name='qty' placeholder='Item quanity?' title='Please enter the number of the item above you wish to donate.' min='1' max='4294967295' required /> <br /><input type='submit' value='Donate!' /> </form> <?php } else { $_POST['item'] = (isset($_POST['item']) && is_numeric($_POST['item'])) ? abs(intval($_POST['item'])) : ''; $_POST['qty'] = (isset($_POST['qty']) && is_numeric($_POST['qty'])) ? abs(intval($_POST['qty'])) : ''; if (empty($_POST['qty'])) { ?><div class='error'>You did not enter a quantity to donate.</div><?php } if (empty($_POST['item'])) { ?><div class='error'>You did not enter an item to donate.</div><?php } $query=$db->query("SELECT `inv_itemid`,`inv_qty` FROM `inventory` where `inv_itemid` = {$_POST['item']} && `inv_userid` = $userid"); $i=$db->fetch_row($query); $query2=$db->query("SELECT `itmname` FROM `items` WHERE `itmid` = {$_POST['item']}"); $itemname=$db->fetch_single($query2); if(!$i['inv_itemid'] == $_POST['item']) { ?><div class='error'>You do not even have the item you wish to donate.</div><?php } elseif($i['inv_qty'] < $_POST['qty']) { ?><div class='error'>You don't even have that item quantity to donate!</div><?php } else { $time=time(); $event = $db->escape("<a href='viewuser.php?u={$userid}'>{$ir['username']}</a> has donated {$itemname} (x {$_POST['qty']}) to the guild armory."); $db->query("INSERT INTO `gangevents` VALUES(NULL, {$gangdata['gangID']}, {$time}, '{$event}')"); item_remove($userid,$_POST['item'],$_POST['qty']); gang_item_add($gangdata['gangID'],$_POST['item'],$_POST['qty']); $db->query("INSERT INTO `tmg_gangarmory_logs` (`id`, `time`, `type`, `user`, `gang`) VALUES ('NULL', '{$time}', 'Donation', '{$userid}', '{$gangdata['gangID']}');"); ?><div class='success'>You have successfully donated your item to your guild's armory.</div><?php } } } Find: echo " <table cellspacing=1 class='table'> <tr> <td><a href='yourgang.php?action=summary'>Summary</a></td> <td><a href='yourgang.php?action=donate'>Donate</a></td> </tr> <tr> <td><a href='yourgang.php?action=members'>Members</a></td> <td><a href='yourgang.php?action=crimes'>Crimes</a></td> </tr> <tr> <td><a href='yourgang.php?action=forums'>Forums</a></td> <td><a href='yourgang.php?action=leave'>Leave</a></td> </tr> <tr> <td><a href='yourgang.php?action=atklogs'>Attack Logs</a></td> <td> "; if ($gangdata['gangPRESIDENT'] == $userid || $gangdata['gangVICEPRES'] == $userid) { echo "<a href='yourgang.php?action=staff&act2=idx'>Staff Room</a>"; } else { echo " "; } Replace with: echo "<br> <table cellspacing=1 class='table'> <tr> <td><a href='yourgang.php?action=summary'>Summary</a></td> <td><a href='yourgang.php?action=donate'>Donate</a></td> </tr> <tr> <td><a href='yourgang.php?action=members'>Members</a></td> <td><a href='yourgang.php?action=crimes'>Crimes</a></td> </tr> <tr> <td><a href='yourgang.php?action=forums'>Forums</a></td> <td><a href='yourgang.php?action=leave'>Leave</a></td> </tr> <tr> <td><a href='yourgang.php?action=atklogs'>Attack Logs</a></td> <td><a href='?action=armory'>Armory</a></td> </tr> <td colspan='2'> "; if ($gangdata['gangPRESIDENT'] == $userid || $gangdata['gangVICEPRES'] == $userid) { echo "<a href='yourgang.php?action=staff&act2=idx'>Staff Room</a>"; } else { echo " "; } Find: <a href='yourgang.php?action=staff&act2=masspayment'>Mass Payment</a> <br /> Paste Under: <a href='yourgang.php?action=staff&act2=armory'>Armory Management</a> <br /> Find: function gang_staff_apps() Paste above: function gang_staff_armory() { global $db,$ir,$userid,$gangdata; if (!isset($_POST['user'])) { ?><i>You are currently in the armory management section...<hr /></i> <form method='post'> <?php echo"User: " . gang_member_dropdown(NULL, "user"); ?><br /> <?php echo"Item: " . armory_item_dropdown(NULL, "item"); ?><br /> Quantity: <input type='number' name='qty' min='1' max='4294967295' title='Input the quantity you wish to give to the user above.' placeholder='Item quantity?' required /><br /> <input type='submit' value='Give To User'> </form> <?php } else { $_POST['item'] = (isset($_POST['item']) && is_numeric($_POST['item'])) ? abs(intval($_POST['item'])) : ''; $_POST['qty'] = (isset($_POST['qty']) && is_numeric($_POST['qty'])) ? abs(intval($_POST['qty'])) : ''; $_POST['user'] = (isset($_POST['user']) && is_numeric($_POST['user'])) ? abs(intval($_POST['user'])) : ''; $w=$db->query("SELECT `gang` FROM `users` WHERE `userid` = {$_POST['user']}"); $testuser=$db->fetch_single($w); if (empty($_POST['qty'])) { ?><div class='error'>You did not enter a quantity to give out.</div><?php } elseif (empty($_POST['item'])) { ?><div class='error'>You did not enter an item to give out.</div><?php } elseif (empty($_POST['user'])) { ?><div class='error'>You did not input a user to even give the item to.</div><?php } elseif ($testuser != $gangdata['gangID']) { ?><div class='error'>The user you input is not in your guild.</div><?php } else { $query=$db->query("SELECT `item`,`quantity` FROM `tmg_gangarmory` where `item` = {$_POST['item']} && `gangID` = {$gangdata['gangID']}"); $i=$db->fetch_row($query); $query2=$db->query("SELECT `itmname` FROM `items` WHERE `itmid` = {$_POST['item']}"); $itemname=$db->fetch_single($query2); $query3=$db->query("SELECT `username` FROM `users` WHERE `userid` = {$_POST['user']}"); $givenun=$db->fetch_single($query3); if(!$i['quantity'] == $_POST['item']) { ?><div class='error'>You do not even have the item you wish to give out.</div><?php } elseif($i['quantity'] < $_POST['qty']) { ?><div class='error'>You don't even have that item quantity to give out.</div><?php } else { $time=time(); $event= $db->escape("You have been given {$itemname} (x{$_POST['qty']}) from your guild armory."); $event2 = $db->escape("<a href='viewuser.php?u={$userid}'>{$ir['username']}</a> has given {$_POST['qty']} x {$itemname} to <a href='viewuser.php?u={$_POST['user']}'>{$givenun}</a>."); event_add($_POST['user'],$event); $db->query("INSERT INTO `gangevents` VALUES(NULL, {$gangdata['gangID']}, {$time}, '{$event2}')"); item_add($userid,$_POST['item'],$_POST['qty']); gang_item_remove($gangdata['gangID'],$_POST['item'],$_POST['qty']); $db->query("INSERT INTO `tmg_gangarmory_logs` (`id`, `time`, `type`, `user`, `gang`) VALUES ('NULL', '{$time}', 'Give', '{$userid}', '{$gangdata['gangID']}');"); ?><div class='success'>You have successfully given an item from the armory.</div><?php } } } } Add into your CSS (Not required) .info, .success, .warning, .error, .validation { border: 1px solid; margin: 10px 0px; padding:15px 10px 15px 50px; background-repeat: no-repeat; background-position: 10px center; } .info { color: #00529B; background-color: #BDE5F8; background-image: url('/images/status/info.png'); } .success { color: #4F8A10; background-color: #DFF2BF; background-image:url('/images/status/success.png'); } .warning { color: #9F6000; background-color: #FEEFB3; background-image: url('/images/status/warning.png'); } .error { color: #D8000C; background-color: #FFBABA; background-image: url('/images/status/error.png'); } .validation { color: #D63301; background-color: #FFCCBA; background-image: url('/images/status/validation.png'); } Icons!! https://drive.google.com/uc?id=0B3NN...xport=download
  21. That's a sexy template.
  22. I've found that quoting in the stock MCCraps engine was rather... ugly. URL encoding, html entities, and other misc. So, I tweaked it a little bit. Replace your quote function (in forums.php) with this one: function quote() { global $ir, $c, $userid, $h, $bbc, $db; $_GET['viewtopic'] = (isset($_GET['viewtopic']) && is_numeric($_GET['viewtopic'])) ? abs(intval($_GET['viewtopic'])) : ''; $_GET['fpid'] = (isset($_GET['fpid']) && is_numeric($_GET['fpid'])) ? abs(intval($_GET['fpid'])) : ''; $_GET['quotename'] = (isset($_GET['quotename']) && is_numeric($_GET['quotename'])) ? abs(intval($_GET['quotename'])) : ''; if (empty($_GET['viewtopic'])) { echo 'Something went wrong.<br /> > <a href="forums.php" title="Go Back">Go Back</a>'; die($h->endpage()); } if (!isset($_GET['quotename']) || !isset($_GET['fpid'])) { echo 'Something went wrong.<br /> > <a href="forums.php" title="Go Back">Go Back</a>'; die($h->endpage()); } $q = $db->query( "SELECT `ft_forum_id`, `ft_name`, `ft_locked`, `ft_id` FROM `forum_topics` WHERE `ft_id` = {$_GET['viewtopic']}"); if ($db->num_rows($q) == 0) { $db->free_result($q); echo 'Topic doesn\'t exist.<br /> > <a href="forums.php" title="Go Back">Go Back</a>'; die($h->endpage()); } $topic = $db->fetch_row($q); $db->free_result($q); $q2 = $db->query( "SELECT `ff_auth`, `ff_owner` ,`ff_id`, `ff_name` FROM `forum_forums` WHERE `ff_id` = {$topic['ft_forum_id']}"); if ($db->num_rows($q2) == 0) { $db->free_result($q2); echo 'Forum doesn\'t exist.<br /> > <a href="forums.php" title="Go Back">Go Back</a>'; die($h->endpage()); } $forum = $db->fetch_row($q2); $db->free_result($q2); if (($forum['ff_auth'] == 'gang' && $ir['gang'] != $forum['ff_owner']) || ($forum['ff_auth'] == 'staff' && $ir['user_level'] < 2)) { echo ' You have no permission to reply to this topic.<br /> > <a href="forums.php">Back</a> '; die($h->endpage()); } $q3 = $db->query("SELECT `fp_text` FROM `forum_posts` WHERE `fp_id` = {$_GET['fpid']}"); $text = $db->fetch_single($q3); $q4 = $db->query("SELECT `username` FROM `users` WHERE `userid` = {$_GET['quotename']}"); $Who = $db->fetch_single($q4); echo "<big> <a href='forums.php'>Forums Home</a> >> <a href='forums.php?viewforum={$forum['ff_id']}'>{$forum['ff_name']}</a> >> <a href='forums.php?viewtopic={$_GET['viewtopic']}'>{$topic['ft_name']}</a> >> Quoting a Post </big> <br /> <br /> "; if ($topic['ft_locked'] == 0) { $quote_csrf = request_csrf_code("forums_reply_{$topic['ft_id']}"); echo <<<EOF <br /><br /> <b>Post a reply to this topic:</b><br /> <form action='forums.php?reply={$topic['ft_id']}' method='post'> <input type='hidden' name='verf' value='{$quote_csrf}' /> <table cellspacing='1' class='table' width='80%'> <tr> <td align='right'>Subject:</td> <td align='left'><input type='text' name='fp_subject' /></td> </tr> <tr> <td align='right'>Post:</td> <td align='left'> <textarea rows='7' cols='40' name='fp_text' id='reply'>[quote name='{$Who}']{$text}[/quote]</textarea><br /> </td> </tr> EOF; } else { echo " <i>This topic has been locked, you cannot reply to it.</i><br /> <a href='forums.php?viewtopic={$_GET['viewtopic']}'>Back</a> "; } } Replace: $qlink = "[<a href='forums.php?act=quote&viewtopic={$_GET['viewtopic']}&quotename=" . urlencode( htmlentities($r['fp_poster_name'], ENT_QUOTES, 'ISO-8859-1')) . "&quotetext=" . urlencode( htmlentities($r['fp_text'], ENT_QUOTES, 'ISO-8859-1')) . "'>Quote Post</a>]"; With this: $qlink = "[<a href='forums.php?act=quote&viewtopic={$_GET['viewtopic']}&quotename={$r['fp_poster_id']}&fpid={$r['fp_id']}'>Quote Post</a>]"; Save, upload. :) Its a small tweak. Rather easy to do. I figured some unregistered lurkers might like it. Or might not. *Shrugs*
  23. Oh darn. I thought the odds were ever in my favor. ;) Congratulations dude!
×
×
  • Create New...