Jump to content

diogo

Moderators
  • Posts

    4,314
  • Joined

  • Last visited

  • Days Won

    80

Everything posted by diogo

  1. Good one soma! I think it would be enough to have it enabled only for logged in superusers.
  2. Not even one year ago there weren't any repeaters in PW. And still, we were all happy
  3. Welcome to the forums ziusurda! You don't really need to look on the database to work with PW, everything you need is in the administration area. There's where you create your templates fields and pages. To output the content on your website you also need the templates files. But since you are curious about the database: All the pages are on the table "pages" and only keep info like "id" "name" "template" (foreign key with id of template), etc. The page table doesn't hold any fields, because each field has a table of his own, and each row holds the value and points to a page. edit: wow, you were quick onjegolders!
  4. You're right again, another bracket was missing here after author=$a"). Already corrected it. Yep, much more elegant than nico's
  5. When you want. No hurries...
  6. there's one right now http://processwire.com/talk/topic/2362-repeater-fields-and-table-columns/
  7. soma's answer is obviously better than mine. still: on the first part ") was missing after $pages->find("template=author i will edit it. on the second I think you must have tried my code before I corrected it. It's working with me as it is.
  8. Thanks for the great explanation nik! For what I understand about fulltext searches, it's also not useful to use them in such a small amount of pages because it will ignore everything that matches more than half of them.
  9. Tricky one... let me think... second problem is easy: foreach($pages->find("template=author") as $a){ echo count($pages->find("template=post, author=$a)); } and the first problem... hm, how about this? $authors = $pages->find("template = author"); $authorsPosts = array(); foreach($authors as $a){ $authorsPosts[] = array("count" => count($pages->find("template=post, author=$a")), "author" => $a); } sort($authorsPosts); $authorsPosts = array_slice($authorsPosts, 0, 5); //added this line to limit to 5 foreach($authorsPosts as $p){ echo $p["author"]->title . " wrote " . $p["count"] . " posts<br>"; } edit: i forgot about the limit of 5... already edited the code:
  10. Another one from gadgetopia, and this time is about all of us http://gadgetopia.com/post/8286
  11. you can test it in any php file, dosen't have to be inside PW
  12. Ya, that's an easy one, but I agree that it would make sense to have this option on the repeaters settings.
  13. You have to go to those fields settings, and in the tab INPUT, set their visibility to "Always collapsed, requiring a click to open". You can also do it only in the context of the repeater by clicking on the field name on the reapeater DETAILS area. edit: hm... that was for the fields, not the repeater itself. Ignore it.
  14. Wouldn't it be better to make it with normal pages instead? I don't think repeaters are the ideal for lots of info.
  15. You can use a robots.txt file to keep the search engines away from these pages. Just disallow the parent like this: User-agent: * Disallow: /parent/ I don't know enough about automated tasks in PHP to answer exactly to want you want in the second question, but I know how to go around To delete the file after let's say a week, you can put this on those pages template: $created = $page->created; // this returns a unix timestamp of when the page was created $week = 7 * 24 * 60 * 60; // a week in unix time (7days * 24hours * 60min * 60sec) $now = time(); if($now - $created > $week){ //page is older than one week, delete it and redirect } This will delete the page when accessed. But if the page is listed from other templates, you would have also to do all this inside a foreach on that other template. I'm sure there is a better way, but I wanted to share anyway
  16. Looks good, Luis. I would also like to test it, am I on time?
  17. Stripe looks really nice, but for it's only available in North America edit: well, this tells a lot http://www.larryullman.com/2012/10/10/introduction-to-stripe/
  18. Soma, PW is flexible to that point. You can tell people one simple way to achieve something, and they will discover with time that there is plenty more beyond that. This is what happens already with the default install.
  19. There is a "more reply options" button next to "post" For the eShop, you should also consider integrating something like Shopify or Jumpseller with PW. Edit: Ammo is in open beta now, and looks also interesting
  20. Everyone wastes everyone's time here If what you ask is useful, it will end up helping someone else. This was widely debated here already. There is a long talk here http://processwire.com/talk/topic/550-e-commerce-with-processwire/ There is also already a eCommerce plugin, but doesn't have many payment systems incorporated http://modules.processwire.com/modules/shopping-cart/ If you are completely sure that you are allowed to use the code from the plugin that you bought, I'm sure it might help more people than just yourself.
  21. Choose the most important for you and ask one at a time, like this is not possible to help...
  22. Each case is a case. Some of those you don't even need in PW, others are really easy to implement, others are a lot pf code for sure, and even if you could try to adapt them you would most probably be breaking their license. A word of advise: if you decide to leave WordPress, just forget that you bought those...
×
×
  • Create New...