kixe

Members
  • Content count

    560
  • Joined

  • Last visited

  • Days Won

    3

kixe last won the day on December 6 2015

kixe had the most liked content!

Community Reputation

734 Excellent

About kixe

  • Rank
    Hero Member

Contact Methods

  • Website URL
    http://qualyweb.com

Profile Information

  • Gender
    Male
  • Location
    Cologne, Germany
  1. @derdogan In PW >= 3.0.39 you have the option to modify sql_mode via $config->dbSqlModes too. Have a look here: https://github.com/processwire/processwire/blob/master/wire/config.php#L879 Thanks @ryan to point this out.
  2. Both is possible since InputfieldWrapper::get() calls InputfieldWrapper::getChildByName() /** * assuming $form is a member of InputfieldWrapper class * the return of the following api calls are similar * if the field exists the return value is an instance of Inputfield otherwise NULL */ $form->tags; $form->get('tags'); $form->getChildByName('tags');
  3. @adrianmak I didn't say you should put something inside another function. Did I? You can remove all the other stuff from the file, because it is not needed. What did you try to put inside your field? Please post here! The setting allows you to use exactly what I described. Nothing else! For example <i class="fa fa-awesome"></i> // allowed <i class="fa fa-awesome">nobreakspace-or-whatever</i> // NOT allowed
  4. $fields->get('image')->getInputfield($page)->maxWidth;
  5. I agree, thats a bit tricky. There is a default setting in CKEditor which overrides the <i> tag with <em>. Luckily CKEditor is highly configurable, even in ProcessWire. If you don't want to disable ACF (Allowed Content Filtering) generally there is this specified solution: Create a config file: /site/modules/InputfieldCKEditor/config.js (if its not already there) with the following content to allow empty <i> tags as used for font-awesome icons CKEDITOR.config.protectedSource.push(/<i[a-z0-9\=\'\"_\- ]*><\/i>/g);
  6. cool video 1000 words vs. 7 minutes video watching One picture says more than 1000 words Have a nice weekend
  7. Module

    @elabx Thanks for interest. Have a look here: https://processwire.com/talk/topic/1025-multisite/?do=findComment&comment=144509 https://github.com/kixe/Multisite/tree/kixe Need some thumbs up here https://github.com/processwire/processwire-requests/issues/94
  8. I had similar problems after updating MYSQL via homebrew and importing a Backup made by ProcessDatabaseBackups. I could fix it by adding a few lines to my .sql file. Could you give some information about MYSQL version and your global settings (my.cnf) especially sql_mode? Try the following to solve # --- check sql mode SELECT @@sql_mode; +-------------------------------------------------------------------------------------------------------------------------------------------+ | @@sql_mode | +-------------------------------------------------------------------------------------------------------------------------------------------+ | ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION | +-------------------------------------------------------------------------------------------------------------------------------------------+ # --- you could add this on top in the .sql file # --- remove values STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE from the returned values and overwrite sql mode. Looks like SET @@session.sql_mode ="ONLY_FULL_GROUP_BYERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"; # --- should also work SET @@session.sql_mode ="ALLOW_INVALID_DATES"; # --- or SET @@session.sql_mode ="";
  9. The hook doesn't create a page. The hook is called if a page is created. If you add a page with a repeater field in its template the hook is called twice, because 2 pages have been created. If you have 2 repeater fields Pages::added will be triggered 3 times and so on. This is not a bug.
  10. Module

    Unfortunately full language support doesn't works properly since the core function LanguageSupportPageNames::getPagePath() isn't hookable, whereas Page::path() is. I posted a request to change this. Support welcome. Thanks in advance. https://github.com/processwire/processwire-requests/issues/94
  11. Module

    Forked this module a few days ago and ended up in a complete rewrite. Still under development and testing but working properly here. What is different? Do not worry about page naming. The root page is defined via ID. Full multilanguage support * take in account $template->slashUrl settings take in account LanguageSupportPagenames::useHomeSegment settings Fallback to default 404 page if custom 404 is not set Throws exception in case of misconfiguration Access of pages residing in a MultisitePageTree for other domains other than the corresponding root page is disallowed except for superuser Pages inside a MultisitePageTree accessible only via the modified url if called from the corresponding domain (throws 404 instead of unexpected redirects) Page paths are set via hook in Page::path() instead of modifying the return of Page::render() Crosslink support via the RTE (CK Editor) Link plugin Page view links in admin with correctly modified urls * under conditions: see next post! Feedback welcome. Have a try: https://github.com/kixe/Multisite/tree/kixe
  12. @Kiwi Chris Welcome! Could this module be a solution for you? AdminRestrictBranch last update 12.04.2017, stable
  13. put this in your ready.php wire()->addHookBefore('Page::addable', null, function ($e) { if ($e->object->parents->count > 1) $e->object->template->noChildren = 1; });
  14. Module

    @adrian I am working on a multisite project using single database. I forked multisite.module by Antti and another fork by Soma and started to adapt it for my needs. Luckily I found your module. I tried it out and it fits 90% to my needs and already saved a lot of work. Thanks for this great module. To get it working properly I need to make some changes. I think these changes could also be an enhancement of your module and you maybe want to take it. First of all I need an option to set branchRootParentId via hook which is currently not possible since the related function isn't hookable and private too. It would be nice if you could change the visibility of the function getBranchRootParentId() to protected and make it hookable. As far I can see there is no reason (security) to refrain from this. Furthermore there are 2 unexpected behaviours or potential issues: In Processwire the breadcrumb 'Pages' is prepended to breadcrumbs in the PageEdit area of the root page only. @see ProcessPageEdit::setupBreadcrumbs() This behaviour is different in your module. The breadcrumb is prepended in any Editor not only for the branchRootParent since $this->wire('breadcrumbs')->count() returns always 0. Is this wanted like that? I would prefer the default behavior here. I found a working solution. If you like I could post an issue on github. The BranchRootParent is not prepended to the Pagetree under PagesTab. ProcessPageList::executeNavJSON() doesn't prepend branchRootParent here. This couldn't be solved inside your module. I can see a PW issue here. ProcessPageList::executeNavJSON() should use $config->rootPageID instead of hardcoded 1 Possible Solution // in ProcessPageList::executeNavJSON // Line 489 from if(!$parentID) $parentID = 1; // to if(!$parentID) $parentID = $config->rootPageID; // Line 494 from if($parentID === 1 && $parentViewable) $items->prepend($parent); // to if($parentID === $config->rootPageID && $parentViewable) $items->prepend($parent); // Line 523 from $numChildren = $id > 1 ? $page->numChildren : 0; // to $numChildren = $id != $config->rootPageID ? $page->numChildren : 0; // Line 551 from if($page->id > 1 && $page->numChildren) { // to if($page->id != $config->rootPageID && $page->numChildren) { //in your module public function ready() { $this->wire('config')->rootPageID = $this->branchRootParentId; // ... }
  15. @PWaddict Thanks. I could reproduce. I will try to fix this.