Jump to content

diogo

Moderators
  • Posts

    4,314
  • Joined

  • Last visited

  • Days Won

    80

Everything posted by diogo

  1. I don't see why not... if your site is responsive, why not having everything responsive? I just think they didn't go far enough with it. If you see the second example, at some point the arrows are bigger than the picture. To make it truly responsive, the arrows should change place to accommodate to the picture. You don't have to use lightbox only with thumbnails. Again, if it's well done, it can save you some headaches when designing for mobile. I think we are falling on a "oh no, now everything is responsive!" hole here. Responsive is a good solution where applicable, so why not use it? I just don't think it's something to brag about anymore. And that's a good thing!
  2. You can try this module http://modules.processwire.com/modules/language-localized-url/ It's still in beta, but it seems to work very well.
  3. That's for tags. Category should be only one. No?
  4. diogo

    Book Recommendations

    This is a great reading! http://processingjs....rial/mario.html edit: Learn OOP the fun way
  5. Google Docs forms work pretty well for this kind of things http://www.google.co...ogle-d-s/forms/
  6. +1 for the subdomain
  7. http://www.cmscritic.com/critics-choice-cms-awards/ Will PW participate?
  8. Sounds like a great idea!
  9. You can use Soma's http://modules.processwire.com/modules/markup-simple-navigation/ and deactivate the link to the placeholder with js. The module has lots of options that give you a nice control over markup
  10. You will know those things if you follow this tutorial http://processwire.com/talk/topic/693-small-project-walkthrough/
  11. You can call it object oriented PHP If you really want to know how it works have a look at this http://www.killerphp...t-oriented-php/, the special thing about ProcessWire, is the clever way how Ryan wrote it, inspired by the simplicity and power of jQuery. That's why you can do great things as $page->images->getRandom(); or {$image->height} You can get it here http://processwire.com/api/ I would suggest that you do like I did. Print it, and read everything while having a coffee or a beer, looking at the see
  12. I think you are going too fast here. Maybe you should have a better look around the forums and read the documentation on the website to have a feel of how ProcessWire works. There is a great walkthrough here http://processwire.c...ct-walkthrough/. You will see that it feels great when you understand the full potential of PW, and start wanting to find out these things for yourself. Having said that. Here is a tip... For having several galleries on a webpage, best thing is to have each gallery on it's own page on the tree (you don't have to show them as pages on the website itself though). Then, you can get them all from your template. foreach ($page->children as $child){ foreach($child->images as $image){ echo "<img src='{$image->url}' rel='$child->gallery_name'/>"; } }
  13. I had a look at soundcloud sharing options, and they don't look very smart... Still, I think your best option would be using the wordpress option that looks like this: [soundcloud url=http://api.soundclou...racks/59046167" iframe="true" /] You have two options. One that represents more work to the editor but less processing work, one simpler to the editor but more complex in PHP. For both options, create a text field "song", and add it to the template. For the first option, teach the editor to get the wordpress sharing option in soundcloud, extract the number of the song [soundcloud url=http://api.soundcloud.com/tracks/59046167" iframe="true" /] and put it on the "song" field. The code on the template would be this: $song = $page->song; echo "<iframe width='100% height='166' scrolling='no' frameborder='no' src='http://w.soundcloud.com/player/?url=http%3A%2F%2Fapi.soundcloud.com%2Ftracks%2F{$song}}&show_artwork=true'></iframe>"; Second option, is a little bit easier to the editor because he doesn't have to look for the number on the wordpress code. Only copying it. [soundcloud url= iframe="true" /] Your code would have to be more complex, and a bit slower in terms of processing: $src = $page->song; preg_match( '/([0-9]+)/', $src, $matches); //extracting the numbers part of the url with a regular expression $song = $matches[1]; // and putting it on a variable echo "<iframe width='100%' height='166' scrolling='no' frameborder='no' src='http://w.soundcloud.com/player/?url=http%3A%2F%2Fapi.soundcloud.com%2Ftracks%2F{$song}&show_artwork=true'></iframe>"; edit: corrected some typos by WinnieB's suggestion
  14. I think you really don't need to create a module here, although I don't see any problem if you do But take Soma's solution: Create a page named Images, and a template for it's children with only one image and a checkbox. Use Soma's module to show the pictures as thumbs on the tree. Create a page "favorite images" with a page fieldType with only the favorited images. You can do this with a selector on the field options. -home --images ---image1 ---image2 ---image3 --favorite images The person just have to add a new image and select the checkbox if it is a favorite, and then go to "favorite images" and order the images by dragging them.
  15. <a href="http://blog.mobilitika.com">Blog</a>
  16. You can also create a repeater field with a single image and a checkbox.
  17. What Pete meant is that, there is a button. Go to "More Reply Options" to find it
  18. Daniel, ProcessWire will put the info exactly where you want it to be, it doesn't make any distinction between things like "title" or "alt". You have to read carefully the instructions of prettyPhoto to know how it works (I din't have any contact with it until now), and build your html from there. That's why I told you that you should have the gallery displaying exactly has you want with html, and put the dynamic things only later. That would be the best way. Just create a text field (gallery_name f.e.) and put it next to the images field on the template. Then, complete your code like this: rel='prettyPhoto[{$page->gallery_name}]' You only need unique names for each gallery if you will put more than one in one page. If this will happen, you risk that people give the same name to both gallery, and it will mess everything. You have two options for this: Tell people that they can't do it, either verbally or on the field description. Create unique ids for each gallery. Here's how you can create the unique ID's: Simple option is to a random string rel='prettyPhoto[{rand_string(5)}]' Another option, is to use some information that is, for sure, unique to this gallery (this will depend on how you will put more than one in each page) galery_id = "gallery-" . $page->name; ... rel='prettyPhoto[{$gallery_id}]'
  19. Sorry, I should have guessed that this was the output I expected... ---- The code is perfectly correct. I created a my_images field with the cropImage type, and pasted your code on my template. Here is the result: In your case the problem must be on the field itself. Can you post here a screenshot of how the field looks like on the fields setup and on the page edit? Or just recreate the field, and redo all the steps, if you prefer.
  20. You could use page segments to do this. You will have to activate them for the gallery-page template, on the URLS tab of the template setup. Well use the number of the position of the image in the field. It seems to me that it's the best way to ensure it's uniqueness. On the template file do something like this: if ($input->urlSegment1) { $index = (int) $input->urlSegment1; // use (int) to sanitize, since we want a number $image = $page->imagesField->index($index); // get the image in the correspondent position echo "<img src='{$image->url}'/>; }else{ ...rest of the code... } on the normal code of the template you can put on the thumbs: $i = 0; foreach($page->imagesField as $image){ <a href="{$page->url}{$i}"><img src='$image->width(100)->url'/></a>; $i++; } This will give us, for each thumbnail, a link like "photos/holiday-2012/n" PS: Gazley, just read your answer before posting mine. I don't think it's that simple as you say, so, here it goes But I might be wrong...
  21. The links break when you move a page, so, I guess it's not dynamic at all. Have a look at the readme.txt of PageLinkAbstractor, it might give you some clues https://github.com/ryancramerdesign/PW2-PageLinkAbstractor
  22. I did a test with chrome tools, and it tells me that you have scripts and css inside the <body> I'm sure that this isn't the main problem, but it might influence the rendering speed. I would move them to the <head>
  23. You're welcome! By the way, the PageLinkAbstractor module prevents the links to be broken when you move your pages around.
  24. You can do it in tinyMCE. Just add a link normally, and choose the option "link to page" on the dialog
  25. Thanks for clarifying Ryan, I will edit my post to point to these corrections.
×
×
  • Create New...