-
Posts
2,007 -
Joined
-
Last visited
-
Days Won
21
Everything posted by dragan
-
afaik, Admin on Steroids can do that too.
-
@Chris B Did you activate SMTP in your sendinblue account? https://help.sendinblue.com/hc/en-us/articles/115000188150-Troubleshooting-issues-with-the-SMTP
-
@Ben Sayers I'm by no means an expert on hooks, but I usually put hooks in ready.php, not init.php. Maybe that's the reason why your hook is not even firing. https://processwire.com/docs/modules/hooks/#where-should-i-define-my-hook
-
Can I change the path of the template files?
dragan replied to franciccio-ITALIANO's topic in Getting Started
Nothing against Filezilla, but I'd suggest you use WinSCP instead. But yes, you'll need some sort of FTP client. A good IDE can also watch out for you and automatically upload files to your server whenever a change is detected (new file being created or saved). -
How to install processwire on Laragon?
dragan replied to franciccio-ITALIANO's topic in Getting Started
You can even skip the first few steps when you add PW as a "one click app". Either with or without Composer. https://processwire.com/talk/topic/21796-one-click-processwire-in-laragon/?tab=comments#comment-187287 -
If you'd like to always use the latest dev, you can also do ProcessWire=https://github.com/processwire/processwire/archive/dev.zip
-
You're probably thinking about the Batch Child Editor module in "Lister mode".
-
solved - how to save $pages array for later use
dragan replied to Rob(AU)'s topic in General Support
Try to use start and limit in your selector? -
... and those have to be children of body, not html :-) How do you include this list in your main template? regular include() ? In that case, you don't output anything in that partial, just build a string with PHP that you then echo() in your main template. You should definitely look into some beginner tutorials and docs - templating in PW really isn't hard to grasp. For the above list, you could use PHP's heredoc syntax. btw, for your last two fields you would need slightly more, since these are probably file/image fields (like $page->images->first()->url or whatever you need)
-
Well, is there a logic behind it? Icons per page-tree / category? How do you plan to use icons? Inline SVGs? With :before or :after pseudo-selectors in CSS? Icon-fonts? The easiest is to use your own classes and then style items with pseudo-selectors. Or you could use attribute selectors: https://developer.mozilla.org/en-US/docs/Web/CSS/Attribute_selectors e.g. .nav a[href^="https://mysite.tld/blog/"]:before {}
-
I'm confused. Are you using checkboxes or radio buttons? Unless you don't check the relevant radio button, you won't get any value after submitting the form. Or maybe I don't understand what you're really asking?
-
[SOLVED] How to add user and date to an uploaded file?
dragan replied to dotnetic's topic in Module/Plugin Development
Datetime of files are already saved automatically by the API, but without created/modified infos about the user. Maybe using a hook and set / modify page meta would work? I haven't looked into the brandnew PW dev branch and the new custom fields for files. This would be the most straightforward way - if you could easily protect those custom (sub-) fields in the admin (not viewable, not editable - same way you can use any regular field). But even then you would need a hook (maybe this one?) -
Are you using image compression at all? Are you seriously going to use 18 variations in a live site? Or is this just a test?
-
is that the exact code you're using? render is a function, so it should be render()
-
@Atlasfreeman Do you actually have template files for those templates? How complex are those pages? Maybe you can just as well output the fields of those pages instead of using render(). Some more infos and options: https://processwire.com/talk/topic/13958-help-understanding-render-and-rendervalue/ https://processwire.com/talk/topic/12228-render-options-documentation/
-
[SOLVED] How to set access toggles of a field via API?
dragan replied to dotnetic's topic in API & Templates
Probably with setting the right flag. If I check both access toggle checkboxes and analyze it in Tracy, I see this: flags => "access access-api access-editor system-override (32992)" Here are all possible flags: https://github.com/processwire/processwire/blob/master/wire/core/Field.php#L52 -
@Jens Martsch - dotnetic Awesome! Pinging @adrian ?
-
When I ran the code I posted above without the "allow..." check, funnily Tracy had output the new user ID, but when I re-opened the page in admin, the old created-user was still there. Kinda weird... PW 3.0.138, advanced mode + debug mode on. Anyway, maybe just a caching issue.
-
I also encounter that (very randomly) on some installs. Till now, I couldn't really find a pattern. Perhaps changing from cookie to DB-based session management can help.
- 8 replies
-
- formbuilder
- disconnected
-
(and 1 more)
Tagged with:
-
There is an option in template settings (Advanced tab -> Template toggles -> Allow the 'created user' to be changed on pages). After you activated this, you can use the API (inside a template or via Tracy Debugger console): $p = $pages->get(11201); d($p->created_users_id); // 41 $p->created_users_id = 10040; $p->save(); d($p->created_users_id); // 10040 d() is dump command inside Tracy
-
CSP? Content Security Policy? o_O