Jump to content

MadTechie

Staff Alumni
  • Posts

    9,409
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by MadTechie

  1. i assume its at the top of the page!
  2. the problem is related to $image1file, thus i assume its not copying.. without more debugging info its almost impossible to point to the problem
  3. try this, for Alternating Row Colors.. <?php while($row = mysql_fetch_array( $result )) { $color = ($color="#FF0000")?"#006600":"#FF0000"; //ADDED // Print out the contents of each row into a table echo "<tr bgcolor='$color'><td>"; //UPDATED echo $row['county']; echo "</td><td>"; echo $row['city']; echo "</td><td>"; echo $row['number']; echo "</td><td>"; echo $row['street']; echo "</td><td>"; echo $row['sfx']; echo "</td><td>"; echo $row['coordinates']; echo "</td></tr>"; } ?>
  4. i think i know what you mean now.. the problem isn't going to getting the image but setting the XY-coordinate outline code only <?php function smillies($text) { $smilies = array( "" => "smile1.gif", "" => "wink.gif", "" => "grin.gif", "" => "tongue.gif", "" => "sad.gif", ":'(" => "cry.gif", ":|" => "noexpression.gif", ":-/" => "confused.gif", ":-O" => "ohmy.gif", "" => "cool1.gif", "O:-" => "angel.gif", "" => "sleep.gif", ":grrr:" => "angry.gif", ":smile:" => "smile2.gif", "" => "laugh.gif", ":cool:" => "cool2.gif", ":fun:" => "fun.gif", ":thumbsup:" => "thumbsup.gif", ":thumbsdown:" => "thumbsdown.gif", ":blush:" => "blush.gif" ); $board = imagecreatefrompng("board.png"); //text for image, problem is find the XY foreach($smilies as $K => $V) { $newtext = str_replace($K, "(15px gap!)", $text); //Get the XY //pass the XY to here $Smile= imagecreatefrompng("$V"); imagecopymerge($board, $Smile, X, Y, 0, 0, 15, 15, 100);//15x15 smileiy size } //etc ?>
  5. yes can shoot in the dark until the cows come home.. did you try echoing them ?
  6. well i can explain the basic's of HTML and then suggest you look at the other thread.. or just ask did you read the code in the other thread!? as for a GD2 Chat room.. your going to have a ton of problem... why re-create the wheel! EDIT: just wondering .. why cant you use imagecopymerge().. ? i assume your using it already for a chat room image!
  7. well style is badly formatted <input name="title" type="text" class="submit" style=width: size="60%"; > to <input name="title" type="text" class="submit" style="width: size='60%';"> try echoing them
  8. I don't understand what your asking.. this may fix the email problem.. $mailheaders .= "Content-type: text/plain; charset=iso-8859-1\r\n"; to $mailheaders .= "Content-type: text/plain; charset=utf-8\r\n";
  9. Same as BBCode really searching the forum helps http://www.phpfreaks.com/forums/index.php/topic,165885.0.html
  10. well the script posted is incompleate but as you say it work.. i would guess the file isn't uploading.. check file permissions etc check this part works.. move_uploaded_file($_FILES['image1']['tmp_name'], $image1file);
  11. if you are using the array in the function then you must put the array in the function... $body = ""; function bb2html($text) { $bbcode = array("<", ">", "[list]", "[*]", "[/list]", "[img=", "]", "[b]", "[/b]", "[u]", "[/u]", "[i]", "[/i]", '[color="', "[/color]", "[size=\"", "[/size]", '[url]', "[/url]", "[mail=\"", "[/mail]", "[quote]", "[/quote]", '\\"]'); $htmlcode = array("<", ">", "<ul>", "<li>", "</ul>", "<img src=\"", "\">", "<b>", "</b>", "<u>", "</u>", "<i>", "</i>", "<span style=\"color:", "</span>", "<span style=\"font-size:", "</span>", '<a href="', "</a>", "<a href=\"mailto:", "</a>", "<table width=100% bgcolor=lightgray><tr><td bgcolor=white>", "</td></tr></table>", '">'); $newtext = str_replace($bbcode, $htmlcode, $text); //$newtext = nl2br($newtext);//second pass $smilies = array( "" => "smile1.gif", "" => "wink.gif", "" => "grin.gif", "" => "tongue.gif", "" => "sad.gif", ":'(" => "cry.gif", ":|" => "noexpression.gif", ":-/" => "confused.gif", ":-O" => "ohmy.gif", "" => "cool1.gif", "O:-" => "angel.gif", "" => "sleep.gif", ":grrr:" => "angry.gif", ":smile:" => "smile2.gif", "" => "laugh.gif", ":cool:" => "cool2.gif", ":fun:" => "fun.gif", ":thumbsup:" => "thumbsup.gif", ":thumbsdown:" => "thumbsdown.gif", ":blush:" => "blush.gif", ); but personally i would use my first suggestion! $smiliesK = array_keys($smilies); $newtext = str_replace($smiliesK, "<img src='images/smilies/$smilies'>", $text); return $newtext; } echo bb2html($body);
  12. Just create another function ie <?php function smillies($text) { $smilies = array( "" => "smile1.gif", "" => "wink.gif", "" => "grin.gif", "" => "tongue.gif", "" => "sad.gif", ":'(" => "cry.gif", ":|" => "noexpression.gif", ":-/" => "confused.gif", ":-O" => "ohmy.gif", "" => "cool1.gif", "O:-" => "angel.gif", "" => "sleep.gif", ":grrr:" => "angry.gif", ":smile:" => "smile2.gif", "" => "laugh.gif", ":cool:" => "cool2.gif", ":fun:" => "fun.gif", ":thumbsup:" => "thumbsup.gif", ":thumbsdown:" => "thumbsdown.gif", ":blush:" => "blush.gif" ); $smiliesK = array_keys($smilies); $newtext = str_replace($smiliesK, "<img src='$smilies'>", $text); //may need to add image path return $newtext; } ?> **untested use just like the bbcode
  13. never replie on HTTP_REFERER, personally i try to use it as little as possible..
  14. 20 second google http://www.trap17.com/index.php/flatfile-user-login-signup_t40598.html
  15. Opps miss-read.. it would be easier if index.html was index.php, is that possible ?
  16. i used <?php $a = 549755805511; $b = 004294967296; $a = base_convert($a, 10, 2); $b = base_convert($b, 10, 2); $c = base_convert(($a & $b), 2, 10); var_dump($c); ?>
  17. <?php $Value = ""; if(isset($_POST['submit'])) { $Value = $_POST['submit']; } switch ($Value) { case 'Button1': print 'Button1 was clicked.'; break; case 'Button2': print 'Button2 was clicked.'; break; case 'Button3': print 'Button3 was clicked.'; break; default: print ' <form method="POST"> <input type="submit" name="submit" value="Button1" /> <input type="submit" name="submit" value="Button2" /> <input type="submit" name="submit" value="Button3" /> </form>'; break; } ?>
  18. switch ($Value) { switch ($_GET['submit']) { should be just switch ($Value) {
  19. Get was not set $Value = ""; if(isset($_GET['submit'])) { $Value = $_GET['submit']; } switch ($Value) {
  20. well first off 0x7FFFFFDF47= 549755805511 you say on one of your servers you get 0 but i don't see how your get any other result i assume you was expecting 34 !
  21. change $font = 'arial.ttf'; to $font = dirname(__FILE__).'/arial.ttf';
  22. a bit of a shot in the dark here, are magic_quotes on ? try this if (!get_magic_quotes_gpc()) { $lastname = addslashes($_POST['lastname']); } else { $lastname = $_POST['lastname']; } but to resolve the problem
  23. Yep.. admin CP, (admin tab) SQL toolbox then at the bottom Run a Query Manual Query (Advanced Users Only) But you can mass move from the forum as well, (tick the top most box) then action move
  24. mysql_query Okay.. that table is from IPB.. so you can use the SQL toolbox (i think its called that) to execute that statement.. But i do think you can also do a mass move form the admin control panel as well
  25. you mean like this UPDATE ibf_topics SET forum_id=3 WHERE forum_id=369 WARNING BACKUP FIRST SQL DUMP
×
×
  • 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.