-
Posts
2,236 -
Joined
-
Last visited
-
Days Won
47
Everything posted by netcarver
-
Hmm, not sure why the module might not be loading. Did Martijn's suggestion help? If not, does it start working if you manually force your module to be loaded by adding a site/init.php file to your site and putting something like this in it... <?php $my_module = wire('modules')->get('HookPageAdd'); ..?
-
<aside> </aside>
-
If that test works, it could be that you are trying to add a child to a page who's template only allows children with a fixed template and for which a child naming policy is defined. If that is the case, the initial add form you are hooking is not even called (and, therefore, your hook won't get called) as PW will do a 'quick add' and use the only permitted template for the child and the defined naming policy. (PW source code) Hope that helps! Edited to add: From your OP it sounds like the build form is being shown, so this is probably not the case.
-
Just to eliminate an outside possibility: calling die() in the init() method kills things dead, right?
-
Attachments work very well using this mailer. I'm using it to send out event photos to purchasers - nice, nice, nice. Thanks for the work on this, Horst!
-
Hi Benjamin, Can you provide an example that shows successful use of the replacement wanted by planmacher as hooked from admin.php? If it is possible, I'd like to learn how to do this too. I must admit, I am a little doubtful about a straight translation from ready.php to admin.php as I think admin rendering works a little differently.
-
Hi DanJuan, I think your description is far too vague for you to get much help at the moment. You are more likely to get meaningful help if you provide a detailed description of the approach you are taking / code you've tried etc. Also, what do you know about HTML/CSS/JS?
-
There's an official blog article about ready.php that might help.
-
Sorry, I've not tried adding hooks in the admin.php file before so I don't know the perfect answer to this. However, if I wanted to hook just admin page renders then I'd keep my ready.php hook and have it filter on the page's template to see if it was an admin page. Like this... $page->addHookAfter('render', function($event) { $template = $event->object->template; if ($template == 'admin') { $event->return = str_replace("</body>", "<p>Hello World!</p></body>", $event->return); } }); Which should restrict changes to just the admin pages.
-
Hello planmacher, Please try this in your <site_root>/site/ready.php file... <?php $page->addHookAfter('render', function($event) { $event->return = str_replace("</body>", "<p>Hello World!</p></body>", $event->return); }); HTH!
-
PW 3.0.12: Support for extended (UTF8) page names/URLs
netcarver replied to ryan's topic in News & Announcements
どうもありがとうございました! -
@Horst Thank you for this module. I've hit the anti-aliasing problem in watermarkText() you mentioned back on page 2 of this thread (I'm using PHP7). This fixed the issue for me... if (function_exists('imageantialias')) { @imageantialias($im1, FALSE); }
-
PW 3.0.11: Composer, Google, Calendars and More
netcarver replied to ryan's topic in News & Announcements
Yes, fantastic! Ryan, Hari KT and anyone else hiding behind the scenes; thank you. -
Hello dimitrios, Thank you for developing this! Could you also post it to the modules directory? Doing so makes it easier for people to locate and install your module.
-
MarkupSEO - The all-in-one SEO solution for ProcessWire.
netcarver replied to Nico Knoll's topic in Modules/Plugins
Seems to be working fine for me on 3.0.10 - but I haven't exercised it to the full yet. -
Some very cool applications and modules being developed in the PW community - as usual!
-
Woot - Dreamhost are offering free 1-click installation of Let's Encrypt certs (ok, almost 1-click.) I've tried it out on a few domains and it works really well for the most part. I've had an install fail on one domain but they are working to fix the problem. Update: Looks like the failure was a user error - I deleted the certificate when installing PW
-
@Pete, seeing some problems when visiting this module's settings page under PHP7. I had to tweak the code a little to get it working again. Here's what I did... // Now use $data and $fieldsModel loop to create all checkboxes foreach ($fieldsModel as $f=>$fM){ $creator = $fM['type']; $fields->add( self::$creator($f, $fM['label'], $data[$f], $fM['desc']) ); }
-
Thanks for that flOeck!
-
Tom, Can you try the branch, here? I think it might solve your sub-sub-field request. Not sure I fully understand your issue with the Field Change Notifier. Could you elaborate?
-
PW already has a mechanism built in that should handle this for you. Edit your templates and look for the URL tab. In the "Scheme/protocol" section choose "HTTP only" and save the change. Repeat for all your templates and you should be set. Hope that helps.
-
Great news! General availability of the service should be close now.
-
Hi verdeandrea, What happens if you try this... function wordLimiter(HookEvent $event){ $field = $event->arguments[0]; // first argument $limit = $event->arguments[1]; $endstr = isset($event->arguments[2]) ? $event->arguments[2] : ' …'; $page = $event->object; // the page $str = $page->get($field); $str = strip_tags($str); if(strlen($str) <= $limit) return; $out = substr($str, 0, $limit); $pos = strrpos($out, " "); if ($pos>0) { $out = substr($out, 0, $pos); } $out .= $endstr; $event->return = $out; } ...?
-
New install over virtual host - only home page runs!
netcarver replied to zota's topic in Getting Started
@zota Welcome to processwire. There's a tutorial here that might help. -
@Ryan Thank you. I hope people find something they like in there.