Jump to content

LostKobrakai

PW-Moderators
  • Posts

    4,956
  • Joined

  • Last visited

  • Days Won

    100

Everything posted by LostKobrakai

  1. That's not that simple as the regex does not have any knowledge about any domain level specifics. I'm not sure if there's any way to hit "myenglishdomain.co.uk", but not "subdomain.domain.com" other than having different regex formulas for both. # First Level Domain (e.g. *.com) !^(www)\.([^\.]+)\.([^\.]+)$ # Second Level Domain (e.g. *.co.uk) !^(www)\.([^\.]+)\.([^\.]+)\.([^\.]+)$
  2. To start out with PW you don't even need to use or understand oop. You just need to understand the api processwire does provide and a basic understanding of using php. You'll learn all the other stuff on the go, which will be much easier with a real use case at your sight.
  3. Take a look at this one: https://gist.github.com/somatonic/5233338
  4. As Macrura proposed: Run the query for each $part in isolation and in the end merge the results. $results = array(); foreach($parts as $part){ // Might be optimized to only retrieve IDs in the first place $result = $pages->find("something=$part"); $results[] = $result->explode("id"); } // Get all the id's present in all results $intersect = array_reduce($results, function($carry, $item){ if(is_null($carry)) return $item; return array_intersect($carry, $item); }); // Get the real search results $search_result = $pages->get("id=" . implode("|", $intersect));
  5. @Ivan It looks like atom does have a way to index function definitions via ctags. This might work for you.
  6. Not sure if you're creating the pager by yourself, but here's how to edit the classes for pw in general: https://processwire.com/api/modules/markup-pager-nav/
  7. The markup seems to be by the frontend editing feature, which explains why it's only for logged in users. The internals of matrix repeaters are quite complex and will probably need a special implementation, because it's using a single template for all the different types of data (which doesn't make sense in my mind, but so be it).
  8. MySQL 5.6 is still far far away from broad adoption especially on shared hostings and fulltext search is essential to processwire's selector engine (e.g every search related to text in any form). Under this circumstances will InnoDB not become the default anytime soon. On the other hand is InnoDB already fully supported, but without using the fancyness of it in core functionality. You need to keep in mind that not everybody is using processwire as cmf (I do so as well), but it's still a simple cms like drumlapress to many people.
  9. Are those articles deleted or just trashed? Because the user might actually have no access to the trash if it's not a superuser.
  10. Just to clarify my code snippets in comparison to BitPoet's. $page->prev($portfolio_pages) === $portfolio_pages->getPrev($page)
  11. RT @t3n: Flexibilität bis zum Abwinken: Das CMS „ProcessWire“ im t3n-Test https://t.co/KbDkeW1rjr https://t.co/TfVGNfzXOD

  12. $portfolioPage is the page object for the portfolio page, asmSelect needs to be changed with the fieldname of your asmselect field. Then replace all prev/next/last/first calls in my last example with the new calls.
  13. $portfolioPage->asmSelect->getNext($current); $portfolioPage->asmSelect->getPrev($current); $portfolioPage->asmSelect->first(); $portfolioPage->asmSelect->last();
  14. @prestoav Please consider using the code blocks the forum does provide instead of bold text. This will make easier for all of us.
  15. There's a new article about processwire on t3n, which is a quite well-known german tech. magazine: http://t3n.de/news/processwire-cms-675223/
  16. <?php $prev = $page->prev->id ? $page->prev : $page->siblings->last(); ?> <div class="left-arrow"> <a href="<?php echo $prev->url; ?>" title="Previous Project"> <?php echo file_get_contents('assets/static-images/left-arrow.svg'); ?> </a> </div> <?php $next = $page->next->id ? $page->next : $page->siblings->first(); ?> <div class="left-arrow"> <a href="<?php echo $next->url; ?>" title="Next Project"> <?php echo file_get_contents('assets/static-images/right-arrow.svg'); ?> </a> </div>
  17. It's not like I could read my task manager, which tells me which program is using which amount of ram I'm fully aware vm's need lots of ram, but phpstorm needing roughly the same amount is hefty.
  18. You can find the part, where the pagelist ajax actions are parsed here: https://github.com/ryancramerdesign/ProcessWire/blob/master/wire/modules/Process/ProcessPageList/ProcessPageListActions.php under processAction().
  19. PHPStorm does have a few damn nice features (mostly related to namespaces and inheritance), but it's a big resource hogger. It's consuming about 1,5 GB of ram on my machine, which just isn't nice if you're also running one or two vm's at the same time. Therefore I find myself using SublimeText most of the time. But I've lately also considered using vim more and set it up once like I need it. It's just super easy to put it on another machines and work from wherever you need to (as long as you've some shell access).
  20. Just to double check: You used "permission" and not "permissions", which would install/remove a permission automatically.
  21. Just take a look at how MarkupSEO is going about it. It's just adding the fields automatically to each template it's used with. That's the goto method. But I've to say I'd thought about such an integrated page field a few times already. The closest thing to that is probably using "Page Field Edit Links", which does open the page of a page field to be edited in a modal.
  22. Edit your first post with the "Full Editor" to change the title. But I'm not sure if you should change the title as the repeater analogy is far more fitting than the table one. ProFields table does not hold other fieldtypes – it's merely using inputfields to let you edit a database table "a bit more comfortably". That's why the field selection and setup differs so much from the real fields. Repeaters or PageTables are really grouping fields (in templates) and make them reusable in other templates, but with the added feature of repeatability. So to conclude, the fieldtype you're looking for is already available. It's the page field in single page mode. It's just that there's currently not a inputfield that would allow for a seamless integration of a page in a page.
  23. That sounds like wrong directory/file permissions.
  24. Not sure if wireshell does allow for that, but if not you could go that way. > php -a php> include "index.php"; php> $pages->find("template=some_template")->each(function($p){ $p->setAndSave("field", "value"; });
×
×
  • Create New...