Jump to content

adrian

PW-Moderators
  • Posts

    10,912
  • Joined

  • Last visited

  • Days Won

    349

Everything posted by adrian

  1. You could use this: echo "<p>Return to: <a href='{$config->urls->root}articles/'>Articles.</a></p>"; Then if your site ends up at the root of the domain when it's made live, you won't have to change links.
  2. Did you install the MarkupLoadRSS module: https://processwire.com/talk/topic/451-load-rss-feeds-markuploadrss/ or did you install one of the markup modules mentioned in this thread?
  3. This should be fixed in the latest dev: https://github.com/ryancramerdesign/ProcessWire/issues/493
  4. Is /articles/ really at: www.mysite.com/articles/ ? Is the page hidden or unpublished? I can't see why that wouldn't work as you have it.
  5. 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/
  6. 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;
  7. 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!
  8. 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/
  9. 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
  10. 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.
  11. 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
  12. Try some jQuery: $.("#field_id").change(function() { alert("Changed"); });
  13. 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
  14. 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
  15. 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.
  16. 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
  17. 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.
  18. Check kongondo's new blog module: http://modules.processwire.com/modules/process-blog/ This can be installed at any time.
  19. Care to share your final code - I bet it will help someone else here at some point in the future
  20. 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?
  21. Love the look. Two small things: "ABOYT THE BLOG" spelling error. There is a one pixel space between the lion and the basil pics.
  22. 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.
  23. 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); }
  24. 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
×
×
  • Create New...