Jump to content

diogo

Moderators
  • Posts

    4,296
  • Joined

  • Last visited

  • Days Won

    79

Everything posted by diogo

  1. As told by Luis and woop, it would be very easy to build this in pw. But if you want to take advantage of tumblr's social features and great interface, you should also consider having a tumblr blog and integrating it with pw. The tumblr API is very easy to use, and makes it very simple to integrate the blog in your own page http://www.tumblr.com/api_docs. There's even a php application that makes it even easier https://code.google.com/p/phptumblr/. Another solution would be to assume that the blog is a different part of the site, and have it on tumblr with a custom domain (ex: blog.domain.com) and in the site's navigation.
  2. i think the idea is great but the implementation is not very intuitive. did you try to make the other way around? i mean, what is inside something is processed, and what is outside doesn't. brackets would be good candidates, just like in php.
  3. i'm on mobile and will not even try to write code. but look for the count method on the cheatsheet, and you should get there. edit: soma was faster
  4. Here is something for us all to learn. Martijn's mistake happened because the dutch word "leren" means learn and teach at the same time. Strange fact but true, courtesy of google translate I suspected it could be something like this, because the word "lernen" in German means both learn and study, and I always found it funny when German people would say to me in English "leave me alone, i have to learn now".
  5. diogo

    Getting Busier

    Welcome to our small and cosy place leeaston. I'm sure you will enjoy the next weeks
  6. best profile for your site is the crssp profile install the default profile and study it well. then you can make your site grow from there adding structure and functionality
  7. I don't think you need to do it, since you will be doing exactly the same work with php on your importing script.
  8. Great! I'm participating on discussions without even knowing
  9. diogo

    Koding

    I didn't have any problem with the database, but I find the interface pretty buggy, especially when moving files or folders. I think koding is a very interesting idea, but there's still a long way to go concerning the implementation.
  10. It seems perfectly possible, with the bonus that you get to choose the format If the second is most likely to be the format for all the info, I would go with that one. You should have a look at more news to see if there is a pattern that you can rely on. After that pattern is identified, you can decide how to divide the data on each file in a way that is more useful for you to manipulate it. Then you can start working with regular expressions or even with a DOM or XML parser to actually divide all the data in pieces. Then comes the fun part , structuring PW to receive all the news (pages, fields, categories) and import everything to PW pages.
  11. diogo

    100+ modules reached!

    Two likes for this. Would be three if a "t" wouldn't be missing
  12. Josh's post encouraged me to tell what I have Laptop is a Dell Inspiron with 15'' display, and when at home I dual screen it with a 21'' Samsung monitor. The OS is the very new Fedora 18 Beta (I'm living on the edge ) with Gnome graphical user interface. When people know I'm a designer and I show up with something that is not a Mac, they say "YOU DON'T HAVE A MAC???"
  13. @ryan, coming from mindplay this should be taken as a big compliment
  14. first of all, @soma, when trying this I noticed that you have a problem in your hotmail example, because you are adding the error to the email value and not the object itself. You should change it to this instead: $emailfield = $form->get("email"); $vemail = $email->value; if($vemail && (strpos($vemail,'@hotmail') !== FALSE)){ // attach an error to the field // and it will get displayed along the field $emailfield->error("Sorry we don't accept hotmail addresses for now."); } (new code editing of the forum is great ) --- @david, I wouldn't use a hidden field only for printing an error... If you don't mind having the error outside the form, you can do simply something like this: if(your check) { $out .= "<p>Please fill one of those three</p>"; $out .= $form->render(); } if you really want to put the error inside the form, and between elements (alert: I will be a bit creative here because I don't really know how to change the render() method), I would suggest that you use a php dom parser (yep, creative, i told you). I tried this one http://simplehtmldom.sourceforge.net by putting it on my templates folder and changing it's extension to .inc and including it on my template with include('simple_html_dom.inc');. You would be able to do what you want by writing something like this inside your error check conditional: if(your check) { $out = str_get_html($out); //get the fielset by it's id $fieldset = $out->find('fieldset#id'); // prepend the message to the fieldset $fieldset->innertext = '<p class="error">Please, fill one of these three</p>' . $fieldset->innertext; echo $out; }
  15. Repeaters are always under /processwire/repeaters/for-field-130/for-page-2757/, where "processwire" is your admin name, "130" is the id of the repeater field, and "2757" is the id of the page where the field is.
  16. nooo, i mean one more forum only for snippets
  17. now we can have a snippets forum
  18. diogo

    Before PW & After PW

    Man! Wallace and Gromit!! Must be great to work with the Aardman people
  19. Like any other php script, just access to the php file through the url. Wish in PW world means accessing the page that has this in the template.
  20. A forum is a forum, and undoubtedly this must be one of the friendliest to anyone that wants to participate on discussions. And no matter what people say or how far this discussion is linked to, it can't be seen as more than a bunch of happy PW users agreeing on the benefits that PW brings over another tool and wishing that other people will see things as they do. There's nothing more natural than this, and unlike in many other forums, people that entered the discussion with a different opinion than the majority where warmly welcomed and their opinions where respected. I don't see any sign of alert here... More importantly. If there's a voice that should be taken has the official voice of the ProcessWire project, that's Ryan's voice. And this thread gave him the opportunity of showing once more how he respects other projects and those who are behind them. Also, I wouldn't worry too much about PW "not being there yet", in my opinion it's going in a very fast (and solid) pace. @panictree, maybe this thread went further than you expected, or even wanted, but from my part thanks for having started it edit: Pete sorry for another one... my paragraphs all glued toguether edit2: managed to fix them in firefox. I was on chrome when posted before edit3: chrome is fixed after refreshing some times
  21. I'm not a moderator and had to do the same as Antti. And yeah, it's great!!
  22. It shouldn't be too difficult to come up with a script to import the text in the flat files to pw pages.
  23. In Portugal we have an expression "giving us music" that means "playing with us" or "trying to full us". In this case it applies beautifully
  24. Great website! Love the full size slideshow with the grid filter on the homepage Edit: After going deeper, I have one suggestion. While I like the background pictures changing on the homepage, while looking at the pictures from the portfolio it can be distracting. What if you would have them changing only on the home, and pick a random picture on the subpages?
  25. The reason I like these kind of snippets so much is the freedom they offer. If you want to show the dev page to anyone that is logged in, change the conditional to: if($user->name='guest') If you want to give a special url like domain.com/?version=dev change it to: if($input->get->version!='dev') with the url version you can also make all the links work wth sessions like this: if($input->get->version!='dev' OR $session->version != 'dev') and inside the else: $session->version = 'dev';
×
×
  • Create New...