-
Posts
2,235 -
Joined
-
Last visited
-
Days Won
2
Posts posted by pwired
-
-
Hi Mikeindee
Thanks for letting know about the Raspberry operating system.
A friend and me want to start setting up our own server
with a Raspberry 4. We will see how far it will take us. -
Quote
I'm using a 4GB RaspberryPi running Apache2 as the web server ...
What operating system version is running on that Raspberry ?
Did you install that operating system your self ? -
Quote
You really have a virtualmachine with Windows for each and every project you work on?
Ever worked with VirtualBox, VMWare, Proxmox, other ? You build only once a virtualmachine
with all your preferred programs, languages, libraries, tools, utilities, components, snippets, etc. etc.
You use that virtualmachine as a Template. After that it is simply cloning the Template for each Project.
It's like having multiple laptops in a single laptop 😉-
1
-
-
I do not have Windows since I am not fond of it either.
We'll you can't beat Laragon5, HeidiSQL and WinSCP when it comes to Windows 😏
I manage every project in it's own virtualmachine, I run every virtualmachine
from a simple usb3 2Tb external hdd ... all very practical.-
1
-
-
Quote
For my Mac there are no too many alternatives,
That is why I like VirtualMachines. It let's you bring together the best of different worlds.
Oracle VirtualBox is there for Windows, Linux and for Mac also.
https://www.virtualbox.org/wiki/Downloads-
1
-
-
I am a Laragon5 User + HeidiSQL + WinSCP , all 3 in a virtual machine, saves me a lot of time , fast, powerful, stable ... and for free
-
3
-
-
Perfect design/photos/fonts/colors
just one thing:https://clinicatrust.pt/contactos/
This page can't load Google Maps correctly
Do you own this website? -
Another very good example of how to handle parts of a website efficiently in processwire "as a page"
I was building a website from scratch lately and was fiddling my css around to look for a way to get it better organized.
And then came across this post from Diogo again:Quote1. Create a template file css.php and put all your css code inside. On the top of the file put this code <?php header("Content-type: text/css"); ?>.
2. Create a "css" PW template with that file.
3. Create a "css" page and give it the "css" template.
4. Link to the stylesheet like this <link rel="stylesheet" href="<?php echo $pages->get('/css/')->url; ?>">.
5. use the PW API on your stylesheet 🙂
Extra:
6. put some fields on the "css" template and use them on your css
Examples: the color picker field for colors; an image field with your style pictures (background, logo, etc).
-
Congratulations, very original design that really stands out from the crowd.
-
1
-
-
I was addressing your first question
This is a different question
QuoteI was looking for a way to make template with fields programatically.
Have you read the Processwire Documentation ?
Your answers are here:https://processwire.com/docs/start/variables/templates/
---------------------------------------------------------------------
Creating a new template with api<?php namespace ProcessWire; $fieldgroup = new Fieldgroup(); $fieldgroup->name = "something"; $fieldgroup->add("title"); // add some fields $fieldgroup->add("body"); $fieldgroup->add("summary"); $fieldgroup->save(); $template = new Template(); $template->name = "something"; // must be same name as the fieldgroup $template->fieldgroup = $fieldgroup; $template->save();
---------------------------------------------------------------------
Adding fields to a template with api<?php namespace ProcessWire; $template = $templates->get("some_template"); $template->fields->add("body"); // add some fields $template->fields->add("summary"); $template->fields->add("images"); $template->fields->save();
---------------------------------------------------------------------
Forum
https://processwire.com/talk/topic/4921-how-to-create-template-file-using-api-under-a-module/
https://processwire.com/talk/topic/352-creating-pages-via-api/Examples
https://processwire-recipes.com/recipes/add-fields-to-template/Beginner mistakes
https://processwire.com/talk/topic/19415-trying-to-create-field-using-api/-
2
-
1
-
-
Quote
Is it possible to add a content textarea with program?
Have you seen the processwire documentation ?
https://processwire.com/api/ref/field/
1) Setup a field of type textarea
2) Echo or include the textarea field where you want itecho $Yourpage->yourfield;
include $Yourpage->yourfield;-
1
-
-
Quote
Finding tutorials for CMS is very hard these days
There are form tutorials you can find in the forum that you can use for what you need.
-
1
-
-
Hi MarkE,
Thanks for pointing to an example use of this.
Yes, with some easy business logic on the template file we can make the _main.php
choose what footer type/content to show in what case or on what front website page.I am also playing with taking the header lines out of the usual _inc file
and move them into "a header page" fields and see how that goes. -
-
Hi
Here my 5cts to it for Windows users.
Laragon has been updated to version 5.x and now works also with php8
(There is even a x86 version available if needed)Laragon 5.x is very easy to set it up to work from php5.x to php8.x
-
2
-
-
Let's not forget Bulma and Spectre, both powerful alternatives
-
1
-
-
How many times this subject already ? Anyways I tried Bootstrap - UIKit and funky Tailwind but guess what,
I returned back to pocketgrid because it can't be beated in usage and speed:
https://arnaudleray.github.io/pocketgrid/faq/
https://arnaudleray.github.io/pocketgrid/ -
QuoteQuote
the php code I need to write in the template files to link that piece of html code, which is always the same everywhere?
Many examples on the net
https://css-tricks.com/the-simplest-ways-to-handle-html-includes/
https://www.thoughtco.com/html-in-many-docs-with-php-3469181
https://www.phptutorial.net/php-tutorial/php-include-file/-
1
-
-
-
Quote
Powered with Bootstrap 5 it might be a game changer for me
I always sticked to the golden rule: keep code separated from layout and it always served me very well.
Funny how fashions like tailwind and the ever next bootstrap invite people to break with the golden rule
and mix code again with layoutQuoteUnpoly 2 is promised to be released soon
Ajaxify is already replacing parts of a page without reloading the whole page for a long time and does it very easy
-
1
-
-
-
Big Discounts here on coding pirple coding school (I am not affiliated)
Just to let you know,
-
Quote
this gem php-hot-reloader
Good find ! Now I can use this together with my browser console to see what I am doing.
Thanks for posting.-
1
-
-
Recommended PHP Editor or IDE?
in Dev Talk
Posted
I can't believe no one is mentioning PHPED from Nusphere
http://www.nusphere.com/products/index.htm
Yes it costs money but so what if you really get something good.