-
Posts
2,146 -
Joined
-
Last visited
-
Days Won
149
Content Type
Profiles
Forums
Events
Everything posted by Magictallguy
-
Code updated
- 8 replies
-
- mccode-v2
- mccode-lite
-
(and 3 more)
Tagged with:
-
It does. I've got a PHP7-compatible MCCv2 lying around one of my drives - no real reason, just wanted to get some practise in - recoding that was .. fun
-
Feature Request: Dark Theme [implemented]
Magictallguy replied to Magictallguy's topic in Feedback and Site Support
You're a beautiful man :P -
Feature Request: Dark Theme [implemented]
Magictallguy replied to Magictallguy's topic in Feedback and Site Support
-
Feature Request: Dark Theme [implemented]
Magictallguy replied to Magictallguy's topic in Feedback and Site Support
Not too shabby! -
Carnal Cove's running CCv2 RC4, a custom source _very_ loosely based on MCCraps (due to the game's origin). And YourMafia's running YMv1, gRPG v1, majorly rewritten. YMv2's currently in a closed beta
-
MWG's a not-so-guilty pleasure of mine, has been for years. Disheartened when it died. Elated now it's back. So, from me to MWG and all its miscreants inhabitants: Welcome the f*** back! :D
-
I'll provide a mirror for it when I get a moment
-
Feature Request: Dark Theme [implemented]
Magictallguy replied to Magictallguy's topic in Feedback and Site Support
Thank ye kindly. I have no specific themes in mind at the moment. Considering writing up a sheet for Stylus (a works-within-Chrome's-standards version of Stylish), but that'd only sort my issue. You're a dev, you understand the desire for darker themes as well as the next man :P -
I part-own Carnal Cove, and I'm currently working on a brand new game engine for a friend of mine over at YourMafia. I'm also working on a little project for myself, but progress is slow (due to my other responsibilities).
-
Hi there! If you're reading this, then .. well .. you clicked the topic name HUURRRHURRRHURRRHURRR I'm Magictallguy, 27 (at the time of writing), and living in greytown in greycity where everything's grey (Bolton). Annnnd I've got no idea what else to put here. Ask away, I'll update this with answers
-
Pretty self-explanatory title. Can we get a dark theme please?
-
My Skype lot now know MWG's back. Regaining the community shouldn't take long. Word spreads quickly ^.^
-
Oh, it's daaaayum good to be back!
-
The code is outdated and outmoded. You need to update the code yourself or find/hire someone who will do that for you. Your DB errors are due to the fact that the dbdata.sql is coded incorrectly - attempting to set default values on blob/text columns (can't do it). At least switch to MySQLi, if you're not willing/able to do anything else - you can do this is config.php, simply change "mysql" to "mysqli"
-
Sounds interesting, I may follow this
-
IPLISTNER.php ssl3.0 FIX and server fix
Magictallguy replied to jay-dogg2009's topic in Modification Support
Forgive the gravedig - spotted this on MCCodes.com and laughed.. iplistener.php is a file I include with my free PayPal IPN integration.. The IPN itself can be found here Only those using that particular IPN class (or equivalent) would need to update their SSL setting -
Added sending event (unless commenting on own profile) to profile owner
- 8 replies
-
- mccode-v2
- mccode-lite
-
(and 3 more)
Tagged with:
-
Moved a few things around, tested and working
- 8 replies
-
- mccode-v2
- mccode-lite
-
(and 3 more)
Tagged with:
-
Tested and working :)
- 8 replies
-
- mccode-v2
- mccode-lite
-
(and 3 more)
Tagged with:
-
Profile Comments
-
Profile Comments! TESTED - Please respond with any bugs Run SQL: CREATE TABLE users_comments ( id INT(11) NOT NULL PRIMARY KEY AUTO_INCREMENT, profile_id INT(11) NOT NULL DEFAULT 0, poster_id INT(11) NOT NULL DEFAULT 0, flagged TINYINT(4) NOT NULL DEFAULT 0, content TEXT NOT NULL, time_added TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, INDEX(profile_id) ) THIS STEP IS OPTIONAL - YOU ONLY NEED TO DO THIS IF YOU INTEND TO USE JBBCODE Find: require_once('globals.php'); Add below: require_once __DIR__ . '/path/to/JBBCode/Parser.php'; Find (default: above "Profile for x user"): $db->free_result($ref_q); Add below <?php // added for syntax highlighting. Remove this line before pasting $delSuccess = false; $flagSuccess = false; $commentPosted = false; $_GET['flagcom'] = array_key_exists('flagcom', $_GET) && ctype_digit($_GET['flagcom']) && $_GET['flagcom'] > 0 ? $_GET['flagcom'] : null; $_GET['delcom'] = array_key_exists('delcom', $_GET) && ctype_digit($_GET['delcom']) && $_GET['delcom'] > 0 ? $_GET['delcom'] : null; if (!empty($_GET['flagcom'])) { $selectComment = $db->query('SELECT id, profile_id, poster_id, flagged FROM users_comments WHERE id = '.$_GET['flagcom']); if ($db->num_rows($selectComment)) { $com = $db->fetch_row($selectComment); if (!$com['flagged']) { $db->query('UPDATE users_comments SET flagged = 1 WHERE id = '.$_GET['flagcom']); $flagSuccess = true; } else { echo 'This comment has already been flagged'; } $db->free_result($com); } else { echo 'The comment you selected doesn\'t exist'; } } elseif (!empty($_GET['delcom'])) { $selectComment = $db->query('SELECT id, profile_id, poster_id FROM users_comments WHERE id = '.$_GET['delcom']); if ($db->num_rows($selectComment)) { $com = $db->fetch_row($selectComment); if (in_array($ir['userid'], [$com['profile_id'], $com['poster_id']]) && !$ir['staff_rank']) { $db->query('DELETE FROM users_comments WHERE id = '.$_GET['delcom']); $delSuccess = true; } else { echo 'You don\'t have access'; } $db->free_result($com); } else { echo 'The comment you selected doesn\'t exist'; } } if (array_key_exists('comment', $_POST)) { $_POST['comment'] = is_string($_POST['comment']) && strlen($_POST['comment']) > 0 ? strip_tags(trim($_POST['comment'])) : null; if (!empty($_POST['comment'])) { $selectDupCom = $db->query('SELECT COUNT(id) FROM users_comments WHERE profile_id = '.$r['userid'].' AND poster_id = '.$ir['userid'].' AND content = "'.$db->escape($_POST['comment']).'"'); if (!$db->fetch_single($selectDupCom)) { $db->query(sprintf('INSERT INTO users_comments (profile_id, poster_id, content) VALUES (%u, %u, "%s")', $r['userid'], $ir['userid'], $db->escape($_POST['comment']))); if ($ir['userid'] != $r['userid']) { $myname = function_exists('username') ? username($ir['userid']) : '<a href="viewuser.php?u='.$ir['userid'].'">'.stripslashes($ir['username']).'</a>'; event_add($r['userid'], $myname.' left a comment on your profile'); } $commentPosted = true; } $db->free_result($selectDupCom); } } Find (default: just above function checkblank() { [...] }): echo ' </tr> </table> '; Replace with: <?php // added for syntax highlighting. Remove this line before pasting echo '</tr>'; $successExists = function_exists('success'); $selectComments = $db->query('SELECT id, poster_id, flagged, content, time_added, username FROM users_comments INNER JOIN users ON poster_id = userid WHERE profile_id = '.$r['userid'].' ORDER BY time_added DESC LIMIT 10' );?> <tr> <td colspan="2" valign="top"> <?php echo $commentPosted ? ($successExists ? success('Your comment has been posted!') : 'Your comment has been posted!<br />') : ''; echo $delSuccess ? ($successExists ? success('You\'ve deleted the comment') : 'You\'ve deleted the comment<br />') : ''; echo $flagSuccess ? ($successExists ? success('You\'ve flagged the comment') : 'You\'ve flagged the comment<br />') : ''; ?> <form action="viewuser.php?u=<?php echo $r['userid'];?>" method="post"> <div class="form-group"> <label for="comment">Comment</label> <textarea name="comment" id="comment" rows="5%" cols="40%" class="form-control"></textarea> </div> <button type="submit" class="btn btn-primary"> <i class="fas fa-thumbs-up" aria-hidden="true"></i> Post Comment </button> </form> <table class="table table-dark table-hover" width="100%"> <thead> <tr> <th scope="col" style="width:25%;">Poster</th> <th scope="col" style="width:75%;">Comment</th> </tr> </thead> <tfoot> <tr> <th>Poster</th> <th>Comment</th> </tr> </tfoot> <tbody> <?php if(!$db->num_rows($selectComments)) { ?> <tr> <td colspan="2" class="center">There are no comments on this profile</td> </tr><?php } else { $usernameExists = function_exists('username'); while($row = $db->fetch_row($selectComments)) { $comment = trim(nl2br(stripslashes(htmlentities($row['content'], ENT_QUOTES, 'UTF-8')))); if(class_exists('JBBCode\Parser')) { $parser = new JBBCode\Parser(); $parser->addCodeDefinitionSet(new JBBCode\DefaultCodeDefinitionSet()); $comment = $parser->getAsHTML($parser->parse($comment)); } ?> <tr<?php echo $row['flagged'] ? ' style="-webkit-filter: grayscale(1);filter: grayscale(1);"' : '';?>> <td> <?php echo $usernameExists ? username($row['poster_id']) : '<a href="viewuser.php?u='.$row['profile_id'].'">'.stripslashes(htmlspecialchars($row['username'])).'</a>';?> </td> <td> <?php echo $comment;?><br /> <span style="font-size:.8em;font-style:italic;float:right;"><?php if(in_array($ir['userid'], [$row['poster_id'], $r['userid']]) || $ir['user_level'] == 2) { ?> [<a href="viewuser.php?u=<?php echo $r['userid'];?>&delcom=<?php echo $row['id'];?>">Delete</a>]<?php } else if(!in_array($ir['userid'], [$row['poster_id'], $r['userid']])) { ?> [<a href="viewuser.php?u=<?php echo $r['userid'];?>&flagcom=<?php echo $row['id'];?>">Flag</a>]<?php } ?> </span> </td> </tr><?php } } ?> </tbody> </table> </td> </tr> <?php $db->free_result($selectComments);
-
I'm afraid I haven't released them to the public yet - mostly because they're for custom builds. I'll write up a stock MC Codes version for you
-
if(my['userid'] == returned['userid']) { show name } else { show 'unknown'; }
-
Nah, just about clinging to life xD