Jump to content

ukyo

Members
  • Posts

    247
  • Joined

  • Last visited

  • Days Won

    5

ukyo last won the day on September 11 2019

ukyo had the most liked content!

About ukyo

  • Birthday 06/08/1983

Contact Methods

  • Website URL
    http://altivebir.com

Profile Information

  • Gender
    Male
  • Location
    Turkey
  • Interests
    PHP, FRAMEWORKS, CMS

Recent Profile Visitors

4,348 profile views

ukyo's Achievements

Sr. Member

Sr. Member (5/6)

339

Reputation

1

Community Answers

  1. Mytqiue works inside repeater fields. If you mean, create repeater field via Mystique, the answer is no.
  2. Basically <?php namespace ProcessWire; // create field $field = new Field(); $field->name = 'my_field'; $field->label = 'My Field'; $field->type = 'FieldtypeText'; // save field wire('fields')->save($field); // get field $field = wire('fields')->get('my_field'); // Create fieldgroup $fieldgroup = new Fieldgroup(); // if you want to edit fields in this field group via admin panel, name need to be same with template name $fieldgroup->name = 'my_template'; $fieldgroup->add('title'); $fieldgroup->add('body'); $fieldgroup->add($field); // save fieldgroup wire('fieldgroups')->save($fieldgroup); // get fieldgroup $fieldgroup = wire('fieldgroups')->get('my_template'); // Create template $template = new Template(); $template->name = 'my_template'; $template->label = 'My Template'; $template->fieldgroup = $fieldgroup; // save template wire('templates')->save($template); // get template $template = wire('templates')->get('my_template');
  3. @Clarity @Jonathan Lahijani I pushed a fix, can u update next branch and try ? Entering language based data, Exporting and importing Mystique field data Video result Ekran Kaydı 2021-10-08 22.46.51.mov
  4. I have many web projects using mystique fields, i didn't see an error like this. You can make a try with clean processwire install, after that if this error continue for your create an issue on github repo.
  5. Yes, json or php file. I see my mistake on readme.md i will fix it. {Mystique.*.php,mystique.*.php,Mystique.*.json,mystique.*.json} Long time i am not working with master branch, i have many updates on next branch, i will merge these 2 branch soon.
  6. @Ivan Gretsky You can also try next version of Mystique field type. Now, its possible to display custom fields depend on template name or page, you imagine it. Here is an example usage: <?php namespace ProcessWire; /** * Resource: magic of mystique field */ return function ($page = null, $field = null, $value = null) { $fields = [ 'hello' => [ 'label' => 'Are you ready for a Magic ?', 'type' => 'select', 'options' => [ 'no' => 'No', 'yes' => 'Yes' ], 'required' => true, 'defaultValue' => 'no' ] ]; if ($page instanceof Page && $page->template->name == 'page') { $fields['current_page'] = [ 'label' => 'Current page title : ' . $page->title, 'value' => $page->title, 'showIf' => [ 'hello' => '=yes' ], 'columnWidth' => 50 ]; } if ($field instanceof Field) { $fields['current_field'] = [ 'label' => 'Current field label : ' . $field->label, 'value' => $field->label, 'showIf' => [ 'hello' => '=yes' ], 'columnWidth' => 50 ]; } return [ 'name' => 'magician', 'title' => 'Do A Magic ?', 'fields' => $fields ]; };
  7. This should work <?php $page->of(false); $page->mystique_field_name->property1 = 'data'; $page->mystique_field_name->property2 = 'data'; $page->mystique_field_name->property3 = 'data'; $page->mystique_field_name->property4 = 'data'; $page->mystique_field_name->property5 = 'data'; $page->mystique_field_name->property6 = 'data'; $page->save();
  8. @szabesz No need new Module for Uikit source files ! Node example only for theme development, if you need admin theme customizations you can import uikit source files on your side. Node usage example is not for ProcessWire users, its only for theme development by @ryan or @bernhard. User can import uikit source files inside : /site/templates/admin.less You can add @uikit-source-path variable on wire/modules/AdminTheme/AdminThemeUikit/uikit-pw/pw.less You can change variable value normally on lately loaded file on less. // Import uikit, use less variable for uikit source @uikit-source-path: "../../node_modules/uikit/src/less/uikit.less" @import $uikit-source-path; Change @uikit-source-path variable /site/templates/admin.less @uikit-source-path: 'source/to/uikit/less/uikit.less'; div { border: 1px solid red; }
  9. @bernhard @ryan Thanks for admin theme customization option But i didn't like uikit source files under AdminThemeUikit/uikit, no need these files. Folder size is big ! I can give an idea about using uikit less or scss files: - You can install uikit via node with package.json file - You can load source uikit files from node_modules/uikit/src/less/uikit.less - You can add node_modules folder to .gitignore - If a user want to modify admin theme, user can define uikit source from less file With this way, we don't need uikit source files under AdminThemeUikit folder
  10. public function ___install() { // do something when istall module $this->files->copy(__DIR__ '/templates/', $this->config->paths->templates); } You can add this operation inside install method. And don't use URL you need to use PATH.
  11. I checked, Hotels, Booking, Airbnb admin panels all they have different solutions about managing availabilities, i created my own one like on video. You can find a solution for your self.
  12. Its a private module, not public. You can take FieldtypeEvents as reference for you.
  13. You can create your templates inside your modules folder, like "MyModule/templates/" on module installation you can copy these templates to "site/templates/" folder.
  14. I registered for check it, but confirmation mail didn't come. I wrote a Fieldtype Module like this. I am using this private module for managing hotel rooms availabilities and room prices etc. I made 2 video for you, you can check the usage. I used https://flatpickr.js.org/ Backend Ekran Kaydı 2021-03-27 01.52.04.mov Frontend Ekran Kaydı 2021-03-27 01.58.10.mov
×
×
  • Create New...