Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

MyAttachments CSS issue? on Vanilla 2.3.1

Hi, thank to @peregrine and @vrijvlinder but on Vanilla 2.3.1 then MyAttachments CSS file seems not inclued, is not?

Don't see something like this
<link rel="stylesheet" type="text/css" href="/plugins/MyAttachments/design/myattachments.css?v=2.2" media="all" />

Found this snippet in myattachmentstabview.php file

// Add the appropriate CSS file
$CSSType = C('Plugins.MyAttachments.CSSType');

if($CSSType) {
    $Sender->AddCssFile($this->GetResource('design' . DS . $CSSType, FALSE, FALSE));
}

Using default theme, not tried debbug mode ;-) but... may be an update is needed for now (since 2.3)

Comments

  • Will try to look into it as soon as I can.

  • edited December 2017


    Have you selected the css file to be added in the settings ? You need to select a style sheet for one to be included. View Type is the setting for selecting style sheets.

  • Yep, thank you for your quick reply... "default" view type, not tried A for example, there are the following lines in my conf. file
    $Configuration['Plugins']['MyAttachments']['CSSType'] = 'myattachments.css';
    $Configuration['Plugins']['MyAttachments']['Count'] = '10';
    $Configuration['Plugins']['MyAttachments']['SortField'] = 'DateInserted';
    $Configuration['Plugins']['MyAttachments']['SortDirection'] = 'desc';
    $Configuration['Plugins']['MyAttachments']['ClickPref'] = '';
    $Configuration['Plugins']['MyAttachments']['RestrictToImages'] = false;
    $Configuration['Plugins']['MyAttachments']['ShowPager'] = '1';

    Removed code snippet related to CSSType and then tried to use this way so it's right...
    $Sender->AddCssFile('myattachments.css', 'plugins/MyAttachments');

    May be a cache issue ;) I 'll try on a fresh install

  • edited December 2017

    Removed code snippet related to CSSType and then tried to use this way so it's right...

    You removed the functionality to choose a different style sheet for the MyAttachments page view. So it's wrong. The default setting adds the default sheet if there is one, however it is not necessary . If you were to choose another style sheet as the examples suggest, you would see this instead.
    $Configuration['Plugins']['MyAttachments']['CSSType'] = 'myattachmentsA.css';

    You are welcome to experiment however you want.

  • Yep, of course ;) thanks to you for your support. No time to test it on a fresh install but added to my 2018 to do list ;) see you soon

Sign In or Register to comment.