-
Posts
262 -
Joined
-
Last visited
-
Days Won
6
Posts posted by ukyo
-
-
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.
-
Its a private module, not public.
You can take FieldtypeEvents as reference for you.
- 1
-
2 minutes ago, fruid said:
I actually have a very specific issue that I'm stuck with…
How do I make the module create the template files, not just the templates in the database via API but also the corresponding php files in the webcontent when being installed?
You can create your templates inside your modules folder, like "MyModule/templates/" on module installation you can copy these templates to "site/templates/" folder.
- 1
-
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
- 3
-
Nice module, i added this feature to Mystique module next version. You can set a fallback function as a config. Here an example config. Also next version will support most of ProcessWire selectors. You can check or test it from next branch.
- 2
-
Do you think to add support for sqllite database? Sometimes i need it for small projects.
-
-
-
@modifiedcontent Can you put these files under a folder something like : templates/extends or site/src. After do that can you add this path to wire classLoader.
You can do this on ready.php file or you can try it before apply your customizations (didn't try that).
<?php // ready.php example $template = $page->template->name; if (in_array($template, ['template-with-comment-field'])) { wire('classLoader')->addNamespace('ProcessWire', wire('config')->paths->templates . '/extends'); // or wire('classLoader')->addNamespace('ProcessWire', wire('config')->paths->site . '/src'); }
or (didn't tested)
<?php wire('classLoader')->addNamespace('ProcessWire', wire('config')->paths->templates . '/extends'); // or wire('classLoader')->addNamespace('ProcessWire', wire('config')->paths->site . '/src'); $page->comments->render(['className' => 'CommentListCustom']); $page->comments->renderForm(['className' => 'CommentFormCustom']);
-
I am currently working on custom comment form output and custom comment list output. I copied `CommentForm.php` as `CommentFormUikit.php` and copied `CommentList.php` as `CommentListUikit.php`.
Renamed class names on these and extend base classes files and removed not used codes and modified needed sections.
When i want to use my custom outputs :
<?php // include customization classes include __DIR__ . '/CommentListUikit.php'; include __DIR__ . '/CommentFormUikit.php'; // custom list output echo $page->comments->render(['className' => 'CommentListUikit']); // custom form output echo $page->comments->renderForm(['className' => 'CommentFormUikit']); ?>
CommentListUikit.php
<?php namespace ProcessWire; class CommentListUikit extends CommentList { // do your customizations }
CommentFormUikit.php
<?php namespace ProcessWire; class CommentFormUikit extends CommentForm { // do your customizations }
Example output for uikit 3 frontend framework, still working on it, specially writing a javascript for comment form
- 1
-
On 6/20/2020 at 11:44 PM, Ivan Gretsky said:
Hello, @ukyo!
I absolutely love your module. And trying to incorporate it in my site-building workflow. I did install it without a problem and am using it for storing some output settings with great success)
But today I found two (probably, related) bugs:
- I cannot create a new Page Reference field. I am getting this error: "Call to a member function getField() on null" (...\Mystique\FieldtypeMystique.module.php:71).
- I cannot view a list of pages with certain template (see the screenshot). The error message is the same.
Do you understand what it is?
I fixed this error, but i can't update module on module directory. There is an error on module directory at the moment.
You can update module by directly downloading it from Github.
- 2
-
On 4/10/2020 at 2:18 AM, gingebaker said:
Hi.
I had the same problem like @fliwire with changed resource property in template context not getting saved and outputted correctly.
I changed the FieldtypeMystique::getBlankValue() method a bit:
public function getBlankValue(Page $page, Field $field) { return new MystiqueValue($page, $page->template->fieldgroup->getField($field,true)); }
API Ref: https://processwire.com/api/ref/fieldgroup/get-field/
With this change you are getting the field in context of the current page template. Then you have the correct resource filename in $field->resource.
This works here in my setup, but I haven't been able to test much for now. Hope this does not break something else.Anyway, thanks for this module. Looks very promising!
Suggested fix applied, module updated.
- 3
-
4 hours ago, fliwire said:
tested: resource showing propery but with empy values. In database field saved with default resource and template resource.
{"title":"","title1033":"","title1185":"","__json":null,"__name":"settings","__path":"D:\/Laragon\/www\/protest\/site\/templates\/configs\/Mystique.settings.php","video":"11111111","video1033":"22222222","video1185":"333333333","__resource":"settings"}
Will check it
-
10 hours ago, fliwire said:
maybe you can look SeoMaestro source code, not have this problem.
Module updated, can you check ?
Its look like adding same method to Fieldtype class solve the problem.
-
2 hours ago, fliwire said:
template overwrite field input settings has bug. Selected resource is saving properly but when shown all inputs empty.
Checked db value, db has also default input resource and home page resource. Expect only home page values. (counts in below code).
{"title":"","checkbox":"","headline":"","summary":"","fieldset":"","fieldset_title":"","fieldset_description":"","another_fieldset":"","another_fieldset_title":"","another_fieldset_description":"","content":"","__json":null,"__name":"example-dive","counts":"888888888","__resource":"settings"}
19 days ago, I created an issue. Waiting for fix or a solution.
-
22 hours ago, fliwire said:
Hi, tried last version. Two Bugs:
1- When update module old module files renamed to ".Mystique" folder and this folder still listing "Resource" list and not shown in editor.
2- useLanguages also has bug. If admin language not default language, default language value not saved properly. Default language value gets it's value from selected language.Module updated, CHANGELOG
- 2
- 2
-
1 hour ago, bernhard said:
Hi @ukyo I just created a PR to support easy value setting via setAndSave().
Before:
After:
$page->setAndSave('contact', ['str' => 'foo']);
Done
- 2
- 1
-
14 hours ago, huseyin said:
In Turkey we have offically 1 covid-19 case.
Today the Govermant has decided to close all schools and universities for 2 weeks.
All sports events will be held without spectators.
All public servants are prohibited to leave Turkey.
Some kind of food is rare at the warehouses.
We have not noticed any donws of our work or clients, but expecting bad for the near future.
Today we have 2 covid-19 case.
I live in Turkey (Marmaris). Everything normal at the moment. I work from office.
-
2 minutes ago, MilenKo said:
Hello again @LAPS & @ukyo . I just tested the module with the -new version you've shared and am still seeing the same error:
Compile Error: Cannot declare class MarkupFontIconPicker, because the name is already in use (line 10 of C:\domains\mywebsite.com\site\assets\cache\FileCompiler\site\modules\FieldtypeFontIconPicker-next\MarkupFontIconPicker.module)
Could you please advise which version should I be using in order to have the name error resolved?
Follow these steps for solve duplicate problem :
-
1 hour ago, bernhard said:
Ok, thx! So why is that field in the example file? For me as an enduser the experience was: "Oh, wow, that even supports image fields! Let's try it! [uploading] Hm... Doesn't work - maybe another thing that isn't working on Windows due to path issues?" ?
PS: When are you planning to merge NEXT into MASTER?
Next version merged with master branch. Image field removed from example ? sorry about that. Module updated.
- 1
-
16 hours ago, bernhard said:
Finally ? Thank you!
Should the images field from the example Dive be working? When I upload an image the field seems to work but when the upload is done, the field resets itself. All other field data is saved correctly. Any ideas?
Image & File fields are not supported yet, i will check these fields later. Feel free to play with module for add support ?
-
Thanks @bernhard, I updated module with same finder function used on FontIconPicker module. I am using dirname function for getting module or templates folder names from file path.
"Example : Dive" is title of config, "(mystique)" is name of module folder
- 3
-
@LAPS @J_Szwarga i updated config file finder and pushed new version of module. You can update your module ! Please let me know if you have same issue.
@bernhard i updated finder https://github.com/trk/FieldtypeFontIconPicker/blob/master/FieldtypeFontIconPicker.module#L46 as your recommend, if it success on this module. i will apply same function for my Mystique module.
- 1
-
9 minutes ago, LAPS said:
Steps I performed:
1. FieldtypeFontIconPicker files uploaded.
2. Admin > Modules > Clear compiled files run.
3. Admin > Modules > Refresh run.
4. Browser cache cleared (one never knows).
5. Steps 2 to 3 repeated once again, and again.Result:
It doesn't work: in the Edit Field > Input > Icon library the libraries (IconPicker.*.php) are not loaded as described in the original issue. ?I added prev brach on github repo, this repo is previous version of module, you can use it. I will try to fix your problem, but let me know your server or computer software versions.
Availability Manager
in Module/Plugin Development
Posted
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.