Jump to content

adrian

PW-Moderators
  • Posts

    10,902
  • Joined

  • Last visited

  • Days Won

    349

Everything posted by adrian

  1. Sorry, the lowercase 's' was my bad!
  2. Ok, here it is: Modules Directory: http://modules.processwire.com/modules/process404-search/ Github: https://github.com/adrianbj/Process404Search Includes a small tweak to also convert dashes and underscores to "+" which should improve search results.
  3. No problem, Having given you those commands, please remember that permissions are not the only thing that must be considered. You must also take into account the owner/group of the files, which is why some web hosts will need different permissions to others for things to work as expected. The typical setup however works with the 755/644 that you are used to seeing. This is a reasonably decent writeup of things if you are interested in a read: http://www.linux.com/learn/tutorials/309527-understanding-linux-file-permissions
  4. adrian

    JSON parser

    I have been using this for a while now and it is incredibly useful. They have also just released a beta version which is so clean I am sure there are other tools out there like it, but this one has made my life so much easier many times. http://json.parser.online.fr/beta/ Be sure to check all the options under the settings cog!
  5. adrian

    New Logo

    Thanks to Craig (http://processwire.com/talk/topic/5770-processwire-website-css-issue/?p=56336), the Chevron fix is: .subnav li a { background-repeat: no-repeat; }
  6. Good spotting on the solution though. I can confirm that: background-repeat: no-repeat; does indeed fix the problem. Ryan, Pete - anyone like to take care of this?
  7. Thanks Craig - already reported and discussed here: http://processwire.com/talk/topic/5718-new-logo/?p=55866
  8. 644 is standard for files on most server configurations. I am curious why they ended up as 600 in the first place though? In case you don't know, and you have terminal access, this will recursively set all files to 644: find . -type f -print0 | xargs -0 chmod 644 and if you ever need to do any changes to just folders, this will do the trick: find . -type d -print0 | xargs -0 chmod 755
  9. Any thoughts on whether this should be released as a module in the directory? I am thinking that I will start using it on all sites now. I can't see any negatives with the way it is working now. Obviously I'd prefer a one click install, but can't see a way around having to add that one snippet to the search.php file. Anyone have any strong thoughts one way or the other?
  10. Forgot to mention, in case you don't know you can send your own variables, arrays to the template file using render. eg: echo $pages->get(1169)->render('./lib/markup/foundation/pages/pg_Video_Element.php', array('myVar' => $myVar, 'myArray' => $myArray); Then retrieve them in your pg_Video_Element.php with $options['myVar'];
  11. I would try again with the 2.4 htaccess file, but take a look at the RewriteBase setting in the 2.3 version that is working and copy that across.
  12. Hi Zahari, I haven't used pagestack before, but from what I just read, you don't send it with the render call. You would use: $options['pagestack'] in your pg_Video_Element.php template file. It is an array of the pages that rendered the template so you would foreach through: $options['pagestack'] to get the article page. Let me know if that works. Maybe I should go test it too
  13. As Jeff pointed out, your example should work as coded. However I am thinking from your example that you don't actually want the repeater id, but an auto-incrementing number starting at 1. Is that right? If so, simply define: $i=1 before the foreach starts and then $++ just before the loop closes. Then use the $i instead of $item->id Does that help?
  14. tiptronic, The way of installing admin themes changed drastically in PW 2.4 which hasn't been out very long. I would recommend that at the moment you steer clear of alternate admin themes until we have some new ones designed for 2.4 - I know there is one very close to being ready. So, try the modules manager for installing other cool modules - lots of great tools to try: http://modules.processwire.com/modules/?sort=-likes (here are the most popular ones on top), or just sort by likes in the modules manager itself Is there any functionality in particular that we can help you with?
  15. On 5.2.17: http://processwire.com/talk/topic/5543-processwire-24-possible-to-run-on-php-533/?p=54099
  16. If you add this line at the end of the array in public static function getModuleInfo() { 'permission' => 'page-view' it will give your other users access. You could even give it a new custom permission, like: 'permission' => 'analytics-view' then create that permission and assign it to the role of the users you want to allow access to. Of course these options are hacking the module core code and so hopefully Luis will reply soon with something along these lines. Hope that helps in the meantime.
  17. One of these should get you going: http://modules.processwire.com/modules/page-edit-per-user/ http://modules.processwire.com/modules/page-edit-field-permission/ http://modules.processwire.com/modules/custom-page-roles/
  18. Ah yes, the client who can't remember a password - I am sure they will be a ancient relic sometime soon, but still. Passwords that is, not clients I have had pretty good luck with environmental scientists and Pydio/Ajaxplorer over the years, and they are usually my benchmark for the bottom end on the tech scale.
  19. Hey Joss, Did you find the share option in Pydio? It is awesome - you can right click on a file (zip if you like) and share it with a unique url which gives them a one click download - no password required. I have Pydio hooked into a parent folder that is above web root so the files are not directly accessible, but I can still map the folder as a drive (SMB etc), so we have multiple ways to access the same stuff. You can set up user accounts with all sorts of access levels. It's not perfectly bug free, but it is still the best tool I have found that allows me to manage our own server and still share files very easily.
  20. Played with it some time back - not sure if it has matured further, but worth a look: http://sparkleshare.org/ Also, Pydio now has a sync tool - again, not really ready for prime time, but their web interface is a great way of sharing files with clients: http://pyd.io/ Or if you are a linux geek and want ultimate configuration: http://www.rsnapshot.org/ (you could of course use cron and rsync, but this is a nice addition to managing things)
  21. Not sure about the 500 error, but have you made sure to get the new version of the modules manager? Before you upgrade to it, you need to install this module first: http://modules.processwire.com/modules/jquery-data-tables/ Hope that fixes things for you. EDIT: Just reread what you wrote and I see that you have already installed the latest version of MM. I don't think it would install without jquery-data-tables so that probably isn't the issue afterall. Sorry for the bad advise
  22. Alternatively you could use this line in the module to send the 404 Page Not Found body to the search template echo $this->page->render($this->pages->get($this->searchPage)->template->filename, array('q' => $term, 'out' => $this->page->body)); and have it output in the search template using: if(isset($options['q'])){ $input->get->q = $options['q']; $out .= $options['out']; } Lots of options really
  23. Just had a thought for a slightly better version. I replaced this: echo $this->pages->get($this->searchPage)->render(array('q' => $term)); with: echo $this->page->render($this->pages->get($this->searchPage)->template->filename, array('q' => $term)); which seems a little cleaner. This change also means that now you only have to add just the one line to your search.php file: if(isset($options['q'])) $input->get->q = $options['q']; No need to change the page title anymore because we are actually now still rendering the 404 page with it's existing fields, just using the template file of the search page. However, I also added the 404 page's body to my search.php file: if(isset($options['q'])){ $input->get->q = $options['q']; $out .= $pages->get(27)->body; } With this approach you can easily then edit the body field of the "404 Page Not Found" page in the PW admin to read something like this: <h3>The page you were looking for is not found.</h3> <p>We have tried to find the content you were looking for, but if we didn't get it right, please use our search engine or navigation above to find the page.</p> Any thoughts on this new version, or the approach in general? Any problems from anyone who has tested it?
  24. Ok, here is something I'm not exactly proud of, but I really don't have anymore time right now, so I thought I'd post anyway in case it inspires someone else to come up with something better. This is the key line that shows you how things are working: echo $this->pages->get($this->searchPage)->render(array('q' => $term)); This way, there is no redirect, so the http headers still return a 404 status code, so I think this solves the SEO issue. There is a new config option that lets you choose your search page, so that should take care of the issue kongondo brought up. With this new version,you need to add this line to the top of your search.php file if(isset($options['q'])) $input->get->q = $options['q']; Or this if you want the title on the search page replaced: if(isset($options['q'])){ $input->get->q = $options['q']; $page->title = $pages->get(27)->title; //27 is the ID of the 404 page that comes with PW } Anyone have any brighter ideas? PS Due to the use of render($options), you need PW 2.4 or a recent 2.3 dev version.
  25. Good point Soma and now I better understand what you are thinking @cmscritic. Agreed - this shouldn't redirect to the search page. It should load the 404 page, but populate it with content from the search results. Will have to rethink for sure!
×
×
  • Create New...