HTML Logo by World Wide Web Consortium (www.w3.org). Click to learn more about our commitment to accessibility and standards.

Moving forward with Composr

ocPortal has been relaunched as Composr CMS, which is now in beta. ocPortal 9 will be superseded by Composr 10.

Head over to compo.sr for our new site, and to our migration roadmap. Existing ocPortal member accounts have been mirrored.


thumbnails in downloads?

Login / Search

 [ Join | More ]
 Add topic 
Posted
Rating:
#50103 (In Topic #10920)
LB
Avatar

Well-settled

thumbnails for images in downloads get messed up

175 views (91 Kb)

Attachment
» Download: e61adeaa7222ba505515365e42f33ba5.dat (3 Bytes, 0 downloads so far)
Hello,
Thumbnails for images in downloads get messed up: instead of thumbnail, system is showing image it self, but even not always the right one.
If I go: Downloads > Sub-category > (please see attachment 1), I can see some downloads with thumbnails, some - with pictures itself (they look bigger); some images are the right ones, but some - belong to different download.
If I click on one of wrong images, it takes me to the right download (please see attachment 2), but still will show the same wrong image.
Then, click on this wrong image - it will show right image (please see attachment 3).
I went though all my downloads, checked all "Representative image", it seemed to be all right for a while, but now it is wrong again (not sure when it happened, noticed in a few days)…
Please help!
Thank you,
LB

Back to the top
 
Posted
Rating:
#50110
Avatar

Hi,

The first problem is due to the way the system works. Image thumbnails are generated to fit a width. If the source image is less wide than that width then it won't be enlarged, but otherwise the image will be resized to that width. In your case you've got some tall scanned images that look unusual with that algorithm.
I'll have a think about this for you.

I'm not sure about the second problem but I'll look into this for you and see if I can reproduce it.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#50113
LB
Avatar

Well-settled

Yes, I do not mind my thumbnails to be the standard width, it is OK.
Thank you,
LB :)
Back to the top
 
Posted
Rating:
#50149
Avatar

Hi,

I've tracked down the bug :).

The attached file replaces sources/downloads.php and should stop the corruption happening again in the future. You may need to repair things this time around though – sorry for the inconvenience there.

Attachment
» Download: downloads.php (24 Kb, 148 downloads so far)


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#50171
LB
Avatar

Well-settled

Thank you so much :D
Back to the top
 
Posted
Rating:
#50184
LB
Avatar

Well-settled

After replacing this file... nothing is working:

An error has occurred

PHP NOTICE [8] Undefined index: id (version: 4.1.9, PHP version: 4.4.9, URL: /site/index.php?page=downloads&type=misc&id=4&root=1)

Here is the stack trace:

Below is a stack trace revealing the state the software was in when the error occurred. If this represents a bug in the unmodified software, you may want to check ocPortal website for a fix, and if there isn't one, report this as a bug. Please note that merely posting a stack trace is not sufficient for us to solve your problem; the stack trace is just an aid that presents us with additional information. We still need to know the error message, what you tried to do, how you tried to do it, version numbers, and any other appropriate information.
We apologise for this problem and if it's a bug we hope you will work with us so that we can fix it for you promptly.

File'/hsphere/local/home/snibbler/plant-doctor.net/sources/failure.php'
Line'224'
Function'get_html_trace'
Args

File'/hsphere/local/home/snibbler/plant-doctor.net/sources/global2.php'
Line'837'
Function'_fatal_exit'
Args'PHP NOTICE [8] Undefined index: id'


File'/hsphere/local/home/snibbler/plant-doctor.net/sources/global2.php'
Line'706'
Function'fatal_exit'
Args'PHP NOTICE [8] Undefined index: id'


Function'ocportal_error_handler'
Args8

'Undefined index: id'

'/hsphere/local/home/snibbler/plant-doctor.net/sources/downloads.php'

81


File'/hsphere/local/home/snibbler/plant-doctor.net/sources/downloads.php'
Line'81'
Function'get_download_html'

File'/hsphere/local/home/snibbler/plant-doctor.net/sources/downloads.php'
Line'431'
Function'get_download_html'
Argsarray ( 'id' => 24, 'category_id' => 4, 'name' => 4918, 'url' => 'uploads/downloads/49b8340ad66c8.dat', 'description' => 4919, 'author' => 'Scot C. Nelson and Brian C. Bushe', 'comments' => 4920, 'num_downloads' => 0, 'out_mode_id' => NULL, 'add_date' => 1236808714, 'edit_date' => 1236974563, 'validated' => 1, 'default_pic' => 1, 'file_size' => 138268, 'allow_rating' => 1, 'allow_comments' => 1, 'allow_trackbacks' => 1, 'notes' => '', 'download_views' => 23, 'download_cost' => 0, 'download_submitter_gets_points' => 0, 'submitter' => 2, 'original_filename' => 'TopCrops_TopDiseases(1)-1.pdf', 'rep_image' => '', 'download_licence' => NULL, 'download_data_mash' => '', )

3


File'/hsphere/local/home/snibbler/plant-doctor.net/site/pages/modules/downloads.php'
Line'280'
Function'get_category_downloads'
Args4

1


File'/hsphere/local/home/snibbler/plant-doctor.net/site/pages/modules/downloads.php'
Line'249'
Function'category_screen'
Class'module_downloads'
Type'->'
Args

File'/hsphere/local/home/snibbler/plant-doctor.net/sources/zones.php'
Line'310'
Function'run'
Class'module_downloads'
Type'->'
Args

File'/hsphere/local/home/snibbler/plant-doctor.net/sources/site.php'
Line'805'
Function'load_module_page'
Args'site/pages/modules/downloads.php'

'downloads'


File'/hsphere/local/home/snibbler/plant-doctor.net/sources/site.php'
Line'637'
Function'request_page'
Args'downloads'

true


File'/hsphere/local/home/snibbler/plant-doctor.net/site/index.php'
Line'51'
Function'do_site'
Args

Back to the top
 
Posted
Rating:
#50185
Avatar

Sorry about that – my mistake, there was a second thing I had to change.
Attachment
» Download: downloads.php (24 Kb, 166 downloads so far)


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#50186
LB
Avatar

Well-settled

Now it looks good!
Thank you :)
Back to the top
 
1 guests and 0 members have just viewed this: None
Control functions:

Quick reply   Contract

Your name:
Your message: