Jump to content

jscrinc

New Members
  • Posts

    7
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

jscrinc's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. it worked also anyone can use the code for the comment system if you want i know its a bit messy but just for helps
  2. I need some help with my commenting system. at the moment the code is like this: <div id="pagepannel"> <div id="ptop_small">Comments</div> <div id="pbottom_small"> <p> <?php // if ($allow_comments == "no") { ?> </p> <p>No Posting comments here!!!</p> <p> </p> <p> </p> <p> <?php } else ?> </p> <p> <?php $sql = "SELECT comment_id, blog_id, posted_by, comment, stamp, email, type FROM jscrgaming_newscomments WHERE blog_id='$blog_id' ORDER BY comment_id DESC"; $result = mysql_query($sql) or die('Error : ' . mysql_error()); while(list($comment_id, $blog_id_co, $username, $comment, $stamp, $email, $type) = mysql_fetch_array($result, MYSQL_NUM)) { if ($type == 'user'){ ?> </p> <table width="95%" border="0" cellpadding="0" cellspacing="0" class="full_border"> <tr> <td width="75" id="avatar"></td> <td><span class="capitalize"><a href="userinfo.php?user=<? echo $username ?>"><strong><? echo $username ?></strong></a></span><strong> posted</strong>: <? echo stripslashes($comment) ?></td> </tr> <tr> <td colspan="2" bgcolor="#CAE4FF" class="date"><? echo $stamp ?> </td> </tr> </table> <p> </p> <p> <? } else{ ?> </p> <table width="95%" border="0" cellpadding="0" cellspacing="0" class="full_border"> <tr> <td><strong> <? echo $username ?>posted</strong>: <? echo stripslashes($comment) ?></td> </tr> <tr> <td bgcolor="#CAE4FF" class="smalltext"><? echo $stamp ?>:: User Was Guest</td> </tr> </table> <p> </p> <p> <? } }?> </p> <p> <?php // if ($allow_comments == "restricted") { /** * User has already logged in, so display relavent links, including * a link to the admin center if the user is an administrator. */ if($session->logged_in){?> </p> <form id="form3" name="form3" method="post" action="user/admin/blog/comment_system/user.php"> <p> </p> <table width="95%" border="0" align="center" cellspacing="2" class="full_border"> <tr> <td colspan="2">You are commenting as <?php echo $session->username;?></td> </tr> <tr> <td width="75">Message</td> <td><textarea name="co_comment" cols="30" id="textfield10"></textarea></td> </tr> <tr> <td width="75"><span class="header"> <input name="co_username" type="hidden" id="co_username" value="<?php echo $session->username;?>" /> <input name="co_blog_id" type="hidden" id="co_blog_id" value="<?php echo $blog_id ?>" /> </span></td> <td><label> <input type="submit" class="blog_button" value=" Post " /> </label></td> </tr> <tr> <td> </td> <td class="smalltext">only 200 charaters can be used</td> </tr> </table> </form> <p> </p> <p> <? } else {?> </p> <p> </p> <table width="95%" border="0" align="center" cellspacing="2" class="full_border"> <tr> <td width="75"><span class="capitalize">Name</span></td> <td><label> <input name="textfield5" type="text" disabled="disabled" id="textfield5" size="35" /> </label></td> </tr> <tr> <td width="75">Email</td> <td><input name="textfield5" type="text" disabled="disabled" id="textfield6" size="35" /></td> </tr> <tr> <td width="75">Message</td> <td><textarea name="textfield5" cols="30" disabled="disabled" id="textfield7">You need to be logged in to comment.</textarea></td> </tr> <tr> <td width="75"> </td> <td><label> <input type="button" class="blog_button" value=" Post " /> </label></td> </tr> </table> <p> </p> <p> <?php } } else { if($session->logged_in){?> </p> <form id="form2" name="form2" method="post" action="user/admin/blog/comment_system/user.php"> <p> </p> <table width="95%" border="0" align="center" cellspacing="2" class="full_border"> <tr> <td colspan="2">You are commenting as <?php echo $session->username;?></td> </tr> <tr> <td width="75">Message</td> <td><textarea name="co_comment" cols="30" id="textfield8"></textarea></td> </tr> <tr> <td width="75"><input name="co_username" type="hidden" id="co_username" value="<?php echo $session->username;?>" /> <input name="co_blog_id" type="hidden" id="co_blog_id" value="<?php echo $blog_id ?>" /></td> <td><label> <input type="submit" class="blog_button" value=" Post " /> </label></td> </tr> <tr> <td> </td> <td><span class="smalltext">only 200 charaters can be used</span></td> </tr> </table> </form> <p> </p> <p> <? } else { ?> </p> <form id="form1" name="form1" method="post" action="user/admin/blog/comment_system/guest.php"> <p> </p> <table width="95%" border="0" align="center" cellspacing="2" class="full_border"> <tr> <td width="75"><span class="capitalize">Name</span></td> <td><label> <input name="co_username" type="text" id="co_username" size="35" /> </label></td> </tr> <tr> <td width="75">Email</td> <td><input name="guest_email" type="text" id="guest_email" size="35" /></td> </tr> <tr> <td width="75">Message</td> <td><textarea name="co_comment" cols="30" id="co_comment"></textarea></td> </tr> <tr> <td width="75">Spam</td> <td> </td> </tr> <tr> <td colspan="2" align="center"><? require_once('user/captcha/recaptchalib.php'); $publickey = "6Ld_W7sSAAAAAPNTLWrUJLEClFpSSPu1d1Ry5zNR"; // you got this from the signup page echo recaptcha_get_html($publickey); ?></td> </tr> <tr> <td colspan="2" align="right"><span class="smalltext">only 200 charaters can be used</span> <input name="co_blog_id" type="hidden" id="co_blog_id" value="<?php echo $blog_id ?>" /> <input type="submit" class="blog_button" value=" Post " /></td> </tr> </table> </form> <p> </p> <p> <? } } ?> </p> <p> </p> <div></div> </div> </div> I, know its a bit messy but lets me see it and design it in Dreamweaver Any way, for the comment system for users, I want it to show their avatar as well, which is stored in the users table. How would one do this. I did think of it submitting the avatar along with the post but then it wouldnt update if the user would to change their avatars :\ Any helps???
  3. Hi I have installed a wysiwyg editor for my form and i wanted to insert an image, so i do and it works great, but when i go to submit it and call it back from the database its all wrong. Here is an example: Code before Submit: <h1>Enter your new post</h1><p>More of the example</p> <p><span><img src="http://lh4.ggpht.com/_Jq9BxxgyOnc/TAV-iAqGrJI/AAAAAAAAAA0/pVNbTVbYIuU/jscrinc.png" title="" align="right"></span><br></p> Code showing on call back: <h1>Enter your new post</h1><p>More of the example</p><p><span><img src=\"http://lh4.ggpht.com/_Jq9BxxgyOnc/TAV-iAqGrJI/AAAAAAAAAA0/pVNbTVbYIuU/jscrinc.png\" title=\"\" align=\"right\"> Image URL on call back: http://jscrgaming.co.uk/%22http://lh4.ggpht.com/_Jq9BxxgyOnc/TAV-iAqGrJI/AAAAAAAAAA0/pVNbTVbYIuU/jscrinc.png/%22.. Im wondering if its anything to do with the submitting of the form or not. Please Help James
  4. Ok, so above is an image of what I would like my users blog to look like, first off I want to make my SQL Table. So here's my question: What should My fields be, what should the data type be and how would I link it to the user table? Feild in the Uer table include:
  5. Haha how did you guess Errm I getting to understand the whole php_things, its just writing it, I mean I can look at some of it and understand what its trying to do. If you do want to help me, just e-mail us at jscr.inc @ gmail.com if you have gtalk tht would be even better or hotmail Im also on twitter xD just search jscrinc
  6. Ah cheers mrMarcus, and thumbs up to the fast reply. I will look through the tutorials tomorrow, need sleep now lol If I find it confusing, I will have to use google, and come back to the forums, I will keep checking up on it for other solutions as well, and update more on the blog system, after getting a basic one working.
  7. Ok, first off would like to say Hi, this is my first post. Now lets get to business. I Have a small system of sites, well fansites (gaming fansite btw), and now I want to do more with it. At the moment, I have a login system, where all the user can do is register, login and change there password and email. So I was think and there are a few things I want to do, is allow the user to have more interactions. So first off, I want my users to to pimp up the users page. At the moment it looks like this: I want the users to do more and other users to interact. But the mains things I will need help on are: [*]I Would like the user to choose a game, and was wondering if there was a php code out there, which will read if that game is stored in the database, and show a picture or icon for that game?? [*]A Blog-type system, Basically, I want the user to have there own blog type thing, where they would share there stories/gaming experience to the rest of the community This is all I can think of at the moment. Waiting on your help Thankyou JSCRinc
×
×
  • 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.