Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 08/15/2015 in all areas

  1. A ProcessWire Fieldtype storing files in a customized location, outside the web root. This module is primarily useful if you need to store sensitive data which should not be accessible directly from the web. Normally, ProcessWire stores all files under /site/assets/files. Direct URL access to these files can be restriced by setting $config->pagefileSecure = true. Still you need to make sure that your template permissions are setup correctly. If something goes wrong, those files could be accessed from outside. GitHub: https://github.com/wanze/FieldtypeSecureFile Modules Directory: http://modules.processwire.com/modules/fieldtype-secure-file/ How does it work? After installing this module, you can create a new field of type SecureFile. Enter your configuration under the "Details" section when editing the field: Storage Location Enter a path outside the web root where the files are stored. You need to create the directory manually. Also make sure that the user running the web server has write permission. Roles allowing to download a secure file Users with a role selected here are able to download the files if a download is requested via the API. Allow Download in Admin If checked, users having a role selected above can download the files when editing a page. I needed this functionality for a recent project, so I created this module and thought to share it, mabye this is useful for someone else Consider it beta, I'm using it on one site but I'm sure it could be improved here and there. Feel free to suggest additional features! Cheers
    2 points
  2. Sorry about this Charles - I'll take a look a little later today or maybe tomorrow - I had a similar issue with CustomUploadNames which actually stole the "Add Category" code from this module. I'll probably just need to make the same changes I made to that, so should be a fairly easy fix.
    1 point
  3. See those 2 places: Pages.php#L973, Pages.php#L1077
    1 point
  4. Hi Webrocker, A direct MySQL query is the way to go here. The solution from LostKobrakai works, in the context of ProcessWire the query looks like this: SELECT pages_id, COUNT(data) AS count FROM field_legacy_id GROUP BY data HAVING count > 1 Now you can extract the page IDs from the result and delete these pages via the Pw API, as there is existing a duplicate post. Note that if the count is greater than 2 somewhere, you'd need to execute this query more than once.
    1 point
  5. http://stackoverflow.com/a/688551 This should give you all duplicates used on field_legacy_id.
    1 point
  6. One other thing. Have you upgraded from apache 2.2 to 2.4? If so, there are a ton of things that have changed. See here http://httpd.apache.org/docs/trunk/en/upgrading.html [edit] I see that you are running 2.4 Start here... <Directory /home/me/www/testes.dev/public_html/> Options Indexes FollowSymLinks MultiViews AllowOverride All Require all granted </Directory> Notice the order deny allow has gone away.
    1 point
  7. Great site Joshua! It really drew me in and I ended up reading a few articles there and started thinking "hey maybe we should move to the Yucatan someday". I think you guys totally nailed it, the site is an experience, felt native to the region, and your client must be very happy. I actually liked all the navigation options myself, though agree some kind of hover effect would be helpful. The only thing I'd mention here (beyond that I love the site) is that pages loaded a bit slowly from here in Atlanta. Run it through webpagetest.org, as it has a lot of suggestions that could make a big difference (especially setting expires headers on the image and css/js assets, of which there are a significant amount). The time to load first byte is also pretty high, which–if not something to do with server/bandwidth–indicates a lot of work is being done on the PHP/template file side, and enabling template cache or ProCache could make a big difference, even if you only use a 5-10 minute cache. Would you mind adding the site to our site directory?
    1 point
  8. Actually if you want it to save to the assets/files/pageid folder for the current page, this is what you want: $page->filesManager()->path(); But do you want to save it directly, or would you rather just add it to a files field for the page? $page->pdfs->add("invoice.pdf"); If you went that route you could do: $mpdf->Output('/tmp/invoice.pdf', 'F'); $page->pdfs->add("/tmp/invoice.pdf"); unlink("/tmp/invoice.pdf"); or something like that
    1 point
  9. Thank you! You really helped a lot by pointing that out so we could fix it It was only Joshua and me on the project, working on it for about 5 months.
    1 point
  10. @simplesequence - welcome to PW - sorry for the rough start, but looking at your screenshot I see that you are running v2.3. According to the modules directory, kongondo's blog module isn't compatible with this version. It requires 2.4+ PW's current stable version is 2.6.1. Is there any reason you are running 2.3?
    1 point
  11. Good afternoon, fellas, sooo I installed the blog module, and it works totally fine, kicking ass and everything, I love it. I'm currently working on a site which is not a blog, but has a blog- subpage, which I got rolling. But what happens, or more like what do I do, if I want a second Subpage on my site which uses the blog - functionality? is there a way to achieve this? consider the following page tree: Home stuff -> regular content stuff2-> Blog 1 stuff3 -> Blog 2 .. and so on. so basically I would want two subpages on my site on which I would be able to publish blog posts independent from each other, which (in my opinion) would mean that I could tell the blog module at a certain point to publish a post on either one of these two pages. Help would be much appreciated. Best regards, DeM /edit: so I kinda had an idea for an approach to a solution to my problem, my thought was, that I could use two templates, which output blog posts by category, so basically I'm looking for a function which outputs posts with category "blog1" on the first page and in a second php script, one that outputs posts with category "blog2" on a separate page. so far though, I couldn't find anything about that in the documentation, I only found output filtered by post author, does the same apply to post category? //edit 2: I managed to do that, just had to change a few lines in one of the php files. Finally, everything works, and I have to admit, I am totally impressed. this module kicks ass in any way imaginable. Thank you so much Kongondo. Greetings from Germany, DeM
    1 point
  12. So back again, get some sparetime to contribute to this one. It's a real beast now with many strings to translate....and i added a few one, too..... https://github.com/kongondo/Blog/pulls But here we are. Complete DE translation for the actual Blog version 2.3.4 (and it's comming pullrequests with additional strings for archive, and pages). + Translated SchedulePages module to use both combined. Important Notice on the main translation thing with the blogmodule: - Some Strings are taken from the pagetitels of the autogenerated pages for eg. "cathegories" or "archive" so please use the installation step with renaming the parents correct or rename the titels later.....but not the names... - CleanUp Ultility is not complete translated because it's only a superuser thing wich should be used with care and knowlegde so don't see a real effort to translate this rarely used function... -Some Strings are not translateable since the where automatic generated on templates and fields so please translate these, too - if needed... Have fun - Thanks again to kongondo ProcessBlog-schedulePages.zip
    1 point
×
×
  • Create New...