Jump to content

FlannelBeard

New Members
  • Posts

    9
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Male
  • Location
    Tallahassee

FlannelBeard's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. When I access the page with the inputs, enter my name and email and hit submit, the page does not change. I have an action set to go through my coupon PHP script, but it does absolutely nothing. I am not sure why nothing comes up after I hit submit. Second error that I know of is that I cannot find the codes to position where those texts would be over my image. Spent 2 hours today on it, not sure what im doing wrong. Why wont it open up a page with the base image at the very least? Argh, frustrating.
  2. Anyone find anything on this? I havent had time to work on it more. I should be able to engage it again in a few hours, so any help before hand would be splendid!
  3. Meant Java as in Java'script'. Coder shorthand, so to speak but a good note to point out the difference for all beginners. Java'script' is what I meant, and using dangerousprince's code you should be able to create what you're looking for. You can tweak the css easily, if needed. Also, look into using jquery. You can do a lot of what youre talking about with some codes they give on the site with some instruction.
  4. PHP is a server side language, Java or Jquery would be would best. Another alternative is Lightbox, Fancybox, Darkbox, etc. You can download Lightbox here http://www.huddletogether.com/projects/lightbox2/[/i]]http://www.huddletogether.com/projects/lightbox2/. Very easy to implement. I prefer Fancybox for its use of inline frames within the java window, but it all depends on what you want to accomplish. dangerousprince, great script! I can use that for myself in the new site im building. Props for the custom CSS Also, try looking into ajax. You might be able to load your content through a div when you click on a link. You can set a drop shadow of like 20, block, 80% alpha and then dynamically load your "pop up". Just a thought if you arent comfortable with java.
  5. gizmola, I just copied and pasted that code above, I know there were errors but it was a starting point JUST to get the idea across also, sorry for the late reply. Also, to answer a brief question, facebook can do anything a regular website can now (ecommerce, fan gates, dynamic content, full html css apache ajax coldfusion php etc...). The html would look something like this: index.php <form name="input" action="getcoupon.php"> Full Name: <input type="text" name="name" /> Email: <input type="text" name="email" /> <input type="submit" name="submit" value="Submit"> </form> I want to be able to take the text the user inputs and overlay it on the image and output the final result on a new tab in the browser for them to download. So now what I have is: (script corrected) getcoupon.php <?php // Load the stamp and the photo to apply the watermark to $im = imagecreatefrompng('Elements/coupon.png'); // Set the content-type header('Content-type: image/png'); header("Content-Description: File Transfer"); header("Content-Disposition: attachment; filename=$file"); header("Content-Transfer-Encoding: binary"); // The text to draw $name = 'Testingg...'; // Replace path by your own font path $font = 'arial.ttf'; // Add some shadow to the text imagettftext($im, 20, 0, 11, 21, $grey, $font, $name); // Add the text imagettftext($im, 20, 0, 10, 20, $black, $font, $name); // Using imagepng() results in clearer text compared with imagejpeg() imagepng($im); ?> The link is here: http://apps.facebook.com/couponapplication/ The download source is here: whatsnextmarketing.com/Applications/Coupon.zip It's not working, not sure what to do next... I put all of what I knew into this so far, learning as I go. Please, sir, can I 'ave some more? Thanks, -FlannelBeard [attachment deleted by admin]
  6. Maq, my sincere apologies. Wont happen again. Wasnt sure which one to post Gizmola, never knew this even existed!! I have dabbled in PHP but never authored anything. Honestly, I have no clue where to begin. But, being proactive and smart, i thought id try to theorize all of this together. (Great resources btw, thank you very much!) Based on the information given I assume that I can use this function to start (added an existing script to this): <?php // Load the stamp and the photo to apply the watermark to $im = imagecreatefromjpeg('photo.jpeg'); // Set the margins for the stamp and get the height/width of the stamp image $marge_right = 10; $marge_bottom = 10; $sx = imagesx($stamp); $sy = imagesy($stamp); // Merge the stamp onto our photo with an opacity (transparency) of 50% imagecopymerge($im, $stamp, imagesx($im) - $sx - $marge_right, imagesy($im) - $sy - $marge_bottom, 0, 0, imagesx($stamp), imagesy($stamp), 50); // Save the image to file and free memory imagepng($im, 'photo_stamp.png'); imagedestroy($im); // Path to our ttf font file $font_file = './arial.ttf'; // Draw the text 'PHP Manual' using font size 13 imagefttext($im, 13, 0, 105, 55, $black, $font_file, 'PHP Manual'); // Output image to the browser header('Content-Type: image/png'); imagepng($im); imagedestroy($im); ?> Now, instead of overlaying an image to the base image, I need to input text in its place. 1. Need to know the html for the input and submit buttons so that it links with the php script 2. Need to place the input text over the image, merge it, and output it to a new tab on the browser so they can download it. I, unfortunately, do not know the script on this...I understand the theory, though, and Im learning really fast as I go. Any help will be appreciated and full source will be posted for this application with a detailed tutorial when I get this up and running. We are a community, after all Thanks a million so far, Im submitting this now but im still doing research. Any help would be most welome! -FlannelBeard
  7. Greetings everyone, FlannelBeard here. Bit new to this community, but planning on sticking around! I work for a marketing company as the lead programmer, but I am stumped when it comes to this application I am developing for Facebook's iFrame Canvas. This is the set up of what I need. GREAT TACOS restaurant is handing out coupons for anyone who "likes" the facebook page. To get the coupon, the user (after liking the page) can input his or her name and email into input boxes. Instead of having our other web designer receive these emails and manually (photoshop) insert their names into the designated area on the image and emailing them, i was hoping there was a way through PHP or Java to automate this system. User inputs name and email > watermarks text input over this image http://www.whatsnextmarketing.com/Applications/Coupon/Elements/Coupon-Showcase.png > automatically emails the coupon with their name / email over the picture upon hitting "submit". Is this possible? I will share source for all when I complete this project (with everyones help of course ) I am pretty good at designing tutorials, so when this project is completed I will start a new topic in another section and design a nice tutorial with source and download for anyone interested. Please help me out, I am stumped and yet I know this is a very simple process... -FlannelBeard, friend and fellow community developer.
×
×
  • 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.