|
|
brocksamsung
from the forest (United States) on 2008-10-06 09:24 [#02242793]
Points: 159 Status: Regular
|
|
forgive me for posting this shit here, but doing it here seems to be more effective than any php board iv been to. those are usually filled to the brimstone with unanswered questions. anyway.
simple question. I would like to take the portion of this page which displays all the graphics and do it with php. rather than having to write out all the html every time I make a new page. how would I go about doing this?
http://www.bootlegsbypeoplewhocare.net/thebadhaircut/2008...
woof!
|
|
SlipDrinkMats
from Thanks (Bhutan) on 2008-10-06 11:29 [#02242830]
Points: 1744 Status: Regular
|
|
Or, do you mean some automated process that went through a directory of photos, created the thumbnails, and generated the HTML to display them automatically?
Or do you mean to have the same graphics appearing on different pages, in which case you would take that section, save it as, I don't know, graphics.php, then call it on all the pages you wanted to have it on with "include(graphics.php);"
|
|
SlipDrinkMats
from Thanks (Bhutan) on 2008-10-06 11:30 [#02242831]
Points: 1744 Status: Regular
|
|
You can see I orignally thought there were three possibilites but now I imagine it's probably option 1 which was at first option 2.
|
|
vlari
from beyond the valley of the LOLs on 2008-10-06 11:45 [#02242835]
Points: 13915 Status: Regular
|
|
shaking pictures on mouseover,
now thats old school
|
|
brocksamsung
from the forest (United States) on 2008-10-06 23:37 [#02243112]
Points: 159 Status: Regular
|
|
yeah. i took the shakes from that old aphex twin website .nu or whatever. i think that's what it was,..
what I want to do is set up some php code I can dump in place of the table full of photos which will basically write up the same html code found there and display all the graphics found in the two folders. the thumbs and the actually photos.
simple pimple, you know? eventually I will get around to setting up some server side functions to make the thumbs on it's own. but photoshop works fine for now. it's got some scripts in it for easy auotmated blah blh blah.
woof yeah?
|
|
hedphukkerr
from mathbotton (United States) on 2008-10-07 01:24 [#02243114]
Points: 8833 Status: Regular | Followup to brocksamsung: #02243112
|
|
"that old aphex twin website .nu"
oh yeah, that old piece of crap.
|
|
horsefactory
from 💠 (United Kingdom) on 2008-10-07 06:28 [#02243193]
Points: 14867 Status: Regular
|
|
you can use something like this
$gallery = opendir("./"); while (($file = readdir($gallery))!==false) { if(preg_match("/\.(jpg|jpeg|gif|png)$/i", $file)){ ?> "
} } closedir($gallery);
in your case you should change the directory in the first line to /photo/ and the img src bit to your td stuff
|
|
brocksamsung
from the forest (United States) on 2008-10-08 00:42 [#02243483]
Points: 159 Status: Regular
|
|
ok so im messing around with this a little bit. iv dumped your codes on to the page.
how should I go about doing this? sorry im still very new to how this stuff works. all the other php shit on this page was done by my ex girly friend.
here is a txt of the php file.
http://www.bootlegsbypeoplewhocare.net/thebadhaircut/2008...
and here is the actual page iv done ths to and the result.
http://www.bootlegsbypeoplewhocare.net/thebadhaircut/2008...
|
|
oxygenfad
from www.oxygenfad.com (Canada) on 2008-10-08 07:58 [#02243528]
Points: 4442 Status: Regular
|
|
You're gonna want to wrap some PHP tags around that code.
Horsefactory code
?>
|
|
brocksamsung
from the forest (United States) on 2008-10-08 13:54 [#02243635]
Points: 159 Status: Regular
|
|
ho shit dawg, you are right.
|
|
brocksamsung
from the forest (United States) on 2008-10-08 13:57 [#02243637]
Points: 159 Status: Regular
|
|
and the result is,
http://www.bootlegsbypeoplewhocare.net/thebadhaircut/2008...
the txt again, http://www.bootlegsbypeoplewhocare.net/thebadhaircut/2008...
|
|
horsefactory
from 💠 (United Kingdom) on 2008-10-08 15:08 [#02243670]
Points: 14867 Status: Regular
|
|
yo sorry, forgot to include something in that - on the 4th line, instead of " you need to put whatever code you want it to print for each image, where $file is the filename
so something like
"
|
|
horsefactory
from 💠 (United Kingdom) on 2008-10-08 15:14 [#02243673]
Points: 14867 Status: Regular
|
|
ah, xltronic is taking it out
look here
that should work if you paste it straight into your page and set it to look in the right directory, then just change line 4 to whatever html you want for each image
|
|
brocksamsung
from the forest (United States) on 2008-10-12 21:54 [#02244900]
Points: 159 Status: Regular
|
|
ok so now what we've got is this.
http://www.bootlegsbypeoplewhocare.net/thebadhaircut/2008...
http://www.bootlegsbypeoplewhocare.net/thebadhaircut/2008...
|
|
Messageboard index
|