Jump to content

Wanze

PW-Moderators
  • Posts

    1,116
  • Joined

  • Last visited

  • Days Won

    10

Everything posted by Wanze

  1. Hi Ben, Enable debug mode in /site/config.php and you should see some errors. Does the frontend work? You shouldn't, but did you modify $config->userAuthSalt?
  2. Ryan, You are right of course Funny, when i wrote the js code I knew something is missing but I couldn't figure it out then. Corrected my post.
  3. Hi Giovanni and welcome! This is a very interesting first question You can write an autoload module which adds the greyscale method with a Hook to the PageImage class. Check out the /site/modules/Helloworld.module for examples. I have never used these hooks which extend a class with methods, but it would be something like this: Edit: I don't know if you can access variables from the Pageimage class inside the makeGreyscale method. So sample code below could be completely wrong. Ryan, Soma, Apeisa, Nik, Teppo etc. where are you? //In your module... public function init() { $this->addHook('Pageimage::greyscale', $this, 'makeGreyscale'); } //This is only sample code... public function makeGreyscale(HookEvent $event) { $img = $event->object; //Make a new image file that is greyscale. Otherwise you could apply your image filter directly to $img $basename = basename($img->basename(), '.' . $img->ext()); $basename .= '-greyscale.' . $img->ext(); $filename = $img->pagefiles->path() . $basename; $greyscale = clone $img; $greyscale->setFilename($filename); //Make it greyscale //... $event->return = $greyscale; }
  4. Another option that would bypass Pw caching, even ProCache is to send an ajax request to handle the counter. If you use jQuery, this would be something like this: //Javascript <script> $(document).ready(function() { var data = {'action' : 'handleCounter'}; var url = '<?= $page->url?>'; $.post(url, data); }); </script> //PHP if ($config->ajax && $input->post->action == 'handleCounter') { //... //put your php code in here //... exit(); //Quit since this was only a request to update the counter } To make this work you would need to disable caching for the POST "action" variable. This is done in the template settings under Cache > Cache disabling POST variables
  5. Hi Noose, Glad the module could help you out! Yeah, I actually set it collapsed because I want the users to first select the right pages before choosing any action and hitting the Execute button. If you could not open it, then I guess this is some sort of a javascript error. Also the change parent works fine for me, it should render an "PageListSelect" instead of the textbox. Could you tell me: Version of ProcessWire Operating system Browser I only tested with the newest dev version and Firefox/Chrome on Mac, so maybe you found a bug. Ah and maybe have a look in your js-console to see if any errors appear. Thanks!
  6. Hi cliff, Can you check the Javascript Console for errors? Also you can enable $config->debug=true in /site/config.php. Check the response of ajax requests, maybe there are some server side errors?
  7. Hi, Set $config->debug = true in your /site/config.php file. Maybe you see an error message then.
  8. Matthew, Claudio Thanks for your comments and suggetions!! I received the new MacBook this week with the Retina display. Impressive how sharp everything looks, especially text! The only downside are the images on websites: There's even a higher contrast seeing this sharp text and the blurry images next to each other. But after 2 days, I already got used to it Thanks again!
  9. Recently had a little problem with an Update. I forgot to write it down, but if I remember correct - this is what happened: I had the LanguageLocalizedUrl module installed (manually). This was only one .module file in /site/modules/. After the update with ModulesManager, there was a Directory created with the same .module file inside under /site/modules. Then I got some server error. Maybe the module could check and rename an old module-file that is not in a folder?
  10. Did you enable "allow new pages to be created from field" ? Here are the notes:
  11. Hi totoff, It does set header 301 if you use Session::redirect by default. Here's the method from the Session class: <?php public function ___redirect($url, $http301 = true) { // if there are notices, then queue them so that they aren't lost $notices = $this->fuel('notices'); if(count($notices)) foreach($notices as $notice) { $this->queueNotice($notice->text, $notice instanceof NoticeError ? 'error' : 'message', $notice->flags); } // perform the redirect if($http301) header("HTTP/1.1 301 Moved Permanently"); header("Location: $url"); header("Connection: close"); exit(0); }
  12. In my opinion, this sentence sounds like a google translation from english to german: I'd choose a more active style of writing, for example: What do you guys think?
  13. Good morning/evening/night or whatever! I just commited to Version 1.0.2. Here are the new Features: Permission Checking: Don't show pages that aren't editable by the current user. Also removed all actions that the user doesn't have permissions to execute. You can directly edit a single page over Fancybox by clicking the small "edit" link after a page (thanks raydale) Added Batch-Creating of Pages Batch-Creating Screenshot taken with Soma's great new Teflon theme Includes permission checking and Family template restrictions. This means in detail: The selected parent must accept children and their template The pages template must accept the parents template User needs the permission to add children to the selected parents template User needs the permission to create Pages for the chosen Template How does it work? 1) Select a parent where your new pages will be added as children 2) Add as many pages as you want by clicking "add Page" 3) Click "Create Pages" You must enter a title and choose a template. The name is optional: If left empty, Pw will generate this for you. Batch-creating tips The chosen template and the statuses are always cloned from the last row. So if you need to add 30 pages with the same template, define it first and the click "add Page" - i'll make your life easier ;-) You can drag & drop the table rows should you want to change the order. The draging looks ugly but it works. For the lazy dogs and keybord hackers among us, you can add a new row by pressing "ctrl+n". This works (at least in firefox) only if no input has focus. After adding a new row, the title input gets the focus. By pressing 3 times tab you arrive at the published-checkbox, here the short-cut works. Restrict Batcher for a user to only allow editing or creating Create permissions "batcher-edit" and/or "batcher-add". As soon those exists, the module checks if the current user has those permissions. Good night
  14. Check out this thread: http://processwire.com/talk/topic/2824-dont-substitute-default-language/ There was a little bug but it should be fixed now by ryan - haven't had time to test it yet. The latest dev will become ProcessWire 2.3 very soon and is already "stable". I'm using it since months and had no issue, so my advice is: Update to the latest dev You can see some of the new features of 2.3 here: http://processwire.com/about/news/feb-2013/ Cheers
  15. Hi Marcel, I assume you mean a navigation somewhere in the frontend? If you have the newest Pw dev version, you could add this to your selector: $pages->find("title!=''"); This should exclude pages that have no title set in the current language. Another possibility is to create additional checkboxes to indicate if a page is really published in language xy
  16. Do you throw any GET vars into a selector?
  17. Hi Aaron, You can use ProcessWires built in User / Roles Management for the Users, so assign either a "Buyer" or "Artist" Role. After the frontend-login, you just display different stuff based on the users Role. As Pete says, 10'000 Users is not a problem – Users are in fact pages too. I'm developping a custom "shop" that currently has about 2000 registered Users and 90'000 Products – everything modeled with pages. It's not finished yet but so far I haven't encountered any problems. Cheers
  18. Hi Stefan, Looks great! One thing i noticed: The webcam isn't working? Seems like an image isn't found, I got this Error-Message: NetworkError: 404 Page Not Found - http://www.typneun.de/img/webcam/typneun-webcam-highres.jpg Great work! Cheers, Stefan ;-)
  19. Depending on the amount of pages, I'd use Antti's excellent redirect module. However, if you have hunderts or more of pages with the same "format", you could add a pemanent redirect in your .htaccess. Let's say you want to rewrite your old pages "section1-pageA.htm" to Pw-Urls, which would look like this: "/section1/pageA/" This is easy if your sections AND pages have the same name in Pw, then one or two lines in the .htaccess are enough: #Add those redirects after the RewriteBase RewriteRule ^(section1)-(.*)\.htm$ /$1/$2/ [R,L] RewriteRule ^(section2)-(.*)\.htm$ /$1/$1/ [R,L] Not tested ;-)
  20. Glad it works! But you have to be patient and try out the different solutions one after another. It's not always easy because each webserver is configured slightly different. Actually I wrote the solution that worked for you already in the other thread: http://processwire.com/talk/topic/833-indexphp-not-found-after-install-404-error/?p=27848 Cheers and happy Pw-discovering
  21. Hi ashrai, foreach works, you can give your news-boxes different classes based on the iteration index. For example: $news = $pages->get('/news-parent/')->children('limit=3, sort=-created'); foreach ($news as $k => $n) { echo "<div class='box{$k}'>"; echo "<h2>{$n->headeline}</h2>"; echo $n->teasertext; echo "</div>"; } And in your css, style your boxes: .box0 { /*first box*/ } .box1 { /*second box*/ } .box2 { /*third box*/ }
  22. Looks very useful, thanks teppo! Will try out this soon. Does it also work for multi-language fields?
  23. With a little addition: $class = ($page === $child || $page->parents->has($child)) ? " class='on'" : ''; $page->parents returns a WireArray with all the parents and ->has checks if the current Nav-Item is in there.
  24. Hi Soma, Looks awesome thanks very much! The Fieldsets without Labels => niiice Hoping to find some time next week for testing - also on IE.
×
×
  • Create New...