Jump to content

Soma

Moderators
  • Posts

    6,798
  • Joined

  • Last visited

  • Days Won

    158

Everything posted by Soma

  1. You got the who and what but not the where. Access is defined per template and inherited. So simplest is to edit home template and define access for your new role there.
  2. Maybe I'm missing something but when I add a fieldset field to a repeater field it does not work, the _END isn't appended. But when using the repeater the fieldsets show, just not closing. Is this a bug or a feature?
  3. RT @ocorreiododiogo: Just created a Sublime Text color scheme inspired by the colors of the great @processwire https://t.co/kA5PxE8zo1

  4. I just went and added support for pagination. I pushed the update to the dev branch of the module you find here: https://github.com/somatonic/ModulesManager/tree/dev Still working out on the details for categories. Currently it just filters on a per page basis, so it possible there's a page not showing anything if category filter is set. Once you changed the limit in modules settings, you should hit refresh first on the ModulesManager screen to delete all cache files. It will create a cache file per page. So it all works now with unlimited modules but still need some work and I'm waiting for the JSON feed from modules.processwire.com to allow for more filtering.
  5. I think we need additional filter param for filtering by category. This would help creating the category filtering in ModulesManager a lot.
  6. @alexl Thank but this has nothing to do with ModulesManger rather than the http://modules.processwire.com/export-json/ Ryan has limited to 200 max. So Ryan needs to update the service to allow for max >200. Of course a limit makes sense and I'm not sure how to deal with the ever growing list of modules. We need to find a solution to keep the list short. - pagination (not sure how) - per kategorie listings only (at some point will maybe exceed 200 too) - not sure ... Currently the json file is downloaded and cached. Also I'm seeing now that Ryan includes the "readme" in the json array too, which makes it a whole (whole!) lot bigger and longer Maybe we can optimize this more to get a listing with only meta data, and a way to get more details on request. But not sure yet. edit: just seen that the feed support pagination already, but with that I would find a way to cache per page... anybody?
  7. Thanks Ryan for looking into this. I can confirm that it works for me in php 5.3.1.
  8. Minor update 1.0.3 to fix delete (move to trash) page button throwing the alert when form was modified before.
  9. That sounds strange. And other modules work fine?
  10. What did you do? That sound not like a problem we are aware of. What version of PW? Because the line isn't where this problem would appear. It sounds more like your PW install is corrupt, missing files or whatever. Try putting in a new wire folder.
  11. RT @processwire: A quick tutorial on how to create file downloads using pages in ProcessWire, by @somartisthttp://t.co/G5lU81yfyi

  12. RT @Herschel_R: Neat "Separation of Concerns"-approach in #Processwire via module - https://t.co/3pdgFHqzSP #php

  13. We got a thread with this http://processwire.com/talk/topic/3601-field-label-language-problem/?p=42693
  14. I just ran into the same problem with float (apeisa shop). It worked well until I added the german language pack! Now it breaks it, and in german the decimal point it a comma. The locale in the translation is set to de_DE.UTF-8. Removing it works again but then the locale is lost? What is the problem really? How can we deal with this reliably? It just that the setlocale where it has comma instead of point the round, floatval float operation fails. I can for now just disable the setlocale for german, but would be nice if not.
  15. Thanks, I corrected and rewrote part of it.
  16. A quick tutorial how to create file downloads using pages You will be able to create a new page using template "PDF" (or any you setup), upload a pdf file. You then can select this page using page fields, or links in Wysiwyg. The url will be to the page and NOT the file itself. This will allow to keep a readable permanent unique url (as you define it), unlike /site/assets/files/1239/download-1.pdf, and you'll be able to update/replace the uploaded file without worring about its filename. Further more the file will also have an id, the one of the page where it lives. Clicking those links will download or open the file (when target="_blank") like it would be a real file on server with a path like /downloads/project/yourfile.pdf. You'll be also able to use the "view" action directly in the page list tree to view the file. Further more you'll be able to esaily track downloads simply by adding a counter integer field to the template and increase it every time the page is viewed. Since the file is basicly a page. This all works very well and requires only minimal setup, no modules and best of it it works in the same way for multi-language fields: Just create the language alternative fields like "pdf, pdf_de, pdf_es" and it will work without modifying any code! Still with me? ok PW setup Download folder: Create a template "folder" or "download-folder" with only a title needed. Create pages in the root like /downloads/project/ using this template. Setup the template for the pdf files 1. Create a new template in PW. Name it pdf 2. Goto template -> URLs tab and set the URL end with slash to no. (So we can have /path/myfile.pdf as the URL) 3. Create a new custom file field, name it pdf. Set its maximal count to 1 under -> Details tab. 4. Add the pdf field created to the pdf template. Easy. 5. Create a new "pdf" page using the pdf template under a download folder you created earlier. 6. Give it the title and in the name field add ".pdf" to the end (could also leave as is) Template PHP file for the pdf files 1. Create the template file pdf.php in your /site/templates folder 2. add the following code: <?php // pdf.php if($page->pdf){ wireSendFile($page->pdf->filename); } Done. To see the options you have with PW's wireSendFile() you can also overwrite defaults <?php // pdf.php if($page->pdf){ $options = array( // boolean: halt program execution after file send 'exit' => true, // boolean|null: whether file should force download (null=let content-type header decide) 'forceDownload' => false, // string: filename you want the download to show on the user's computer, or blank to use existing. 'downloadFilename' => '', ); wireSendFile($page->pdf->filename, $options); } Simple and powerful isn't it? Try it out. Some thoughts advanced Create as many file types as you like. It might also be possible to use one "filedownload" template that isn't restricted to one field type but evaluate it when being output using $page->file->ext, or save the file extension to the page name after uploading using a hook. One last thing. You can add other meta fields or preview images to the template and use those to create lists or detail pages. It's all open to goodness. Again all without "coding" and third-party modules. Further more you can use the excellent TemplateDecorator to add icons per template and have a nice pdf icon for those pages. This as a base one could also easily create a simple admin page for mass uploading files in a simple manner, and create the pages for the files automaticly. ImagesManager work in the same way. Cheers
  17. i.e. for me $f = $fields->get("select_download"); if(is_subclass_of($f->inputfield, 'Inputfield')) { echo "is subclass"; } works locally with php 5.3.1 while $f = $fields->get("select_download"); if(is_subclass_of($f->inputfield, 'InputfieldPageListSelection')) { echo "is subclass"; } doesn't work. But it does work on another server with php 5.3.8.
  18. I know there was some additions and changes right there where it checks for a valid page. Playing around it works in older dev version, but not latest. I figured that on my local install is_subclass_of($instance, "InputfieldPageListSelection") fails for me but shouldn't. Since this is only called when not on a direct child of the parent specified it won't even get to this check (for pages right under the parent). I'm not sure is_subclass_of works same for all php version (5.3 5.4) and since the InputfieldPageListSelection is only a interface (implements) I'm not sure what's about it. I also noticed some strange parents() results on those page while testing. No idea why.
  19. Thanks so much adrian for testing! I think you have it right, but not sure, there's nothing that special on the language side, the root page has "/en/" and "/de/" for it's names. Strange, as soon as I specify a template I can select and save the page that previously didn't work. So it also seems some pages work and some not. Further more I have the custom page list label module installed and it stopped also working for some pages... *confused* I will test again on a different install.
  20. Sorry maybe I got an older version indeed. I install VIA ModulesManager
  21. I'm using latest dev. Multilanguage support and multilanguage page names. I have a page field PageListSelectMultiple and a parent to select pages, no template spec. Now I can't select a page that is more down than on root level from parent. I get Page 5216 is not valid for select_download No matter what setting. Multiple, single, template I always get this error and can't go on... This was never an issue. Can anybody confirm?
  22. Hmm, I have latest dev an language support. I tried and disabled plugin already, no luck.
  23. @adamspruijt long time no see! still around? Also wanted to note that if you download the module from modules repository I still get 1.0.7, but the newest is 1.0.8!
×
×
  • Create New...