Jump to content

Search the Community

Showing results for tags 'images'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to PHP Freaks
    • Announcements
    • Introductions
  • PHP Coding
    • PHP Coding Help
    • Regex Help
    • Third Party Scripts
    • FAQ/Code Snippet Repository
  • SQL / Database
    • MySQL Help
    • PostgreSQL
    • Microsoft SQL - MSSQL
    • Other RDBMS and SQL dialects
  • Client Side
    • HTML Help
    • CSS Help
    • Javascript Help
    • Other
  • Applications and Frameworks
    • Applications
    • Frameworks
    • Other Libraries
  • Web Server Administration
    • PHP Installation and Configuration
    • Linux
    • Apache HTTP Server
    • Microsoft IIS
    • Other Web Server Software
  • Other
    • Application Design
    • Other Programming Languages
    • Editor Help (PhpStorm, VS Code, etc)
    • Website Critique
    • Beta Test Your Stuff!
  • Freelance, Contracts, Employment, etc.
    • Services Offered
    • Job Offerings
  • General Discussion
    • PHPFreaks.com Website Feedback
    • Miscellaneous

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Age


Donation Link

  1. Hi: I´m trying to make my own code for upload images using php to my server for my webpage, but I don´t know why the code doesn´t work at 100%. I know that its works until a point but not more away... Can you help me?? I have two files: an html and php called "form.html" and "sube.php" that I post here... And now explain what I´m try to do... [ File: form.html ] <form action="sube.php" method="post" enctype="multipart/form-data"> Sube un archivo:<br /> <input type="file" name="archivo" id="archivo" /> <br /> <input type="submit" name="boton" value="Subir" /> </form> [ File: sube.php ] <?php echo "Name of image: ".$_FILES["archivo"]["name"]; echo "<br />"; $tamano = $_FILES["archivo"]["size"]; echo "Size of image: ".$_FILES["archivo"]["size"]; // here always an error echo "<br>"; $t_max="50000000000"; echo "Maximum size:"; echo "$t_max <br>"; if( $tamano < $t_max) { $destino = "fotogal/grandes"; $sep=explode('image/',$_FILES["archivo"]["type"]); if($_FILES["archivo"]["type"] == "gif" || $_FILES["archivo"]["type"] == "jpg" ) move_uploaded_file ( $_FILES["archivo"]["tmp_name"], $destino . '/' .$_FILES["archivo"]["name"]); } else echo "No way..."; // OUT } else { echo "too much weight of image."; } ?> The case of this is that always i reach the same point and don´t know how to go further... The point is that always I receive: Name.."ok"... Size: This item is completely different of the weight of the image And... No way. This is always my result. Can you help me with this code????? I would like to upload my own images, but I´m not able to do it... and don´t know why. Thanks a lot. regards
  2. Hi guys, I am currently going through the Lynda Learning Jquery Essential training course. I have completed all the lessons in the first chapter however on the last lasson in the chapter that puts everything together in a practical example I cant get it to work properly. This is really anoying as i have spent all my free time this week studying. Anyway, the lesson/code should work like this, display a small PDF icon next to every href element in the document the has the .pdf extension. However when i preveiw the code below none of the pdf images are displayed. This is the code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" > <head> <title>Automatic PDF Icons</title> <style type="text/css"> li { margin: 5pt 0 0 5pt; } </style> <script type="text/javascript" src="js/jquery-1.9.1.js"></script> <script type="text/javascript"> $("document").ready(function() { $("a[href$=.pdf]").after("<img src='images/small_pdf_icon.gif' align='absbottom' />"); }); </script> </head> <body> <h1>Example: Automatic Insertion of Icons for PDF Links</h1> <p>This example demonstrates how to examine the contents of a link to see if it points to a PDF file and automatically insert a PDF icon if it does.</p> <ul class="navlist" id="navlinks"> <li><a href="someurl.html">Link #1</a></li> <li><a name="#anchor1">Named Anchor Link</a></li> <li><a href="someurl.html">Link #2</a></li> <li><a href="someurl.pdf">Link #3</a></li> <li><a href="someurl.html">Link #4</a></li> <li><a href="someurl.html">Link #5</a></li> <li><a href="someurl.pdf">Link #6</a></li> <li><a href="someurl.html">Link #7</a></li> <li><a href="mailto:joe@joe.com">Email Link</a></li> </ul> </body> </html> Hope you guys can help me out on this one, I was really enjoying learning Jquery up until now. Many thanks in advance.
  3. I was wondering if there is a image format code is get images from a database to show up. For example I use: <td>' . number_format($row['Population']) . '</td> the number_format to fix the population to show up the way I want. Is there an image format? Or what do I do? Right now it's showing up as a long string of text. <td>' . $row['Picture'] . '</td> Thanks in Advance!!
  4. Fila54

    Justify images

    Hi ! I've got a little problem with creating my gallery. What I want is simply gallery which perfectly fits to my website. So I decided to make a lightbox gallery where thumbnails are justify. And there is my question how can I justify images in my div? I don't want to center them.
  5. Hello All, I am creating an image sharing platform for our local community and i need to know if there is any standards for resizing images in PHP? I mean how does bigger image sharing websites like imgur, flickr, etc resize their images? Also, there are already many small PHP scripts/functions available on internet to generate thumbnails or resize images on the go or while uploading, but i am not sure if we can use those for a website focused solely on images, can we? I will have to resize larger dimension images into smaller images while maintaining its quality. I am also aware of ImageMagicks and GDLibrary So, can anybody guide me or give me some information or suggest me on how to go about it? Thanks in advance for advice.
  6. I am trying to store images in a folder on server. For some reason the images that need to be uploaded should be with their orignal name as uploaded by user i.e they can be changed only wth the original name in it. 1)So how can i put it in folder using php and retrieve it wherever needed whch means the name should be in database. 2)Now in the folder if two files with the same name are uploaded then the latest would overwrite whch should be avoided. Plz could anyone give some way to make ths up.
  7. Hello Everyone! I am new here. I have visited this site many times before for info but haven't joined until now. I now find myself with a problem that I can not figure out on my own. I purchased a wordpress template and it come pre-loaded with many useful shortcodes. One of which caught my eye but I can seem to get the code for it to look the way I want it to. Hense why I am here with the pros asking for help. I will try to post as much detail as possible in the text below to help you assist me in this project. The short code in wordpress is this: [callout title="Visit Our Patient Portal" button="Patient Registration" link="http://google.com" buttoncolor="green" target="_blank" buttonmargin="4px 0 0 0;"]Very user friendly and easy to use![/callout] This entered looks like this on the home page: The callout code in the shortcode.php file looks like this: function minti_callout( $atts, $content = null) { extract( shortcode_atts( array( 'title' => '', 'button' => '', 'buttonsize' => 'normal', 'buttoncolor' => 'alternative-1', 'link' => '', 'target' => '_self', 'buttonmargin' => '0px' ), $atts ) ); return '<div class="callout"><div class="border clearfix"><div class="callout-content"> <h2 class="highlight">' .$title. '</h2>' . do_shortcode($content) . ' </div><div class="callout-button" style="margin:' .$buttonmargin. ';"> <a class="button ' .$buttonsize. ' ' .$buttoncolor. '" href="' .$link. '" target="' .$target. '">' .$button. '</a> </div></div></div>'; } function minti_box( $atts, $content = null) { extract( shortcode_atts( array( 'style' => '1' ), $atts ) ); return '<div class="description clearfix style-' .$style. '">' . do_shortcode($content) . '</div>'; } I am trying to add two more buttons for a total of three using the short code but this is my downfall. I want it to look like this: If you think that you can help, Please post here and let me know. I have been working on this for 3 days straight and I can't get it to work. I wish PHP was as easy as Photoshop. Thanks in advance, Bigsease30
  8. I have several images in a directory, which I would like to output(in an organized way) to the page. I've tried reading all the directory contents, and loading their names into an array to display the images using HTML, but I can't for the life of me figure out how to then position the pictures correctly in CSS. Here's the code: <?php $dirLoc = 'myWebsite/galleryPics'; $handle = opendir($dirLoc); while($readDir = readdir($handle)){ if($readDir != '.' && $readDir != '..'){ $pic[] = $readDir; } } foreach($pic as $k){ echo "<div class = \"picsDiv\">"; echo "<img src = \"$dirLoc/$k\" height = \"100px\" width = \"100px\"/></div>"; } ?> <html> <head> <style type = "text/css"> .picsDiv {width:150px; height:150px; border:1px solid red; background-color:grey;} img {position:relative; top:50%; left:50%; margin-top:-50px; margin-left:-50px;} </style> </head> </html> Thank you in advance for any feedback.
  9. Hi, I am trying to create a tabbed image gallery using php and mysql . The following are my table structure. CREATE TABLE IF NOT EXISTS `gallery_category` ( `category_id` int(11) NOT NULL auto_increment, `category_name` text NOT NULL, PRIMARY KEY (`category_id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=3 ; CREATE TABLE IF NOT EXISTS `photos` ( `photo_id` int(20) NOT NULL auto_increment, `photo_filename` varchar(25) NOT NULL, `photo_caption` text NOT NULL, `photo_category` bigint(20) NOT NULL, PRIMARY KEY (`photo_id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=56 ; I am tring to create a tabbed gallery like this. <ul class="tabs"> <li><a href="#" rel="view1">gallery1</a></li> <li><a href="#" rel="view2">gallery2</a></li> </ul> <div class="tabcontents"> <div id="view1" class="tabcontent"> Gallery1 images goes here. </div> <div id="view2" class="tabcontent"> Gallery2 images goes here. </div> </div> Here is my code which i am trying to make this work. <ul class="tabs"> <?php $sql = "SELECT * FROM category ORDER BY category_id ASC"; $query = mysql_query($sql); while($row = mysql_fetch_array($query)) { $cid = $row['category_id']; $category_name = $row['category_name']; echo "<li><a href='?catid=".$cid."' rel='view".$cid."'>$category_name</a></li> "; } echo "</ul>"; ?> <div class="tabcontents"> <?php $sql = "SELECT * FROM category ORDER BY category_id ASC"; $query = mysql_query($sql); while($row = mysql_fetch_array($query)) { $catid = $row['category_id']; $category_name = $row['category_name']; $count = $row['COUNT(photo_id)']; echo"<div id='view".$catid."' class='tabcontent'>"; $catid = (int)($_GET['catid']); $sql = "SELECT * FROM gallery_photos WHERE photo_category = $catid ORDER BY photo_id DESC"; $query = mysql_query($sql); while($row = mysql_fetch_array($query)) { $pid = $row['photo_id']; $photo_caption = $row['photo_caption']; $photo_filename = $row['photo_filename']; echo "$photo_caption</br>"; echo "<img src='".$images_dir."/tb_".$row[photo_filename]."' border='0'"; } } ?> </div> </div> The category is displaying correctly (first <ul> </ul> part) but it content display part is not working. Can any one please help me with this.. Thanks, Sam.
  10. Hello follow programmers, I have a little question regarding my PHP code. I now have a perfect working code that takes my frame heigth and width and adjusts the image to the frame. Works great. The issue now is, I have multiple images in my dolder, how can I play them with a delay of say.. 10 seconds? Here is the piecer of my code that matters: Of course I have to count the images in the folder but how do I play them with a short break in it. <?php $img_folder = "../fotos/"; $imgs = dir($img_folder); while ($file = $imgs->read()) { $lengte = (strlen($file)-3); $extentie = substr($file,$lengte,3); //print "extentie $lengte = $extentie <br>"; if($extentie == "jpg" || $extentie == "JPG" || $extentie =="jpeg" || $extentie =="gif" || $extentie =="bmp"){ //print "tada<br>"; $size = getimagesize($img_folder.$file); $hoog = $size[1]; $breed = $size[0]; if(($breed/$screenW)>($hoog/$screenH)){ print"<img src=\"$img_folder$file\" width=\"$screenW\">"; }else{ print"<img src=\"$img_folder$file\" height=\"$screenH\">"; } } } closedir($imgs->handle); } ?> Thanks in advance! Dave
  11. Hi I have a little php and a site that used to work (apparently, I didn't build it) has recently stopped. The problem ius that you used to be able to upload an image, and it would make three different sized versions of it and then link them to the various bits of profile information. This has recetnly stopped working, and I shoujld say the site is around 6 years old. What happens now is that when you create a new profile, select an image for upload and press "Submit" you get a whole pile of errors mostly along the lines of [b]Warning[/b]: imagecopyresampled(): supplied argument is not a valid Image resource in [b]/websites/LinuxPackage02/.../public_html/admin/php/nslib_php/nslib_image.php[/b] on line [b]133[/b] [b]Warning[/b]: imagedestroy(): supplied argument is not a valid Image resource in [b]/websites/LinuxPackage02/.../public_html/admin/php/nslib_php/nslib_image.php[/b] on line [b]136[/b] Using ftp I can see that 3 images have been created on the server, and they do link to the profiles but they are just "Black" rectangles. Here;s some of the code creating the problem (I think) if ($target_type == 'image/jpeg') { // RESIZE the image with the parameters specified imagecopyresampled($target_file, $source_file, 0, 0, $source_x, $source_y, $target_width, $target_height, $source_width, $source_height); It looks to me that whoever has built the site used a library, but I cant find that library or the builder. Would anyone out there be able to suggest what I need to do? Happy to supply more detail if it helps! Many thanks Edward
  12. I am in the process of trying to figure out how to build an image library of if one exists that I can already leverage without having to write a ton of code. Here is a basic list of what I am looking for: - Upload images to a folder. Login required - Resize and create thumbnails - Allowing to change the image title - Allowing to delete the image - Create/Edit/Delete albums - Ability to set a cover photo Please advise me on what I can leverage to build this fast. Thanks
×
×
  • 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.