Jump to content


  • Posts

  • Joined

  • Last visited

  • Days Won


Everything posted by zyON

  1. It seems like this hook doesn't work with other Lists, only on the Page Tree list (I'm using ListerPro). Any ideas how can I remove publish and hide buttons from lists? EDIT: Ok, forget it. The hook still works on a Lister. I had a debug message being fired on the hook handle function that was not appearing, but the unset of the buttons still work. ProcessPageListActions::getExtraActions
  2. Robin, I don't have the "Unpublished" checkbox because I'm using the RestrictTabView module to hide the Settings and Delete tabs for this role. Thank you for the hooks code, this will come in handy very soon.
  3. This is how I solved this question: I've assigned page-publish permission to the agent role so they can publish pages based on the property template. I've created a module that with a hook on ProcessPageEdit::buildForm like this $this->addHookAfter('ProcessPageEdit::buildForm', $this, 'removePublishButton'); The function that handles this just looks at the page being edited and if it has a status of Unpublished, it removes the Publish button: foreach($form->children() as $f){ if($f->name == "submit_publish" && $page->isUnpublished()) $form->children()->remove($f); // Removes the Publish Button from Properties not yet published. } This allows the users with agent role to edit already published pages (if they belong to them, something that the module also checks) but keeps them from publish new pages directly.
  4. Hi. I'm going to bump this one alive again. What Adrian was mentioning is exactly what I need. I need to give some users (agents) the possibility to create pages with a specific template (property) but I don't want them to have access to publish it before someone checks if everything is correct. I've used the special permission page-publish and that takes care of that part. But I also need to give them permission to edit the page as soon as they are published so they can make alterations. I'm kind lost on how to handle this. I guess I'll have creat a module to handle this, but how can I override the page-publish behavior so it can give access to edit published pages? Or should I ignore this permission? Thanks in advance.
  5. Wanze, yes thanks. I was missing the configuration options on the WirePDF module (was checking only the Pages2PDF module configuration).
  6. Is there an easy way to remove the space occupied by the header? It's probably me or my setup but I can't seem to remove the space.
  7. Sérgio, you're right. I thought you had to use S3 but you can use any server for CloudFront delivery.
  8. Wanze: Thanks. You were right, I had to change it to DejaVuSans (but I also had to to copy the DejaVuSansCondensed family to the module ttfonts folder because it was looking for them somehow and throwing an error. I was using Helvetica and it should contain Portuguese characters... I'm using it on the site text too.
  9. Yes, those are on the front-end, but all the other content is ok except for the text coming from the TextAreaLanguage :/.
  10. Hi, I'm using multi language support and everything is working well (great module btw) except for the text coming from a TextAreaLanguage field where I get missing characters, like in Portuguese, that are replaced by '?'. Anyone having this problem or know what can be wrong? Thanks.
  11. I've not tried yet to block other sites from hotlinking my CloudFront content. You can also check to apply a cache control http header on the module itself. It will apply it to every file uploaded via the module.
  12. CloudFront uses S3. There's no other way.
  13. Thanks. In the current version of the module it will only work with assets uploaded via the admin. That's something in the roadmap for me but I don't have a date I can share right now because I'm really lacking the time at this moment.
  14. Manol, the plugin doesn't handle the deletion of the files in the assets folder. If the plugin is active, the files will be delivered through S3 without relying on the local ones , so theoretically you could manually delete them from you local assets folder but I think of it as a backup that you can quickly start using just by deactivating the plugin. EDIT: Sorry, I forgot to mention (too much work) that in the admin, the local files are used. So it's definitely not a good Idea.!
  15. I'm not having that problem, but of course that depends on several things. If you can put the files on the webroot of your hosting root, I think you'll have no problems and can safely ignore the $config->urls->root "hack".
  16. This site is also multilingual. I did it like arjen suggested. Created a _init.php file in the templates folder with $config->urls->root = "/" and then I've uncommented the line (50) on config.php : $config->prependTemplateFile = '_init.php'; That way, this code is prepended to every template and so it's executed before any code on the templates.
  17. I'm using ProCache and as far as I can tell, it's working ok.
  18. Arjen: Neat and clean. Thanks, it solved the problem!
  19. I'm having a similar problem with a site hosted on Bluehost and using Processwire 2.4. The site files are under the public_html/myfolder folder and when I hit the home page in the browser I get the url as it should like: http://www.mysite.com But when I follow a link I get the url like http://www.mysite.com/myfolder/section. So the folder name appears in the address. Not pretty. This is what the .htaccess looks like in the public_html folder: Options +SymLinksIfOwnerMatch RewriteEngine on RewriteCond %{HTTP_HOST} ^(www.)?mysite\.com$ AddHandler application/x-httpd-php54 .php Options ExecCGI Includes IncludesNOEXEC SymLinksIfOwnerMatch -Indexes RewriteCond %{REQUEST_URI} !^/myfolder/ RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ /myfolder/$1 RewriteCond %{HTTP_HOST} ^(www.)?mysite.com$ RewriteRule ^(/)?$ myfolder/index.php [L] Anyone having the same issue?
  20. New version available. The module now has the ability to update the filename when a new thumbnail is created via the thumbnails plugin. This is important if you use Amazon CloudFront option to serve the files and want to show the changes you've made to the thumbnails immediately (without waiting for the cache to expire). Because when you create a new image crop it's filename doesn't change, I had to force this change in both the thumbnails files and the source file.
  21. There's a new version available. Now supporting file versioning to handle the caching issues of CloudFront. There's an option on the module configuration that will automatically rename the uploaded files by inserting a timestamp in the file name. This way all the files have unique names and that will make it easier to replace old files already cached by CloudFront (something that can be a huge PITA as many CloudFront, or other CDN systems know well).
  22. I've updated the module so now it's possible to set a custom time in seconds to control the cache in the browser and in CloudFront. Previously it used the Expires Header but it's advisable to user the Cache-Control directive instead.
  23. julienmarie: I think Pagefile:install is not triggered with files added from the admin and that was my major concern. Yes, go ahead, fork it and let's create a better module!
  24. I've created a module that works with S3 and Cloudfront. See this topic.
  25. I've put up a module that works with S3 and Cloudfront. See this topic.
  • Create New...