last day (15 days later) » 

19:09
great thank you! :)
hi
so tell me what we need to accomplish
I'll try to be more clear...
I creating a single page site where every post appear as a thumbnail
the point is that some post have a lot of images inside them
and I want the user to be able to load those images directly from the home page
when a thumbnail is clicked, it will be opened in fancybox, and the rest of the images are supposed to be visible when clicking the next button
from the backoffice, images are just uploaded in the post editor. So it appears as <img src> tags
Are u still following me? :)
hmm. so you need to do 2 things
1. read through all images embedded in the posts
2. make it so the images may be navigated freely in one rel gallery
is there text within these posts as well?
or just the images
19:15
no text at the moment, there is not supposed to be.
ok. and you have control over this? it is your own site? or we just trust that this is the case?
I can tell the future user not to add text in those posts. :)
I'm making the site for a friend.
and what if the user right clicks on thumbnail and says "open in new tab" ?
this is why i gave you the if(is_ajax()) stuff
have to have a condition for people who browse that way
anyway. in the single, when it is ajax, you could make it so each image in the main div is "display:none"
so say you wrap AJAX content in div called "ajax-gallery"
I tried with the working images, they open in a new tab.
Didn't thought of it.
But on middle mouse button or ctrl+click the fancybox opens.
then css say `div.ajax-gallery img { display: none; }
hmm lemme think
i actually did something like this here
each photo-gallery is a post type
it gets featured image, then runs through ALL attachment images though. not just ones embedded
you can reorder those with media uploader. but you'd have to DELETE them if you don't want them included
19:21
the exact solution :)
but is a little dirty
all the images are already there. view source. they are just display none
its not ajax
more elegant solution would be for single.php to load all of the images and display none
so you only load them when time is right
otherwise == high bandwidth
make sense?
I don't really need ajax. Yeah I get it. that's what I was thinking about with my first proposition I guess?
Not bandwidth friendly, but working. :)
yea. but is possible to do "correctly" as well with a bit of tinkering
if you wanted
i'll give you source code one sec
ok
ok this needs modified cause it is post_type of 'gallery'
and is getting ALL images in post. not in "content"
all attachments
class="silent-partner" is display:none
19:26
I'm not sure to understand the difference
if i upload 300 images to a post
but only "place" 3 of them in the body
all 300 are considered attachments for the purpose of this loop
this doesnt examine the body (content), only the database. attachments are connected to posts
ok, so it takes all the images from the site?
no, from a particular post
sorry I'm a newb :)
everything you upload to a post is attached to that post until it is destroyed
a reference in the database
you have used media uploader right?
19:29
yep
it is confusing because within it you could place an image from one post into another, right?
but that image doesn't BELONG to that post. it is "attached to" the original post
go look at the media library. it will show you which images belong to which posts
and that is what my loop gets. images ATTACHED to the post(s). so, that can work. but you have to understand the difference to make it work for you
I'm going to have a haaard time :)
That's the messy part of wordpress
yea cause what you are talking about is you PLACE all the images inside a post
but then you would have to use preg_match or something to find them and do something with them
you have to rel="gallery_name" them somehow too
otherwise fancybox will just keep going from one post's images to the next
i took care of that in my second example code
already noticed that
19:47
I'll have to go. Is this room staying open or should I copy everything now?
better copy
:)
i believe the room only persists if one of us stays in it.
best of luck. let me know if you need further help after you try some things
Thanks a LOT, I'll try to adapt your code tomorrow. Yeah I'll let you know for sure.
Have a nice... afternoon?
yup. 3pm here
you too
19:54
thx again, bye!

last day (15 days later) »