Jump to content

adrian

PW-Moderators
  • Posts

    11,176
  • Joined

  • Last visited

  • Days Won

    371

Everything posted by adrian

  1. Ivan - let me know if my ChildBatchEditor is now working with cyrillic characters. If it is, I can apply the same fix to this.
  2. Ivan, I am really not very experienced with non-latin characters, but I just changed page name sanitizer to include: "Sanitizer::translate" which I am hoping will do what you need. Otherwise I will need to revisit things and use the code from the core that dynamically generates the page names on the fly from the titles. I have also added a few new features to this module: There is a new "Add" option so it is possible to bulk add new children regardless of the content and grandchildren of the other sibling pages. Also there is a new config setting for allowing you to override the content protection check when using the overwrite mode - obviously use with extreme caution. Hope all those changes are useful. First post updated with new options and screenshots.
  3. There is this one from Soma: https://processwire.com/talk/topic/5895-sev-online-relaunch/
  4. Ok, thanks for the explanation - it all makes sense now I don't know what your getTpl() method actually does, but this will also return the template file's full path: echo $page->template->filename; Maybe you are already using this as part of getTpl()?
  5. I'm with WillyC - I can't find getTpl() in the source code anywhere. Can you point us to the file/line on github where this method is defined. I am curious!
  6. adrian

    Windows XP lives on

    It's not the average Joe/Jane I am worried about - it's the government sysadmins that are too lazy to upgrade their staff! I don't support old IE on most projects, but some I still need to
  7. adrian

    Windows XP lives on

    This is depressing: http://www.extremetech.com/computing/183362-windows-xp-rises-from-the-grave-simple-hack-gives-you-five-more-years-of-updates Another 5+ years of IE6-8 When will this madness end?
  8. Sorry, forgot to mention that you also need to shuffle if you want random order rather than just random selection. So do this once you have $randWords populated: $randWorks->shuffle();
  9. Are you looking for findRandom rather than getRandom? http://cheatsheet.processwire.com/?filter=findrandom
  10. A couple of really quick comments. Have you tried saving $player? $player->save(); or $player->save("game"); Also you should use: wire('input')->post->user_id; It's the PW way and apart from looking cleaner it also takes care of any magic quote discrepancies between servers.
  11. I don't know if you have any specific requirements for your SKU, but someone came up with something on SO: http://stackoverflow.com/questions/15830222/text-abbreviation-from-a-string-in-php You can also google creation of a GUID (globally unique ID). There is even a built-in php function: http://www.php.net/manual/en/function.com-create-guid.php
  12. I am not completely sure what you are after, but does this do what you want: $pages->count("selector")
  13. I don't know about the multisite side of things, although I don't imagine there is anything different, but here are the full set up upgrade instructions: https://processwire.com/talk/topic/52-how-do-i-upgrade-processwire-to-the-latest-version/
  14. Ivan, Is this just an issue with this module, or does it happen when creating pages in PW in general? I don't know much about this stuff. Just found this post: https://processwire.com/talk/topic/5278-error-in-transliteration/ but before I look into it more, I just want to confirm that it works as expected for you when creating a page normally in PW.
  15. I think so - check out this discussion: https://github.com/ryancramerdesign/ProcessWire/issues/496
  16. You're right about the sub/grand children issue with that module when in create/overwrite mode, but if you switch to edit mode you can still quickly add new pages in this scenario. But, yes we should take this conversation over here: https://processwire.com/talk/topic/6102-batch-child-editor/ now. I'd be happy to modify the module if you have suggestions for improvements that would help your workflow without compromising the need to protect from accidental data loss.
  17. Not sure if there are any instructions posted yet, but if you install the module from the core list, the setup of a new field with this type is well documented. I am sure you'll get the hang of things from playing around for a few minutes. There is some discussion about PageTables from this post onwards: https://processwire.com/talk/topic/6417-processwire-profields-table/?p=62890
  18. This module might be useful for you: http://modules.processwire.com/modules/batch-child-editor/ Use the Create/Overwrite mode.
  19. adrian

    Hanna Code

    Oh right - sorry I misunderstood. Both provide similar functionality, although I haven't actually used Nico's shortcode module, so not completely sure on the differences. I guess my advice would be to experiment with both and see which best provides you the functionality you need.
  20. I actually really agree with you on this being enabled during development - I often change page titles at this time and it can become painful to remember to change the names as well.
  21. adrian

    Hanna Code

    I am at a loss for why it isn't working for you. Not that it matter, but here is a slightly cleaned up version of your code: if (!isset($size)) $size = 200; if (!isset($link)) $link = $page->httpUrl; echo "<img src='http://chart.googleapis.com/chart?chs={$size}x{$size}&cht=qr&chl=$link' />"; You had unnecessary curly braces and extra semi-colons and also since these are square, there is no need to define the width and height separately. If you wanted you could even make it a one liner: echo "<img src='http://chart.googleapis.com/chart?chs=" . (isset($size) ? $size : 200) ."x" . (isset($size) ? $size : 200) ."&cht=qr&chl=" . (isset($link) ? $link : $page->httpUrl) . "' />"; Although you do sacrifice a little readability. One other quick thing - in your google.com example, you are using backslashes instead of forwardslashes - probably just a typo
  22. adrian

    Hanna Code

    I am not quite sure whether you are having problems with your code working or not. It works perfectly for me if I don't define a link - it defaults to the current page and if I do define it goes to that link. Can you tell us exactly what isn't working and what the link is instead? Effectively they are/do the same thing. I think Ryan got the name and inspiration from WP's Hana code.
  23. A PW upgrade overwrites the wire directory, the main index.php and the .htaccess file (although it's rare for these two files to change). A module and it's cache folder (and anything else under site) is untouched. Upgrading to a new version of the Procache module would only overwrite the module files in site/modules/ProCache. The actual cache of pages would be untouched.
  24. This should give you an idea of what I mean: On another note, I like being able to only display the Recent Posts when viewing a single post. I don't see much value in having it on the blog home page because the recent posts are there already. As for comments - all those options sound great!
  25. Hey kongondo - great improvements. I have another suggestion for a widget for you On the main posts page, I like having a thumbnail of the first image to the left of the summary text. Of course you could use the first image from the images field, but I think it would be more appropriate to use the first image embedded in the post - domdocument or even a regex does the trick nicely. You could maybe even have a "feature image" field which could be used for this purpose, or perhaps enable tags on the images field and have people enter "feature_thumb" or something like that in the tag field for the image they want to use as the thumbnail - this might be the simplest and most flexible approach and will also require no duplication of images.
×
×
  • Create New...