-
Posts
342 -
Joined
-
Last visited
-
Days Won
5
virtualgadjo last won the day on October 9 2025
virtualgadjo had the most liked content!
Recent Profile Visitors
5,412 profile views
virtualgadjo's Achievements
Sr. Member (5/6)
217
Reputation
-
hi @BrendonKoz exaclty like you said in your answers, the first thing i thought about was all those directories i use outside pw /site one for special cron jobs (not lazy ones :)) downloadable files and so on without any problem... but you're right, first thing to check is if the host allows htacces protection (if not, time to change because it would sound a bit prehistoric π ) afterwards, maybe the url he gives as pw htaccess prevents direct access to php files for exemple that why my second thought was to exclude the directory from pw htaccess rules and then put his own ones in the directory htaccess and see what happens, it's a bit harsh but also a simple debug attempt π have a nice day
-
@floko my pleasure, il's usually a very easy way to exclude a directory from the rules of an htaccess that is at the root level and, of course, allows to submit this directory to its own htaccess rules have a nice day and nice 14 days away from your computer π
-
virtualgadjo started following Generate image caroussel or "attention blocks" , htaccess protected folder , How to transfer a Processwire site from one server to another and 4 others
-
hi, have you tried the simple RewriteRule ^(yourdirectory)/.*$ - [L] in pw htaccess ? it may be a simple and easy solution not to have to go and implement a more complex workaround have a nice day
-
Hi, honestly, the answer is in your first post, files and DB backup are all you need (same as when you go online for a local dev website) the only things you'll have to change are the db connection settings in the config.php file of course, depending on the pw version the websites are using you may have to check the php version your new hosting server is on and if needed set a lower one (most recent hosting service will use a 8+ version and if your website uses a 3.0.165 pw there may be some warnings π in that case go for a php 7.4.x version and, afterwards, simply upgrade both your pw and php) have a nice day
-
WebP as source/input images - expected behaviour?
virtualgadjo replied to Peter Knight's topic in General Support
hi, i guess it may come from the fact that creating a vign (the first variation pw creates when tou upload an image) is not that simple (not possible on a server that only has gd and not a recent imagick version) that would be a not very universal feature so far have a nice day -
New namespaced version - beta testers wanted.
virtualgadjo replied to adrian's topic in Tracy Debugger
Hello @adrian that's great, I had an older version (from 2022) on my machine, so I installed it on my local ProcessWire which I use for my French translations (so it's not necessarily representative of all situations, as it's always up to date with the latest version, ProcessWire 3.0.256 Β© 2026). then I commented out the module folder and replaced it with the namespaced version folder. After a short normal update time, the only thing visible was a small alert ModulesInfo: Upgrading module (TracyDebugger: 4.23.40 => 4.28.0) the site is still up and running, no errors, and Tracy seems to be working fine. tried on a php 7.4.9 and 8.1.31 hope this may be somehow useful have a nice day -
hi, can't agree more, so many ways..s and it's exactly why processwire is so special, it offers you a lot of ways to do things, including when it exists a simple php piece of code i must admit i often go for pure php when possible and not to verbose and thank you so much pw for letting me do so... well and for so many other things like custom page classes, hooks, i have to stop here else the list will be far too long π€£ have a nice day
- 11 replies
-
- 1
-
-
- markup regions
- template
-
(and 1 more)
Tagged with:
-
Hi @ai_slop if you knew how much i agree with this, of course my very first website with pw was made with my usual includes of header and footer php files but as soon as i decided to try and understand the various output strategies and tried the markup regions it was a no return back path π what you describe about your homepage is somthing i often run into too, my solution varies from the things i need for the hom page, sometimes i can even be e script tag with various things far easier to deal with in the template and that would be a bit too much in the website general js file in this case i use the trick i spoke about, my script tag surrounded by a simple if page id is 1 but when i'm a little less lazy i sometimes even use something pw allows me to do, when i need ereally specific heavy css for example based on some pages parent, ids or even a variable value, i add the type i need to the config, i.e $config->contentTypes = array_merge($config->contentTypes, array( 'css' => 'text/css' ) ); this way you'll have a new header type added to the Content-type combo box choice in the template and a php file with a css type header but having access to pw api, this allows you some pretty acrobatic things π but well, to be honest, i more often use the old php if to load some files or even output script tags keeping in mind that the _main.php file is appended at the end of the template files, you can also submit content, script, files and so on output or not, relying on a var you define in the template itself, actually, the kind of things you could do even in a not pw structure but taking advantage of pw api have a nice day
- 11 replies
-
- 1
-
-
- markup regions
- template
-
(and 1 more)
Tagged with:
-
Hi, as i stongly agree with @monollonom about this checkbox to use a different, say frame, than the usual _main and the fact that in general you don't need a specific config, there are ready, init and so on for this i'd like to add a few things change your _main frame would useful for rss feed, sitemap; well xml files π but also for modals for example (and sometimes for dynamic css or js files) as you often need a lighter when not totally different html head and quite often too far less js files to the bottom of the file but not at all for the home page if you have a closer look to what this _main file allows with marlup regions you'll see that it goes far above a main div with an id you can use in every template with totally (or not) diffeerent html content and around, above and below, div (or else) you will have (or not) on every template/page even before diving deep into the markup regions world, first thing first, as this _main.php file is a php one let's take a simple example, the homepage quite often you have a section name hero (i still don't know why...) with a big image, carrousel, or any gsap animated witchcraft π and on top of this other page a simpler and horter image with or not a title sometimes a breadcrumbs... well, before that main div/section you will (or not) use everuwhere, why not simply use php... if page id is 1 (or template == home) hop, your big whatever it is and else what you need in the other page of course, is there are some pages, say, in your case your futur shop, for which you need a different head part, well you see where i'm going... and you may have noticed i quite often said "or not", this is processwire way of life π, nothing is compulsory it is all about your logic, its own logic is just here to help you do things faster than if you had to write every single thing by yourself but you can think exactly the same way as if you did and now if you dive a little deeper into markup regions, its optional attributes, you'll see how powerful it is have a nice day (and a great pw journey :))
- 11 replies
-
- 1
-
-
- markup regions
- template
-
(and 1 more)
Tagged with:
-
How to clone a referenced page when selecting
virtualgadjo replied to lpa's topic in General Support
hi @lpa actually the save ready event is a "funny" one, it happens when you're saving the page but before the saving if done, this way what you launch is in a way prepared and done juste before the cms really saves the page it's an event i really like as instead of field events that may charge the server each time you change your mind about a field value/content, this one happens when you're done and... ready to save the page and, of cours, you see the result as soon as the page is saved but, of course, we're speaking pw here and you have a lot of events to choose from, have a look at the hookable event of a field https://processwire.com/api/ref/process-field/ the important thing being always to be careful with the cms and server charge π have a nice day -
How to clone a referenced page when selecting
virtualgadjo replied to lpa's topic in General Support
hi, that sounds like a good call for a three steps hook on page save ready step one, get the value (id) of the refpage step two $pages->clone(the id) and then get the id of the page newly created setp three yourreferencefield->set() of course, this will be easy with a single page reference field for a multiple pages one, a foreach will be necessary and for step three i must admit that having played a lot with ref field i would probably go for an sql query to update your ref field table (field_fieldname) and set data = new page id where data = former page id hope it may help π have a nice day -
hi totally agree width @Krlos i continue to get some pro module renewed even if i don't use them a lot for some of them, giving back being the least i can do and i may add something, the first time i see something i need to understand in the docs, module, pro module, api and so on, hop, singlefile and i save the page, this way i can use it offline but well, maybe it's because of my advanced age π€£ have a nice day
-
@taotoo avec grand plaisir π
-
Generate image caroussel or "attention blocks"
virtualgadjo replied to _Roy_'s topic in Getting Started
Hi, well lets'assume that if your first piece of html generates a slider/markup or whatever you'd like to name it you probably have some css and js to do so if the second snippet which generate the same kind of html but with the images enclosed inside a tags, the problem could be your js settings that assume the slider elements are images and not the a tags, something with an unwanted !important in the css breaking the slider css grid, flex or even the evil floats π etc etc honestly hard to say further without knowing what generates the sliding behaviour as there are so many libraries like the ones @Jan Romero quotes above without speaking of all the custom things you can make with gsap... have a nice day -
Hi, I'm not sure it's very useful if you're neither French nor seriously obsessive, but just in case... In French, when using a CKEditor or TinyMCE field, it is easy to insert a non-breaking space before exclamation marks, question marks, colons, semicolons, and so on, so that they do not wrap to the next line on their own, at the end of a sentence or in the middle of one. This is not possible in simple text fields, single-line fields, or non-rich-text textarea fields and this often causes formatting issues that are not very βattractiveβ, especially in responsive usage, remember, i said obsessive π. So I created for myself a small textformatter module that allows you (well pw for you actually) to insert a non-breaking space before or after certain specific characters in a text or textarea field. It's completely useless and should not be used in a rich-text field, but if it's ever useful to anyone, it's available on GitHub at this address. https://github.com/virtualgadjo/Processwire-module-espaces-insecables-dans-champs-text have a nice day