Jump to content

diogo

Moderators
  • Posts

    4,296
  • Joined

  • Last visited

  • Days Won

    79

Everything posted by diogo

  1. Overflow hidden doesn't seem to be necessary at all here. Is it?
  2. Kongondo, I think this could change your mind http://processwire.com/talk/topic/3122-chrome-dev-tools-tuts/
  3. Sorry, wrote it on the browser and seems that I forgot a "t" edit: ... and inverted the order on the condition
  4. This should work: foreach ($tps as $tp) { $out .= "<p class='title'><a href='{$tp->url}'>{$tp->title}</a></p>"; $out .= "<p class='summary'>{$tp->summary}</p> "; $out .= $p === $tps->last() ? "<hr />" : ""; // oops, see corrections on next post }
  5. I will throw an interesting option to the pile, and surprisingly you have have it in your computer for sure Chrome dev tools, are very close to become a great IDE while developing localy by using the "workspace" tab on the settings, and I actually managed to make to edit files on my VPS using a sshfs mount. http://www.html5rocks.com/en/tutorials/developertools/revolutions2013/ http://gregrickaby.com/turn-chrome-developer-tools-into-an-ide/ (using the dev version of chrome you don't have to activate the experiment anymore)
  6. I had the need of iterating through a lot (and I mean A LOT) of pages by template, and was also having memory problems. With this amount of pages it was becoming really annoying to do it few at a time, so I came up with a solution that doesn't need a wireArray. With this I could iterate over more than 50.000 pages with the same template on a website with more than 100.000 pages by bootstrapping PW from the command line. I just had to set a time bigger limit to PHP with set_time_limit(), and everything went fine and without interruptions. while (1) { $p = wire('pages')->get("template=my_template, id>$id"); // get page with id bigger than previous if(!$id = $p->id) break; // assign current page's id to $id or break the loop if it doesn't exist // do stuff using $p as the current page wire('pages')->uncacheAll(); // clean the memory (with $p->uncache() doesn't work. why?) }; edit: actually, using the command line I don't think set_time_limit() is even needed.
  7. Looks like the same problem as here http://processwire.com/talk/topic/4434-pw-not-installing-correctly-admin-not-found/?hl=htaccess#entry43479. Try onjegolders' suggestion on the first answer. Replace /pw/ by your subfolder name.
  8. Oh, I saw this only now... So, the module is working as it should Pete?
  9. hm, 400 field in one template sound really like a lot. Maybe you could optimize those templates by joining all those fields in one. If you're are not planning to use most of them for making searches and you only need to spit them when they are called by a page, crate a textarea and make a list with the info from all those fields: field1: "content" field2: "content" field3: "content" ... To present the content of this field, just explode it (but not literally, please)
  10. Generally you don't have to use the curly braces. But if I were you I would focus in understanding the strings first.
  11. put that code in a php file, open it in the browser and see what happens
  12. You only need curly braces when using variables inside strings, like here "<li><a$class href='{$child->url}'>{$child->title}</a></li>". In your second case you only use PHP when giving the value to the variable, there's no string so you don't have to use curly braces. edit: also, using the curly braces, even if only for a simple variable "I had {$number} coffees today", makes it more readable.
  13. Martijn, there is a difference. Your module applies it to all fieldsets and Peter's doesn't.
  14. Not completely sure of what you want. I'm assuming that your pages fields accept only a single page, so this should work: echo $page->town->title // title of chosen town echo $page->town->country->title // title of chosen country inside the chosen town edit: corrected typo
  15. I completely agree with Antii that this is one of the strongest points of PW. Democracy in Open source projects can some times take to delayings and strange decisions. I think it's great that all final decisions are made by one person that knows very well in which direction the project should go.
  16. This would for sure be a Lennon/Chapman thing
  17. To be honest I use the default theme, not because I dislike the others, but mainly because it's the default. There are two main reasons for this: one is that it represents PW (in a "corporate identity" way), the second is because I trust it will break less then the others with PW updates. As much as I like to try, and to see that there are nice themes being designed for PW, unless one is much better, I will stick with the default. This is one of the reasons I would prefer to see the default theme evolving, than a proliferation of alternative themes, and that's also why I'm happy that Philipp started this (being is ideas used or not). That said, I do agree that the admin should be more appealing to newcomers and easily tweakable to have different appearances by changing colors and typography (business (Nico's colors are a great example), fun, serious, etc). I even think that the default install could offer 4 or five alternatives, besides of those that would be shared by users, I'm talking maybe a small json file that could be imported by the system to change it's appearence (a bit like Philipp's color changes, but maybe more profound). What I'm talking here are not different themes, but variations of the same (default) theme. IMO the possibility to easily make these kind of changes, would allow us to maintain the recognizable PW colors on the default appearance of the default theme. This is for me an important point: the PW corporate feeling should be kept. I also want to remind Reno's small tweaks for the edit page. I think they work great: http://processwire.com/talk/topic/2002-repeating-events-multiple-datestimes-for-datepicker/?p=18862 This post went too long. I'm sure it's a mess...
  18. Great! Both, the photos and the website.
  19. Kongondo, add continue; to your list http://php.net/manual/en/control-structures.continue.php Edit: you had two different blues. I chose the lighter if you don't mind
  20. Hiding the buttons is not enough. There have to be alternative ways of reaching the functions that were accomplished by those buttons, and once the software has those alternative ways, it doesn't make sense to keep the possibility of putting the buttons back...
  21. Maybe it is a trend (I hope is not) to minimize the interface to an extreme while keeping the maximum of functionality. This doesn't happen only with code editors, but also with websites, web apps, and even with physical things. There is also a tendency of reducing the number of functions that a thing does so there is a good focus on those that it does. I really like to see where this effort is going, and personally enjoy much more to work with such tools (I consider PW one of them). I really dislike looking for a button in the middle of many as much as I dislike looking for a piece of garlic in my fridge. Of course, if features wouldn't be important I would still be using scribes http://www.webupd8.org/2011/03/scribes-is-very-interesting.html, but I'm not... That said, this all goes down to a matter of personal preference, of course.
×
×
  • Create New...