Jump to content

Soma

Moderators
  • Posts

    6,798
  • Joined

  • Last visited

  • Days Won

    158

Everything posted by Soma

  1. Hey Lars, it's done using the http://fancybox.net/
  2. Small hint to people using language packs. If you happen to have a custom admin theme installed, you need to add a translation for the /site/templates-admin/default.php to translate the admin top menu and profil, logout text. @yellowled the Translation/Language module itself seems missing, or is that not translatable yet? But so far great work!
  3. Just one issue for now, I can't install the pack with just using the zip from github. The readme.markdown is the problem. Edit: ah well, it installs it all .json even with the readme file it will just ignore it...
  4. Everytime I need to delete a long list of files or images on a page, I wish there were a button to toggle all to delete.
  5. Awesome work yellowled! Thanks so much for taking the time. Well at least you only have to do it once. Will for sure check it out and see if I spot something.
  6. OK, coming back to this Thanks Ryan, I'll pull request the tinymce module and js changes I've done to add a third party config textfield to add plugins from outside the core. Hope you'll find the time to pull it in - bramus_cssextras, mainly it's for fixing the tinymce internal style select, which doesn't work well with nested elements and is cumbersome to deal with. This plugin is context sensitive, as it only enables the style dropdown if you put cursor in an element that has a class specified. Like if you specify p.lead{} in your content.css, it will only be selectable if you select a paragraph. It also provides an solution to an issue where you couldn't add a class to the <ul> element in tinymce, because you can't select it. So if you click inside a ul list, the <li> element is usually selected and classes get appended to the <li> element and not the parent <ul>. Bramus solves this. WEll I don't know why I'm explaing this the x-time here on the forums The website explains it all and the demo works well to demostrate: http://www.bram.us/d...amus_cssextras/ ... The top row "style" is the regular style select. The disabled ".class" and "#id" menu select on the 3rd row is the one from bramus_cssextras. Click inside the list in the text and see the menu gets enabled and only shows classes that can be added to the current selected element. Pretty cool compared to tinymce default style if you ask me.
  7. You could get the page name inputfield replacements settings like this: $pn = $modules->get("InputfieldPageName"); if(array_key_exists('replacements',$pn->data)) $replacements = $pn->data['replacements']; else $replacements = InputfieldPageName::$defaultReplacements; print_r($replacements); Edit: There was some discussions about this subject and to wether sanitizer should support the replacements from page name inputfield. And it seems it's still open to make it consistent throughout the system. See thread here for Ryan's thinking http://processwire.c...t-module-issue/
  8. Hey mcmorry Thanks again for putting this together. Some feedback. I guessed it, but newcomers maybe could have problems understand that URLsegments needs to be enabled in PW template settings to make it work. Maybe suggest the proxy pages could also be made hidden, to avoid showing up in the navigation. The module unfortunately doesn't work well with special chars in many languages. Like Umlauts ÜÖÄäöü ... àåéê and a lot more. I end up with /de/1001_-ber-uns/ instead of /de/1001_ueber-uns/.. Note that those conversion are used in the default title -> name relation when creating a new page, and can be configured in the page name inputfield module in processwire. Maybe there is a way to get that config from the module loaded to do the slug. Or if not, add it to this module locally. The mlUrl() seems to work expect the link for homepage "/" doesnt work. It has "". Also to avoid the problem of having doubles in alternative languages, id feature has to be always enabled. As there's nothing preventing me from entering same title for two pages under same tree. Or maybe there's an easy way to prevent it with a hook and do some additional validating on page title language fields. Some idea I had would be to have an install method in the module to install the needed template with urlSegments enabled and prepare the default and other proxy pages according to the language settings in PW.
  9. Welcome mcmorry, and thanks for making this module. The following is maybe more directed to Ryan, but everyone it welcome to think about something. What would it mean to implement this feature in the core? Would it be a lot of work to change the url mapping to support language name for a page? (edit: or even possible or making sense). I mean since you already have implemented the multilang fields, and given that there's a page title multilang field, I find it now strange that such a module is required to implement language urls which is a "must have" feature, regarding SEO, for a good multilanguage site. Sorry to bring this up here a little late. I just am thinking about this subject a very long time and not only since PW, but haven't really payed attention to the multilang field and title and that something seems missing as the "last" brick for a on-one-page multillanguage solution (with speaking urls) out of the box. I'm ever since using separate language trees to build sites and it works very well and flexible, consistent, fast, not so polluted page edit mask, etc. so I'm more the one heading towards the concept of Olivers language module with synced, linked multitrees. But this is a different subject and maybe discussed in the other room.
  10. Have you created an image field and then set the inputfield (on field input settings tab) to "cropimage"? Or changed an already setup image field to use cropimage inputfield? If so, it won't work, you have to create a field using fieldtype "cropimage" from the start. I recently ran into this problem.
  11. Sure you can // get all pages that have at least 1 quote $res = $pages->find("employee_quotes.count>0"); // add all quotes to an PageArray $allquotes = new PageArray(); foreach($res as $r) $allquotes->add($r->employee_quotes); // shuffle or whatever you please $allquotes->shuffle(); // output all foreach($allquotes as $q){ echo "<p>$q->employee_quote</p>"; }
  12. Thanks Ryan! Then you have to take look at the $page->created_users_id, it returns the modified user id and modifiied_users_id the created user id... Think you missed it in the previous posts. Is this a bug?
  13. Thanks for testing antti! I was also thinking this, but my testsite has only 10 direct children in "/"... EDIT: *Logs out with editor and logs in with admin* It's actually 14 including trash and admin etc, same like the amount of the result.
  14. Ryan, I was testing yesterday with a different code. While testing with this, can you explain why the following happens: When I use this: $results = $pages->get("/")->find("modified_users_id|created_users_id=41"); echo "res: " . $results . "<br/>"; I get this: res: 1002|1004|1008|1010|1112|1143|1161|1163|1170|1193|1194|1196|1240|1257 When I use: $results = $pages->find("modified_users_id|created_users_id=41"); echo "res: " . $results . "<br/>"; I get this: res: 1|1001|1002|1003|1004|1005|1008|1010|1112|1143|1161|1163|1165|1170|1176|1177|1188|1193|1194|1196|1197|1202|1240|1257 I think that's why I got so confused. This does only happen when echo the result, it is not this way when using foreach... (ok forget this, I must be dreaming) Edit: sorry changed first post code to correct.
  15. Ryan thanks for the throughout explanation. That all makes sense. Now testing again with and with your new PageFinder.php it seems to make a difference and should work. Maybe I mixed something up with the new php file yesterday... But one thing that caught me is that when I test with your code. In the output the user id's are switched. I tracked 2 pages and edited with admin and an editor user. page: 1240, created_user_id: 1007, modified_user_id: 41 page: 1257, created_user_id: 41, modified_user_id: 1007 Actually 1240 was created by admin (41) and modified by editor (1007)... ? Same with the page 1257, it's created by 1007 and modified by 41. When I look at the info on page edit screen it shows me the correct values. I double checked everything and tried everything (removed PageFinder.php) etc but can't figure out why.
  16. Ryan, I also tested this and we were utterly confused. (in the irc) "|" means OR, and it was working as it should (or is it different with textfields?) the first to find will be returned. Can you put some light into this? Now after your change, it returns all pages that are found for both fields (created and modified). And this is confusing as I assume it's an OR. But that's not what he wants. He wants ALL pages that are either modified or changed by the user. At the end we ended up again to what I suggested to split the find and merge them. Because it can't be done with one selector like "created=uid, modified=uid" as it will only return the pages both are true.
  17. It works fine, I'm using repeaters and haven't run into this issue. I assume it's something with the permission on templates/pages that does not find the pages for guests. $quoteList = $pages->find("employee_quote!=")->shuffle(); This is not on page but doing a find over ALL pages there is. If the pages with the repeater on it is somwhere the guest doesn't have access it won't find them. To test this you could try adding a ",include=all" to your selector. Does it change anything?
  18. Errm, while extensively testing things, I forgot that I had caching on, and once turned off (and urlsegments ) it seem to be working. Although not tested completely
  19. nikola, I think it's either because the Module isn't installed, or you're logged in while viewing the page. It only renders form when not logged in. I tested it but it doesn't seem to work just like this. Somehow it doesn't process it and instead just show the form again after submit.
  20. Steve, you're revealing too much already...
  21. You're missunderstanding viewable(). It's only for checking if a user has view permission. I think what you're trying to archive would be: if( !$parent->isHidden() ) ... Do a "page->is" search on the cheatsheet to see further methods. Edit: ...oh and I drink coffee not beer. Edit2: Damn you already got that in your code... (not enough coffee I guess) need to read again. lol Edit3: Ok I added a !, so this looks ok. Reading again you already got the answer there in the code. Anyway, as an alternative, you could also leave the apple page visible and create a special template ie. "redirect_xy", and use that to do redirects to the first child or anything you could specify. You then would also have to deal with the searchresult additionally, or maybe not. For example the: $session->redirect($page->children()->first()->url); Or maybe even add a page field (single) to the template to select the page to redirect to. $session->redirect($page->redirect_page->url); But your solution seems ok to me. Just wanted to give alternatives (for others and the record).
  22. Same caught me too once. It's only when logged in as supermom.
  23. There's actually a login link at the end of the installation.
  24. Ryan, this doesn't return the anything for me. ? echo $page->pdf->pathname; // returns nothing However, I got a little class that works pretty well for download files. Without getting headache. https://gist.github.com/2775882
×
×
  • Create New...