Jump to content

kongondo

PW-Moderators
  • Posts

    7,529
  • Joined

  • Last visited

  • Days Won

    160

Everything posted by kongondo

  1. Here's the presentation to TinyMCE 4 http://www.tinymce.com/presentation/
  2. Very nice! Thx for sharing.. Shame it doesn't do PHP from what I can tell..
  3. OK. Your statement confused me...Of course you meant in this particular case Gnuey needed to do the renaming
  4. This is a quick tip for my front-end developer peeps and other wanna-be-coders like me....I have been seeing this "strange" <?php endif; ?> code in some code here in the forums and in some template files. <?php if ($a == 5): ?> <p>A is equal to 5</p> <?php endif; ?> //In the above example, the HTML block "A is equal to 5" is nested within an if statement written in the alternative syntax. The HTML block would be displayed only if $a is equal to 5. //The alternative syntax applies to else and elseif as well. I have largely ignored it until I read about it more and wow! I wish I knew about it earlier. Anyway, you might want to read up about it. In a nutshell, it makes mixing PHP and HTML much more friendly in some cases. It helps avoid echoing out a lot of HTML but instead gives you flexibility to just type them out normally... A few resources to help you understand the alternative syntax. http://php.net/manual/en/control-structures.alternative-syntax.php http://www.brian2000.com/php/understanding-alternative-syntax-for-control-structures-in-php/ http://www.stoimen.com/blog/2010/03/10/php-if-else-endif-statements/ http://www.trans4mind.com/personal_development/phpTutorial/controlStructures.htm http://stackoverflow.com/questions/564130/difference-between-if-and-if-endif http://stackoverflow.com/questions/6023418/when-do-i-use-if-endif-versus-if http://www.trans4mind.com/personal_development/phpTutorial/controlStructures.htm
  5. Ye, this does confuse at times...PW has both input and output formats for date...
  6. On XAMPP (locally) PW renames my /site-default/ to /site/. Does it not in other local installs?
  7. Diogo, Thx for the tip. Btw, not sure why this last thumbnail is not loading? I can't see it in the modal It's now OK...some forum quirk I suppose
  8. I don't think it's possible, I could be wrong. I saw a post about this but can't find it now. Such a user will be able to "view" but not edit pages. See also this module http://modules.processwire.com/modules/page-edit-per-user/ (page edit per user). This may also be of interest: http://processwire.com/talk/topic/2443-hide-pages-from-page-tree-asmselect-problem/ ("hiding" pages by putting them under Admin page)
  9. Galaxy, These should get you started...nothing really special about accessing repeaters http://processwire.com/api/fieldtypes/repeaters/ http://processwire.com/talk/topic/958-repeatable-fields/
  10. And we have you to thank for hiring him in the first place which led us to Hanna Code! Thank you!
  11. Massive! Thanks for the write-up Ryan! I'm especially intrigued by the import script and the URL hook.
  12. Thx Ryan. I've said it before - with PW, we are spoilt for choice!
  13. Stefan, From what I understand, In modules and in functions $page is always out of scope (?). In functions, use wire ('page') or $wire->page instead since is global. In modules use $this -> //These two are equivalent, so what syntax you prefer to use is up to you: //http://processwire.com/api/include/ $mypage = $wire->pages->get("/about/contact/"); $mypage = wire('pages')->get("/about/contact/"); See also http://processwire.com/talk/topic/3638-this-scope-in-modules/?p=35554http://processwire.com/talk/topic/3056-cant-use-input-urlsegment1-in-a-function-is-this-my-php-weakling-status-showing/?p=30044
  14. I'll hazard a guess. I know PW prevents u from running php scripts directly in site/templates/ and some other places. Maybe also in assets folder? http://processwire.com/talk/topic/407-processing-contact-forms/?p=3106
  15. It does clarify things, thanks for posting. Once you've configured the macro, does the placeholder then get replaced or it stays in place?
  16. +1 for $pages->add();
  17. Sorry; I just wasted your precious time! I forgot to set it as my textformatter after I made a couple of changes! Thanks
  18. Is it just me or is Hanna version 1.0.4 broken? It no longer works - it outputs the raw tag Don't know what's happening but even older versions do not work any more. I'm stumped. Ideas? Using it on 2.3 stable
  19. /site/assets/cache/HannaCode/ . The PHP are stored as PHP files
  20. Other uploaders/topics that may be of interest http://www.plupload.com/ (by TinyMCE guys) - this is a beast! http://www.fyneworks.com/jquery/multiple-file-upload/# http://www.phpletter.com/Demo/AjaxFileUpload-Demo/ http://pixelcone.com/jquery/ajax-file-upload-script/ http://www.jscripts.info/mfupload.php http://www.jquery4u.com/plugins/10-jquery-ajax-file-uploader-plugins/ http://www.9lessons.info/2012/09/multiple-file-drag-and-drop-upload.html http://www.nacodes.com/2013/04/14/DROPAREA-jQuery-Html5-drag-drop-file-uploader-plugin
  21. You do that server side. Dropzone will deliver the file to your PHP file. With that you can do whatever you want
  22. I have tested Hanna with single {, ( and [, i.e. (hello) [hello] {hello} They all work fine in both PHP and Text mode. Ryan, are these OK or they could throw up issues? Thx.
  23. I have been testing it this week. It is simple and works out of the box. I settled for https://github.com/Widen/fine-uploader though due to its many features...(note: it is OS but for those not wanting GPL, they can buy a commercial license; Initially I thought it was all commercial)
  24. Good point. Let me update the post...but will just leave the attachment up with a note
  25. WillyC, even the following will work with Hanna Edit: with normal text; with PHP no....see below LAST EDIT:) All work single ( or { or [ {piranha} Just change the tags you want to use in TextformatterHannaCode module. I haven't tried it with PHP yet. These single tags/square brackets will work in PHP mode. All the below work in hanna in PHP and text mode [piranha]{piranha}(piranha) Sorry for digression
×
×
  • Create New...