-
Posts
9,409 -
Joined
-
Last visited
-
Days Won
1
Everything posted by MadTechie
-
i assume its at the top of the page!
-
[SOLVED] Issue with thumbnail script. Could be server related?
MadTechie replied to Solarpitch's topic in PHP Coding Help
the problem is related to $image1file, thus i assume its not copying.. without more debugging info its almost impossible to point to the problem -
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>"; } ?>
-
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 ?>
-
yes can shoot in the dark until the cows come home.. did you try echoing them ?
-
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!
-
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
-
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";
-
Same as BBCode really searching the forum helps http://www.phpfreaks.com/forums/index.php/topic,165885.0.html
-
[SOLVED] Issue with thumbnail script. Could be server related?
MadTechie replied to Solarpitch's topic in PHP Coding Help
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); -
[SOLVED] BB Code with Smilies simple question
MadTechie replied to gtal3x's topic in PHP Coding Help
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); -
[SOLVED] BB Code with Smilies simple question
MadTechie replied to gtal3x's topic in PHP Coding Help
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 -
firefox vs ie7 & any other browsers problem with HTTP_REFERER
MadTechie replied to rj2kix's topic in PHP Coding Help
never replie on HTTP_REFERER, personally i try to use it as little as possible.. -
20 second google http://www.trap17.com/index.php/flatfile-user-login-signup_t40598.html
-
Opps miss-read.. it would be easier if index.html was index.php, is that possible ?
-
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); ?>
-
[SOLVED] PHP Notice: Undefined index: submit in .......
MadTechie replied to praeto's topic in PHP Coding Help
<?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; } ?> -
[SOLVED] PHP Notice: Undefined index: submit in .......
MadTechie replied to praeto's topic in PHP Coding Help
switch ($Value) { switch ($_GET['submit']) { should be just switch ($Value) { -
[SOLVED] PHP Notice: Undefined index: submit in .......
MadTechie replied to praeto's topic in PHP Coding Help
Get was not set $Value = ""; if(isset($_GET['submit'])) { $Value = $_GET['submit']; } switch ($Value) { -
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 !
-
[SOLVED] attempting to create an image with imagettftext
MadTechie replied to scotch33's topic in PHP Coding Help
change $font = 'arial.ttf'; to $font = dirname(__FILE__).'/arial.ttf'; -
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
-
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
-
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
-
you mean like this UPDATE ibf_topics SET forum_id=3 WHERE forum_id=369 WARNING BACKUP FIRST SQL DUMP