Separate model for viewing attachments in line?

Kevin

Well-known member
I'm working on a quick little hack to allow guests to view specified image extensions (yes, I want to have guests view images but not other attachment types). By extending Model_Attachment I can get it so that clicking on the attached image shows the image to the guest but when the image is embedded full size within the post then the guest still sees the thumbnail; clicking on the thumbnail opens the full size image in a new window.

I'd like to also have it so that guests viewing posts with images attached & embedded full size will see the full size image also.

Any pointers for which direction to look in?

Thanks :)
 
It's not really overkill. It really doesn't do much more than what you're asking.

It does everything you need plus it has an extra few lines of code to reduce the amount of bandwidth and queries used to fetch an image. It's a much shorter route to achieve what you want seeing as the code for it is already written.
 
It's not really overkill. It really doesn't do much more than what you're asking.

It does everything you need plus it has an extra few lines of code to reduce the amount of bandwidth and queries used to fetch an image. It's a much shorter route to achieve what you want seeing as the code for it is already written.
For my purposes it is easier & more straight forward for me to just add something to one of my existing listeners than using another add-on so, yes, it would be an overkill for me.
 
We'll obviously have to agree to disagree. It's not really easier and straight forward to write new code when it already exists.

But if you paste your code so far we can see what's missing.
 
Top Bottom