TalkPHP
 
 
Account Login
Latest Articles
» The basic usage of PHPTAL, a XML/XHTML template library for PHP
» Vulnerable methods and the areas they are commonly trusted in.
» Simple way to protect a form from bot
» The Basics On: How Session Stealing Works
» How to keep your forms from double posting data
IRC Channel
IRC Speech Bubble Join the friendly bunch on IRC...
(#TalkPHP on Freenode)

...Also available via a web interface.

See this thread for information on the TalkPHP Free Hugs Initiative™. Subject to availability.
Associates
Associates
CSS Tutorials
Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old 07-29-2009, 12:16 PM   #1 (permalink)
The Visitor
 
Join Date: Jul 2009
Posts: 3
Thanks: 0
Rubin Remus is on a distinguished road
Red face PHP Gallery - Help Needed!

Hello everyone,

I'm new here, so I hope I've posted this in the right place.

Basically, I have a problem and I've scoured the web for a solution or a gallery which does exactly what I need, but to no avail, so here goes.

I'm trying to build a photo gallery for a friends website. What I need is the ability for the script to read straight from the directory and display those images, BUT(this is where I struggle), I then want to be able to click on that image and have it display in a box to the right - on the same page.

Any help would be great, because I'll be pulling my hair out until I'm bald otherwise!

Thanks alot in advance,

RR
Rubin Remus is offline  
Reply With Quote
Old 07-29-2009, 12:57 PM   #2 (permalink)
Super Moderator
Inquisitive 
 
codefreek's Avatar
 
Join Date: Sep 2007
Location: Near you.
Posts: 791
Thanks: 241
codefreek is on a distinguished road
Default

Have you any code to start with, or some extra info, like some google knowledge ?,
might wanna start with a simple google search, + look at php.net,

a basic setup of this would be to set path of the dir, you want to take the photos out from, and then what do you do ?.. thats your goal try to figure it out if you need more help, ask but try first.

PHP, is a get a feel to it, code,
as everything else is, so if you don't try, only ask.. you will never learn,
you have to get a feel for it.


PS: welcome to the forums.. :)


-Cf

Last edited by codefreek : 07-29-2009 at 02:32 PM. Reason: TEXT, EDIT
codefreek is offline  
Reply With Quote
Old 07-29-2009, 12:59 PM   #3 (permalink)
The Acquainted
 
Hightower's Avatar
 
Join Date: May 2009
Location: Durham, UK
Posts: 134
Thanks: 9
Hightower is on a distinguished road
Default

Sounds like a job for jQuery (or similar) to me.
__________________
Hightower's Softpolio
Send a message via MSN to Hightower
Hightower is offline  
Reply With Quote
Old 07-29-2009, 01:06 PM   #4 (permalink)
The Visitor
 
Join Date: Jul 2009
Posts: 3
Thanks: 0
Rubin Remus is on a distinguished road
Default

Hi,

I really have tried looking everywhere, altering bits of code I've put in. I haven't really got much to go on at the moment. I wouldn't ask for help if I hadn't tried dealing with it myself - I'm a very proud soul...

So if anyone knows a nice simple solution, I'd be grateful...

Thanks.

AdminNote: i deleted the post i made, but it is back now thats why you did not find it earlier.

Last edited by codefreek : 07-29-2009 at 02:36 PM. Reason: note added: i deleted the post i made, but i put it back thats why you did not find it
Rubin Remus is offline  
Reply With Quote
Old 07-29-2009, 02:42 PM   #5 (permalink)
Super Moderator
Inquisitive 
 
codefreek's Avatar
 
Join Date: Sep 2007
Location: Near you.
Posts: 791
Thanks: 241
codefreek is on a distinguished road
Default

Set, dir, read dir, print from dir..
i would say is the simple answer to the first question,
the second, well as Hightower said, that can be fixed with,
jquery, or other, css/javascripts, search for image + css/javascript
codefreek is offline  
Reply With Quote
Old 07-30-2009, 09:37 AM   #6 (permalink)
The Visitor
 
Join Date: Jul 2009
Posts: 3
Thanks: 0
Rubin Remus is on a distinguished road
Default

Thanks for the above information.

I've managed to get the images to display on the page, but I'm still confused as to how to get them to open larger within the page - presumably with a JS 'onclick' function. I don't know how to implement this within Dreamweaver, as I'm used to having an image to click on, but obviously it only shows code for now.

With regards to Jquery, I've looked at the website, downloaded it and have no idea what to do with it, how to use it or anything...

HELP?!

Thanks alot guys, I really appreciate it!
Rubin Remus is offline  
Reply With Quote
Old 07-30-2009, 10:46 AM   #7 (permalink)
Super Moderator
Inquisitive 
 
codefreek's Avatar
 
Join Date: Sep 2007
Location: Near you.
Posts: 791
Thanks: 241
codefreek is on a distinguished road
Default

google has info, just try to google on tutorials etc,
and you shall find some info.


-Cf
codefreek is offline  
Reply With Quote
Old 07-30-2009, 02:47 PM   #8 (permalink)
The Wanderer
 
aSAP's Avatar
 
Join Date: Sep 2007
Posts: 7
Thanks: 0
aSAP is on a distinguished road
Default

Just for fun and since I haven't really done much in PHP/Javascript for a while I decided to create an image gallery like this. It is pretty sloppy but with a little help from google I think I created what you were looking for.

I know me giving this to you won't help you learn that much but feel free to ask questions on how it works.

Enjoy,
aSAP
aSAP is offline  
Reply With Quote
Old 07-30-2009, 02:53 PM   #9 (permalink)
Super Moderator
Inquisitive 
 
codefreek's Avatar
 
Join Date: Sep 2007
Location: Near you.
Posts: 791
Thanks: 241
codefreek is on a distinguished road
Default

Download, with safety in mind,
scan file.. http://virusscan.jotti.org/en

google for online file scan,
http://www.google.se/search?hl=sv&q=...2&oq=file+scan
codefreek is offline  
Reply With Quote
Old 07-30-2009, 02:58 PM   #10 (permalink)
The Wanderer
 
aSAP's Avatar
 
Join Date: Sep 2007
Posts: 7
Thanks: 0
aSAP is on a distinguished road
Default

Wow, well is there any way you would rather me upload it for him? I know you are trying to protect him from any malicious downloads but was that really necessary?
aSAP is offline  
Reply With Quote
Old 07-30-2009, 04:09 PM   #11 (permalink)
La Vida es Sueño
Advanced Programmer Top Contributor 
 
Wildhoney's Avatar
 
Join Date: Sep 2007
Location: Oldham
Posts: 2,280
Thanks: 90
Wildhoney is on a distinguished road
Default

Eek! What was all that about, Codefreek? aSAP is to be trusted. I know him well I suppose you're not to know that. Being programmers though, I am sure we all take steps to scan for pesky viruses!
__________________
The man who comes back through the Door in the Wall will never be quite the same as the man who went out.
Send a message via AIM to Wildhoney Send a message via MSN to Wildhoney Send a message via Yahoo to Wildhoney
Wildhoney is offline  
Reply With Quote
Old 07-30-2009, 04:41 PM   #12 (permalink)
Super Moderator
Inquisitive 
 
codefreek's Avatar
 
Join Date: Sep 2007
Location: Near you.
Posts: 791
Thanks: 241
codefreek is on a distinguished road
Default

Sorry, some factors that i saw just trigged me to say something for safety of talkphp users, but anyways i am sorry. And on a side note: other forums do also ask for people to post scan results if you upload a file into the forum. Not that hard to do, and proofs the safety of the file. Don't see why we need to make a big deal of that.. just scan it or don't anyways, i don't think i did anything wrong by just alerting the users or did i ? if so then well i did what i thought was right..

-CF
codefreek is offline  
Reply With Quote
Old 07-30-2009, 05:26 PM   #13 (permalink)
The Wanderer
 
aSAP's Avatar
 
Join Date: Sep 2007
Posts: 7
Thanks: 0
aSAP is on a distinguished road
Default

http://virscan.org/report/22b76eeacf...8cd86927b.html

Scanner results : All Scanners reported not find malware!
Time : 2009/07/31 01:22:16 (CST)

Doesn't really prove anything different but I hope it eases everyone's mind. I will add a live preview later when my hosting is back up.
aSAP is offline  
Reply With Quote
Old 07-31-2009, 06:14 PM   #14 (permalink)
The Wanderer
 
aSAP's Avatar
 
Join Date: Sep 2007
Posts: 7
Thanks: 0
aSAP is on a distinguished road
Default

Had to go with a different host so here is the preview.

http://asap.x10hosting.com/ImgGallery/
aSAP is offline  
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to create a gallery class Tanax Advanced PHP Programming 25 02-19-2013 04:25 AM
Python to PHP Translation Needed ETbyrne Python to PHP Translation 16 10-03-2009 10:01 PM
10 PHP Myths Dispelled Wildhoney General 9 06-15-2009 06:55 AM
PHP Session Login - help needed. boycoda General 6 06-08-2008 12:40 AM
PHP Compressor Kalle Script Giveaway 8 05-28-2008 12:14 AM


All times are GMT. The time now is 08:17 AM.

 
     

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Inactive Reminders By Icora Web Design