Don't have an account? Register now to chat, post, use our tools, and much more.
Latest Headlines
Online Users
There are 123 users online: 8 members, 91 guests and 24 bots. Members: Ashbad, flyingfisch, gbl08ma, LuxenD, Pizzaboy, ti83head, tiseac. Bots: Magpie Crawler (4), VoilaBot (2), Googlebot (18).
RSS & Social Media
SAX
You must log in to view the SAX chat widget
|
| Author |
Message |
|
KermMartian

Site Admin

Joined: 14 Mar 2005 Posts: 55742 Location: Earth, Sol, Milky Way
|
|
| Back to top |
|
|
comicIDIOT

Guru

Joined: 01 May 2006 Posts: 5107 Location: SFBA, California
|
Posted: 13 Nov 2011 02:55:56 pm Post subject: |
|
|
It is indeed what I wanted. Is there a better way to go about it?
How would you set up the loop so it didn't fail? Perhaps a hacky if($portfolio) {} else { instructions }? _________________
-Alex |
|
| Back to top |
|
|
KermMartian

Site Admin

Joined: 14 Mar 2005 Posts: 55742 Location: Earth, Sol, Milky Way
|
|
| Back to top |
|
|
comicIDIOT

Guru

Joined: 01 May 2006 Posts: 5107 Location: SFBA, California
|
Posted: 14 Nov 2011 12:56:45 am Post subject: |
|
|
I can't troubleshoot that enough to get a valid reason why it won't work.
Code: # List all sub-directories as Portfolios if applicable portfolio thumbnail can be found
if (!isset($portfolio) || $portfolio == "") { echo 'Hello there 1<br>';
foreach($gallery_dirs as $f) { echo 'Hello there 2<br>';
if(file_exists($tpath . $f . '.jpg')) {
echo '<img src="' . $tpath . $f . '.jpg" name="' . $f .'">';
}
}
} #endif, Portfolio List I'm not getting either "Hello theres" and I know it's the correct page because I've changed some other things and gotten some non-fatal errors (and worked in preg_replace with some errors). :/
Update: I've changed the above code to the following, to still no avail. I get a "Hello there 0" but no "Hello there 1 or 2." It's not suppose to display images yet. Which, should actually have links around them. I guess I'll add that in as well. Then come back to this whole issue.
Code: # List all sub-directories as Portfolios if applicable portfolio thumbnail can be found
if ($portfolio) {echo 'Hello there 0<br>';} else { echo 'Hello there 1<br>';
foreach($gallery_dirs as $f) { echo 'Hello there 2<br>';
if(file_exists($tpath . $f . '.jpg')) {
echo '<img src="' . $tpath . $f . '.jpg" name="' . $f .'">';
}
}
} #endif, Portfolio List
_________________
-Alex |
|
| Back to top |
|
|
KermMartian

Site Admin

Joined: 14 Mar 2005 Posts: 55742 Location: Earth, Sol, Milky Way
|
Posted: 14 Nov 2011 04:30:02 pm Post subject: |
|
|
Can you add an echo "{{".$portfolio."}}"; right before the if(... statement so we can see more about what might be happening? _________________
 |
|
| Back to top |
|
|
comicIDIOT

Guru

Joined: 01 May 2006 Posts: 5107 Location: SFBA, California
|
Posted: 14 Nov 2011 05:13:20 pm Post subject: |
|
|
I did. No dice.
http://alexglanville.com/eyefi/
I added a closing bracket just for the heck if it, got an unexpected "}" on line 205. I have no idea why that won't show. Not even the brackets show. Which is odd. _________________
-Alex |
|
| Back to top |
|
|
KermMartian

Site Admin

Joined: 14 Mar 2005 Posts: 55742 Location: Earth, Sol, Milky Way
|
Posted: 14 Nov 2011 05:14:26 pm Post subject: |
|
|
| comicIDIOT wrote: | I did. No dice.
http://alexglanville.com/eyefi/
I added a closing bracket just for the heck if it, got an unexpected "}" on line 205. I have no idea why that won't show. Not even the brackets show. Which is odd. | Oh, that's a bit of PHP silliness. Try using "[[" and "]]" instead of the curly braces. _________________
 |
|
| Back to top |
|
|
comicIDIOT

Guru

Joined: 01 May 2006 Posts: 5107 Location: SFBA, California
|
|
| Back to top |
|
|
KermMartian

Site Admin

Joined: 14 Mar 2005 Posts: 55742 Location: Earth, Sol, Milky Way
|
|
| Back to top |
|
|
comicIDIOT

Guru

Joined: 01 May 2006 Posts: 5107 Location: SFBA, California
|
|
| Back to top |
|
|
rthprog

Expert

Joined: 21 Sep 2007 Posts: 726 Location: Pittsburgh, PA
|
Posted: 15 Nov 2011 03:02:00 am Post subject: |
|
|
Since you're loading the full-size images on the gallery page anyways, have you considered writing a client side viewer? As in, load all of your images on one page, and then focus on an image when the user clicks on one.
You could still make it possible to link to a particular image with anchors/GET - plus, you're making things slightly faster while making it all look slicker.
Also, hello. Long time no speak. |
|
| Back to top |
|
|
comicIDIOT

Guru

Joined: 01 May 2006 Posts: 5107 Location: SFBA, California
|
Posted: 15 Nov 2011 04:46:57 am Post subject: |
|
|
| rthprog wrote: | Since you're loading the full-size images on the gallery page anyways, have you considered writing a client side viewer? As in, load all of your images on one page, and then focus on an image when the user clicks on one.
You could still make it possible to link to a particular image with anchors/GET - plus, you're making things slightly faster while making it all look slicker.
Also, hello. Long time no speak. |
Initially, the full size images were 640x480, and they are on the demo pages. But since I plan to move this to my portfolio's, they'll almost be 800pixels on the longest side. I haven't considered a client side viewer. I know I'm misunderstanding what you are saying by client side viewer, but an iOS application has crossed my mind many times. But that's farther down the road when I start enabling online registration and booking for photography sessions.
So I'm understanding what you mean, do you have any examples of client-side viewers that are web based?
Hello as well! I've been following your projects and such on Facebook and must say I'm impressed by all of them; great job on the recent Facebook hackathon as well  _________________
-Alex |
|
| Back to top |
|
|
rthprog

Expert

Joined: 21 Sep 2007 Posts: 726 Location: Pittsburgh, PA
|
Posted: 15 Nov 2011 05:27:28 am Post subject: |
|
|
| comicIDIOT wrote: | | rthprog wrote: | Since you're loading the full-size images on the gallery page anyways, have you considered writing a client side viewer? As in, load all of your images on one page, and then focus on an image when the user clicks on one.
You could still make it possible to link to a particular image with anchors/GET - plus, you're making things slightly faster while making it all look slicker.
Also, hello. Long time no speak. |
Initially, the full size images were 640x480, and they are on the demo pages. But since I plan to move this to my portfolio's, they'll almost be 800pixels on the longest side. I haven't considered a client side viewer. I know I'm misunderstanding what you are saying by client side viewer, but an iOS application has crossed my mind many times. But that's farther down the road when I start enabling online registration and booking for photography sessions.
|
My client side, I mean client side javascript, as opposed to server side php. Something as simple as a lightbox with left/right buttons + keydown events would do.
A quick google search brings up tons of such implementations, though it would be fun to implement your own. (For example, http://galleria.aino.se/themes/folio/ )
| comicIDIOT wrote: |
Hello as well! I've been following your projects and such on Facebook and must say I'm impressed by all of them; great job on the recent Facebook hackathon as well |
Thanks! |
|
| Back to top |
|
|
comicIDIOT

Guru

Joined: 01 May 2006 Posts: 5107 Location: SFBA, California
|
Posted: 15 Nov 2011 02:18:19 pm Post subject: |
|
|
Ah, of course. I failed to realize server & client side scripts. I do have JavaScript in my plans, but nor for the gallery just yet. I want to continue my education of PHP before starting JavaScript. I'm not sure what project to start learning JavaScript with, though.
Meanwhile, I've made no progress in understanding where this error is stemming from  _________________
-Alex |
|
| Back to top |
|
|
KermMartian

Site Admin

Joined: 14 Mar 2005 Posts: 55742 Location: Earth, Sol, Milky Way
|
Posted: 15 Nov 2011 08:25:22 pm Post subject: |
|
|
Would you mind pastebinning your full code, or PMing it to be if you don't feel comfortable publishing it? Since you said nothing appears with $portfolio is empty, it sounds like you're doing something wrong above that.  _________________
 |
|
| Back to top |
|
|
comicIDIOT

Guru

Joined: 01 May 2006 Posts: 5107 Location: SFBA, California
|
|
| Back to top |
|
|
comicIDIOT

Guru

Joined: 01 May 2006 Posts: 5107 Location: SFBA, California
|
|
| Back to top |
|
|
KermMartian

Site Admin

Joined: 14 Mar 2005 Posts: 55742 Location: Earth, Sol, Milky Way
|
Posted: 16 Nov 2011 02:39:32 pm Post subject: |
|
|
Hahahahahaha, I figured it was probably something like that. Well done.  _________________
 |
|
| Back to top |
|
|
comicIDIOT

Guru

Joined: 01 May 2006 Posts: 5107 Location: SFBA, California
|
Posted: 16 Nov 2011 03:35:15 pm Post subject: |
|
|
Thanks
Update: I've managed to add links to the respective portfolios, added the background images, restyled the notices and what not. Still need to sanitize the input and I plan to work with functions a bit and see if I can get the size down at all.
All that remains is figuring out how to fetch the thumbnails from their respective directory. Currently, I'm fetching and resizing full-size 900px photos. I don't get that much traffic, but I'm assuming my bandwidth would suffer anyways.
http://alexglanville.com/portfolio.php?portfolio=Hello! _________________
-Alex |
|
| Back to top |
|
|
comicIDIOT

Guru

Joined: 01 May 2006 Posts: 5107 Location: SFBA, California
|
Posted: 17 Nov 2011 02:11:22 pm Post subject: |
|
|
Was able to adjust the script so that it would use thumbnails. No file_exists is in place to catch if the thumbnail isn't there for the full size image yet, but I know I'll need to add that. Right now I'm focusing on getting the include files in place and rewriting some pages to accept changes in the future - i.e. a different style.
Currently, the last two navigation links will result in error messages on the portfolio page, just to show it off.
Other things that I plan to adjust is to push down the portfolios, maybe enough so when the error message appears it doesn't push anything down the page a bit (not that it terribly matters). When I get around to the finalizing the pages as a whole, I'll need to take a new head-shot as the current head shot is a bad portrait and almost two years old.
Check it out! New & Old refers to the portfolio script, I'm not changing domains
New: http://www.comicidiot.com
Old: http://www.alexglanville.com _________________
-Alex |
|
| Back to top |
|
|
|
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.
» Go to Registration page
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
© Copyright 2000-2013 Cemetech & Kerm Martian :: Page Execution Time: 0.048617 seconds.
|