Jump to content

Recommended Posts

Just now, Lutz said:

Media Manager for storing the images?

Each media is a PW page, hidden in admin part of the tree. Non-supersusers never get to see them :-).

Share this post


Link to post
Share on other sites
27 minutes ago, David Karich said:

Apropos: I never received a download link for the update to 012 by mail. Or do I have to buy a new license?

Subscriptions (update + VIP support) are valid for 1 year. After that you can renew for a fraction of the original price. Otherwise, I don't send out update reminders but post here in the forums. If you have a valid subscription, you can use the resend download links form to get an email with the download link to the latest version (or use the link in the original email you received after purchase). For renewals, please use the renewal form. Any problems, please PM or send me an email.

  • Like 1

Share this post


Link to post
Share on other sites
47 minutes ago, kongondo said:

Each media is a PW page, hidden in admin part of the tree. Non-supersusers never get to see them :-).

@kongondo To prevent a misunderstanding: each media is stored in the database, not in the file system?

Share this post


Link to post
Share on other sites
33 minutes ago, Lutz said:

@kongondo To prevent a misunderstanding: each media is stored in the database, not in the file system?

Sorry I wasn't clear.

Media = $page

Media has one MM field. In the case of images, it is an multi image field. So $page->image_field will give you the image

Media has a title field: $page->title;// title of your media

If you had own fields to Media, you can access them using $page->your_field, as usual.

However, we don't use the variable $page. Instead what you get is a MediaManager Object.

So, Media page object is $mm.

Echo $mm->id: id of the media

Echo $mm->title;

// this is the image field

foreach($mm->media) {

}

Hope this makes sense.

 

Share this post


Link to post
Share on other sites
31 minutes ago, kongondo said:

Hope this makes sense.

 

@kongondo Yes, thank you, this is what I had expected and hoped for. My question was in terms of scalability, regarding file system limits. In PW, files are stored in subdirectories under /site/assets/files, therefore we normally have to deal with max directory limits (e.g. 32k). We have $config->pagefileExtendedPaths, but it's marked as beta. So as you mentioned +500k, I hoped for an info regarding the stability of pagefileExtendedPaths (or another way to avoid collisions with max directory limits). When they manage +500k, did they enable pagefileExtendedPaths?

Share this post


Link to post
Share on other sites
1 hour ago, Lutz said:

When they manage +500k, did they enable pagefileExtendedPaths?

I have no idea. I never asked. I could try and find out.

  • Like 1

Share this post


Link to post
Share on other sites

Thanks for this awesome module! Here is some feedback after some hours of testing: When using MediaManager along with Ryan’s ProDrafts, I had to manually disable ProDrafts support for the MediaManager specific templates. Otherwise, inserted images from the MediaManager would not display in the saved pages (neither drafts nor published versions). I figure this was because the images in MediaManager were by default also handled as drafts. After disabling ProDrafts for the MediaManager templates, everything – including working with drafts – works just fine.

  • Like 1

Share this post


Link to post
Share on other sites
11 hours ago, tb76 said:

Thanks for this awesome module!

Glad you like it.

11 hours ago, tb76 said:

I figure this was because the images in MediaManager were by default also handled as drafts. After disabling ProDrafts for the MediaManager templates, everything – including working with drafts – works just fine.

Thanks for testing and reporting back. I guess it doesn't make much sense to have a draft media (i.e. using ProDrafts). However, if you have added other fields to your Media Manager templates, you might want those to work with drafts. Hmm. I've never used ProDrafts before but you've given me something to think about.

Share this post


Link to post
Share on other sites

Hi kongondo,

one of our customers asks, if it would be possible to write out not only the usage amount of media manager items, but also all usages as list with concrete info about field, page etc. I know, this isn't going to be easy, but maybe it's worth the effort, if other users reported the same idea?

Greetings,

Thomas.

  • Like 1

Share this post


Link to post
Share on other sites
On 6/21/2019 at 3:57 PM, xportde said:

one of our customers asks, if it would be possible to write out not only the usage amount of media manager items, but also all usages as list with concrete info about field, page etc. I know, this isn't going to be easy, but maybe it's worth the effort, if other users reported the same idea?

Hi Thomas,

I'll have a think. The interface will need careful thought as it would need to be separate from the tooltip.

Share this post


Link to post
Share on other sites
On 5/10/2019 at 3:09 PM, kongondo said:

However, two people have reported an error about class ProcessMediaManager not found in line 20 of MediaManagerUtilities.

Three people now! haha

Any news on this bug?? Thanks!

I rolled back but now I am having issues with JqueryUpload version 008 working, tried rolling back to 002 but I still can't open when I click on Add Media on any of the pages, getting:

 Uncaught Error: Class 'ProcessWire\JqueryFileUpload' not found in /srv/users/serverpilot/apps/ladosis/public/site/modules/ProcessMediaManager/ProcessMediaManager.module:209

Ok this took me through a tour of namespacing issuer all over the MediaManager modules and got it working back. 

Share this post


Link to post
Share on other sites
On 7/31/2019 at 6:23 AM, elabx said:

Three people now! haha

Any news on this bug?? Thanks!

I rolled back but now I am having issues with JqueryUpload version 008 working, tried rolling back to 002 but I still can't open when I click on Add Media on any of the pages, getting:

 Uncaught Error: Class 'ProcessWire\JqueryFileUpload' not found in /srv/users/serverpilot/apps/ladosis/public/site/modules/ProcessMediaManager/ProcessMediaManager.module:209

Ok this took me through a tour of namespacing issuer all over the MediaManager modules and got it working back. 

Hey @elabx,

Sorry for the delay in responding. I have just tested in a new PW install with only 3 modules: MM, JFU and Tracy. I had to click on Clear Compiled Files 3 or 4 times for it to finally work. Here's what I did.

  1. Upgrade JqueryFileUpload by overwriting the existing files
  2. Delete MediaManagerTabs.php and pocketgrid.css in the current (old) Media Manager install
  3. Overwrite MM version 011 files with version 012 files
  4. Access Media Manager
  5. You might see Class not found error (either MediaManagerUtilities or JqueryFileUpload
  6. Access Modules (on same tab in #4) and click on Clear Compiled Files
  7. Once step #6 is finished, click browser back button to go back to Media Manager.
  8. If you get class error again, repeat steps 6 - 7 as necessary

Please let me know if this works for you. Thanks.

  • Like 1

Share this post


Link to post
Share on other sites

@kongondo Finally managed to updated!! But you know what, now I didn't have to clear anything, it just worked after a module refresh!! Just so you have more info, the only difference was that I namespaced the old modules (in a desperate attempt to bring back everything to work because it kind of broke after I rolled back from my first install failure). honestly don't have very clear what happened, but indeed the new version works flawlessly.

Questions/issues: 

  • I don't seem to be able to drag and drop over the Inputfield. I can give you access to my site if you need to debug.
  • I cannot seem to find the edit button for the image description now, the one that was placed at the top right? Is there a new way to edit the descriptions? Appending how my images look when I click on them.   Jut realized now this is done in a normal, maybe you could enable an Edit link right on the Inputfield? At least on my site it's not showing, I'd guess that's the most practical for editors, instead of opening the Media Manager Popup.
  • I cannot get the alt text on images placed in CKEditor to update accordingly, I also have the setting updated in the Inputfield configuration, have you had any issues with this?

All my questions crossed where solved configuring the Inputfield :)

This is a GREAT update kongondo! I know this has been mentioned before but the improvement in the UI is a huge plus! I see you mentioned you have a lot of users that had never mentioned this, but in my case as with other PW users, all my clients complained about the lack of polish in UI, but this update really solves a lot of the inconveniences. 

Share this post


Link to post
Share on other sites
Posted (edited)
10 hours ago, elabx said:

Just so you have more info, the only difference was that I namespaced the old modules

Aah, nice workaround. I never thought to do that 😊.

10 hours ago, elabx said:

This is a GREAT update kongondo! I know this has been mentioned before but the improvement in the UI is a huge plus! I see you mentioned you have a lot of users that had never mentioned this, but in my case as with other PW users, all my clients complained about the lack of polish in UI, but this update really solves a lot of the inconveniences. 

Glad you like it :-).

10 hours ago, elabx said:

I cannot get the alt text on images placed in CKEditor to update accordingly, I also have the setting updated in the Inputfield configuration, have you had any issues with this?

I don't follow. What is this alt text please? Please clarify which inputfield configuration, CKEditor or MM?

Full documentation is available here, by the way :-).

Thanks.

Edited by kongondo

Share this post


Link to post
Share on other sites
5 hours ago, kongondo said:

I don't follow. What is this alt text please? Please clarify which inputfield configuration, CKEditor or MM?

 

When you insert an image through CKEditor, ideally I'd want to grab the description from the image's description field. CKEditor Inputfields fields have an option called "Image management" that should enable this:

https://processwire.com/docs/fields/textarea-fieldtype/#markup-html-option

I just can't get this to work well, if I add a new image to the text fields, their descriptions are not pulled from the images. 

My bad again man, I kept on reviewing this on the CKeditor source and just realized this is done on runtime. 

Share this post


Link to post
Share on other sites
21 minutes ago, elabx said:

My bad again man, I kept on reviewing this on the CKeditor source and just realized this is done on runtime. 

😀

  • Like 1

Share this post


Link to post
Share on other sites

@kongondo Thank you for that module. Befor I go and order it, I'd like to make sure that the feature my client needs is included already.

For that client each media item should be available as a public download. So in the list of media in the manager there should be something like a button to copy that public link and when editing media that public link should be displayed also.

I guess the module needs some customizing to do this. Would this be possible through hooks? Especially for the media lists in the manager. Are there hooks available where I could inject some markup or even an extra column in list view?

Since all media are pages, I guess I can hook into ProcessPageEdit for those templates and add the link to display in the page editor screen? 

Share this post


Link to post
Share on other sites
On 8/28/2019 at 10:54 AM, gebeer said:

So in the list of media in the manager there should be something like a button to copy that public link and when editing media that public link should be displayed also.

Where is the link being copied from?

On 8/28/2019 at 10:54 AM, gebeer said:

Since all media are pages, I guess I can hook into ProcessPageEdit for those templates and add the link to display in the page editor screen? 

Yes, but Media Manager methods are currently not hookable. I'm not sure you've seen it, but Media Manager allows you to add your own (ProcessWire) fields to the media pages templates. Those will then be displayed in the list (table) view if you configure them to be displayed in Media Manager settings. However, you will not be able to edit the values directly in the table view. Instead, each media has an edit link that when clicked will open the full page for editing - this is a normal (almost) ProcessWire page edit form. You can use it to edit any of the fields in the template as well as the media themselves. In the frontend you access them as $m->your_public_link_field. I hope this makes sense. If not, please let me know.

Thanks.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By eelkenet
      Hi! I've created a small Inputfield module called InputfieldFloatRange which allows you to use an HTML5 <input type="range" ../> slider as an InputField. I needed something like this for a project where the client needs to be able to tweak this value more based on 'a feeling' than just entering a boring old number. Maybe more people can use this so I'm hereby releasing it into the wild.  
       
      What is it?
      The missing range slider Inputfield for Processwire. 
      What does it do?
      This module extends InputfieldFloat and allows you to use HTML5 range sliders for number fields in your templates.
      It includes a visible and editable value field, to override/tweak the value if required.  
      Features
      Min/max values Precision (number of decimals) Steps (Read more) Manual override of the selected value (will still adhere to the rules above) Usage
      Clone / zip repo Install FieldtypeFloatRange, this automatically installs the Inputfield Create new field of type `Float (range)` or convert an existing `Float`, `Integer` or `Text` field. To render the field's value simply echo `$page->field` Demo
      A field with Min=0, Max=1, Step=0.2, Precision=2

      Field with settings Min=0, Max=200, Step=0.25, Precision=2

       
      Todo
      Make the display-field's size configurable (will use the Input Size field setting)  Hopefully become redundant If it's usable for others I'll add it to the Modules list  
      Changelog
      v002
      - Fix issue where setting the step value to an empty value created problem with validation
      - Make the display-field optional 
      v001
      - Initial release
       
      Thanks!
       
       
    • By Robin S
      Another little admin helper module...
      Template Field Widths
      Adds a "Field widths" field to Edit Template that allows you to quickly set the widths of inputfields in the template.

      Why?
      When setting up a new template or trying out different field layouts I find it a bit slow and tedious to have to open each field individually in a modal just to set the width. This module speeds up the process.
      Installation
      Install the Template Field Widths module.
      Config options
      You can set the default presentation of the "Field widths" field to collapsed or open. Field widths entered into the Template Field Widths inputfield are only applied if the Edit Template form is submitted with the Template Field Widths inputfield in an opened state. "Collapsed" is the recommended setting if you think you might also use core inputs for setting field widths in a template context. You can choose Name or Label as the primary identifier shown for the field. The unchosen alternative will become the title attribute shown on hover. You can choose to show the original field width next to the template context field width.  
      https://github.com/Toutouwai/TemplateFieldWidths
      https://modules.processwire.com/modules/template-field-widths/
    • By adrian
      Tracy Debugger for ProcessWire
      The ultimate “swiss army knife” debugging and development tool for the ProcessWire CMF/CMS

       
      Integrates and extends Nette's Tracy debugging tool and adds 35+ custom tools designed for effective ProcessWire debugging and lightning fast development
      The most comprehensive set of instructions and examples is available at: https://adrianbj.github.io/TracyDebugger
      Modules Directory: http://modules.processwire.com/modules/tracy-debugger/
      Github: https://github.com/adrianbj/TracyDebugger
      A big thanks to @tpr for introducing me to Tracy and for the idea for this module and for significant feedback, testing, and feature suggestions.
    • By adrian
      This module allows you to automatically rename file (including image) uploads according to a configurable format
      This module lets you define as many rules as you need to determine how uploaded files will be named and you can have different rules for different pages, templates, fields, and file extensions, or one rule for all uploads. Renaming works for files uploaded via the admin interface and also via the API, including images added from remote URLs.   Github: https://github.com/adrianbj/CustomUploadNames
      Modules Directory: http://modules.processwire.com/modules/process-custom-upload-names/
      Renaming Rules
      The module config allows you to set an unlimited number of Rename Rules. You can define rules to specific fields, templates, pages, and file extensions. If a rule option is left blank, the rule with be applied to all fields/templates/pages/extensions. Leave Filename Format blank to prevent renaming for a specific field/template/page combo, overriding a more general rule. Rules are processed in order, so put more specific rules before more general ones. You can drag to change the order of rules as needed. The following variables can be used in the filename format: $page, $template, $field, and $file. For some of these (eg. $field->description), if they haven't been filled out and saved prior to uploading the image, renaming won't occur on upload, but will happen on page save (could be an issue if image has already been inserted into RTE/HTML field before page save). Some examples: $page->title mysite-{$template->name}-images $field->label $file->description {$page->name}-{$file->filesize}-kb prefix-[Y-m-d_H-i-s]-suffix (anything inside square brackets is is considered to be a PHP date format for the current date/time) randstring[n] (where n is the number of characters you want in the string) ### (custom number mask, eg. 001 if more than one image with same name on a page. This is an enhanced version of the automatic addition of numbers if required) If 'Rename on Save' is checked files will be renamed again each time a page is saved (admin or front-end via API). WARNING: this setting will break any direct links to the old filename, which is particularly relevant for images inserted into RTE/HTML fields. The Filename Format can be defined using plain text and PW $page variable, for example: mysite-{$page->path} You can preserve the uploaded filename for certain rules. This will allow you to set a general renaming rule for your entire site, but then add a rule for a specific page/template/field that does not rename the uploaded file. Just simply build the rule, but leave the Filename Format field empty. You can specify an optional character limit (to nearest whole word) for the length of the filename - useful if you are using $page->path, $path->name etc and have very long page names - eg. news articles, publication titles etc. NOTE - if you are using ProcessWire's webp features, be sure to use the useSrcExt because if you have jpg and png files on the same page and your rename rules result in the same name, you need to maintain the src extension so they are kept as separate files.
      $config->webpOptions = array(     'useSrcExt' => false, // Use source file extension in webp filename? (file.jpg.webp rather than file.webp) ); Acknowledgments
      The module config settings make use of code from Pete's EmailToPage module and the renaming function is based on this code from Ryan: http://processwire.com/talk/topic/3299-ability-to-define-convention-for-image-and-file-upload-names/?p=32623 (also see this post for his thoughts on file renaming and why it is the lazy way out - worth a read before deciding to use this module). 
       
       
      NOTE:
      This should not be needed on most sites, but I work with lots of sites that host PDFs and photos/vectors that are available for download and I have always renamed the files on upload because clients will often upload files with horrible meaningless filenames like:
      Final ReportV6 web version for John Feb 23.PDF

×
×
  • Create New...