jDownloadsownloads.com

Author Topic: Content plugin  (Read 113 times)

0 Members and 1 Guest are viewing this topic.

Offline heinchrs

  • Newbie
  • *
  • Posts: 2
Content plugin
« on: 01.05.2021 16:22:52 »
For the content plugin it would be useful to have the possibility to add class attributes for the image display.
The plugin itself displays the filetype image (filepic) without the possibility to define a specific class attribute for the image.

Is it possible to implement this or is there a other way to do this?

Offline ColinM

  • Moderator
  • *
  • Posts: 3.985
Re: Content plugin
« Reply #1 on: 02.05.2021 15:03:26 »
Hi
The simple answer is yes!  The plugin uses ,by default, the laouy specified in  Options 'Content Plugin - Default Layout.  Or you can use the "jd_file_onlinelayout=..."Please see articlehttps://www.jdownloads.net/documentation-for-v3-9/modules-plugins-v3-9/using-the-content-plugin-in-articles-and-modules
The layout controls the view in the article.  In most of the standard Download layouts there is a line such as below

Quote
<div class="jd_image_right" style="">{screenshot_begin}<a href="{screenshot}" rel="lightbox"><img src="{thumbnail}" style="" />[/url]{screenshot_end} </div>
After making a copy of your selected layoutSee articlehttps://www.jdownloads.net/documentation-for-v3-9/layouts-v3-9/layouts-overview-an-introductionYou can then edit the layout to add you own styling directly.  If you want to add classes then these need to be in jdownloads_custom.cssSeehttps://www.jdownloads.net/documentation-for-v3-9/layouts-v3-9/custom-css-in-layouts
If you are unsure please let me know what you are trying to achieve and I will try to help
Colin

Offline heinchrs

  • Newbie
  • *
  • Posts: 2
Re: Content plugin
« Reply #2 on: 02.05.2021 21:29:30 »
Hi,
thanks for your answer, but i have a different problem.

In the content plugin there is a replacement of the token {file_pic}.
My question is, if there is a possibility to adapt the replacement.

In the content plugin file jdownloads.php on line 1490 the following code is executed:
Code: [Select]
$filepic = '<img src="'.JURI::base().$jDFPsfolders['file'].$files->file_pic.'" align="top" class="nothumb" width="'.$params->get('file_pic_size').'" height="'.$params->get('file_pic_size_height').'" border="0" alt="'.substr($files->file_pic,0,-4).'"/>';
I see no configuration item how this could be changed, so that i can insert a class attribute in the {file_pic} token.

I need this adaption since i have also the image sizer plugin from redim installed.
This this plugin tries to create thumbs for images which have height and width parameters it will create a lightbox for the file type images which i want to prevent by inserting the class="nothumb" .

Offline ColinM

  • Moderator
  • *
  • Posts: 3.985
Re: Content plugin
« Reply #3 on: 03.05.2021 17:34:44 »
Hi
I presume you mean a css classIf so what class do you want?
You can of course set the default sizes of the preview images without the need for a separate resizerSee options - Pictures - Specify the size of the preview images (thumbnails).
Colin