-
Posts
6,629 -
Joined
-
Last visited
-
Days Won
358
Everything posted by bernhard
-
I don't care about those 135kB, but I also don't care about any other theme than we currently have ?
-
For me: No, sorry. I don't get it or maybe I'm misunderstanding it. Do you want to add some css modules on the fly in the frontend when you are using some markup (eg add slider.css when using a slider html block)? Markup regions could then be a solution: <region id="slider"> <div>your slider markup</div> </region> <region pw-append="styles"> <link rel="stylesheet" type="text/css" href="slider.css" /> </region>
-
Just go to Modules > Admin and install the Select Options Module, then you can select it in the list of available Fieldtypes
-
Could you explain that a little bit more detailed, please? I just try to understand how your module works ?
-
Thx for the heads-up noel. I just tried your theme again and found this little bug: Very nice! Why are there three colors? Could you describe a bit how you created thos color variants? What is necessary to add a new custom color? Is everything replaced by hand in the css? Or is there some less/sass files? The reason why I'm asking is because it would be great to have the option to change some colors just by selecting one.
-
How to render admin page into a variable to create a PDF?
bernhard replied to dotnetic's topic in General Support
Wow @OLSA thx for that great example! Creating PDFs via PHP (mpdf) definitely has some drawbacks (formatting is sometimes tedious since not all css commands are supported, for example you can't use block elements inside table cells). Your method would also work with charts or other complex elements. Not sure how multipage would work, but I guess support for that via the @page directives should be possible. @jmartsch For creating 1000s of reports you could use RockGrid's batcher. You could create a grid containing all elements to create a PDF from and batcher would create the reports one-by-one with a progressbar and user feedback, similar to this: -
How to render admin page into a variable to create a PDF?
bernhard replied to dotnetic's topic in General Support
Do you know about RockPdf? Yeah, performance is a problem with all those PHP PDF libraries. Generating PDFs on page save would definitely help, if possible. mPDF also has a feature to replace text in pdf files, so you could maybe copy a base PDF and replace blocks individually to make it more performant (never tried, though). The problem with this feature (for me) was that it does only support strings and not any other markup (like images). -
from this github issue: https://github.com/bmewburn/vscode-intelephense/issues/135 So in a future release intelephense might also work server-side (if I understand this comment correctly)...
- 246 replies
-
- 1
-
-
- visual studio code
- vsc
-
(and 2 more)
Tagged with:
-
How to render admin page into a variable to create a PDF?
bernhard replied to dotnetic's topic in General Support
haha, sorry, totally missed that ? -
How to render admin page into a variable to create a PDF?
bernhard replied to dotnetic's topic in General Support
As adrian already told you. Or like this: -
MathParser adds Intelligence to your Number Inputfields
bernhard replied to bernhard's topic in Modules/Plugins
v0.0.4 fixes the bug mentioned by @kongondo, thank you! v0.0.5 adds a check to load assets only once -
MathParser adds Intelligence to your Number Inputfields
bernhard replied to bernhard's topic in Modules/Plugins
Thx, also added a showIf for the exclude config field. https://github.com/BernhardBaumrock/MathParser/commit/e0f0c27ae07a6d19efb5ba768ae9313babcc873e I'm using renderReady - so I'm not sure why fields are loaded?! Any hints? Any experience with this? Working on it ? -
MathParser adds Intelligence to your Number Inputfields
bernhard replied to bernhard's topic in Modules/Plugins
Hi @kongondo thx for your improvements! Thx, I've moved the module to github. I'll do that for all my public modules. The workflow is now the same for me (it somehow didn't work before so I stayed with GitLab) and the pw modules directory does also only auto-update versions from github, not gitlab. I've merged your changes. You forgot to change one occurance of id/name change. Not sure if/why it really didn't work before the changes. Can't really believe that ? Please try version 0.0.2 https://github.com/BernhardBaumrock/MathParser/commit/3b09d501b86df06f4502f8415db9a74d13ac5d23#diff-c4d3faaaa59bb6d7e0d306c2c1312e13L125 -
How to render admin page into a variable to create a PDF?
bernhard replied to dotnetic's topic in General Support
I guess it would be the easiest to setup a function that loops over all fields of the edit form, creates a simple HTML table (or floating divs could also be an option) and populates all the values with outputformatting turned on. Rendering the original admin HTML into pdf will bring you a lot of bloat and I guess it will be hard to make that look pretty (actually I think it will be hard to even make it work at all, at least with RockPDF (mpdf), because it does not support all kinds of css and you also have some JS magic in the pw admin...). -
How to render admin page into a variable to create a PDF?
bernhard replied to dotnetic's topic in General Support
What exactly are you trying to do? I guess you want to create some sort of reports? https://parall.ax/products/jspdf could also be an option. But generating a PDF from the markup of the adminpage will definitely need some additional work. I'm curious what you come up with. Could also need a good solution ? -
I don't understand your code $total is never used and $thumb is not defined if you don't have an iconimage... Maybe something like this? <div class="projects"> <?php foreach($projects as $project): $imgOrCount = ''; if($project->iconimage) { $imgOrCount = '<img src="'. $project->iconimage->size(800,800,['upscaling'=>false, 'cropping'=>false]). '">'; } else { $imgOrCount = count($pages->get('/missingimages')->missingimages); } ?> <div class="project"> <?= $imgOrCount ?> </div> <?php endforeach;?> </div>
-
To be honest, I would not care too much about it (I guess). I'll have to think of it during further usage of the console. If you implement them, then I'd suggest you implement them in a way that they pull the current api and are always up to date (no idea how hard that would be). Otherwise you'd get plenty of requests to keep everything up to date, I'm afraid. But maybe others think differently... What annoys me, though, are suggestions like this: Would it be somehow possible to prevent those suggestions of php functions when I actually want to access an object property/method? Thx
-
DEPRECATED - see the new version here: Brand new module that I've built because I'm too lazy to always open the calculator when I have to do some calculations (like vat calculations etc): It adds some magic to FieldtypeDecimal, FieldtypeFloat and FieldtypeInteger fieldtypes. Of course you can define which fields you want to extend: https://github.com/BernhardBaumrock/MathParser Any ideas or contributions are welcome. What do you think about the name? What do you think about the styling?
- 12 replies
-
- 13
-
-
-
ah, thx - I have been using it some weeks ago but had no intellisense at that time so it was not that helpful. thx, this extension looks better on first sight than the one I linked
- 246 replies
-
- visual studio code
- vsc
-
(and 2 more)
Tagged with:
-
no, but i can of course share my php.json file ? but I want to wait until it does not change on an hourly rate ? Just found another nice extension that is especially handy if you are using intelephense: https://marketplace.visualstudio.com/items?itemName=vincentkos.php-docblock-generator It creates docblocks for your methods or properties, which will tell intellisense the type of the variable. I've also created one new snippet that let's you add those typehints inline: "Add variable declaration comment": { "prefix": "var", "body": [ "/** @var $1 $$2 */", ], "description": "Add variable declaration comment" }, Both in action: PS: I created a keyboard shortcut CTRL+ALT+D for the docs extension. Just go to your keyboard shortcut settings and look for the command "generate a documentation block". PPS: you can even combine snippets:
- 246 replies
-
- visual studio code
- vsc
-
(and 2 more)
Tagged with:
-
another one: "Module Boilerplate": { "prefix": "module", "body": [ "${0:// info snippet}", "class ${1:Classname} extends WireData implements Module {", "", " public static function getModuleInfo() {", " return [", " 'title' => '${2:Hello World}',", " 'version' => '0.0.1',", " 'summary' => '${3:Your module description}',", " 'singular' => true,", " 'autoload' => true,", " 'icon' => '${4:smile-o}',", " 'requires' => [],", " 'installs' => [],", " ];", " }", "", " public function init() {", " }", "}", ], "description": "Module Boilerplate" },
- 246 replies
-
- 2
-
-
- visual studio code
- vsc
-
(and 2 more)
Tagged with:
-
Add optional label beside integer fieldtype
bernhard replied to Juergen's topic in Wishlist & Roadmap
You can easily hook the field and prepend and append any markup you want. I wouldn't need such a feature I guess. But maybe you tell me some examples and I change my mind.. -
$today = date('Ymd'); $start = date('Ymd', $single->getUnformatted('Start_date')); $end = date('Ymd', $single->getUnformatted('End_date')); if($today == $start AND $today == $end) echo "<div class='Dates-text'>TODAY!</div>"; elseif($today >= $start AND $today <= $end) echo "<div class='Dates-text'>ONGOING!</div>";