phpBB2Refugees.com Logo
Not affiliated with or endorsed by the phpBB Group

Register •  Login 

Continue the legacy...

Welcome to all phpBB2 Refugees!Wave Smilie

This site is intended to continue support for the legacy 2.x line of the phpBB2 bulletin board package. If you are a fan of phpBB2, please, by all means register, post, and help us out by offering your suggestions. We are primarily a community and support network. Our secondary goal is to provide a phpBB2 MOD Author and Styles area.

Attachment thumbs on viewforum

Goto page 1, 2  Next
 
Search this topic... | Search phpBB2 Discussion... | Search Box
Register or Login to Post    Index » phpBB2 Discussion  Previous TopicPrint TopicNext Topic
Author Message
JLA
Board Member



Joined: 30 Apr 2009

Posts: 451
Location: U.S.A


flag
PostPosted: Tue Apr 24, 2012 1:01 pm 
Post subject: Attachment thumbs on viewforum

Since no reason to reinvent the wheel - anyone know if something was developed that took a thumb of a picture attachment of a post (attached with attachment mod) and put it on viewforum??

Thanks in advance

_________________
http://www.jlaforums.com
Back to top
JLA
Board Member



Joined: 30 Apr 2009

Posts: 451
Location: U.S.A


flag
PostPosted: Thu May 17, 2012 11:04 am 
Post subject: Re: Attachment thumbs on viewforum

Anyone?

Thanks again!

_________________
http://www.jlaforums.com
Back to top
drathbun
Board Member



Joined: 24 Jul 2008

Posts: 729
Location: Texas


flag
PostPosted: Thu May 17, 2012 3:25 pm 
Post subject: Re: Attachment thumbs on viewforum

I haven't seen one. What do you want to happen if there is more than one photo attached?
_________________
phpBBDoctor Blog
Back to top
JLA
Board Member



Joined: 30 Apr 2009

Posts: 451
Location: U.S.A


flag
PostPosted: Thu May 17, 2012 6:03 pm 
Post subject: Re: Attachment thumbs on viewforum

Well normally there might be multiple attachments of various kinds with a topic. What we would like it to do is when a user pulls up viewforum that it look to see

1st, if there are any attachments for each topic row. If so, it would need to know if one of those attachments was a picture file. If so, it would create a thumbnail (using the same method as Smartor's Original Photo Gallery)

A few things to consider here. Since this would be implemented on a high traffic site, some thought needs to be given how this will scale.

* An indicator would probably need to be put in the topic table indicating along with the existing attachment indicator that one of the topic attachments is a picture file. Also there would be a field that would store the thumbnail name (just as in Smartor's Photo Gallery) of the 1st attached picture of the topic. Doing this will keep you from having to do separate queries in some cases to pull the information separately after the initial topic sync.

* During posting, once the 1st picture is attached, the picture indicator on the topic row would be set, the thumbnail would be created (just as it is during photo posting in Smartor's Photo Gallery) and the thumbnail name would be stored on the topic row as well.

* Since we have nearly 160 million postings on the site, some process needs to be made to deal with existing topics with attachments. Smartor's Photo Gallery does a similar thing so the function for this could be pull from there. We would have to put one additional indicator field if a topic has already been processed for this new functionality. If the indicator is not set, and the attachment indicator is set, then it will query the attachments table to see if any of the topic attachments are pictures and then run the process similarly as is done with posting.

* Later on further development can be made to convert existing [img] and other non-attached topic images into attached topic images. This should be able to be done through a similar process.

_________________
http://www.jlaforums.com
Back to top
drathbun
Board Member



Joined: 24 Jul 2008

Posts: 729
Location: Texas


flag
PostPosted: Mon May 21, 2012 3:19 pm 
Post subject: Re: Attachment thumbs on viewforum

When I read this, what I'm thinking about is an ebay style site, where each "topic" has attached images. So when you are viewing a list of topics on viewforum.php the topic icon is the attached image. That's sort of what you're going for?

The sync could be a background cron job that runs at a lower priority so that it slowly catches up to the total number of topics. The "create thumbnail" code should not be too bad. Basically nothing of what you're asking seems far outside the realm of possibility, just a question of getting someone with time to write the code.

_________________
phpBBDoctor Blog
Back to top
JLA
Board Member



Joined: 30 Apr 2009

Posts: 451
Location: U.S.A


flag
PostPosted: Mon May 21, 2012 4:59 pm 
Post subject: Re: Attachment thumbs on viewforum

Very true.

The code with Smartor's gallery that deals with Thumbs could easily be pulled over to perform most of the functions here. As far as the CRON - that shouldn't be an issue either as we use CRON job's extensively as it is already.

Just didn't know if there was something already done by somebody in the past. From what you are telling me, that doesn't seem the case so looks like this will get added to the development queue to be cranked out.

Thanks again

_________________
http://www.jlaforums.com
Back to top
drathbun
Board Member



Joined: 24 Jul 2008

Posts: 729
Location: Texas


flag
PostPosted: Wed May 23, 2012 12:20 pm 
Post subject: Re: Attachment thumbs on viewforum

Found this while looking up something else related to image handling:

http://us.php.net/manual/en/function.exif-thumbnail.php

Look at one of the early user-contributed notes. It's a script that will take a set of jpg images and embed a thumbnail within the image. That way the thumbnail goes with the image and doesn't have to be stored separately. Seems like an interesting concept; don't know if it's appropriate for your project or not.

_________________
phpBBDoctor Blog
Back to top
JLA
Board Member



Joined: 30 Apr 2009

Posts: 451
Location: U.S.A


flag
PostPosted: Wed May 23, 2012 12:44 pm 
Post subject: Re: Attachment thumbs on viewforum

drathbun wrote:
Found this while looking up something else related to image handling:

http://us.php.net/manual/en/function.exif-thumbnail.php

Look at one of the early user-contributed notes. It's a script that will take a set of jpg images and embed a thumbnail within the image. That way the thumbnail goes with the image and doesn't have to be stored separately. Seems like an interesting concept; don't know if it's appropriate for your project or not.


That is interesting and we'll have to look at it in more detail. The question is how will it scale under load. As you might know, we significantly rewrote quite a bit of Smartor's Photo Gallery since the original code was never meant to efficiently handle more than say 50,000 to 100,000 photos. In comparison, we are currently up to over 3.3 million posted photos.

So, lets look at an example - on the photo gallery cat page (grid or detail view), we display 12 image thumbnails in addition to a possible 10 more for the highest rated block. We selected a thumbsize that was a good size compromise. The thumbs are created at the time of photo upload so there is little overhead in that regard when the album cat page is viewed. The thumbs are stored so they have a very quick access time and it scales decently when looking at simultaneous page views.

When you start having thousands of simultaneous page views, the thumbs need to be served efficiently.

So when looking at view forum, there would be a possible 25 thumbs (since that is the amount of topics per page that are displayed), and using the same method for thumb display should scale similar to that of the album cat page.

The question is, would using this PHP function be more efficient under load than the current method? I'll add it to the project considerations.

Thanks for pointing that out.

_________________
http://www.jlaforums.com
Back to top
hoimyr
Board Member



Joined: 16 Apr 2009

Posts: 115
Location: Oslo


flag
PostPosted: Fri May 25, 2012 5:09 pm 
Post subject: Re: Attachment thumbs on viewforum

I have this on my board. It grabs the first attachment and makes an thumbnail when the post is submitted. It has been installed and recoded 3 times by different guys so i have no idea how i can extract it. I rented a guy on scriptlance last time some months ago. I had some problems with the old version but all the bugs are gone now. I can provide the files on email and maybe you can make a mod out of it?

Did you see this? http://phpbb2refugees.com/viewtopic.php?t=798
Back to top
JLA
Board Member



Joined: 30 Apr 2009

Posts: 451
Location: U.S.A


flag
PostPosted: Sat May 26, 2012 2:06 am 
Post subject: Re: Attachment thumbs on viewforum

hoimyr wrote:
I have this on my board. It grabs the first attachment and makes an thumbnail when the post is submitted. It has been installed and recoded 3 times by different guys so i have no idea how i can extract it. I rented a guy on scriptlance last time some months ago. I had some problems with the old version but all the bugs are gone now. I can provide the files on email and maybe you can make a mod out of it?

Did you see this? http://phpbb2refugees.com/viewtopic.php?t=798


Please contact us at info@jlaforums.com

Seems cannot send a PM here

Thanks!

_________________
http://www.jlaforums.com
Back to top
dogs and things
Board Member



Joined: 18 Nov 2008

Posts: 628
Location: Spain


flag
PostPosted: Sat May 26, 2012 4:36 pm 
Post subject: Re: Attachment thumbs on viewforum

The email- function works fine though, just click his email icon.
_________________
phpBB2 will never die, I hope!
Back to top
hoimyr
Board Member



Joined: 16 Apr 2009

Posts: 115
Location: Oslo


flag
PostPosted: Tue May 29, 2012 9:10 am 
Post subject: Re: Attachment thumbs on viewforum

Im currently fishing it out... icon_smile.gif

You have ALOT of users JLA. How does your phpBB handle all the attachments? Do you have a didicated server?
I want to split my attachments to multiple servers. Thats my next big project..
Back to top
drathbun
Board Member



Joined: 24 Jul 2008

Posts: 729
Location: Texas


flag
PostPosted: Tue May 29, 2012 9:15 am 
Post subject: Re: Attachment thumbs on viewforum

Attachments themselves, other than the bandwidth used to up/download them, should not really be a performance issue. Disk space, yes. Performance, no. It's a very simple process to read and serve up a file. In my opinion, database queries are a far heavier strain on the server than attachments.

That being said, I've been toying with a hashing algorithm to split attachments into different folders, rather than having everything dumped into a single folder. It's not for performance, but simply to keep that one folder from exceeding reasonable limits as far as the number of included files.

_________________
phpBBDoctor Blog
Back to top
hoimyr
Board Member



Joined: 16 Apr 2009

Posts: 115
Location: Oslo


flag
PostPosted: Tue May 29, 2012 3:02 pm 
Post subject: Re: Attachment thumbs on viewforum

Quote:
hashing algorithm to split attachments into different folders, rather than having everything dumped into a single folder. It's not for performance, but simply to keep that one folder from exceeding reasonable limits as far as the number of included files.


The attachment mod needs that so bad. I am already worried about my folder.. and its just about 10.000 files. But it is growing fast. I had an idea of splitting them by year but any kind of split is good. Can you make a mod out of it? icon_mrgreen.gif I can test it. icon_cool.gif

Yes when i wrote splitting to servers i was thinking bandwidth. What i was thinking of was to have an "mirror" panel inside the ACP where you could add servers and paths. Then just copy all the attachments over to that server/path with ftp. Then we have to make som kind of "random script" on the main site that uses all the "mirrors" equally. But i dont know yet how to deal with new attachments. Direct uploading to mirrors aso..

ontopic:
still working on the files..
Back to top
drathbun
Board Member



Joined: 24 Jul 2008

Posts: 729
Location: Texas


flag
PostPosted: Tue May 29, 2012 4:35 pm 
Post subject: Re: Attachment thumbs on viewforum

hoimyr wrote:
Can you make a mod out of it? icon_mrgreen.gif I can test it. icon_cool.gif

Eventually, yes.

JLA, sorry for hijacking your topic. icon_redface.gif

_________________
phpBBDoctor Blog
Back to top
Display posts from previous:   
Register or Login to Post    Index » phpBB2 Discussion  Previous TopicPrint TopicNext Topic
Page 1 of 2 All times are GMT - 4 Hours
Goto page 1, 2  Next
 
Jump to:  

Index • About • FAQ • Rules • Privacy • Search •  Register •  Login 
Not affiliated with or endorsed by the phpBB Group
Powered by phpBB2 © phpBB Group
Generated in 0.0627 seconds using 16 queries. (SQL 0.0165 Parse 0.0011 Other 0.0450)
phpBB Customizations by the phpBBDoctor.com
Template Design by DeLFlo and MomentsOfLight.com Moments of Light Logo