• Content Count

  • Joined

  • Last visited

  • Days Won


kixe last won the day on September 10 2018

kixe had the most liked content!

Community Reputation

996 Excellent

About kixe

  • Rank
    Hero Member

Contact Methods

  • Website URL

Profile Information

  • Gender
  • Location
    Cologne, Germany

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. kixe

    Nothing I fixed this. Update to 1.0.9
  2. $new = new Event(5555); $s->add($new); // just prepend $s->sort("myDateTimeFieldOrWhateverSortOption"); foreach ($s as $sortedWireDataObject) { // ... }
  3. kixe

    You have several options in the backend: 1.) Page based under Page > Settings Enable or disable every non default language. Trying to access an inactive page will result in an 404 2.) Template based under Template > Advanced (bottom) 3.) Field based under Edit Field > Details
  4. it depends! // ADD PAGE // adding a page via API can be triggered by the guest user even if he has not the permission to add children under a specific parent (12464) if ($user->isGuest()) $pages->add('contribution', 12464); // works // VIEW PAGE or FIELD VALUE // if guest user has not the view permission it depends on outputformatting if ($user->isGuest()) var_dump($pages->get(12985)->title); // "I am the Page Title" if ($user->isGuest()) var_dump($pages->get(12985)->of(true)->title); // NULL // MODULES // Call of a Module via API. User has not the permission to use the module if ($user->isGuest()) $modules->get('MyModule')->execute(); // Fatal error: Exception: You do not have permission to execute this module (if debug mode is on/ 500 otherwise) if ($user->isGuest()) $modules->getModule('MyModule', array('noPermissionCheck' => true))->execute(); // works!
  5. Delete cache folder. Error will be gone.
  6. Assuming category is a page field I really don't understand your setup. Do you have multiple categories (pages) with the title: "Cyclonic Vacuums" under different parents? Why? So "Cyclonic Vacuums" is provided selectable in the list multiple times? 3 ways to solve this use unique titles for your categories, even if they are stored under different parents. use a custom label format in the field settings of category. e.g. {parent.title} - {title} use custom selector (screenshot)
  7. kixe
  8. kixe

    Do you really need it human readable? In this case GET and urlencode() is maybe a safer option. $query = "?keywords=" . urlencode('løts of special chåracters änd'); // "?keywords=l%C3%B8ts+of+special+ch%C3%A5racters+%C3%A4nd" $keywords = urldecode($input->get->keywords); // "løts of special chåracters änd"
  9. Of course a good solution using the database instead of textdomain To translate globally defined strings as described in my post: go to SETUP > LANGUAGES > ITALIAN klick button "Find files to translate" select /site/translations.php start to translate
  10. I do it usually as follows: 1.) Create a file /site/translations.php <?php namespace ProcessWire; /** * TRANSLATABLE STRINGS * Define globally available translatable strings * * USAGE * place this file under /site/translations.php * __("My translatable string", $ferry); * The wire property $ferry refers to the textdomain of this file * */ __("My translatable string"); 2.) Define a wire derived object and place it in /site/ready.php /** * TRANSLATABLE STRINGS * Include translatable strings * @see /site/translations.php * @var $ferry */ $this->wire('ferry', '/site/translations.php', true); output in any template /** * output in template */ echo __("My translatable string", $ferry); Now you need to translate it only once, by using the string in any template. Usecase: strings like "read more" etc. For strings specific to a template you can use simply: /** * output in template */ echo __("My translatable string");
  11. add this hook to your ready.php $this->wire()->addHookBefore('InputfieldCheckbox::render', function($e) { if ($e->object->id != "delete_page") return; if ($this->wire('user')->isSuperuser() == false) $e->object->label = "Hello World"; });
  12. To get the options title in current user language use $type_material->getTitle(); or enable outputformatting $type_material->of(true); $type_material->get('title');
  13. kixe

    The idea is to generate the page name from field values and not from labels. I will not change this. But I added support for dot syntax for the options fieldtype which should feed your needs. // no fallback to default language if not set. Options should be populated in each language my_options_field.title my_options_field.value // always fallback to default language. If values are set pagename is pulled from the value, otherwise from title my_options_field
  14. kixe

    @PWaddict Sorry. I fixed the bug. Please update to 2.1.2
  15. kixe

    Small wish for this module which I use intensively: Option to define a selector string for newPageParent instead of selecting a fixed page. (alternatively provide option to hook in here I also recommend linking to instead of in module settings.