Monkuar
Members-
Posts
987 -
Joined
-
Last visited
-
Days Won
1
Everything posted by Monkuar
-
else if ($cur_topic['icon_topic'] == '2') { $icon_topic = '<font color=red>'; $subject = '<font color="red">' . $subject . '</font>'; } and it just wont make it turn bold on my topic title am i doing something wrong? 2 is value of a input type text box of a using checking if they want there topic title red.. I can use <b> and <i> and it works just not font color weird eH?
-
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..
-
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 [email protected] please add me or post yours.. i really need im offering ftp access and everything!! Thanks..1 XD
-
thank u sir alot.. <3
-
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
-
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
-
Smarty? Im not trying to be mean ahah sorry
-
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? ^^ ?
-
i use this query $result4 = $db->query('SELECT imgaward FROM users WHERE username="'.($cur_topic['poster']).'" ') or error('Unable to fetch category/forum list', __FILE__, __LINE__, $db->error()); and i need to change "'.($cur_topic['poster']).'" or w/e to something that switches on a if statement possible? This way i dont have to have 3 query's runned per page like $result4 = $db->query('SELECT imgaward FROM users WHERE username="'.($cur_topic['poster']).'" ') or error('Unable to fetch category/forum list', __FILE__, __LINE__, $db->error()); $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()); and so on lol so i can save some bandwidth
-
Can u explain this script in real life to me? THanks..
Monkuar replied to Monkuar's topic in Javascript Help
That's some specific code if u ask me, lol -
Can u explain this script in real life to me? THanks..
Monkuar replied to Monkuar's topic in Javascript Help
plz lol -
1:0,1,0;7:0,2,0;8:0,3,0;9:0,4,0;5:0,5,0;3:1,1,0;4:1,2,0;2:2,1,0;6:3,1,1
-
function getObj(o){return gi(o);} function uS() { var v, i; if(lV[cId][3]) lV[cId][2] = (a.secH.checked?1:0); if(lV[cId][4]) lV[cId][0] = a.secL.selectedIndex; if(lV[cId][5]) { v = parseInt(a.secO.value); if(v!=NaN && v) lV[cId][1] = v; } v=""; for(i in lV) v+=(v?";":"")+i+":"+lV[i][0]+","+lV[i][1]+","+lV[i][2]; a.v.value = v; gi("aS").style.display="block"; cS(); } function cS() { if(eSo) eSo.parentNode.removeChild(eSo); eSo = 0; } var eSo = 0, cId=0; function eS(obj, id) { var i,c = obj.parentNode; var fs = c.parentNode; cS(); cId = id; eSo = document.createElement("div"); eSo.className="p3"; var h = ""; if(lV[id][3]) h += "<input name=\"secH\" type=checkbox"+(lV[id][2]?" checked":"")+"> Hide This Section<br>"; if(lV[id][4]) { h += "Display Location: <select name=\"secL\">"; for(i=0;i<3;i++) h += "<option"+(lV[id][0]==i?" selected":"")+">"+locs[i]+"</option>"; h += "</select><br>"; } if(lV[id][5]) { h += "Display Order: <input name=\"secO\" type=text value=\""+lV[id][1]+"\" size=2><br>"; } if(h) { h += "<div class=\"ab\"><a href=\"javascript:uS()\">Update Settings</a></div>"; eSo.innerHTML = h; } if(c.nextSibling) { fs.insertBefore(eSo, c.nextSibling); } else { fs.appendChild(eSo); } } Now whenever I save my V Value POST.. it only shows 3 freaking 1:0,0,0 arrays it needs to show 6 each one ? PLZ HELP
-
Hi thanks! it works on text but if i have a variable like this itdoesnt work $test = "{$info['v']}"; $test = preg_replace('/,\d:/',']$0[',$test); $test = preg_replace('/{\d:/','$0[',$test); $test = str_replace('}', '])', $test); echo $test; ^^ ?
-
I am in need of php that put's [ ] at the beggining and end of each variable when javascript spit's it out. So for example i need: 1:0,1,0;7:0,2,0;8:0,3,0;9:0,4,0;3:1,1,0;4:1,2,1;2:2,1,0;6:2,2,0;5:2,3,0 This is what it spit's out after i Send the Post data, and show it on my profile.. But i need to have the brackets like: 1:[0,1,0,0,0,0],7:[0,2,0,1,1,1],8:[0,3,0,1,1,1],9:[0,4,0,1,1,1],3:[1,1,0,1,0,1],4:[1,2,1,1,0,1],2:[2,1,0,0,0,0],6:[2,2,0,1,1,1],5:[2,3,0,1,1,1] I hope u understand guys, Thanks..
-
yea, function getObj(o){return gi(o);} function uS() { var v, i; if(lV[cId][3]) lV[cId][2] = (a.secH.checked?1:0); if(lV[cId][4]) lV[cId][0] = a.secL.selectedIndex; if(lV[cId][5]) { v = parseInt(a.secO.value); if(v!=NaN && v) lV[cId][1] = v; } v=""; for(i in lV) v+=(v?";":"")+i+":"+lV[i][0]+","+lV[i][1]+","+lV[i][2]; a.v.value = v; gi("aS").style.display="block"; cS(); } then it does this for my POST FORM: (on whatever settings it is) 1%3A0%2C1%2C0%3B7%3A0%2C2%2C0%3B8%3A0%2C3%2C0%3B9%3A0%2C4%2C0%3B3%3A1%2C1%2C0%3B4%3A1%2C2%2C1%3B2%3A2%2C1%2C0%3B6%3A2%2C2%2C0%3B5%3A2%2C3%2C0 MY WHOLE JAVASCRIPT FILE FOR IT IS: function getObj(o){return gi(o);} function uS() { var v, i; if(lV[cId][3]) lV[cId][2] = (a.secH.checked?1:0); if(lV[cId][4]) lV[cId][0] = a.secL.selectedIndex; if(lV[cId][5]) { v = parseInt(a.secO.value); if(v!=NaN && v) lV[cId][1] = v; } v=""; for(i in lV) v+=(v?";":"")+i+":"+lV[i][0]+","+lV[i][1]+","+lV[i][2]; a.v.value = v; gi("aS").style.display="block"; cS(); } function cS() { if(eSo) eSo.parentNode.removeChild(eSo); eSo = 0; } var eSo = 0, cId=0; function eS(obj, id) { var i,c = obj.parentNode; var fs = c.parentNode; cS(); cId = id; eSo = document.createElement("div"); eSo.className="p3"; var h = ""; if(lV[id][3]) h += "<input name=\"secH\" type=checkbox"+(lV[id][2]?" checked":"")+"> Hide This Section<br>"; if(lV[id][4]) { h += "Display Location: <select name=\"secL\">"; for(i=0;i<3;i++) h += "<option"+(lV[id][0]==i?" selected":"")+">"+locs[i]+"</option>"; h += "</select><br>"; } if(lV[id][5]) { h += "Display Order: <input name=\"secO\" type=text value=\""+lV[id][1]+"\" size=2><br>"; } if(h) { h += "<div class=\"ab\"><a href=\"javascript:uS()\">Update Settings</a></div>"; eSo.innerHTML = h; } if(c.nextSibling) { fs.insertBefore(eSo, c.nextSibling); } else { fs.appendChild(eSo); } } and maybe function gi(i){var itm=null;if(document.getElementById){itm=document.getElementById(i);}else if(document.all){itm=document.all[i];}else if(document.layers){itm=document.layers[i];}return itm;}
-
I heard this has something to do with ereg replace so i can put [ after X amount of numbers and a , for the output! Help guys i will pay $..
-
My variable: lV={1:0,1,0,0,0,0,7:0,2,0,1,1,1,8:0,3,0,1,1,1,9:0,4,0,1,1,1,3:1,1,0,1,0,1,4:1,2,1,1,0,1,2:2,1,0,0,0,0,6:2,2,0,1,1,1,5:2,3,0,1,1,1} This is what is spit's out when im pulling it from MYSQL not mysql i mean post data. 1%3A0%2C1%2C0%3B7%3A0%2C2%2C0%3B8%3A0%2C3%2C0%3B9%3A0%2C4%2C0%3B3%3A1%2C1%2C0%3B4%3A1%2C2%2C1%3B2%3A2%2C1%2C0%3B6%3A2%2C2%2C0%3B5%3A2%2C3%2C0 How do i add bracket's so it's like this: lV={1:[0,1,0,0,0,0],7:[0,2,0,1,1,1],8:[0,3,0,1,1,1],9:[0,4,0,1,1,1],3:[1,1,0,1,0,1],4:[1,2,1,1,0,1],2:[2,1,0,0,0,0],6:[2,2,0,1,1,1],5:[2,3,0,1,1,1]} Thanks notice the ['s... How do i add that in my code so it spit's it out with [ and after ] each 6 numberS?
-
I have a field name, secH.. when a user submit it's My MYSQL Update query is: 'lastupdate' => $updatetime, 'secH' => $ibforums->input['secH'], ) ); $DB->query("UPDATE ibf_members SET $db_string WHERE id='{$this->member['id']}'"); $this->lib->do_signature_2(); I need, it to update so it's like this order: 1,2,1,1,0,1[/quote] so then that user with field name sech will be updated with the order of [code]1,2,1,1,0,1 but then if a user unchecks the check box and saves how do i display it back to the order of 0 ?
-
OH DANG!! I Got it!! monk="oh Hi", Now it works! thanks,!! PHPFREAKS Lov u guys aalalal
-
lol in my javascript i have var monk=OHHI; this is in a different .php then when i called it out from javascript using +monk+ i get undefined? but if i change monk=1; then it shows 1, why cant i use texT?
-
only error i get is in Internet Exploror, lmao..
Monkuar replied to Monkuar's topic in Javascript Help
Bump lol PLEASE IE IS DUMB THIS WORKS ON CHROME,FIREFOX,OPERA EVERYTHING BESIDES IE!?!? lolollol -
Wow thanks abunch u guys are smart!!
-
mysql_query("UPDATE ibf_members set signature_2 = '".mysql_real_escape_string($_POST['newname'])."' WHERE id = '{$info['id']}'"); what if i want to update my field name NOTES and more? How would i add them in there lol im updating signature_2 right now? i want to update NOTES field too? possible ?!?!