Jump to content

gmclelland

Members
  • Content Count

    526
  • Joined

  • Last visited

  • Days Won

    4

Posts posted by gmclelland


  1. Hi Adrian,

    Just wanted to let you know that I'm seeing an error:

    PHP Warning: in_array() expects parameter 2 to be array, string given in .../TracyDebugger/TracyDebugger.module.php:1072

    I'm running php 7.1.33 and Processwire 3.0.159.  TracyDebugger module is at 4.21.16.

    I'm seeing this error on all pages of my site.  I have also done a modules refresh.

    Let me know if you need any more information.

    Thanks for all you do!


  2. So it sounds like you are wanting the ability to select a file from an predefined directory?  Then the user can select the file using some kind of file browser where you can drill down to select the file you want?

    It would be cool if someone made another module that can either extend the core imagefield or create a new fieldtype to allow for different sources to be added via additional modules?

    I've used something like this before in Drupal with the https://www.drupal.org/project/filefield_sources module.  You can see all the modules that integrate with it at https://www.drupal.org/search/site/filefield sources.

    In the screenshot below, you can see the different toggle links/tabs that are added: Upload, File Browser, Reference existing, Remote URL.  Each additional module can add more toggle links to change the input that is used.  Sources are configured per field in the field settings.

    image.png.ec5c8faaca502531494a2b0d0f6fd336.png

    If we had a module like that, then we could create an another integrated module that adds a "File browser" source link/tab that uses an input similar to the "Page List Select Multiple" input field type from the core Page Reference module, but instead of pages show/select files and folders?

    Maybe the input could look something like this??  Taken from PageListImage module at 

     

     

    post-100-0-60777700-1339186188.png

    There is also already a module to select files, but maybe it could be modified to add a new inputfield type similar to image above?

    Or maybe you could have a module like https://www.drupal.org/project/imce and  https://www.drupal.org/project/imce_filefield that just adds a "Open File Browser" link to the image field that opens IMCE or similar to browse a file system?  There is also https://www.drupal.org/project/visual_select_file that has a slightly different UI.

    image.thumb.png.6ea968d6b392b1b37d7632dd9d8888c2.png

    I know this isn't a solution, but these are all rough ideas of me thinking out loud in case any one wants to run with it?

     


  3. On 1/20/2018 at 10:59 AM, modifiedcontent said:

    It would be super convenient if you could just upload images to a folder/directory in the templates folder or root, without any processing, and be able to access that as a source option in the image field. Any way to make that happen?

    I know this is an older post, but you should be able to do some of this now with this module:

     

    • Thanks 1

  4. 4 hours ago, d'Hinnisdaël said:

    I do have an at-a-glance/counter panel on the roadmap, but I'm not sure how to exactly build that since ProcessWire — as opposed to Wordpress — doesn't have any pre-configured content types, so I would have to make it a bit more configurable.

    Couldn't you loop over all templates(excluding system templates) and use the template's name along with a count?

    For example:

    • Basic Page (55)
    • Calendar Postings (77)
    • Job Postings (88)
    • community-event (55)  <- this one doesn't have a friendly template name, the others above do
    • Total Pages (400)

    It would probably be helpful to show file information as well.  Like:

    • Documents (1,000)
    • Images (2,000)
    • Audio (30)
    • Videos (40)
    • Total Files (3,000)

    The number of users would be helpful per role

    • Editors (20)
    • Contributors (25)
    • Vendors (22)
    • System Admins (2)
    • Total Users (60)

    All of that would probably need to be cached so isn't too taxing on the server.  Maybe only displayed to admins as well?  I thought I remembered a module that already provides similar counts?  I can't remember the name. Maybe I'll remember it later?

    • Like 3

  5. Haven't tried out the module **yet**, but I love the look of these dashboards.

    One panel that could be useful is a content overview panel like in Wordpress.  It would show the amount of pages for each type of page with a link to the built in pages lister that shows all pages filter for that page type.

    image.png.7c68dfab0cdd0cdd580de7566bc41b9a.png

    Another feature that might be useful would be the ability to create multiple dashboard pages, or tabs within dashboards like what is shown in the Drupal Workbench module?  This could be a dashboard for the user?

    image.thumb.png.db81048cb564a504d9e8389f4bd41abc.png

    Maybe you could have a site dashboard(displayed when clicking on the main logo or the Processwire logo or visiting the main processwire admin page at /processwire) and a user dashboard(displayed when a user first logs into the Processwire Admin)?

    Here is what a "My dashboard"(from drupal.org) for users could look like

    138499719_HomeboxDrupal.org2020-01-1409-42-23.jpg.cfb534b2212dbe70060c434d8698f30d.jpg

    If we had the ability to create multiple dashboard pages then while creating/editing each dashboard page, you can choose which roles are allowed to view the page. If you do not choose any roles, then only admins can view the dashboard page.  For obvious reasons, anonymous users will not be able to save pages or add custom items.

    All of this might be too complex, but I thought would just get these thoughts out of my head in case anybody liked them.

    Here is another dashboard I found just to give others some ideas of what could probably be created with this module.

    varbase-total-control-admin-dashboard_0.jpg.ee8aae33e674f8224b4e96bbc59bc4b1.jpg

    Anyways, thanks for making this module.  Look forward to trying it soon.

    • Like 2

  6. Hi @Robin S, just wanted to let you know that I tried out the latest version, but it didn't seem to work with the file/image files with no extension.

    Here are some examples that didn't work for me:

    Ex. pdf file with no extension:

    https://www.charleston-sc.gov/DocumentCenter/View/18787/Certificate-of-Construction-Completion-RES-Checklist?bidId=

    Ex. image file with no extension:

    https://www.charleston-sc.gov/ImageRepository/Document?documentID=23023

    After saving the page with those urls, it shows the following error message:

    AddImageUrls: The remote file https://www.charleston-sc.gov/DocumentCenter/View/18787/Certificate-of-Construction-Completion-RES-Checklist?bidId= has no file extension and its MIME type does not correspond with a valid file extension for field "page_files".

    The file field is configured to allow pdf files and the image field is configured to allow png, jpg, jpeg, gif.

    Do these urls work for you?

    • Like 1

  7. Thanks for adding this to modules directory and combining both module's functionality. 🎉

    Not sure if this is possible, but sometimes you have sites that have file urls or image urls with no extensions.  Example: mywebsite.com/this-is-a-pdf-link or mywebsite.com/this-is-an-image

    Urls like that won't work currently with this module.  I'm not sure if there is a way to add a check if the url doesn't have an extension, then check the mime type against the allowed extensions?

    Maybe somehow comparing the two by using $config->fileContentTypes and $ctype = mime_content_type($file->filename); ?


  8. @gebeer - FYI... I modified Robin's AddImageUrls module and adapted it to work with file fields now.  It's called the AddFileUrls module.

    @matjazp I'm not sure I fully understand what you want, but maybe you could try the new "AddFileUrls" module and then use some kind of hook to modify and pre-fill the default value of the url in the file field?

    • Like 2
×
×
  • Create New...