Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: [1]   Go Down

Author Topic: Problem with "Pic_download_link" plugin in one of custom themes  (Read 5464 times)

0 Members and 1 Guest are viewing this topic.

vikler

  • Coppermine newbie
  • Offline Offline
  • Posts: 12
Problem with "Pic_download_link" plugin in one of custom themes
« on: October 06, 2014, 09:19:39 pm »

Hi everyone. I seem to have problem with using "Pic_download_link" plugin in one of my custom themes. I can click the link, and the download starts. But I can't open image, it says I have a corrupted jpg.
Anyway, here is the link to the theme that seems problematic:
http://dane-dehaan.org/photos/displayimage.php?theme=omm_cpg18&album=322&pid=19472#top_display_media
try clicking on "Download HQ photo": you will face the problem described above
And on other themes it works well, the downloaded image can be opened and viewed:
http://dane-dehaan.org/photos/displayimage.php?theme=dane&album=322&pid=19472#top_display_media
Logged

ron4mac

  • Administrator
  • Coppermine addict
  • *****
  • Country: us
  • Offline Offline
  • Posts: 2027
Re: Problem with "Pic_download_link" plugin in one of custom themes
« Reply #1 on: October 07, 2014, 12:30:58 am »

There is a LF character (0x0A) prepended to the file when downloaded from the problem theme. I suspect that somewhere the theme code is unnecessarily outputting a linefeed character before the plugin gets a chance to send the file. Suspect areas to look for are extra lines after the closing ?> of a .php file. It's generally best to just delete the ?> at the end of php files.
Logged

vikler

  • Coppermine newbie
  • Offline Offline
  • Posts: 12
Re: Re: Problem with "Pic_download_link" plugin in one of custom themes
« Reply #2 on: October 07, 2014, 12:42:49 am »

There is a LF character (0x0A) prepended to the file when downloaded from the problem theme. I suspect that somewhere the theme code is unnecessarily outputting a linefeed character before the plugin gets a chance to send the file. Suspect areas to look for are extra lines after the closing ?> of a .php file. It's generally best to just delete the ?> at the end of php files.
thanks for your reply, however I can't find where the located LF character is :( I don't use php's in this theme, it's just template.html. My theme.php is empty.
Any tips on how I find the LF character and get rid of it?:(
Logged

ron4mac

  • Administrator
  • Coppermine addict
  • *****
  • Country: us
  • Offline Offline
  • Posts: 2027
Re: Problem with "Pic_download_link" plugin in one of custom themes
« Reply #3 on: October 07, 2014, 01:47:40 am »

your theme.php needs to be at least one line:
Code: [Select]
<?php
Logged

vikler

  • Coppermine newbie
  • Offline Offline
  • Posts: 12
Re: Re: Problem with "Pic_download_link" plugin in one of custom themes
« Reply #4 on: October 07, 2014, 01:49:56 am »

your theme.php needs to be at least one line:
Code: [Select]
<?php
:) that fixed my problem. thanks so much!
Logged
Pages: [1]   Go Up
 

Page created in 0.018 seconds with 20 queries.