-
Posts
1,079 -
Joined
-
Last visited
-
Days Won
17
Everything posted by dotnetic
-
@kongondo Yes. Disable modules in the Tracy console, especially Tracy and ProcessWire logs. I experienced the same on one site of mine. You can see the load times in the Tracy panel
-
Boy, I love our community. So helpful and friendly. Never experienced anything like this. Spread the love.
-
@Steve_Stifler It would help much if you post the complete code of your home.php or even provide an URL where the error can be seen. Then people can help you better. Your errors seems to come from a not encoded entity. The failing character is the apostrophe ' Some chars in PHP have to be encoded to work. But without seeing your actual code, we can not provide much help.
-
@Steve_Stifler That depends on your output strategy. The CSS code belongs to, well your css file (or in the head of your template file). Then you would insert a HTML element with the class "bg" (according to the example @Zeka mentioned) in one of your template files, where you would like to use the fullscreen image. Template files are residing in the site/templates folder. Maybe you use a home.php template file? Then insert the element there.
-
FieldtypeOptions - set selectable options through api
dotnetic replied to fbg13's topic in API & Templates
The trick is to set the options AFTER saving the field, otherwise they seem to be overwritten with an empty value. $old_field = $fields->get('abzuege_neu'); d($old_field, 'Field exists'); if ($old_field){ $fields->delete($old_field); } $ja = new SelectableOption(); $ja->title = 'Ja'; // $ja->value = 'Ja'; // only if this should be different from title $nein = new SelectableOption(); $nein->title = 'Nein'; // $nein->value = 'Nein'; // only if this should be different from title $fieldtype = $this->modules->get("FieldtypeOptions"); $field = new Field(); $field->type = $fieldtype; $field->inputfieldClass = 'InputfieldRadios'; $field->optionColumns = true; $field->name = "abzuege_neu"; $field->label = "Abzüge"; $field->save(); // Now add the options to the field $options = $fieldtype->getOptions($field); d($options, "existing options"); $options->removeAll(); $options->add($ja); $options->add($nein); d($options, 'SelectableOptionArray'); // $manager = new SelectableOptionManager(); // $managerOptions = 'option1|Option 1 // option2|Option 2 // option3|Option 3 // '; // you can also set IDs and values if needed // $manager->setOptionsString($field, $managerOptions, false); $fieldtype->addOptions($field, $options); d($field); -
FieldtypeOptions - set selectable options through api
dotnetic replied to fbg13's topic in API & Templates
I try to create a new FieldtypeOptions field and set some options for it, but the options don't appear. What am I doing wrong? $old_field = $fields->get('abzuege_neu'); if ($old_field){ $fields->delete($old_field); } $ja = new SelectableOption(); $ja->title = 'Ja'; $ja->value = 'Ja'; $nein = new SelectableOption(); $nein->title = 'Nein'; $nein->value = 'Nein'; $fieldtype = $this->modules->get("FieldtypeOptions"); $field = new Field(); $field->type = $fieldtype; $field->inputfieldClass = 'InputfieldRadios'; $field->optionColumns = true; $options = $fieldtype->getOptions($field); d($options, "existing options"); $options->add($ja); $options->add($nein); $options->pop(1); // remove the first default option d($options, 'SelectableOptionArray'); $field->name = "abzuege_neu"; $field->label = "Abzüge"; // $field->_options = "1=option1|Option 1\n2=option2|Option 2\n3=option3|Option 3"; $fieldtype->setOptions($field, $options); $field->save(); d($field); My code can be easily be executed via Tracy console. @Robin S Maybe you can provide some help? -
@tiefenbacher_bluetomato To transfer the repo to your account, you have to first remove your cloned repo from your account.
-
This is absolutely possible, as I modify fields of the cloned page directly after cloning via the hook that @netcarver mentioned.
-
Best/preferable license type for ProcessWire modules?
dotnetic replied to Gadgetto's topic in Module/Plugin Development
You can read short excerpts of the different licenses here https://tldrlegal.com/license/mozilla-public-license-2.0-(mpl-2) and choose the one, that fits your needs best. I prefer a license where the derivate has to be distributed/published under the same license for example the LGPL-3.0 https://tldrlegal.com/license/gnu-lesser-general-public-license-v3-(lgpl-3) -
I do it this way: $t = $this->database->query("DELETE FROM MarkupActivityLog WHERE `page_id` = $page->id");
-
RockSkinUikit - Easily and quickly skin your AdminThemeUikit backend
dotnetic replied to bernhard's topic in Modules/Plugins
Another thing. In another almost vanilla PW installation your module runs fine. But if I change which AdminThemeUikit module should be used in the settings, and set it back to "/wire/modules/AdminTheme/AdminThemeUikit/AdminThemeUikit.module", your module still loads and destroys all styles because the css can not be loaded. The default AdminThemeUikit works again if I uninstall RockSkinUikit -
RockSkinUikit - Easily and quickly skin your AdminThemeUikit backend
dotnetic replied to bernhard's topic in Modules/Plugins
Hey @bernhard. The module does not work if the admin url is not the standard "processwire" url. Somehow in one of my installations, it just returns wrong paths. Which comes from the line $file = $this->config->paths->root . trim($event->return, '/'); because $event->return has the custom admin url included. There seems to be some confusion with paths and urls?! In my case the $file in line 35 of RockSkinUikit.module it looks like this: There is one "bewerbertool-talents" directory too much. It does not exist. I can change it if I use $file = $this->config->paths->root . "site/assets/RockSkinUikit/theme.less"; But even after that, I doesn't work, because RockLess.module's getUrl function also returns a false url. I also think, that the module should remove the folder site/assets/RockSkinUikit on uninstall and restore the use of the default AdminThemeUikit. No more time to debug right now, but I hope I could help you to make the module more versatile. -
Wow. Thank you for this great module. Hope I can test and use it soon.
-
what do you call this kind of navigation bar?
dotnetic replied to anderson's topic in Getting Started
Thats what I meant when stating because these frameworks contain styling and javascript for dropdown menus. -
what do you call this kind of navigation bar?
dotnetic replied to anderson's topic in Getting Started
It`s a simple navbar with dropdowns. There are a zillion ways to get this done. One would be the use of http://modules.processwire.com/modules/markup-simple-navigation/ or http://modules.processwire.com/modules/process-menu-builder/ They generate a list of pages and their children and you can modify the output of the markup. Then you could use a framework like Bootstrap or Foundation, or whatever you like and use their navbar components, to get the dropdowns and styling. -
This means, that this field is mandatory on a page that uses this field. So you can not save the page until the required field is filled, else you would get an error message.
-
I also agree with @LostKobrakai
-
@Pete Nudge ? Any updates on this topic?
-
Can ProcessWire do this? (User Management, Profiles, Search)
dotnetic replied to Kai's topic in Getting Started
@JeevanisM Please take a look at https://processwire.com/docs/security/sessions/. With Database-driven sessions you can monitor live traffic on your site.- 23 replies
-
- 1
-
-
- search
- user-management
-
(and 1 more)
Tagged with:
-
ImageMagick isn't required for progressive JPGs. GDlib also just works fine. You just need the interlace setting. See my originial request here https://github.com/processwire/processwire-requests/issues/134
- 12 replies
-
- 1
-
-
- progressive
- interlaced
-
(and 4 more)
Tagged with:
-
What excactly are you trying to do? And where? Is this for the admin or the frontend? Do you want to output fields from a admin template on the frontend and make it a multi step form?
-
Hey @diogo I love the clean design and the opposite scrolling of text and images @ desktop resolution. However there are some flaws in the site. The mobile and tablet resolution does not show the images, and makes the whole site look boring, as it is only text. Links and text can not be distinguished, so you have to hover over the links. But this can't be done on mobile. If you click on a project at mobile resolution there is way too much white space above the text.
-
add possibility to prepend or append scripts and stylesheets in admin
dotnetic replied to dotnetic's topic in General Support
Thanks for all your suggestions. Here is what I use right now in my ready.php $wire->addHookAfter('AdminTheme::getExtraMarkup', function (HookEvent $event) { $parts = $event->return; $parts['head'] .= '<link rel="stylesheet" href="' . $this->config->urls->templates . 'admin/admin.css">'; $parts['head'] .= '<script src="' . $this->config->urls->templates . 'admin/admin.js"></script>'; $event->return = $parts; }); I don't want to rely on another module like AoS or AdminCustomFiles, because I think adding another module just to add styles and JavaScript is overkill and bloat. Instead I want to add the assets in my own modules, or in ready.php. I still think that it would be good in the core, and the core could still be lean. There are already methods there to prepend or append assets, but they don't work correctly because of the init order. Mainly the problem is that core modules should be loaded first with their assets like jQuery and CSS, etc, and then I should be able to add my assets after them to override them. I know it might be a specific case, where you want to alter default behavior and styles of the admin, but it is something I often need. In most cases the actual behaviour $config->styles->add($config->urls->templates . "admin/admin.css"); is just fine, if you are not trying to override some styles -
add possibility to prepend or append scripts and stylesheets in admin
dotnetic replied to dotnetic's topic in General Support
@arjen I think I am to stupid to get it to work. Here is a screen of my settings. then I added these files to the AdminCustomFiles directory but none of them gets loaded when I am on a PageList page or a ListerPro page. Do I need to select dependencies first? However, I still think that it should be a core function that lets us choose, where our styles and scripts get inserted. AdminCustomFiles is the more advanced solution, if you want to select which files get injected for what process. But for me thats overkill, and I want one file for all pages in the admin. -
Seems to have to do with the status field, which is for pageStatus. The line 195 in PageFinder.php returns this: I solved it with using a different query. I only used status=1|2049 before, because "include=all" did not work, and I even had unpublished pages in my result. And that was what I wanted. Show only published pages, or show them all. Don't know why it did not work before, but now it does again.