Jump to content

Monkuar

Members
  • Posts

    987
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by Monkuar

  1. function ForumRow($info, $subinfo="") { global $ibforums; $color_one = 'ce bc1'; $color_two = 'ce'; static $i = 0; $color = ($i % 2) ? $color_one : $color_two; $i++; if ($info['name'] == "Board Announcements") { $test = 'hey'; } if ($info['name'] == "Donate to 24-7PK Realm") { $image_icon = "<img src='donors/big_star.gif' />"; } elseif ($info['name'] == "Import Request/Support Section") { $image_icon = "<img src='images/imports.png' />"; } elseif ($info['name'] == "How to Install 24-7PK") { $image_icon = "<img src='images/connect_arrow.gif' />"; } elseif ($info['name'] == "Trading Grounds") { $image_icon = "<img src='gold.png' />"; } else { $image_icon = $info['img_new_post']; } return <<<EOF <tr class="$color"> <td>$image_icon</td> <td align="left"><b><a href="index.php?showforum={$info['id']}" title="{$info['description']}">{$info['name']}</b></a>{$subinfo} {$info['moderator']}</td> <td nowrap><span class="desc">Topics:</span> {$info['topics']}<br/><span class="desc">Posts:</span> {$info['posts']}</td> <td align="left" nowrap class="lc"><span class="desc">{$info['last_post']}</span><br/>» {$info['last_topic']}<br>By {$info['last_poster']}</td> </tr> <tr> EOF; } I want to put a if function so that it does, if user [ cookie value = 0 ] display that function but if the user cookie changes it does else function witch will be to show; function ForumRow($info, $subinfo="") { global $ibforums; $color_one = 'ce bc1'; $color_two = 'ce'; static $i = 0; $color = ($i % 2) ? $color_one : $color_two; $i++; if ($info['name'] == "Board Announcements") { $test = 'hey'; } if ($info['name'] == "Donate to 24-7PK Realm") { $image_icon = "<img src='donors/big_star.gif' />"; } elseif ($info['name'] == "Import Request/Support Section") { $image_icon = "<img src='images/imports.png' />"; } elseif ($info['name'] == "How to Install 24-7PK") { $image_icon = "<img src='images/connect_arrow.gif' />"; } elseif ($info['name'] == "Trading Grounds") { $image_icon = "<img src='gold.png' />"; } else { $image_icon = $info['img_new_post']; } return <<<EOF <tr class="$color"> <td>$image_icon</td> <td align="left"><b><a href="index.php?showforum={$info['id']}" title="{$info['description']}">{$info['name']}</b></a> {$info['moderator']}</td> <td nowrap><span class="desc">Topics:</span> {$info['topics']}<br/><span class="desc">Posts:</span> {$info['posts']}</td> <td align="left" nowrap class="lc"><span class="desc">{$info['last_post']}</span><br/>» {$info['last_topic']}<br>By {$info['last_poster']}</td> </tr> <tr> EOF; } [HENCE I removed {$subinfo}] in second code so then they could hide subforums if they want and i can store data in a cookie ? lol
  2. Bump lol been 3rd day!
  3. 5$.. VIA PAypal if I get it to work
  4. I would love example of this code if u can post it below mine sir, please.? If u have aol or msn can add me for more help too? Thanks sir!
  5. Im going to school But I gota bump this
  6. Ok here's the deal. My forum shows subforums on each category if there any, here is the code for that: ///------------------------------- // Get The Subforums //------------------------------- $querysub = $DB->query("SELECT name, id, read_perms FROM ibf_forums WHERE parent_id = '{$forum_data['id']}' ORDER BY ibf_forums.position"); if($DB->get_num_rows($querysub) > 0) { $subinfo = "<span class=desc><br>Subforums: "; while($subin = $DB->fetch_row($querysub)) { if ( $subin['read_perms'] != '*' ) { if ( ! preg_match( "/(^|,)".$ibforums->member['mgroup']."(,|$)/", $subin['read_perms'] ) ) { $subinfo .= ""; } else if ( preg_match( "/(^|,)".$ibforums->member['mgroup']."(,|$)/", $subin['read_perms'] ) ) { $subinfo .= "<a href='{$ibforums->base_url}showforum={$subin['id']}'>{$subin['name']}</a>, "; } } else if ( $subin['read_perms'] == '*' ) { $subinfo .= "<span class=desc><a href='index.php?showforum={$subin['id']}'>{$subin['name']}</a></span> - "; } } $subinfo = substr ($subinfo, 0, -2); } Ok now, I want a user to beable to switch on and off by clicking 1 link to show those subforums and hide those subforums: kinda like this picture: Ok so your saying that it's a different question and im asking for help on a forum? Wrong I have the link and the functions to use the link here: In my Login.php there's this thing I added. case '08': $this->showhidesubforums(); break; I did that so then When people click: forums/index.php?act=Login&CODE=08 It reads off this function showhidesubforums(): function showhidesubforums() { global $ibforums, $DB, $std, $_COOKIE; put my code in this spot so i can show/hide subforums $std->boink_it($ibforums->base_url); exit(); } Ok please please I am willing to stay with u and get help from u and obsorb your knowledge in.. but I need ur help (im french srry for language) But yea, I need to put in a case switch php to show/hide the subforums code way above or what? Please please guys, Help
  7. well it's better then nothing bro... if they wanted to spam something they would have less action of doing it if they had to delete cookies everytime right ? ya lol
  8. I know.. but the basics of deleting a cookie and re doing it again again takes time and it's fine.. holy cow man, lol Ok Gevans Is that all i got? form_submit is the name? wat about the else function and if? lol srry im really noob but ur helping me
  9. Thanks for your post.. I dont understand any of that.. omg
  10. Make it so the user can only use it once every x minutes or twice every 5minutes or vice versa.. i looked on google for tutorials but i cant find anything and i got no clue it's out of my boundries of knowledge care to help me? and it stores in the users cookie.. [i dont care if people can delete cookie] most wont and kinda need it to be stored in cookie.
  11. Thank u
  12. I Keep getting Division by zero when i visit my Store in my forums.. here's the code and error line: ERROR: Warning: Division by zero in C:\xampp\htdocs\forums\sources\functions.php on line 1005 Warning: Division by zero in C:\xampp\htdocs\forums\sources\functions.php on line 1007 CODE LINES: if ( ($data['TOTAL_POSS'] % $data['PER_PAGE']) == 0 ) { $work['pages'] = $data['TOTAL_POSS'] / $data['PER_PAGE']; }
  13. Ok well I can do it by database too any way how? your post's kinda didn't help em
  14. <?php require_once "ipbsdk_class.inc.php"; $SDK =& new IPBSDK(); $message = $_POST['message']; $title = $_POST['title']; $username = $_POST['username']; $SDK->write_pm ("$username", "$title", "$message"); echo "$username $title $message"; ?> Ok Now since I got that to work.. I want to beable to make validation functions only a user can send a message once every 5minutes? Something like that please, thanks php! I know need to add a if function.. but can i add it and store it in a user cookie so they can only use this once every 1-5minutes or whatever i can edit xx minutes. thanks!
  15. i did $message = $_POST['message']; nice php is awesome, topic solved thanks bro <3
  16. <?php require_once "ipbsdk_class.inc.php"; $SDK =& new IPBSDK(); $SDK->write_pm ("1", "Hello!", "$message"); ?> That's my form.php and this is my html: <form method="post" action="form.php"> Email: <input name="email" type="text" /><br /> Message:<br /> <textarea name="message" rows="15" cols="40"> </textarea><br /> <input type="submit" /> </form> And when i do submit it has no errors but it doesnt send me the PM.. but if take out $message and put "hey biatch" it sends pm what's wrongg lol
  17. I added a s/s no the skd -> write_pm just makes so it so i can send pm with that simple line i guess lol
  18. <?php require_once "ipbsdk_class.inc.php"; $SDK =& new IPBSDK(); $message = $_REQUEST['email'] ; $title = $_REQUEST['title'] ; $SDK->write_pm ("1", "$title", "Hello! This is a test message sent to user id 1"); ?> that's my form.php and this is my html: <form method="post" action="form.php"> Email: <input name="email" type="text" /><br /> Message:<br /> <textarea name="title" rows="15" cols="40"> </textarea><br /> <input type="submit" /> </form> Is this right? because for some reason it's not working help ? It just blanks page and it's not send
  19. WOW LOL I Copied and pasted that from a tutorial off google not my fualt but I still laughed haha funny thx
  20. I put this in my <?php tags and i load up.. $_POST['name'] : "John" $_POST['email'] : "[email protected]" $_POST['mesg'] : "Hello, my nam is John!" $_POST['submitForm'] : "Send" and i get a parse error? are u kidding me im trying to do this form and this is what happens? wtf Parse error: parse error in C:\xampp\htdocs\forums\form.php on line 4
  21. Im confused if i can put that in form.php then how would i get variables form a form.php to get used in my forums.php lo so that they correspond..
  22. Thanks for all the stuff you guys said too bad I dont know how to start anything.. I just need a basic form.. I would love to use ajax any help? I dont know anything about ajax nonetheless I know a little about php.. WOuld it work if i put that code in form.php and used it as a action = form.php in a form would it still work? with my defined variables??
  23. Thanks for viewing. First, I have this funtion I need to run (I use it on my forum it's a mod) $SDK->write_pm ("1", "Hello!", "Hello! This is a test message sent to user id 1"); And whenever I put that between <?Php codes on my forum (Each Refresh it runs) it runs and send's a Message (PM) To the user id 1 and title then message.. But the problem is I'm making it so users can send a Pm to somone while viewing a topic. sO Do I save that into a form.php then make a form and put action = form.php and fill out variables or something like that? If your kind can u tell me how. Thanks for reading...
  24. im not requesting anything.. this is php help isnt it? looks like no help for me
×
×
  • 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.