-
Posts
1,070 -
Joined
-
Last visited
-
Days Won
16
Everything posted by dotnetic
-
@Schwab Right now I am using the PHP class Emogrifier to inline the styles. It works as easy as $emogrifier = new \Pelago\Emogrifier(); $html = '<html><h1>Hello world!</h1></html>'; $css = 'h1 {font-size: 32px;}'; $emogrifier->setHtml($html); $emogrifier->setCss($css); $mergedHtml = $emogrifier->emogrify(); Well, $html has to come from your page, and deliver correct HTML for every mail client. You have to generate that first. There are some preconfigured templates out there or you could use tools like MJML to create a template yourself.
-
Enabled https for localhost, now I can't turn it off :(
dotnetic replied to OrganizedFellow's topic in Dev Talk
If you want to really disable SSL try deselecting it in Laragons Apache settings: But I would recommend to keep it activated, since many web features like geolocation only work in a HTTPS context. Normally, when Chrome shows this error message, it provides an option to add an exception for this site, and then you can view it. -
My Laragon is also fast. I have the same settings as @wbmnfktr Admin loads in approx. 400ms, frontend in 600-700 ms, but it is a large site, with many includes and stuff.
-
It works fine now ? Thanks
-
@adrian @tpr Just made a donation. Thanks again. However, the filterbox seems to not work correctly, see my screenshot I entered "sb-1.1" as my search value, but users starting with "sb-1.x" and others are also found.
-
-
Yes, @Autofahrn is right. The data-attributes are converted into real attributes from lazysizes
-
Look into your webservers (Apache?) logfiles. In error.log you can most likely find the error
-
Yes, there is a minimal noticable delay I think, but it loads very quickly. As far as I know Select2 is good but depends on jQuery. Some vanilla JavaScript alternatives are https://leaverou.github.io/awesomplete/ (from the famous Lea Verou, only 2KB gzipped) https://github.com/kraaden/autocomplete (Only 1KB gzipped) https://github.com/TarekRaafat/autoComplete.js
-
Yes, I have some hundred users (800 atm) and I need to switch to all of them
-
@adrian and @tpr Thanks for the filterbox, that was also on my todo list, but now you done it. Could you please also add it to the user switcher panel?
-
Permissions for "Page Reference" field linked to "Users"
dotnetic replied to johnstephens's topic in General Support
I don't think that one should need additional software, just to copy and use code from this forum. -
There is a space or colon missing between the word "Location" and the actual location in the user info column
-
@bartelsmedia The case you linked to is to prevent unsolicited advertising emails. An opt-in email is NOT an advertising email, depending on the contents of the email. If it just says, "you are subscribed", or "please confirm your subscription", without links to products or special offers, or something else that has advertising character, sending it is allowed. Like @teppo said, it is not required to store the emails in an encrypted format. I am also no lawyer but had to inform myself a lot about this, because I needed the information for some of my customers.
-
New forum look is very clean. I like it, but as @teppo said, the font size is really too small.
-
Yes, I experience the same as @kongondo. PW logs are running fast, but as soon as I enable Tracy Log, its getting slow. Here is a screenshot And I think I know why it takes so long. Look at this. 1,48 GB WTF?
-
@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)