
pleek
Members-
Posts
135 -
Joined
-
Last visited
Everything posted by pleek
-
i tried both of the posted methods and i couldn't get either to work.
-
HTML <SELECT NAME="BG" ID="BGChooser" onchange="changeimg()"> <OPTION VALUE="0">Choose a Background... <OPTION VALUE="0">None <OPTION VALUE="1">Little Big Planet <OPTION>Other Background </SELECT> Javascript function changeimg(){ document.getElementById(\'Card\').src=\'http://craigh.tlcrepair.net/ConsoleCard/ConsoleCardTwo/index.php?UserName=' .$UserName. '&Posts=' .$UserPosts. '&PS=' .$PersonalText. '&Site=' .$Website. '&Av=' .$UserAvatar. '&Group=' .$Group. '&BG=\' + document.getElementById(\'BGChooser\').value; } The code above doesn't work but when i replace "document.getElementById(\'BGChooser\').value" with "1" it works fine. How am i supposed to do this so when the user changes the dropdown menu it gets the value and adds it to the url in the function?
-
Won't that show php as the filetype? The file itself is a png image. I read the php manual for parse_url and im not seeing how that will get the files extension.
-
ok, so i know how to get the images extension if its a direct path to the image. My problem is my script will be using file paths such as.. http://www.tinyportal.net/index.php?action=dlattach;attach=18707;type=avatar How can i get that files extension?
-
ok, that made the background work. (see it here) But now there is this ugly white around the image. How do i fix that?
-
thats my problem (quote "looks perfect" not "is"), the white background is supposed to be transparent.
-
ok, i don't get it. I have scoured the internet for hours on how to fix this but i can't figure out anything. And i can't find anything wrong with my code ether. PLEASE HELP!!! The image looks perfect. But when you save it and open it in photoshop it has a white background. But its supposed to be transparent. Thats my problem. See the image here <?php header('Content-type: image/png'); $new_image = ImageCreateTruecolor(418, 252); imagealphablending($new_image, true); $bg = ImageColorAllocateAlpha($new_image, 255, 255, 255, 127); ImageFill($new_image, 0, 0 , $bg); $Background = imagecreatefrompng('BackgroundOne.png'); $Logo = imagecreatefrompng('CcLogo.png'); $AvatarBackground = imagecreatefrompng('AvatarBackground.png'); $Avatar = imagecreatefrompng('Avatar.png'); $AvatarReflection = imagecreatefrompng('AvatarReflection.png'); $UserRank = imagecreatefrompng('administrator.png'); imagecopy($new_image, $Background, 3, 42, 0, 0, 412, 167); imagecopy($new_image, $Logo, 0, 0, 0, 0, 247, 252); imagecopy($new_image, $AvatarBackground, 5, 44, 0, 0, 134, 164); imagecopy($new_image, $Avatar, 12, 56, 0, 0, 120, 139); imagecopy($new_image, $AvatarReflection, 11, 49, 0, 0, 120, 143); imagecopy($new_image, $UserRank, 280, 50, 0, 0, 128, 28); imagepng($new_image); imagedestroy($new_image); imagedestroy($Background); imagedestroy($Logo); imagedestroy($Avatar); imagedestroy($AvatarReflection); imagedestroy($UserRank); ?>
-
bump* i can put as many pngs as i want using imagecopymerge and imagecopy. But beyond the background gif i can't get any more gifs to work. And now that i got the transparencies working the imagestring won't show up. heres the new code. <?php header('Content-type: image/png'); // Set a White & Transparent Background Color $new_image = ImageCreateTruecolor(345, 130); $bg = ImageColorAllocateAlpha($new_image, 255, 255, 255, 127); // (PHP 4 >= 4.3.2, PHP 5) ImageFill($new_image, 0, 0 , $bg); $String = $_GET['text']; $UserRank = imagecreatefrompng('elitemember.png'); $UserAvatar = imagecreatefrompng('avatar.png'); $Background = imagecreatefromgif('Background.gif'); $TextColor = imagecolorallocate($Background, 225, 225, 225); $Font = imageloadfont('Kozuka Gothic Pro B.gdf'); imagecopymerge($new_image, $Background, 0, 0, 0, 0, 345, 130, 50); imagecopymerge($new_image, $UserRank, 110, 55, 0, 0, 128, 28, 100); imagecopy($new_image, $UserAvatar, 0, 0, 0, 0, 128, 128); imagestring($new_image, $Font, 90, 15, $String, $TextColor); imagepng($new_image); imagedestroy($new_image); imagedestroy($Background); imagedestroy($UserAvatar); imagedestroy($UserRank); ?> view it here
-
alright, that helped me out. I had seen that but i overlooked part of it. Now, can anybody tell me why i can't get gifs to load with createimagefromgif? pngs work fine.
-
if you clicked the "here is the result" link you can see how big userrank is. It 128 * 28. And im not sure how to set the transparency for $background. How do i do that? And yes i know its GD not GD. But i didn't notice my error till after i posted it and it won't let me edit it.
-
anybody? lol bump!
-
Ok, so im learning GC and alls going well but im stuck. The second image that is supposed to merge with $background isn't showing up. <?php header('Content-type: image/png'); $String = $_GET['text']; $UserRank = imagecreatefrompng('elitemember.png'); $UserAvatar = imagecreatefromgif('avatar.gif'); $Background = imagecreatefrompng('Background.png'); $TextColor = imagecolorallocate($Background, 225, 225, 225); $Font = imageloadfont('Kozuka Gothic Pro B.gdf'); imagestring($Background, $Font, 90, 15, $String, $TextColor); imagecopymerge($Background, $UserRank, 110, 55, 0, 0, 128, 28, 100); imagecopymerge($Background, $UserAvatar, 20, 20, 0, 0, 160, 160, 100); imagepng($Background); imagedestroy($Background); imagedestroy($UserRank); imagedestroy($UserAvatar); ?> The image $UserAvatar is not showing up but $UserRank is. Also how can i stop the transparent parts in $background from turning black? Here is the result
-
do you want just the code or the images and everything? Its a design for part of a personal website theme. I learned how to make it using these websites http://www.nimlok-louisiana.com/blog/create-custom-search-bars-with-image-replacement-using-css/ http://www.nkuttler.de/2008/09/20/html-forms-and-onclickonfocus/ Everything i used is from there and a little googling.
-
kk, i figured out everything. thanks for all the help! finished project
-
um, not sure how to do that. But with the help of the posts before you i have it looking how i like it. And im working on getting the search bar with the style i want. But i can't figure out how to get it to stay all the way to the right.
-
ok, wow those tips helped a ton. I made a lot of progress. I also solved my image problem by using "align="absmiddle"". I have everything how i want it except the search box. I tried a few things, but im not sure how to get it aligned to the right without it going to a new line. And using the link posted for the image input button uses tables and that makes it start on a new line. New code: <html> <head> <title>Pleek</title> <style type="text/css"> #statbar { width: 100%; background-color: #888888; background: url(barbg.jpg); font-family: calibri,arial,sans-serif; font-size: 1.2em; color: #ffffff; padding: 4px 0px 4px 6px; position: fixed; top: 0px; left: 0px; right: 0px; } #statbar a { color: #ffffff; } #statbar a:hover { color: #1e1e1e; } </style> </head> <body> <div id="statbar"> Welcome <a href="#">Pleek</a> <A HREF="#"><IMG SRC="Logout.png" border="0" align="absmiddle"></A> <IMG SRC="Divider.gif" align="absmiddle"> You have 2 <a href="#">new messages</a> <IMG SRC="Divider.gif" align="absmiddle"> <a href="#">Profile</a> <INPUT TYPE="text" NAME="search" VALUE="Search..."> </div> </body> </html>
-
ok, using the tips from xtopolis and the code supplied by Yesideez im off to tinker. Ill post back with my progress and if i need any more help. Thanks for your replies.
-
so, nobodys got a clue whats wrong...
-
ok, i have a concept for a menu bar i want to make. When i put it together looks all jacked up. I really need some help here. This is what i want it to look like (I have the psd i made, if you need it). this is what i've got so far Things i really need help with. 1. ALIGNMENT!!! i have tried align, valign, and more and i can't get everything strait. The valign of the images and text Getting the search box to stay all the way to the right 2. The search box, i want this as the background but don't have a clue on how to do it. The code i have html <TABLE class="bar"> <TR> <TD> Hello <A HREF="#" class="menu">Pleek</A> <A HREF="#"><IMG SRC="Logout.png" border="0"></A> <IMG SRC="Divider.gif"> You have 2 <A HREF="#" class="menu">new messages</A> <IMG SRC="Divider.gif"> <A HREF="#" class="menu">Profile</A> </TD> <TD> <INPUT TYPE="text" NAME="search" VALUE="Search..."> </TD> </TR> </TABLE> css a.menu:link { color: white; text-decoration: underline; } a.menu:visited { color: white; text-decoration: underline; } a.menu:hover { color: #1e1e1e; text-decoration: none; } .bar { background: url(barbg.jpg); width: 100%; height: 30px; position: fixed; top: 0px; left: 0px; right: 0px; color: white; padding-left: 10px; } Any suggestions?
-
so, nobody knows i guess.
-
.bar { background: url(barbg.jpg); width: 100%; height: 30px; position: fixed; top: 0px; left: 0px; right: 0px; color: white; padding-left: 10px; float: left; clear:both; text-align:left; } and this is what it looks like. i need the text and the image to be even, each thing i try moves it some but doesn't make them line up.
-
when adding that to my code, the imaged drops below the text. Any other ideas?
-
i have this code table <TABLE class="bar"> <TR> <TD> Hello <A HREF="http://craigh.tlcrepair.net/smf2/index.php?action=profile;u=1" class="menu">Pleek</A> <IMG SRC="LogOut2.png"> </TD> </TR> </TABLE> but when i view it in ff the image doesn't line up right. its higher than all the text. If i put it in a new <td> it aligns right but then its way off to the side. How do i fix this?
-
[SOLVED] entering a donation amount and changing a input value
pleek replied to pleek's topic in Javascript Help
even with it hidden, the "changetext()" function doesn't change the value of the form, but something you posted did solve my problem. Just change the input to text instead of hidden and the user can just input what ever they want. thanks for the idea. -
ok, i have this code script type="text/javascript"> function changeText(){ var donationAmount = document.getElementById('amount').value; document.getElementById('boldStuff').innerHTML = donationAmount; document.getElementById('donation').value = donationAmount; } </script> <input type="text" id="amount"> <input type='button' onclick='changeText()' value='Change Text'/> <p>donate <b id='boldStuff'>$0.00</b> </p> <input type="hidden" id="donation" name="amount" value="0.00"/> i didn't include the whole form, just the input for the amount. The form works by itself, and the 'boldstuff' amount changes with "changetext()". But it doesn't change the input value, what am i doing wrong?