Jump to content

adrian

PW-Moderators
  • Posts

    11,097
  • Joined

  • Last visited

  • Days Won

    365

Everything posted by adrian

  1. Sorry to hijack this thread, but if you are working with HTML5 video, have you seen my draft video fieldtype module: https://processwire.com/talk/topic/4580-video-fieldtype/
  2. Sorry I didn't realize the articles weren't directly under the parent - that's how I have always done things. I don't really see the problem in linking to the parent news page directly with something like: $pages->get("/news/")->url;
  3. $page->parent->url
  4. Just a couple of quick comments for you. www.mcalleluya.mil.nf doesn't work, but http://mcalleluyashow.mil.nf/ does There is a broken image at: http://mcalleluyashow.mil.nf/mc/categories/introductory/ Congrats on getting the site live!
  5. Hi davo, Thanks for the kudos. That error is part of the recently added functionality to grab the video title and add it to the image's description field. Do you know whether it occurs randomly with the same video, or does it happen only with certain videos? It's an easy check to prevent the error, but I am curious as to why the entry item is sometimes not available in the YouTube xml feed. Also, I noticed that you have the module installed under: GetVideoThumbs-master It's unfortunate that Github does this, but it suggests to me that you are manually downloading modules, so I thought I'd suggest using the Download and Install functionality under the New tab in PW's module page. You'd simply paste in "ProcessGetVideoThumbs" into there and it would download and install everything for you automatically. This also means that you can then use the automatic updating when a new version of a module is released because it will be installed in the correct folder. Then of course there is also Soma's modules manager which makes things even easier: http://modules.processwire.com/modules/modules-manager/
  6. The $files variable is for accessing just about everything else about a file, but not its content. Of course the contents of files vary so much from type to type. There might not be much value in extracting the content of a binary file, but it might be a nice addition to have an easy way to extract the content of text based files. $file->url would be used, for example, for making a link to view a PDF or display an image. $file->filename is what you would want to pass to fopen. $files->path is the full disk path to the files directory for the page, eg /home/public_html/site/assets/files/1001/ Here's something else that might be useful for you to read - the difference between fopen and fread: http://www.tuxradar.com/practicalphp/8/1/3
  7. Not sure how it could possibly have happened, but have you checked through the SQL file to make sure that: INSERT INTO `fieldgroups` ( `id` , `name` ) is not duplicated anywhere.
  8. From your description, I think you want to make use of fopen and also fgetcsv or str_getcsv: http://www.php.net/manual/en/function.fgetcsv.php http://www.php.net/manual/en/function.str-getcsv.php Both those links have examples on how to use them. You might also learn a lot from Ryan's CSV importer: https://github.com/ryancramerdesign/ImportPagesCSV/blob/master/ImportPagesCSV.module#L299
  9. Try some jQuery: $.("#field_id").change(function() { alert("Changed"); });
  10. I think skeumorphism maybe had a place in GUIs in the early days, but should have been gone long ago. One of my pet peeves is page turning effects - we are not reading a paper book anymore people That said, I do think Apple may be going too far in its dumbing down of the desktop OS, but I have stuck with Lion, so maybe I don't know what I am missing I like diversity: Macbook Pro (I need to be able to run both OSX and Windows, so this is a necessity for me) Android phone - awesome - love the freedom Sonos music system - again nice not to be tied into the Apple ecosystem
  11. Please think carefully about using captchas - they are a horrible user experience and not really that great at preventing spam anymore anyways. Consider a honeypot or similar approach instead: https://processwire.com/talk/topic/2089-create-simple-forms-using-api/?p=41795 https://processwire.com/talk/topic/960-comment-spam-filtering-alternatives/?p=8097
  12. This will echo out all the textformatters for the body field: $f = $fields->get("body"); foreach($f->textformatters as $tf){ echo $tf; } Hope that helps.
  13. You can used a hidden field: $field = $modules->get("InputfieldHidden"); and set the value to whatever you need and process that with the rest of the form. As for collapsing fields: $field->collapsed = Inputfield::collapsedBlank; and you can use all the options from here: https://github.com/ryancramerdesign/ProcessWire/blob/03387f8283d518e9cc405eff8f05cd6a5bf77c4c/wire/core/Inputfield.php#L56
  14. I think you probably know this already, but you can create a linux VM using one of these: vmware fusion parallels bootcamp I have only used fusion and only for a windows VM, but it should be straight forward to install debian or similar through one of these too.
  15. Check kongondo's new blog module: http://modules.processwire.com/modules/process-blog/ This can be installed at any time.
  16. Care to share your final code - I bet it will help someone else here at some point in the future
  17. A couple of thoughts. As far as a know, and from a little testing in your fiddle, class names can't start with a number. You need a letter or a dash/underscore. Also, the idea of having a different class for each item doesn't seem particularly useful in this situation, but maybe you are using the class as an identifier in some way, rather than as a way to style the menu item?
  18. Love the look. Two small things: "ABOYT THE BLOG" spelling error. There is a one pixel space between the lion and the basil pics.
  19. https://github.com/adrianbj/ProcessMigrator and since you are coming from Wordpress, you might enjoy this plugin module for taking WP XML exports and importing them into PW: https://github.com/NicoKnoll/MigratorWordpress They are still possibly not quite release worthy yet, but with a little more testing, hint hint we might be ready to add them to the modules directory.
  20. You can do it in one with findRandom(2) and then you won't need to worry about duplicate images: $randogals =$pages->find("images.tags=fav"); $randogal = $randogals->getRandom(); $randomimgarray = $randogal->images->findTag('fav'); foreach($randomimgarray->findRandom(2) as $randomimage){ echo $randomimage->size($thumbWidth, $thumbHeight); }
  21. I think you are referring to the tags property? $page->images->first()->tags or $page->images->eq(n)->tags where n is the number of the image in the images field starting with 0
  22. It is possible to extend the images field with extra fields: https://processwire.com/talk/topic/417-extending-image-field/?p=3351 but the simplest option for you might be to enable tags and write "fav" or something like that in there. Details tab > Use Tags? Or you could also have one image per page and then you have complete flexibility in adding custom fields for each image.
  23. Ok, I just committed another update and I just tested myself with some cyrillic characters and I think everything should be working fine now. I also fixed the blank dropdown issue. Now if there are no edit modes set in the config, the editor is not available at all from the Children tab. Please let me know how it goes for you.
  24. Ivan - let me know if my ChildBatchEditor is now working with cyrillic characters. If it is, I can apply the same fix to this.
  25. 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.
×
×
  • Create New...