Leaderboard
Popular Content
Showing content with the highest reputation on 11/12/2019 in all areas
-
Well, DB-user and host are wrong. Just compare the two screenshots...3 points
-
2 points
-
Ok, my bad. Still, reporting post serves a completely different purpose. Hopefully this will be picked up by someone that can address the issue, but the best is to post the issue on github. You would have to create an account there, and of course that's up to you, but you don't need to use git to do it, only fill a form on the site.2 points
-
@tpr, I have added a fix for this in v0.0.2 of the Link Hover plugin if you want to update the version included in AOS: https://github.com/Toutouwai/linkhover Not as far as I can see. Without the Link Hover plugin installed there is no equivalent functionality to show the link URL on hover. Thanks for the bug report though.2 points
-
pfffffff... ok everyone thanks for the replies! but i think i just found the problem. The client hadn't filled out the subject line field in the back-end, so i was trying to send emails with no subject lines. so i guess all the send requests got filtered by a spam filter or something, or they were just invalid. But now they are being send. Stupid mistake, which took way too many hours to correct! But that's web development for you i guess ?1 point
-
Unfortunately this is probably a path to disaster these days - spam has made email painful and I think the only reliable option these days is to go with a transactional email service like MailGun, Postmark, SendInBlue etc. And be sure to spend the time to learn about and properly implement DKIM, SPF, and a DMARC policy.1 point
-
Yes, but it's up to you to connect only fields that have the appropriate allowed pages for the templates they are added to. From the module readme:1 point
-
@MarkE, this module connects two Page Reference fields across the site - the module config doesn't allow for limiting the connection by template. Nor would I want to add that because it would make the config more complicated than it needs to be for the majority of users. I suppose it might be possible to add a hookable method to the module that could let you opt out of updating connected fields in certain circumstances, but I doubt that would be preferable to simply creating a different Page Reference field that isn't connected to other fields by this module.1 point
-
@vwatson, if you want a simple but not 100% tamper-proof solution then the AdminOnSteroids module makes it fairly easy. 1. Install AdminOnSteroids. 2. In the "Asset Paths" section, add the URL to a CSS file that will contain custom styles for the admin: 3. In this CSS file, for a role named "editor"... /* Hide restore and delete links in ProcessDatabaseBackups */ .role-editor.ProcessDatabaseBackups a[href*='/db-backups/restore/'], .role-editor.ProcessDatabaseBackups a[href*='/db-backups/delete/'] { display:none; }1 point
-
The simple solution is to create a new text field "full_name" and add it to your template. Set the visibility to "Hidden (not shown in the editor)". In /site/ready.php: $pages->addHookAfter('saveReady', function(HookEvent $event) { $page = $event->arguments(0); if($page->template == 'your_template') { $page->full_name = $page->first_name . ' ' . $page->last_name; } }); You'll need to save all the pages once to populate the full_name field - if there are a lot then use the API to loop over the pages and save them. Now you can search the full_name field.1 point
-
@teppo thanks pal Yeah I noticed as soon as this was uploaded. Just tweaking it now but as you say no need for the hook as allows it to play better with other WireMail modules.1 point
-
Ok... so start is not necessary. Good to know. My fault. ? Where does this ukBlogPosts() come from? Are you using one of the included profiles (Regular or how it is called)? If so... I'm out... never used it. ? If you don't need it there, you can just go on from here.1 point
-
sure, here are some examples, i have these in a file called schema_helpers.php, which is in my shared functions folder: 1.) function siteSchema() { $page = wire('page'); $schema = array( "@context" => "http://schema.org", "@type" => "Website", "url" => wire('pages')->get(1)->httpUrl, "name" => $page->title, "description" => '', "potentialAction" => array( "@type" => "SearchAction", "target" => wire('pages')->get(1000)->httpUrl . "?q={search_term}", "query-input" => "required name=search_term" ), "about" => array( "@type" => "Thing", "name" => "A very interesting THING", "description" => "Website about a very interesting THING" ) ); if($page->summary) { $schema['description'] = $page->summary; } else { unset($schema['description']); } return '<script type="application/ld+json">' . json_encode($schema) . '</script>'; } 2.) News function jsonldNews($item, $settings) { $image = $item->image ?: getFallbackImage($item); if(!$image) return; $out = ''; $jsonld = array(); $jsonld["@context"] = "http://schema.org/"; $jsonld["@type"] = "NewsArticle"; $jsonld["name"] = $item->title; $jsonld["headline"] = $item->title; $jsonld["url"] = $item->httpUrl; $jsonld["mainEntityOfPage"] = array( '@type' => "WebPage", '@id' => $item->httpUrl ); $jsonld["description"] = $item->summary; $jsonld["datePublished"] = date(DATE_ISO8601, $item->published); $jsonld["dateModified"] = date(DATE_ISO8601, $item->modified); $jsonld["dateline"] = date(DATE_ISO8601, strtotime($item->news_date)); $jsonld["wordCount"] = str_word_count($item->body); $jsonld['author'] = $settings['author']; $jsonld['publisher'] = $settings['entity']; $jsonld['articleBody'] = $item->body; $jsonld['articleSection'] = $item->categories_select->first()->title; // Publisher $pubLogo = wire('pages')->get(3525)->image; if($pubLogo) { $pubLogo = $pubLogo->height(60); $jsonld['publisher'] = array( '@type' =>'Organization', 'name' => 'A Publisher', 'url' => 'https://publisher.org/', 'logo' => array ( '@type' => 'ImageObject', 'url' => $pubLogo->httpUrl, 'height' => $pubLogo->height, 'width' => $pubLogo->width ) ); } // News Items may have a featured image $image = $image->width(696); $jsonld['image'] = array( "@type" => "ImageObject", 'url' => $image->httpUrl, 'height'=> $image->height, 'width' => $image->width ); $out .= '<script type="application/ld+json">' . json_encode($jsonld) . '</script>'; return $out; } 3.) Event function jsonldEvent($event) { if(!$event->event_location_select) return; if($event->template == 'event-child') { // inherit unset fields needed $event->event_link = $event->event_link ? : $event->parent->event_link; $event->body = $event->body ? : $event->parent->body; $event->event_location_select = $event->event_location_select ? : $event->parent->event_location_select; $event->price = $event->price ? : $event->parent->price; $event->currency_code = $event->currency_code ? : $event->parent->currency_code; $event->link = $event->link ? : $event->parent->link; } $out = ''; foreach($event->event_date_m as $ed) { $jsonld = array(); $date8601 = date(DATE_ISO8601, strtotime($ed)); $jsonld["@context"] = "http://schema.org/"; $jsonld["@type"] = "MusicEvent"; $jsonld["name"] = $event->title; $jsonld["url"] = $event->event_link; $jsonld["description"] = $event->body; $jsonld["startDate"] = $date8601; if($event->event_location_select) { $state = $event->event_location_select->state ? $event->event_location_select->state->title : $event->event_location_select->address_state; $jsonld["location"] = array( "@type" => "Place", "name" => $event->event_location_select->title, "url" => $event->event_location_select->link, "address" => array( "@type" => "PostalAddress", "streetAddress" => $event->event_location_select->address_street, "addressLocality" => $event->event_location_select->address_city, "addressRegion" => $state, "postalCode" => $event->event_location_select->address_zip, "addressCountry" => $event->event_location_select->country->title ) ); } if($event->price && $event->currency_code && $event->link) { $jsonld["offers"] = array( "@type" => "Offer", "description" => "Tickets", "price" => $event->price, "priceCurrency" => $event->currency_code, "url" => $event->link ); } $out .= '<script type="application/ld+json">' . json_encode($jsonld) . '</script>'; } return $out; } Also - I don't think you need to use JSON_PRETTY_PRINT1 point