Jump to content

liam1412

Members
  • Posts

    170
  • Joined

  • Last visited

    Never

Everything posted by liam1412

  1. Me again mate. Im sorry to be a complete pain and I know you have already gone above and beyond but i can't seem to get the add tag bit to work.  The image comes up but when I click it i doesn't put anything in the text area. Cheers
  2. Can anyone tell me wher the two  breaks are coming from in the following code. I want text along the top of the a table and it seems there are 2 or 3 breaks above the box so the text is hovering a few lines above it. Ta [code]<html> <head> <title>KlubDeutsch</title> <STYLE type="text/css"> h1 {font-family:"trebuchet ms";   font-size:14px;      color: "#ffffff"} p {font-family:"trebuchet ms"; font-size:12px; color: "#ffffff"} p.lastpost  {font-family:"trebuchet ms"; font-size:11px; color: "#b5b5b5"} p.legal {font-family:"trebuchet ms"; font-size:9px; color: "#b5b5b5"} p.error {font-family:"trebuchet ms"; font-size:12px; color: "#ff0000"} p.header {font-family:"trebuchet ms"; font-size:16px; font-weight:bold; color: "#ffffff"} .header2 {font-family:"trebuchet ms"; font-size:14px; font-weight:bold; color: "#b5b5b5"} .grey {font-family:"trebuchet ms"; font-size:12px; color: "#b5b5b5"} a {font-family:"trebuchet ms"; font-size:12px; color:"#b5b5b5"} a:hover {color:"#ff0000"} img {border-color:"#383838"} .border {border-style:solid; border-width:2px; border-color:"#383838"} .topic {font-family:"trebuchet ms"; font-size:12px; color:"#565656"; background-color:"#b5b5b5"; border-style:solid; border-width:2px; border-color:"#444444"; width:350px;} .topic_text {font-family:"trebuchet ms"; color:"#565656"; font-size:12px; background-color:"#b5b5b5"; border-style:solid; border-width:2px; border-color:"#444444"; width:500px} </STYLE> <script type="text/javascript" language="javascript"> function chgImg(imgField,imgState) { document[imgField].src = "images/" + imgField + imgState + ".jpg" } </script> <script type="text/javascript"> function AddEmo(tag) { var emo=document.forms["form"].elements["text"]; if (document.selection) { emo.focus(); var sel = document.selection.createRange(); sel.text = tag } else if (emo.selectionStart || emo.selectionStart == '0') {    var startPos = emo.selectionStart    var endPos = emo.selectionEnd    emo.value = emo.value.substring(0, startPos)                  + tag                  + emo.value.substring(endPos, emo.value.length) } else {    emo.value += tag;  } } </script> </head> <body bgcolor="#444444"> <table align="center" width="600" cellspacing="5" cellpadding="0" border="0"> <tr>    <td colspan="6" align="center" width="600" ><img src="images/header2.jpg" width="600" height="80" alt="header" /></td> </tr> <tr>    <td width="100" align="center"><a href="index.php" onmouseover="chgImg('home','On')" onmouseout="chgImg('home','Off')"><img src="images/homeOff.jpg" width="100" border="0" name="home"></a></td>    <td width="100" align="center"><a href="my_profile.php" onmouseover="chgImg('profile','On')" onmouseout="chgImg('profile','Off')"><img src="images/profileOff.jpg" width="100" border="0" name="profile"></a></td>    <td width="100" align="center"><a href="news.html" onmouseover="chgImg('news','On')" onmouseout="chgImg('news','Off')"><img src="images/newsOff.jpg" width="100" border="0" name="news"></a></td>    <td width="100" align="center"><a href="stats.html" onmouseover="chgImg('stats','On')" onmouseout="chgImg('stats','Off')"><img src="images/statsOff.jpg" width="100" border="0" name="stats"></a></td>     <td width="100" align="center"><a href="gallery.html" onmouseover="chgImg('gallery','On')" onmouseout="chgImg('gallery','Off')"><img src="images/galleryOff.jpg" width="100" border="0" name="gallery"></a></td>     <td width="100" align="center"><a href="forum_home.php" onmouseover="chgImg('forums','On')" onmouseout="chgImg('forums','Off')"><img src="images/forumsOff.jpg" width="100" border="0" name="forums"></a></td> </tr> </table> <?php session_start(); include 'header.html'; if(empty($_SESSION['username'])) { echo '<p class="grey" align="center">You need to be logged to add a topic. Please <a href="login.php"><b>Log In</b></a> here.  If you are not laready a member <a href="register1.php"><b>Click Here</b></a> to register.</p>'; }else{ $forum_id = $_GET['forum_id']; ?> [/code] I wnat to place a line of text along the top of this table but it is going two or three lines above the table. is there something that's adding breaks that I can't see. Am I just going blind/loopy [code] <table class="border" align="center" width="600" cellspacing="3" cellpadding="0" border="0" bgcolor="#565656"> <tr> <td rowspan="6" width="50" align="center" valign="top"><br /></td> <td class="header2" colspan="2" width="500"><br />Subject:</td> <td rowspan="6" width="50"><br /></td> </tr> <tr> <form name="form" id="form" action="add_topic_func.php?forum_id=<?php echo $forum_id;?>" method="post"> <td class="grey" colspan="2" width="500"><input class="topic" type="text" name="topic" id="topic" size="55" max length="45"></td> </tr> <tr> <td class="header2" colspan="2" width="500">Comment:</td> </tr> <tr> <td class="grey" colspan="2" width="500"><textarea class="topic_text" name="text" id="text" rows="12" cols="57"></textarea></td> <br /> <br /> </tr> <tr> <td colspan="2" width="500"> <img src="images/smilies/smile.gif" onclick="AddEmo('::smile::')">&nbsp;&nbsp; <img src="images/smilies/smirk.gif" onclick="AddEmo('::smirk::')">&nbsp;&nbsp; <img src="images/smilies/wink.gif" onclick="AddEmo('::wink::')">&nbsp;&nbsp; <img src="images/smilies/cool.gif" onclick="AddEmo('::cool::')">&nbsp;&nbsp; <img src="images/smilies/sad.gif" onclick="AddEmo('::sad::')">&nbsp;&nbsp; <img src="images/smilies/mad.gif" onclick="AddEmo('::mad::')">&nbsp;&nbsp; <img src="images/smilies/rolleyes.gif" onclick="AddEmo('::rolleyes::')">&nbsp;&nbsp; <img src="images/smilies/surprised.gif" onclick="AddEmo('::surprised::')">&nbsp;&nbsp; <img src="images/smilies/thinking.gif" onclick="AddEmo('::thinking::')">&nbsp;&nbsp; <img src="images/smilies/tongue.gif" onclick="AddEmo('::tongue::')">&nbsp;&nbsp; </td> </tr> <tr> <td colspan="2" width="500"><input type="reset">&nbsp;<input type="submit" value="Add Topic"><br /><br /></td> </form> </tr> </table> <?php }; include 'footer.php'; ?> Sorry about all the code I just thought maybe it's something i don't expect. thanks [/code]
  3. Didn't think it woudl be that simple. Thout youwould have to define columns and rows as you do when formatting them inline.
  4. Hi People. here is my CSS code for my input and text area tags.  Can anyone tell me how I can define the width of the input and the width and height of the text area. [code] textarea               {font-family:"trebuchet ms"; font-size:12px; background-color:"#b5b5b5";} input {font-family:"trebuchet ms"; font-size:12px; background-color:"#b5b5b5";}[/code] Thanks
  5. Legendary. Again thanks a lot for your help.  I suppose I really shoul dlearn Javascript but I just can't seem to grasp it at all. it doesn't make any sense to me at all.  Cheers again and if there is anything I can do in return just let me know.. Liam
  6. Its me again. I know im probably really pushing my luck here but have you any idea if this function can be adapted to wrap around  tags ie place [b] [/b] in fromt of and at the end of highlighted text. If you can point me in the direction of where to look for this i will try and work it out. Thanks
  7. No really I think your a genious. Cheers for taking so much time out to help me. All working now. Cheers again!!!!!!
  8. I still can't get thi sto work.  Can you show me whic bits I need to change and exactly how it shoudl be written. I am using the following [code]<script type="text/javascript"> function insertAtCursor(myField, myValue) {   //IE support   if (document.selection) {     myField.focus();     sel = document.selection.createRange();     sel.text = myValue;   }   //MOZILLA/NETSCAPE support   else if (myField.selectionStart || myField.selectionStart == ‘0′) {     var startPos = myField.selectionStart;     var endPos = myField.selectionEnd;     myField.value = myField.value.substring(0, startPos)                   + myValue                   + myField.value.substring(endPos, myField.value.length);   } else {     myField.value += myValue;   } } </script>[/code] and then [code]<td width="30" bgcolor="#565656"><img src="images/smilies/smile.gif" onCLick="imagesinsertAtCursor(edit_post.html.edit_form.edit_area, ‘::smile::’");></td>[/code] Sorry I really am shocking with Javascript. PHP comes easy to me but for some reason I just can't get the grasp of Javascript.
  9. Your an absolute Geeeeeeeeeeeeenious. Cheers again Mate. ;D
  10. Okay that working now.  But it will only go at the end and not where the cursor is.  Do you know a fix for this at all or is it not possible with this method. Thanks
  11. hey, Nice one mate. That works spot on.  Cheers
  12. Thanks for your reply. This is now printing what I want - IE on click is printing ::smilie:: but just on a new page not in the text area. Any other clues.
  13. Im trying to create the clickable smilie and bb buttons that input the smily wherever the cursor is in the text box. I have been given this code and it just takes me to the IE cannot find this page. Please can someone tell me what im doing wrong. Its trying to link to a page on my local host named [code]document.selection.createRange().text='::smilie::'[/code] But obviously that isn't there as the text box is on the same page. [code] <td width="30" bgcolor="#565656"><a href="document.selection.createRange().text='::smilie::'"><img src="images/smilies/cool.gif"></a></td> [/code] ??? ??? ??? Thanks
  14. Does anyone know how to code a "remember me" button. Is this PHP/JS or something else. Ta
  15. Hi I am wanting a user to be able to bring up a list of threads they have posted in and also have an indicator at the side of threads that they have posted in on the main forum screen. How would I go about this. Thanks
  16. Okay thanks for all your help.
  17. I have 3 tables forum_category forum_question - contains the topic title and text amongst other things forum_answer - contains all the replies. is there a way round it without me re doing my databases. Ta
  18. As above. Just want a move function so I can change the forum that a thread is in but i want to leave the topic title in the forum I have moved it from so the OP can see that it has been moved. Any Ideas???
  19. I have been asked to design a site for a company. The logo they use is a copyrighted image (by someone else) of a comic book caracter.  I have asked about the permission they have to use this and he says he isn't bothered. Am I as the designer responsible for the copyright infringment or is it him as the site owner. Should I do the site or am I at risk from lawsuits. Thanks
  20. See I knew it would be that easy. Just couldn't find it anywhere. Feel dumbass now. Lol
  21. Hi People. This is really simple but I am quite new to PHP so go easy. Can anyone tell me how to pass 2 variables at once in a query string????????? view_topic.php?topic_id=$topic_id forum_id=$forum_id they become one long variable. what do I need to place between them. Thanks Liam
  22. Just wondering has anyone seen or know wher there is an auction tutorial before. Or can anyone give ma brief run down of the DB and method etc so I at least know where to start. Ta
  23. I figured this from this project but it's too late to start again.  I will learn from my mistakes!!!!  I find this is my best way to learn tho.  I just jump in and figure out what I did wrong. Its worked for everything I have learned.  Seems silly i know but we all have our ways eh!!! ha ha
  24. [quote]You could do it with another flag or attribute. If it is set to "locked," you know not to allow anyone but admin and mods to write to it.[/quote] It's all so simple when you tell say it. I just can't seem to think of a way at the time. Ta
  25. Cheers Obsidian.  Thought it would be a lot more complicated than that. Now just one more thing.  How do I lock a topic so it can still be read but not ba added too.  in fact do you just want to write my script. ha ha
×
×
  • 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.