Jump to content

Search the Community

Showing results for tags 'gallery'.

  • 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

Found 10 results

  1. I am looking for a script to make a photo gallery exactly like the one iTunes uses. This is what it looks like: I want all of the same functionalities as this one has and I need to be able to put it inside of a web page easily and sized the way I will need it. The images displayed in this gallery must auto-resize and open in a new tab as the original file when clicked on. I need the iPhone and iPad screen view options to both be there and if there aren't any images for one or the other, the button to switch isn't displayed or is inactive. If you could write this script or give me source code, that'd be great as I really need it for my new site I am developing. Please make it look exactly the same
  2. Azercii

    Need Tips/Advice

    Apologies if this is in the wrong section, as I'm not too sure what I would need for the things I'm wanting, and I would like to constrain it to one topic if possible. I had an idea for a gaming community site (http://gamer-cafe.net/), and so far I have a bare-bones layout but I would like an image gallery, and a mod gallery. Problem is, I don't know what to begin learning to even get a basic version of either going This is what I hope to achieve at the end; Content uploads are member restricted Users can upload an image of their favourite moment in gaming Users can upload a mod to improve others games Users must include a minimum of one image, a title, a short description, and 4 tags with their upload(s) Users can then download, comment, and rate the content Site will automatically grab thumbnails of the content Content originating from the user will display on their profile I use PhPBB for the users credentials, so it would need to integrate with that so I could get the users names etc for comments I know it's a lot, and it's going to take a while aha but I'm up for it and determined, what would I need to learn to get something like these working?
  3. Hello. How can I integrate a "gallery maker" with TinyMCE editor, with images from external source (I don't want to upload images to my website server, because I have a limited storage space).
  4. I have two questions, what am I doing wrong? my script isnt working. It doesnt return errors nor a rezised pic. My second questions is just asking for ideas of how to improve this script in terms of security and quality. any help is appreciated. <?php #TODO: find ways to improve quality $quality = '100'; //in imagejpeg() type function default quality = 75, min = 0, max 100 $maxW = '180'; $maxH = '180'; $dirLoad = 'photos/load/'; //thumb size dir $dirOriginal = 'photos/'; //original size dir if(isset($_GET['a']) AND isset($_GET['y']) AND isset($_GET['i'])){ $falbum = stripslashes($_GET['a']); $fyear = stripslashes($_GET['y']); $img = stripslashes($_GET['i']); } else { echo 'lol'; exit; } $locOriginal = $dirOriginal.$fyear.'/'.$falbum.'/'.$img; //get normal location of img $locSave = $dirLoad.$fyear.'_'.$falbum.'_'.$img; // location and how img will be save #TODO: maybe redefine algorith to use crop to add more pic quality list($originalW, $originalH) = getimagesize($locOriginal); $ratio = $originalW / $originalH; if($ratio > 1){ // landscape shape original photo $tgtH = $maxW/$ratio; $tgtW = $maxW; } else { // portrait shape Original photo $tgtW = $maxH*$ratio; $tgtH = $maxH; } //echo $originalW.'x'.$originalH.'@'.$ratio; #checking code behavior //echo '<br>'.$tgtW.'x'.$tgtH; #checking code behavior //get file extension $ext = explode('.',$locOriginal); $ext = end($ext); //only variables should be passed by ref with end $ext = strtolower($ext); //turn it into lower case to match with switch below, just in case switch($ext){ //open the image according to file extension #note: must image we will work with are jpg/jpeg extension, added switch just in case #also bmt files are not supported by this script case 'jpg': //$imgOld = @imagecreatefromjpeg($locOriginal); break; no need but makes it look uniform case 'jpeg': $imgOld = @imagecreatefromjpeg($locOriginal); break; case 'gif': $imgOld = @imagecreatefromgif($locOriginal); break; case 'png': $imgOld = @imagecreatefrompng($locOriginal); break; default: $imgOld = false; break; } return $imgOld; //create a blank img with target dim. $imgNew = imagecreatetruecolor($tgtW, $tgtH); //resample old img with new imgNew size [0,0,0,0] crop options ImageCopyResampled($imgNew,$imgOld, 0, 0, 0, 0, $tgtW, $tgtH,$originalH, $originalH); switch($ext){ // #edit added header, forgot to #also bmt files are not supported by this script case 'jpg': case 'jpeg': Header("Content-type: image/jpeg"); Imagejpeg($imgNew,$locSave,$quality); break; case 'gif': Header("Content-type: image/gif"); Imagegif($imgNew,$locSave,$quality); break; case 'png': Header("Content-type: image/png"); Imagepng($imgNew,$locSave,$quality); break; default: false; break; } ImageDestroy($imgOld); ImageDestroy($imgNew); ?>
  5. Hello everyone! I'll get straight to the point. I have built a portfolio gallery for a client that uses a javascript/jquery to arrange my thumbnails on a single page. It includes a "filter" function that allows me to narrow down what is displayed on the page based on certain keywords associated with the content. I have an upload script which allows me to add data through a form to my MySQL database. The image name is saved to the database and the image is uploaded to a particular folder on my server. I then pull that information into my portfolio page and loop through all the "rows" in the database which creates my page full of thumbnails. When a user clicks on any given thumbnail, a lightbox is shown which shows a larger image or embedded video, along with the title and description of the project. Everything works great. I would like to go one step further and add a feature to click to the "next" and "previous" item in the portfolio from within the lightbox without having to close the lightbox and click another thumbnail. Make sense? I am a beginner with php but am learning my way around it. Javascript is still a foreign language so I would like to accomplish this in PHP if possible. Thank you for any help you can offer to get me in the right direction. <?php include('includes/connection.php'); $tbl_name="portfolio_pg"; ?> <nav id="filter"></nav> <section id="main"> <ul id="grid"> <?php $data = mysql_query("SELECT * FROM portfolio_pg") or die(mysql_error()); while($info = mysql_fetch_array( $data )) { ?> <li data-tags="<?php echo $info['Filters']; ?>"> <a href="javascript:void();" onclick="document.getElementById('underlay').style.display='block'; document.getElementById('<?php echo $info['pg_id']; ?>').style.display='block';"><?php echo "<img src=images/portfolio/thumbs/".$info['photo'] ." width=\"164\" height=\"164\">"; ?></a> <div id="underlay"></div> <div class="lightbox" id="<?php echo $info['pg_id']; ?>"> <div id="closer"><a href="javascript:void();" onclick="document.getElementById('underlay').style.display='none'; document.getElementById('<?php echo $info['pg_id']; ?>').style.display='none';">close</a></div> <?php if($info['Project_Link']!="") { echo "<div class=\"vidHolder\"> ".$info['Project_Link']." </div>"; } else { echo "<div class=\"picHolder\"><img src=\"images/portfolio/".$info['photo_2'] ."\" width=\"100%\" height=\"100%\"></div>"; } ?> <div class="projectHead"><?php echo $info['Page_Heading_1']; ?></div> <div class="projectBod"><?php echo $info['Paragraph_1']; ?></div> </div><!-- Close Lightbox Viewer --> </li> <?php // close while loop } ?> </ul> </section> you can see it in action by going following HERE Thanks for any help
  6. Hi I'm an Illustrator with little knowledge of web development, i'm experienced in HTML, CSS. I'm ok in PHP and Jquery and SQL I was wondering if it was possible to make a website where i can upload my illustrations to the database and view them on the website (while also having a jquery style on the images). like this: http://www.twospy.com/galleriffic/example-2.html if yes would you be able to give me any tutorial to teach me how to do it. if you can't find any toturials would you be able to give me tips. e.g. will it be easier to use a different language (i'm willing to teach my self), is there any opensource web development software that will help me do this Thank you very much for your help
  7. 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.
  8. Dear All this is my first topic here i need some help with php coding, I have an old script for image gallery that i were able to upgrade on it. I did some change by adding the option of the categories but my issue is when going to the second page ( each page has X amount of images ) and the page splitte to ?page= 2 and like that. but when i add the category id this option didn't work please help. <?php // Get Page config Info $info = @mysql_query("SELECT keywords,description,sitetitle FROM configtable LIMIT 1"); $pageInfo = @mysql_fetch_assoc($info); $pageDesc = $pageInfo['description']; $pageKeyw = $pageInfo['keywords']; $general_title = $pageInfo['sitetitle']; $rowSen = 21; $numRow = $rowSen + 1; //check the page number if(empty($page) || !is_numeric($page)){ $st = 0; $page = 0; }else if(is_numeric($page)){ $st = $page * ($numRow+1); $st = @mysql_real_escape_string($st); } // Get Photos By Category if(isset($_GET['id'])){ $id = @mysql_real_escape_string($_GET['id']); $get_all_images = mysql_query("SELECT * FROM photos WHERE photo_country = $id"); $num_images = mysql_num_rows($get_all_images); $QueryCount = @mysql_query("SELECT count(*) as num FROM photos WHERE photo_country = $id"); $QueryNumbr = @mysql_fetch_assoc($QueryCount); // Get Country By Id $countries_set = @mysql_query("SELECT * FROM countries WHERE id = $id LIMIT 1"); $country = mysql_fetch_assoc($countries_set) ; $countrysnum = @mysql_num_rows($countries_set); } else { $photos_set = @mysql_query("SELECT * FROM countries ORDER BY id desc"); } ?> and herer is my gallery <table width="850px" border="0" cellspacing="0" cellpadding="0" align="center"> <tr> <td><?php if($num_images>0){ $count = 0; $num = 0; $fin = 0; $num_colm = 3; while($row = mysql_fetch_assoc($get_all_images)){ if($count < $rowSen){ $fin++; if($num==$num_colm){ echo "</tr>\n"; echo "<tr>\n"; $num = 0; }else if($num==0){ echo "<tr>\n"; } if($lan=='en'){ $download = "Download"; }else{ $download = "Download"; } $PICnewPath = 'data/photos/'.$row['photo_name'] ; echo '<td><center><a href="'.$PICnewPath.'" rel="lightbox[roadtrip]"><img style="font-size:15px;" onmouseover="this.style.opacity = \'0.4\';" onmouseout="this.style.opacity = \'1\';" height="150" src="'.$PICnewPath.'" alt="'.$row['photo_title'].'" title="'.$row['photo_title'].' " /></a></center><p><center>' . $row['photo_title'] . '<br /> <table width="200" border="0" cellspacing="0" cellpadding="0"> <tr> <td> ' . substr(stripslashes(strip_tags($row['photo_dec'])),0,500) . '<a href="picture.php?&id=' . $row['photo_id'] . '"> Read More</a></td> </tr> </table> </center></p> </div></td>'; $num++; if($fin == $num_images){ if($num!=$num_colm && $fin>$num_colm){ $subtract = $num_colm - $num; for($i=0;$i<$subtract;$i++){ echo '<td> </td>'; } } echo "</tr>\n"; } } $count++; } }else{ $brak = '<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br />'; if($lan=='en'){ echo '<tr><td>There is no images right now'.$brak.'</td></tr>'; }else{ echo '<tr><td>There is no images right now'.$brak.'</td></tr>'; } } ?></td> </tr> </table> and here is my page splitting code <?php $dataNum = $QueryNumbr['num']; if($dataNum>$numRow){ $numPages = $dataNum/$rowSen; $numPages = ceil($numPages); for($i=0;$i<$numPages;$i++){ $pageNum = $i + 1; if($i==$page){ echo '<b><span class="shift" style="font-size:15px">'.$pageNum.'</span> '; }else{ echo '<a style="font-size:15px" href="'.$_SERVER['PHP_SELF'].'?id='.$id.'&page='.$i.'" class="shift">'.$pageNum.'</a></b> '; } } } ?> Please help
  9. 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.
  10. 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.
×
×
  • 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.