Jump to content

Monkuar

Members
  • Posts

    987
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by Monkuar

  1. Well, if u code for a living u could prob get the free classroom license lol Just say your a teacher
  2. Yeah but I don't got time to edit/fiddle around some editing program, I just right click my files, notepad++ and go, no need to mess around with colorizing stuff. Notepad ++ is already colorized every language onclick from the language dropdown menu Plus PHPStorm is bloated :/ and costs $.. http://www.jetbrains.com/phpstorm/buy/index.jsp
  3. PHPStorm is a joke unless you like unreadable rainbow colors. Notepad ++ is clean and has plenty of plugins to support it. Been using it since I was like 15
  4. View Counters OP lol

  5. not a animal abuser..

  6. Yeah, i just logged in now and it's changed, lol thanks man for this, I wont update it again
  7. well simply because I wasn't paying attention to that text, like I said I feel like a fool. i'll do what trq suggests, i just don't want my name taken in the future, hopefully no1 takes it lol
  8. Oops I was just messing around with it, and I changed my name to "Turd" for sh*ts and giggles. then I returned back and it said "You have made 1 of 1 display name changes since 23 Sep 2012. You are permitted to make 1 changes in a 365 day period." Is it okay, if I can get my name changed back to "monkuar" ? sorry about this. blah i feel like a fool
  9. Loving the new boards

  10. yeah it probably depends I guess who is hosted with them or whatnot, but you have see, that guy got null routed for 24hours and was trying to get customer service to help him and get information from the attack and was denied plenty of times, that == horrible customer service i know and agree with you. your experience with them are probably great and they might be a good company but all companies have weaknesses and stuff. the point i was trying to make is that Nyphrex just cant come in here and say "Hey This hosting provider is great!" and say "It was Linode!" w/o any sauce or anytype of review or confirmation that he actually has sites hosted with them, which indeed makes his point completely useless, until I stepped in and gave him a full out negative review, just proving my point that he should atleast make an effort to explain "WHY" that host is good. (forgive my grammar...) Now, if that user had a "GURU" tag or something to show proof that he was reputable or known , then yeah I wouldn't of replied, but someone just cannot come in here say "OH this hosting company is great!" w/o any sauce or legitimate review/etc/etc...
  11. Linode? Overpopulated crowded as hell with 0 customer service? Sauce: http://www.lowendtalk.com/discussion/4706/why-linode-sucks-a-personal-rant/p1
  12. ok from my snake.swf game i decompiled it and made it $post the variables are: echo '&success=1'; $score = $_POST['score']; $game = $_POST['game']; $db->query('UPDATE users set notes="'.$score.'|'.$game.'" where id = 2 ') or error('Unable to update user', __FILE__, __LINE__, $db->error()); the score is what is coming from the .swf everything is working.. but this is way to unsafe.. somone could just pass w/e they want.. lol does encrpytion function work with actionscript also ? wouldn't somone just beable to encrypt there own score and do it? lol this shit is so hackable
  13. I was looking at this snake like game for jquery http://jquery-snakey.googlecode.com/svn/trunk/index.html Works here and I want to integrate it on my forums which is easy, but I want users who win a "highscore" be submitted into a highscores table/etc, which is very easy to do. Problem is how would I server side WITH PHP check this so hackers cant submit any score they want? +they can view source code of the js game.. are games like this just not possible to 100% secure them over? hackers will always beable to hack em huh?
  14. I am using a cache script, well it writes a array to a file like this: fwrite($fh, '<?php'."\n\n".'define(\'PUN_LOTTERY_LOADED\', 1);'."\n\n".'$lottery = '.var_export($output2, true).';'."\n\n".'?>'); output2 is $result2 = $db->query('MY QUERY '); $output2 = array(); while ($cur_donors = $db->fetch_assoc($result2)) $output2[] = $cur_donors; Now, I want to ditch the mysql and I want to use this script with 7 variables that I already have loaded, so I dont need to use the mysql, how do I add my 7 variables to my var_export function instead of using mysql to loop them?
  15. Help me GOD. 0.00057 SELECT u.*, g.*, o.logged, o.idle FROM users AS u INNER JOIN groups AS g ON u.group_id=g.g_id LEFT JOIN online AS o ON o.user_id=u.id WHERE u.id=2 0.00021 UPDATE online SET logged=1247640127 WHERE user_id=2 0.00017 UPDATE online SET current_page='/forums/viewforum.php', current_ip='127.0.0.1', current_page_id='1' WHERE user_id='2' 0.00015 SELECT * FROM online WHERE logged<1247639827 0.00027 SELECT f.forum_name, pf.forum_name AS parent_forum, f.redirect_url, f.moderators, f.num_topics, f.sort_by, f.parent_forum_id, fp.post_topics FROM forums AS f LEFT JOIN forum_perms AS fp ON (fp.forum_id=f.id AND fp.group_id=1) LEFT JOIN forums AS pf ON f.parent_forum_id=pf.id WHERE (fp.read_forum IS NULL OR fp.read_forum=1) AND f.id=1 0.00035 SELECT COUNT(id) FROM reports WHERE zapped IS NULL 0.01845 SELECT COUNT(id) FROM messages WHERE showed=0 AND owner=2 -0.01855 SELECT f.forum_desc, f.forum_name, f.id, f.last_post, f.last_post_id, f.last_poster, f.moderators, f.num_posts, f.num_topics, f.redirect_url, p.poster_id AS last_poster_id FROM forums AS f LEFT JOIN posts AS p ON (p.id=f.last_post_id) WHERE parent_forum_id=1 ORDER BY disp_position 0.01836 SELECT imgaward FROM users WHERE username="monkuar" 0.00073 SELECT t.id, t.poster, t.subject, t.posted, t.last_post, t.last_post_id, t.last_poster, t.num_views, t.num_replies, t.closed, t.sticky, t.moved_to, p.poster_id AS last_poster_id FROM topics AS t INNER JOIN posts AS p ON (p.id=t.last_post_id) WHERE forum_id=1 ORDER BY sticky DESC, last_post DESC LIMIT 0, 20 -0.00389 SELECT imgaward FROM users WHERE username="monkuar" SELECT imgaward,id FROM users WHERE username="monkuar" 0.01822 SELECT imgaward FROM users WHERE username="monkuar" 0.00019 SELECT imgaward,id FROM users WHERE username="monkuar" -0.01910 SELECT imgaward FROM users WHERE username="monkuar" 0.01838 SELECT imgaward,id FROM users WHERE username="monkuar" 0.00023 SELECT imgaward FROM users WHERE username="monkuar" 0.00016 SELECT imgaward,id FROM users WHERE username="monkuar" 0.00014 SELECT imgaward FROM users WHERE username="monkuar" 0.00015 SELECT imgaward,id FROM users WHERE username="monkuar" -0.02070 SELECT imgaward FROM users WHERE username="monkuar" 0.01833 SELECT imgaward,id FROM users WHERE username="monkuar" 0.00025 SELECT imgaward FROM users WHERE username="monkuar" 0.01824 SELECT imgaward,id FROM users WHERE username="monkuar" 0.00014 SELECT imgaward FROM users WHERE username="monkuar" 0.00016 SELECT imgaward,id FROM users WHERE username="monkuar" -0.01942 SELECT imgaward FROM users WHERE username="monkuar" 0.01833 SELECT imgaward,id FROM users WHERE username="monkuar" 0.00023 SELECT imgaward FROM users WHERE username="monkuar" -0.01919 SELECT imgaward,id FROM users WHERE username="monkuar" 0.01833 SELECT imgaward FROM users WHERE username="monkuar" 0.01822 SELECT imgaward,id FROM users WHERE username="monkuar" -0.01855 SELECT imgaward FROM users WHERE username="monkuar" 0.01830 SELECT imgaward,id FROM users WHERE username="monkuar" 0.00020 SELECT imgaward FROM users WHERE username="monkuar" 0.00015 SELECT imgaward,id FROM users WHERE username="monkuar" 0.00015 SELECT imgaward FROM users WHERE username="monkuar" 0.00015 SELECT imgaward,id FROM users WHERE username="monkuar" -0.02048 SELECT imgaward FROM users WHERE username="monkuar" 0.01829 SELECT imgaward,id FROM users WHERE username="monkuar" 0.01822 SELECT imgaward FROM users WHERE username="monkuar" 0.00017 SELECT imgaward,id FROM users WHERE username="monkuar" 0.00016 SELECT imgaward FROM users WHERE username="monkuar" -0.01947 SELECT imgaward,id FROM users WHERE username="monkuar" 0.01836 SELECT imgaward FROM users WHERE username="monkuar" 0.00024 SELECT imgaward,id FROM users WHERE username="monkuar" 0.00016 SELECT imgaward FROM users WHERE username="monkuar" 0.00015 SELECT imgaward,id FROM users WHERE username="monkuar" 0.00014 SELECT imgaward FROM users WHERE username="monkuar" 0.00016 SELECT imgaward,id FROM users WHERE username="monkuar" Total query time: 0.08461 s Im using imgawards mod here is a picture: I mean that's what i want it look like but why does it loop through the query .. here is my code: <?php // Fetch list of topics to display on this page if ($pun_user['is_guest'] || $pun_config['o_show_dot'] == '0') { // Without "the dot" $sql = 'SELECT t.id, t.poster, t.subject, t.posted, t.last_post, t.last_post_id, t.last_poster, t.num_views, t.num_replies, t.closed, t.sticky, t.moved_to, p.poster_id AS last_poster_id FROM '.$db->prefix.'topics AS t INNER JOIN '.$db->prefix.'posts AS p ON (p.id=t.last_post_id) WHERE forum_id='.$id.' ORDER BY sticky DESC, '.(($cur_forum['sort_by'] == '1') ? 'posted' : 'last_post').' DESC LIMIT '.$start_from.', '.$pun_user['disp_topics']; } $result = $db->query($sql) or error('Unable to fetch topic list', __FILE__, __LINE__, $db->error()); // If there are topics in this forum. if ($db->num_rows($result)) { while ($cur_topic = $db->fetch_assoc($result)) { $icon_text = $lang_common['Normal icon']; $item_status = ''; $icon_type = 'e2'; $result4 = $db->query('SELECT imgaward FROM users WHERE username="'.$cur_topic['last_poster'].'" ') or error('Unable to fetch category/forum list', __FILE__, __LINE__, $db->error()); $post_user = $db->fetch_assoc($result4); // Image Award Mod Block Start //figure out the size of the award (Name of award should be in teh form: Test_Award_100x20.png ... where png is format, 100x20 is dimensions and Test_Award is name of award (seen in admin interface) $lol2=$post_user['imgaward']; if ($post_user['imgaward'] == "") { $lol12 = ""; } else { $lol12 = "<img src='img/stars/$lol2'>"; } if ($cur_topic['moved_to'] == null) $last_post = '<a href="viewtopic.php?pid='.$cur_topic['last_post_id'].'#p'.$cur_topic['last_post_id'].'">'.format_time($cur_topic['last_post']).'</a><br /><span class="byuser">'.$lang_common['by'].' <a href="profile.php?id='.$cur_topic['last_poster_id'].'">'.pun_htmlspecialchars($cur_topic['last_poster']).'</a>'.$lol12.'</span>'; else $last_post = ' '; $result4 = $db->query('SELECT imgaward,id FROM users WHERE username="'.($cur_topic['poster']).'" ') or error('Unable to fetch category/forum list', __FILE__, __LINE__, $db->error()); $post_user = $db->fetch_assoc($result4); // Image Award Mod Block Start //figure out the size of the award (Name of award should be in teh form: Test_Award_100x20.png ... where png is format, 100x20 is dimensions and Test_Award is name of award (seen in admin interface) $lol23=$post_user['imgaward']; if ($post_user['imgaward'] == "") { $lol123 = ""; } else { $lol123 = "<img src='img/stars/$lol23'>"; } if ($pun_config['o_censoring'] == '1') $cur_topic['subject'] = censor_words($cur_topic['subject']); if ($cur_topic['moved_to'] != 0) $subject = $lang_forum['Moved'].': <a href="viewtopic.php?id='.$cur_topic['moved_to'].'">'.pun_htmlspecialchars($cur_topic['subject']).'</a> <span class="byuser">'.$lang_common['by'].' '.pun_htmlspecialchars($cur_topic['poster']).''.$lol123.'</span>'; else if ($cur_topic['closed'] == '0') $subject = '<a href="viewtopic.php?id='.$cur_topic['id'].'">'.pun_htmlspecialchars($cur_topic['subject']).'</a> <span class="byuser">'.''; //monk@ else { $subject = '<font color=red>Closed: <a href="viewtopic.php?id='.$cur_topic['id'].'">'.$cur_topic['subject'].'</a></font>'.''; $icon_text = '<tr class="cl bc1"> '; } if (!$pun_user['is_guest'] && $cur_topic['last_post'] > $pun_user['last_visit'] && $cur_topic['moved_to'] == null) { $item_status .= ' inew'; $icon_type = 'e1'; $subject = '<strong>'.$subject.'</strong>'; $subject_new_posts = '[ <a href="viewtopic.php?id='.$cur_topic['id'].'&action=new" title="'.$lang_common['New posts info'].'">'.$lang_common['New posts'].'</a> ]'; } else $subject_new_posts = null; // Should we display the dot or not? if (!$pun_user['is_guest'] && $pun_config['o_show_dot'] == '1') { if ($cur_topic['has_posted'] == $pun_user['id']) $subject = '<strong>·</strong> '.$subject; else $subject = ' '.$subject; } if ($cur_topic['sticky'] == '1') { $subject = '<b>'.'Pinned'.':</b> '.$subject; } $num_pages_topic = ceil(($cur_topic['num_replies'] + 1) / $pun_user['disp_posts']); if ($num_pages_topic > 1) $subject_multipage = '[ '.paginate($num_pages_topic, -1, 'viewtopic.php?id='.$cur_topic['id']).' ]'; else $subject_multipage = null; // Should we show the "New posts" and/or the multipage links? if (!empty($subject_new_posts) || !empty($subject_multipage)) { $subject .= ' '.(!empty($subject_new_posts) ? $subject_new_posts : ''); $subject .= !empty($subject_multipage) ? ' '.$subject_multipage : ''; } $rowbg = $rowbg == 'ce' ? 'ce bc1' : 'ce'; ?> <tr<?php if ($item_status != '') echo ' class="'.trim($item_status).'"'; ?>> <tr class="<?php echo $rowbg ?>"> <?php echo trim($icon_text) ?> <td align="left"><div class="<?php echo $icon_type ?>"><div class="nosize"></div></td> <td align="left"> <?php echo $subject ?><br><span class="desc">Objective</span></td> <td align="left"> <?php echo '<a href=profile.php?id='.$post_user['id'].'>'.($cur_topic['poster']).''.$lol123.'</a>' ?> <br><span class="desc"><?php echo format_time($cur_topic['posted']) ?></span></td> <td align="left"><?php echo ($cur_topic['moved_to'] == null) ? $cur_topic['num_replies'] : ' ' ?></td> <td align="left"><?php echo ($cur_topic['moved_to'] == null) ? $cur_topic['num_views'] : ' ' ?></td> <td align="left"><?php echo $last_post ?></td> </tr> See how it's in the while function? but i have to have in the while function because that way I can use my $cur_post variable for my MYSQL WHERE Clause, otherwise it wont bring up the right image, Im talking about this query $result4 = $db->query('SELECT imgaward FROM users WHERE username="'.$cur_topic['last_poster'].'" ') or error('Unable to fetch category/forum list', __FILE__, __LINE__, $db->error()); Anyone know any ideas on how to make it's only 1 Query or maybe im doing something totally wrong?? please help thx..
  16. i have a mod that it put's a image next to a users name in the viewforum.php (im using punbb btw) but nonethless this is simple php/mysql that fails me: //If there's a last poster $result4 = $db->query('SELECT imgaward FROM users WHERE username="'.($cur_topic['last_poster']).'" ') or error('Unable to fetch category/forum list', __FILE__, __LINE__, $db->error()); $post_user = $db->fetch_assoc($result4); // Image Award Mod Block Start //figure out the size of the award (Name of award should be in teh form: Test_Award_100x20.png ... where png is format, 100x20 is dimensions and Test_Award is name of award (seen in admin interface) $lol23=$post_user['imgaward']; if ($post_user['imgaward'] == "") { $lol123 = ""; } else { $lol123 = "<img src='img/stars/$lol23'>"; } So im selecting imgaward where username=lastpost.. bla bla. That is not good tho, because then when i do that, I have like 20 topics in 1 forum and it just runs 20 freaking query's and checks every user and crap, how is this possible so i can get information from the topics table or something so it doesnt have 100queries run each time u refresh your viewforum page, example: Isn't there a way I can run that query just once and put my variable $lol123 next to the username so it works?? ~~~~_~_~_~_~_~ Thanks, if u got msn mine is nick445617@Hotmail.com please add me or post yours.. i really need im offering ftp access and everything!! Thanks..1 XD
  17. if ($cur_post['group_id'] == '1') $user_info[] = '<br>Group'.': Admin'; else $user_info[] = '<br>Group'.': Members'; but i want to say IF ($cur_post['group_id'] == '2') then display something too? How do i do that
  18. http://www.smarty.net/ I'm not a big fan, but to each their own (I prefer a different template engine). Smarty's powerful once you learn the syntax. I'd rather stick with just php, lol
  19. Smarty? Im not trying to be mean ahah sorry
  20. Using this $rowbg = $rowbg == 'ce' ? 'ce bc1' : 'ce'; or using this: $color_one = 'ce bc1'; $color_two = 'ce'; static $i = 0; $color = ($i % 2) ? $color_one : $color_two; $i++; for Alternating colors? ^^ ?
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.