MDC stands for Mapped Diagnostic Context. Mapped Diagnostic Context enriched the logs by providing more information about the event in the logs. By default, Mule logs two entries: processor which shows the location of current events, events which shows the correlation Id of the event.
Mule Runtime 4.4 introduced Tracing module and enables you to add more information to the logs by by adding, removing, and clearing variables from the logging context for a given Mule event.
It seems this fault has been going for years, PayPal don't know why it is and say it's our fault.
I think the checkout page is hosted somewhere else?
My regular customers don't have this problem, it's the NEW customers that can't pay. I suspect PayPal save their details so checkout is faster or pre-filled?
Does anyone have this problem?
Did anyone solve it? Ta everyone, Steve
Have you ever had to manually book 50,000 flights because you rushed to deliver new features on your product?
In this episode of the Dev Interrupted podcast, we asked some of our favorite engineering leaders if they could share memorable stories of professional mistakes with our audience.
Mobile application development has increased tenfold due to the high demand for such digital platforms among users worldwide. According to a report, there are more than 3 billion mobile application users, and this is where most businesses are looking to capitalize.
Mobile application software helps businesses engage users on mobile devices, making it an attractive investment. Mobile applications offer higher engagement value for organizations, but they also help organizations generate more leads.
There are over 50+ tools and solutions available in the market for performance testing your application and services. Now it is time to check out Ddosify, a high-performance load testing tool that offers free and commercial features to test web applications and services over HTTP(S), HTTP/2, and other protocols are on their way. In this blog article, let us deep-dive into the Ddosify tool and see whether it satisfies a typical performance engineer or not.
Before we see Ddosify, let us try to understand the name of the tool. Ddosify contains Ddos term. DDoS stands for Distributed Denial of Services. Below is the Wikipedia entry for Denial of Service:
What are the leading causes of traffic flow disruptions and safety risks? Of course, we can mention accidents, which certainly disrupt the smooth flow and cause delays. To get to the root of traffic delays...
Hello. I am trying to check if a table definition (the default value on a constraint) is equal to UTC Time by using the following query:
IF NOT EXISTS((SELECT object_definition(default_object_id) AS definition
FROM sys.columns
WHERE name = 'ModifiedDate'
AND object_id = object_id('dbo.WorkflowAudit')) == GETUTCDATE())
However, you can not compare a function (GETUTCDATE()) to this Select Statement. I need to do it this way because I am building an update script and it can only update the table IF the table definition is NOT equal to UTC TIME Any ideas? Thank you
Merge, a tech startup founded in 2020 that provides a unified API for access to myriad B2B integrations, recently announced a new partnership with UKG (Ultimate Kronos Group). As a UKG Technology Partner, Merge has built out connections to UKG’s technology suite, enabling streamlined access for end-users.
a11y-syntax-highlighting — Eric Bailey’s repo of code syntax highlighting themes for a variety of software that are both attractive and meet WCAG color contrast guidelines (including support for Windows High Contrast mode as well).
Respecting Users’ Motion Preferences — Michelle Barker with a guide on when and how to honor people’s prefers-reduced-motion setting. While there is no one right way, it should be done. It’s interesting how many things might apply. Properties like transition and animation are fairly obvious, but did you think of scroll-behavior or things specifically in JavaScript (where you can also test for a preference)?
Accessibility testing — Jeremy Keith: “When you commission an accessibility audit, you should hope to get feedback that’s mostly in that third category—interactive widgets.” Don’t waste an accessibility expert’s time telling you about color contrast problems because you can find and fix those yourself fairly easily.
The effect of CSS on screen readers — Part of me wishes the effect of CSS on screen readers was “nothing” but Jozsef Polgar notes there are some things CSS does affect. A classic is setting list-style: none on lists will force them to not read as lists in VoiceOver. Jozsef points to Ben Meyer’s article covering similar ground.
In Quest of Search — Sara again, this time weighing in on <search>. I’ve heard mostly negative things (like, why the focus on this when there are so many bigger fish to fry, like <dialog> and inert), but Sara is all for it. I agree that we might as well have an element that gives us a free role="search" like we get with <nav> and <main>.
Accessible Palette: stop using HSL for color systems — Eugene Fedorenko says, “While HSL and HSV are fine choices for choosing a single color, they’re not suitable for building a color system, as they simply transform the RGB model and ignore the complexities of human perception.” It seems like everyone who has looked into next-gen color formats is a fan, but I haven’t wrapped my mind around them yet. Things like LCh, Lch(ab), HCL, LCH(uv)… There is starting to be some trickles of browser support.
One last time: custom styling radio buttons and checkboxes — Scott O’Hara notes that you can entirely replace these inputs with custom styling, and do it accessibly. Part of doing it right is dealing with every possible state. Worth noting: without replacing everything, you can get pretty far in styling checkboxes/radios by just changing width/height and the accent-color, as Dave and I noted here.
Understanding Logical Focus Order — Rachel Leggett explains it is “the idea that someone navigating your webpage with a keyboard (i.e. without a mouse) will encounter elements in an order that makes sense.” Nearly anytime you use the order property, you’re probably interferring here. But less obviously, hidden elements that remain interactive can confuse logical focus order.
Assistiv Labs — I didn’t realize there was a tool in the vein of CrossBrowserTesting or BrowserStack that allowed you to test in JAWS and NVDA and stuff — but there is! Just the other day I wanted to test in JAWS, so I spun up a (paid) copy of Parallels with my (paid) copy of Windows 10 and used my (40-minute test version) of JAWS to test. While it worked, it was not particularly cheap or without significant technical debt. This seems easier, although I haven’t actually tried it yet.
#include <iostream> // input and output code
#include<conio.h> // getch - passwd
#include<cstdio> // fileopen fscanf fileclose
#include<windows.h> // system cls and pause
using namespace std;
///////////////////////////////////////////////////CLASS EMPLOYEE /////////////////////////////////////////////////////////
class admin{
private:// variables for admin details
char name[30],id[5],position[20];
int age,Salary,experience;
//quit functions
void quit(void){
cout<<"\n\n\n Please ENTER To Go Back MAIN PAGE \n\n";
cin.get(); // get update the information key infrom user before quit
cin.get(); // get update the information key in from user before quit
}
void listEmployees(void){ //To list total employees with Name, ID and Position
system("cls"); //clear the screen
FILE *file; // to open a existed file or create a file if doesn't exist
file= fopen("data.txt", "r"); // opened file with data.txt and only able to read the data
cout<<"\n\t List of Employees of RSVV SDN.BHD\n";
cout<<"\n========================================================";
cout<<"\n= Name || Employee ID || Position =";
cout<<"\n========================================================";
//while ((fscan(file, "%[^\n]",line))!= EOF) %s//string %d//integers or numbers
// it will scan the data in the file and update the data inside the dta.txt before void quit
while(fscanf(file, "%s %s %s %d %d %d", &name[0], &id[0] , &position[0], &age, &Salary, &experience)!= EOF)
cout<<"\n"<<name<<"\t\t\t"<<id<<"\t\t\t"<<position; // update the name,id and position in the table
fclose(file); //close the created file
quit(); //calling the void quit
}
// functions to call the updated employee list
void duplistEmployees(void){ // this void to showcase the the list before edit,delete menu
system("cls"); //clear the screen
FILE *file; // to open a existed file or create a file if doesn't exist
file= fopen("data.txt", "r"); // opened file with data.txt and only able to read the data
cout<<"\n\t List of Employees in RSVV SDN.BHD\n";
cout<<"\n========================================================";
cout<<"\n= Name || Employee ID || Position =";
cout<<"\n========================================================";
//while ((fscan(file, "%[^\n]",line))!= EOF) %s//string %d//integers or numbers
// it will scan the data in the file and update the data inside the dta.txt before void quit
while(fscanf(file, "%s %s %s %d %d %d", &name[0], &id[0] , &position[0], &age, &Salary, &experience)!= EOF)
cout<<"\n"<<name<<"\t\t\t"<<id<<"\t\t\t"<<position; // update the name,id and position in the table
fclose(file); //close the created file
}
void showDetails(void){ //Displays all details according to Employee's id
duplistEmployees(); // calling the updated employee list
char checkId[5]; // declare to check if got any exist id
cout<<"\n\nPlease Enter the Employee ID: ";
cin>>checkId;
FILE *file;
file= fopen("data.txt", "r"); // open the file and read the file data
//while ((fscan(file, "%[^\n]",line))!= EOF) %s//string %d//integers or numbers
while(fscanf(file, "%s %s %s %d %d %d", &name[0], &id[0] , &position[0], &age, &Salary, &experience)!=EOF)
if(strcmp(checkId,id)==0){ //checking the inputted variable with the existing variable is yes so the permission access given
cout<<"\n---------------------";
cout<<"\nEmployee Name: "<<name;
cout<<"\n---------------------";
cout<<"\nEmployee Id: "<<id;
cout<<"\n---------------------";
cout<<"\nEmployee Position: "<<position;
cout<<"\n---------------------";
cout<<"\nEmployee Age: "<<age;
cout<<"\n---------------------";
cout<<"\nEmployee Salary: "<<Salary;
cout<<"\n---------------------";
cout<<"\nEmployee Experience: "<<experience;
cout<<"\n---------------------";
}
fclose(file); //close the opened file
quit(); //calling the quit function
}
void editExisting(void){ //edit the existing employee list
duplistEmployees(); //calling out updated employee list
char checkId[5];
cout<<"\nPlease Enter Employee ID To Edit: ";
cin>>checkId;
char newPosition[10];
cout<<"\n-----------------------------";
cout<<"\nPlease Enter The New Position Of The Employee: ";
cin>>newPosition; // key in newposition of the employee
int newSalary;
cout<<"------------------------------";
cout<<"\nPlease Enter The New Salary Of The Employee: ";
cin>>newSalary; //key in the newSalary of the employee
FILE *file, *tempfile; // to open a existed file or create a file if doesn't exist // create a temp file as well
file= fopen("data.txt", "r"); // file manipulation method
tempfile= fopen("temp.txt", "w"); //using temp file manipulation method
//while ((fscan(file, "%[^\n]",line))!= EOF) %s//string %d//integers or numbers
while(fscanf(file, "%s %s %s %d %d %d", &name[0], &id[0] , &position[0], &age, &Salary, &experience)!=EOF){
if(strcmp(checkId, id)==0)
fprintf(tempfile, "%s %s %s %d %d %d \n", name, id, newPosition, age, newSalary, experience );
else
fprintf(tempfile, "%s %s %s %d %d %d \n", name, id, position, age, Salary, experience );
}
fclose(file);
fclose(tempfile);
int isRemoved= remove("data.txt"); // remove the content of the data.txt
int isRenamed= rename("temp.txt", "data.txt"); //change the temp file data into data.txt file.
quit();
}
void addNewEmployee(void){ //adding records
system("cls"); //clear the screen
duplistEmployees(); // calling out the updated employee list
cout<<"\n----------------------------------------";
cout<<"\n PLease Enter The Name of New Joined Employee: ";
cin>>name;
cout<<"\n----------------------------------------";
cout<<"\n Please Enter The New Joined Employee ID [MAX 4 digits]: ";
cin>>id;
cout<<"\n----------------------------------------";
cout<<"\n Please Enter The New Joined Employee Position: ";
cin>>position;
cout<<"\n----------------------------------------";
cout<<"\n Please Enter The New Joined Employee Age: ";
cin>>age;
cout<<"\n----------------------------------------";
cout<<"\n Please Enter The New Joined Employee Salary: ";
cin>>Salary;
cout<<"\n----------------------------------------";
cout<<"\n Please Enter The New Joined Employee Experience (IF NO EXPERIENCE PUT '0'): ";
cin>>experience;
cout<<"\n----------------------------------------";
char ch;
cout<<"\nPlease Enter 's' TO Save The Employee's Information\n";
cin>>ch;
if(ch=='s'||ch=='S'){
FILE *file; // to open a existed file or create a file if doesn't exist
file= fopen("data.txt","a"); //open a data.txt file without changing the content
fprintf(file, "%s %s %s %d %d %d \n", name, id, position, age, Salary, experience );
fclose(file);
cout<<"\nA New Employee Has Been Added To The System\n";
}
else
addNewEmployee();
quit();
}
void deleteEmployeeDetails(void){ //removing records
duplistEmployees();
char checkId[5];
cout<<"\n----------------------------------";
cout<<"\nPlease Enter The Employee Id: ";
cin>>checkId;
char ch;
cout<<"----------------------------------";
cout<<"\n\n\n\n\n\n Do you want to remove this employee?";
cout<<"\n\n\n\n\nCONFIRMATION!!!\nEnter 'r' To Confirm Deletion \n";
cin>>ch;
if(ch=='r'||ch=='R'){
FILE *file, *tempfile; // to open a existed file or create a file if doesn't exist // create a temp file as well
file= fopen("data.txt", "r");
tempfile= fopen("temp.txt", "w");
//while ((fscan(file, "%[^\n]",line))!= EOF) %s//string %d//integers or numbers
// it will scan the data in the file and update the data inside the dta.txt before void quit
while(fscanf(file, "%s %s %s %d %d %d", &name[0], &id[0] , &position[0], &age, &Salary, &experience)!=EOF)
if(strcmp(checkId, id)!=0)
fprintf(tempfile, "%s %s %s %d %d %d \n", name, id, position, age, Salary, experience );
fclose(file); //close the create file
fclose(tempfile); //close the create temo file
int isRemoved= remove("data.txt"); //remove the data file
int isRenamed= rename("temp.txt", "data.txt"); //change temp.txt as the data.txt
cout<<"\nRemoved Successfully\n";
quit();
}
else
deleteEmployeeDetails();
}
Freedom has always been the cornerstone of technology. And yet, there is no freedom without options. For example, users should have a choice in how they pay for digital goods offered in-app. Although the Supreme Court’s recent decision in the battle between Epic Games and Apple was mixed, the judges ruled Apple cannot stop developers from directing users to other methods of payment in their apps. That’s good news for app developers looking for alternatives.
There are many different options for hosting payments — in-app or on the web, developing an actual web app that would not require mandatory taxes, a hybrid of in-app and outside the app, and so on. The options are ever-changing, so it can be difficult to keep up.
Every day, the ProgrammableWeb team is busy, updating its three primary directories for APIs, clients (language-specific libraries or SDKs for consuming or providing APIs), and source code samples.
There has been a lot of talk about automated social images lately. GitHub has created its own. A WordPress plugin has been acquired by Jetpack. There is definitely interest! People like Ryan Filler and Zach Leatherman have implemented social images on their websites. They had to code a lot of things on their own. But the landscape is changing and tools are available to smooth the process.
In this tutorial, we are going to create our own automated social images with HTML and CSS, integrate them to an Eleventy blog — mostly by configuration — and deploy our site to Netlify.
<meta property="og:title" content="The blue sky strategy" />
<meta property="og:description" content="Less clouds, more blue" />
<meta property="og:image" content="/sky-with-clouds.jpg" />
When we share this page on Facebook, we and our friends see this:
LinkedIn, Twitter, WhatsApp, Slack, Discord, iMessage… All these sites behave pretty much the same way: they provide a visual “card” that accompanies the link, giving it more space and context.
Twitter has its own set of markups with its Twitter Cards, but they are very similar. And Twitter falls back to Open Graph when it can’t find them.
It is natural for our pages to have a title and a description. But in the screenshot above, they are quite small compared to the space and attention the picture of sky and clouds gets — not to mention the size of the clickable area. That’s the power of the social image. It’s easy to understand the impact these images can have when a link is shared.
From Level 0 to Level 3
Not all social images are created equal. These are not official terms, but let’s consider numbered “levels” on how impactful these social image cards can be.
Level 0
The most basic social image is no image. The link might be lost in a sea of content with the small area and not much visual.
Level 1
A classic technique is to create a site-wide social image. While this solution might seem to offer a good outcome-to-effort ratio, one could argue this is worse than no image at all. Sure, we get some attention, but the reaction might be negative, especially if people see a lot of links to this website that all look the same. It risks feeling repetitive and unnecessary.
Level 2
The next level is standard in blogs and media sites: the social image of a post. Each post has its own featured image, and they differ from one post to another. This practice is totally legitimate for a news site, where the photo complements the page content. The potential drawback here is that it requires effort to find and create artwork for each and every published post.
That might lead to a bit of laziness. We’ve all been exposed to images that are obviously stock photos. It might get attention, but perhaps not the kind of attention you actually want.
Level 3
The final level: per-page, content-rich, meaningful social images. CSS-Tricks is doing just this. The team’s social images are branded. They share the same layout. They mention the post title, along with the author’s name and profile picture, something the regular title and description could not show. They grab attention and are memorable.
There is an obvious requirement with this approach: automation. It is out of question to create unique images for every possible link. Just think of the overhead. We’d need some programmatic solution to help with the heavy lifting.
Let’s start a blog with blog posts that have unique social images
To give ourselves a nice little excuse (and sandbox) to build out unique social images, we’ll put together a quick blog. When I write and publish an article to this blog, I follow a quick two-step process:
Write and publish the article
Post the published URL to my social network accounts
This is when social images must shine. We want to give our blog its best shot at being noticed. But that’s not our only goal. This blog should establish our personal brand. We want our friends, colleagues, and followers to remember us when they see our social posts. We want something that’s repeatable, recognizable, and representative of ourselves.
Creating a blog is a lot of work. Although automated social images are cool, it’s unwise to spend too much time on them. (Chris came to the same conclusion at the end of 2020). So, in the interest of efficiency, we’re making an Eleventy site. Eleventy is a simple static site generator. Instead of starting from scratch, let’s use one of the starter projects. In fact, let’s pick the first one, eleventy-base-blog.
Let’s create the repository, and set a repository name, description. We can make it public or private, it doesn’t matter.
Next, we clone our repository locally, install packages, and run the site:
git clone [your repo URL]
cd my-demo-blog ### Or whatever you named it
npm install
npm run serve
Our site running is running at http://localhost:8080.
Now let’s deploy it. Netlify makes this a super quick (and free!) task. (Oh, and spoiler alert: our social images automation relies on a Netlify Function.)
So, let’s go to Netlify and create an account, that is, if you don’t already have one. Either way, create a new site:
Go through the process of allowing Netlify to access the blog repository.
Netlify deploys our site:
After a minute or so, the blog is deployed:
One image template to rule them all
Our social images are going to be based on an image template. To design this template, we are going to use the technologies we already know and love: HTML and CSS. HTML doesn’t turn itself into images auto-magically, but there are tools for this, the most famous being headless Chrome with Puppeteer.
However, instead of building our social image stack ourselves, we use the Resoc Image Template Development Kit. So, from the project root we can run this in the terminal:
This command creates a new image template in the resoc-templates/default directory. It also opens up in a new browser window.
We could use this template as-is, but that only gets us to Level 2 on “impactful” spectrum. What we need to make this go all the way up to Level 3 and match the CSS-Tricks template is:
the page title aligned to the right with a bit of negative space on the left.
a footer at the bottom that contains a background gradient made from two colors we are going to use throughout the blog
the post author’s name and profile picture
If we head back to the browser, we can see in the Parameters panel of the template viewer that the template expects two parameters: a title and description. That’s just the template we chose when we ran -m title-description in the terminal as we set things up. But we can add more parameters by editing resoc-templates/default/resoc.manifest.json. Specifically, we can remove the second parameter to get:
{
"partials": {
"content": "./content.html.mustache",
"styles": "./styles.css.mustache"
},
"parameters": [
{
"name": "title",
"type": "text",
"demoValue": "A picture is worth a thousand words"
}
]
}
The viewer reflects the change in the browser:
It’s time to design the image itself, which we can do in resoc-templates/default/content.html.mustache:
That’s just regular HTML. Well, except {{ title }}. This is Mustache, the templating framework Resoc uses to inject parameter values into the template. We can even type some text in the “Title” field to see it working:
Looking at the previews, notice that we’re missing an image, profil-pic.jpg. Copy your best profile picture to resoc-templates/default/profil-pic.jpg:
It’s time to write the CSS in resoc-templates/default/styles.css.mustache. The point of this post isn’t how to style the template, but here’s what I ended up using:
Most of the sizes rely on vw and vh units to help anticipate the various contexts that the template might be rendered. We are going to follow Facebook’s recommndations, which are 1200×630. Twitter Cards, on the other hand, are sized differently. We could render images in a low resolution, like 600×315, but let’s go with 1200×630 so we we only need to work in pixels.
The viewer renders the Facebook preview at 1200×630 and scales it down to fit the screen. If the preview fulfills your expectations, so will the actual Open Graph images.
So far, the template matches our needs:
What about the image?
There is one little thing to add before we are done with the template. Some of our blog posts will have images, but not all of them. In situations where a post doesn’t have an image, it would be cool to use the image to fill the space on the left.
This is a new template parameter, so we need to update resoc-templates/default/resoc.manifest.json once again:
The new {{#sideImage}} ... {{/sideImage}} syntax is a Mustache section. It’s only present when the sideImage parameter is defined.
We need a little extra CSS to handle the image. Notice that we’re able to use the Mustache syntax here to inset the background-image value for a specific post. Here’s how I approached it in the resoc-templates/default/styles.css.mustache file:
Before we automate the social images, let’s generate one manually, just as a teaser. The viewer provides a command line to generate the corresponding image for our testing purposes:
Copy it, run it from a terminal and open output-image.jpg:
Social images automation
OK, so we created one image via the command line. What should we do now? Call it as many times as there are pages on our blog? This sounds like a boring task, and there is a deeper issue with this approach: time. Even if creating a single image took something like two seconds, we can multiply by the number of pages and we easily see the effort grow and grow.
The original Eleventy blog template is generated almost instantly, but we should wait about a minute for something as marginal as social images? This is not acceptable.
Instead of performing this task at build time, we are going to defer it, lazy style, with a Netlify Function and a Netlify on-demand builder. Actually, we aren’t actually dealing directly with a Netlify Function — an Eleventy plugin is going to handle this for us.
templatesDir is where we stored our image template. patchNetlifyToml is asking the plugin to configure @resoc/netlify-plugin-social-image in netlify.toml for us.
We want all our pages to have automated social images. So, let’s open the master template, _includes/layouts/base.njk, and add this near the top of the file:
{% set socialImageUrl %}
{%- resoc
template = "default",
slug = (title or metadata.title) | slug,
values = {
title: title or metadata.title,
sideImage: featuredImage
}
-%}
{% endset %}
This declares a new variable named socialImageUrl. The content of this variable is provided by the resoc short code, which takes three parameters:
The template is the sub directory of our template (it is in resoc-templates/default).
The slug is used to build the social image URL (e.g. /social-images/brand-new-post.jpg). We slug-ify the page title to provide a unique and sharable URL.
The values are the content, as defined in resoc-templates/default/resoc.manifest.json. title is obvious, because pages already have a title. sideImage is set to a meta named featuredImage, which we are going to define for illustrated pages.
Now we can open up _includes/layouts/base.njk, place our cursor in the <head>, add some new markup to populate all that stuff
<meta name="og:title" content="{{ title or metadata.title }}"/>
<meta name="og:description" content="{{ description or metadata.description }}"/>
<meta name="og:image" content="{{ socialImageUrl }}"/>
<meta name="og:image:width" content="1200"/>
<meta name="og:image:height" content="630"/>
The title and description markups are similar to the existing <title> and <meta name="description">. We’re using socialImageUrl as-is for the og:image meta. We also provide the social image dimensions to round things out.
Automated social images are ready!
Let’s deploy this
When we deploy the blog again, all pages will show the text-only version of our template. To see the full version , we assign an image to an existing page. that requires us to edit one of the posts — I created four posts and am editing the fourth one, posts/fourthpost.md — so there’s a featuredImage entry after the existing meta:
---
title: This is my fourth post.
description: This is a post on My Blog about touchpoints and circling wagons.
date: 2018-09-30
tags: second tag
layout: layouts/post.njk
featuredImage: https://resoc.io/assets/img/demo/photos/pexels-pixabay-459653.jpg
---
Using an external URL is enough here, but we normally drop images in an img directory with Eleventy and provide the base URL once and for all in _includes/layouts/base.njk.
Build the site again:
npm run build
When running git status, we might notice two modified files in addition to the ones we edited ourselves. In .gitignore, the plugin added resoc-image-data.json. This file stores our social image data used internally by the Netlify plugin, and netlify.toml now contains the Netlify plugin configuration.
Deploy time!
git commit -a -m "Automated social images"
git push
Netlify is notified and deploys the site. Once the latest version is online, share the homepage somewhere (e.g. Slack it to yourself or use the Facebook debugger). Here’s how the social card looks for the homepage, which does not contain an image:
And here’s how it looks for a post that does contain an image:
Perfect!
Conclusion
So far, automated social images have mostly been a matter of developers willing to explore and play around with lots of different ideas and approaches, some easy and some tough. We kept things relatively simple.
With a few lines of code, we were able to quickly setup automated social images on a blog based on Eleventy and hosted on Netlify. The part we spent the most time on was the image template, but that’s not a problem. With the viewer and Mustache already integrated, we focused on what we know, love, and value: web design.
Hopefully something like the Resoc image template dev kit and its related tools will help make the automated social images go from being a niche hobby into the mainstream.
Do you want to optimize your RSS feed in WordPress?
Every WordPress site has an RSS feed by default. You can optimize this feed to protect your content, send more traffic to your site, and more.
In this article, we’ll show you how to optimize and customize your RSS feeds the right way.
Why Optimize Your WordPress RSS Feeds?
RSS feeds offer a way for your readers to subscribe and read your blog posts in their favorite feed reader apps like Feedly.
Even though feed readers aren’t as popular as they once were, there are still many readers who prefer to read WordPress blog content this way.
By optimizing your RSS feed you can also prevent content scraping, get more backlinks, send traffic to your site, and more.
With that said, let’s get into our expert tips for optimizing your RSS feed.
1. Create an RSS Feed Sitemap
An RSS sitemap is different from an XML sitemap. RSS sitemaps only contain your most recent content, which helps Google to keep your content fresher in search results.
If you publish content frequently, then this can lead to a boost in your search engine rankings.
All in One SEO allows you to add an RSS sitemap to your website easily, without having to code.
Upon activation, you’ll be prompted to set up the plugin. You can follow the guided steps in the setup wizard, or see our guide on how to set up All in One SEO for WordPress.
AIOSEO enables RSS sitemaps automatically, so there’s nothing else you need to do.
If you’d like to double check, simply go to All in One SEO » Sitemap and then click on the ‘RSS Sitemap’ tab.
You can see that the ‘Enable Sitemap’ toggle in the ‘RSS Sitemap’ box is already enabled.
You can also set the number of posts and the post types you want to include in the ‘Sitemap Settings’ box.
We’ll leave the default settings, but you can include more posts or only include certain post types.
Before you leave the screen, make sure to click the ‘Save Changes’ button.
Now you’ve enabled your RSS sitemap for your website.
4. Show Excerpt Instead of Full Article in RSS Feed
Showing your full article in the RSS feed lets your users read the entire article in their feed reader. This can negatively affect your page views, advertising revenue, and conversion rates.
By showing the article summary instead of the full article in your RSS feed, you require readers to come to your WordPress website to read the full post.
WordPress comes with a built-in solution. Simply go to Settings » Reading in your WordPress admin dashboard.
Then, scroll down to the section titled ‘For each post in a feed, include’ and select the ‘Excerpt’ radio button.
You can also control the number of posts that display in your RSS feed as well.
In the ‘Syndication feeds show the most recent’ box, simply enter a number into the box.
Before you leave this screen, make sure to click the ‘Save Changes’ button to update your RSS feed settings.
5. Add a Featured Image to Posts in RSS Feed
By default, WordPress doesn’t add your post featured images to your RSS feed. When your users read your post in a feed reader, it’ll often pull the first image in your post.
Not all your users want to use a feed reader to subscribe to your posts. A lot of people will prefer to subscribe by email instead. That’s one reason why having an email newsletter is important.
To send RSS emails automatically, we recommend using Sendinblue. It’s a popular email marketing service provider that has a forever free plan to send up to 300 emails a day.
Once your email list is set up, you can automatically send RSS emails when you publish a new blog post.
9. Allow Users to Subscribe to Categories in RSS Feed
Each category on your WordPress site will automatically have its own RSS feed. If you run a massive blog with many diverse categories, then this lets your readers only subscribe to categories that interest them.
However, a lot of users don’t realize they can easily subscribe to specific categories. You can make this easier on your readers by highlighting this on your website.
This code checks if the custom field is being used and if the RSS feed is being displayed. After that, it will add the custom field data below the post content.
11. Delay Posts From Appearing in RSS Feed
Delaying posts from appearing in your RSS feed can save you from accidental publishing and can help you beat content scrapers, if that’s an issue you regularly face.
When you delay posts from appearing in your RSS feed, you give the search engines time to crawl and index your content before it appears elsewhere.
Plus, you can check for any typos before it gets sent out to RSS subscribers.
function publish_later_on_feed($where) {
global $wpdb;
if ( is_feed() ) {
// timestamp in WP-format
$now = gmdate('Y-m-d H:i:s');
// value for wait; + device
$wait = '10'; // integer
// http://dev.mysql.com/doc/refman/5.0/en/date-and-time-functions.html#function_timestampdiff
$device = 'MINUTE'; //MINUTE, HOUR, DAY, WEEK, MONTH, YEAR
// add SQL-sytax to default $where
$where .= " AND TIMESTAMPDIFF($device, $wpdb->posts.post_date_gmt, '$now') > $wait ";
}
return $where;
}
add_filter('posts_where', 'publish_later_on_feed');
This code will add a 10 minute delay before posts appear in your RSS feed. You can change it to your own needs by changing the 10 and MINUTE values.
12. Add Social Buttons to Your WordPress RSS Feeds
Most RSS feed readers don’t have social sharing features, or they’re not very noticeable. However, you can add your own social media icons to your RSS feed to encourage sharing.
First, you’ll need to create image icons for the social media networks you want to add. For this tutorial, we created images for Facebook and Twitter and uploaded them by going to Media » Add New.
After you upload your image files, you need to copy the ‘File URL’ and paste it into your favorite text editor to save it for the next step.
// add custom feed content
function wpb_add_feed_content($content) {
// Check if a feed is requested
if(is_feed()) {
// Encoding post link for sharing
$permalink_encoded = urlencode(get_permalink());
// Getting post title for the tweet
$post_title = get_the_title();
// Content you want to display below each post
// This is where we will add our icons
$content .= '<p>
<a href="http://www.facebook.com/sharer/sharer.php?u=' . $permalink_encoded . '" title="Share on Facebook"><img src="Facebook icon file url goes here" title="Share on Facebook" alt="Share on Facebook" width="64px" height="64px" /></a>
<a href="http://www.twitter.com/share?&text='. $post_title . '&url=' . $permalink_encoded . '" title="Share on Twitter"><img src="Facebook icon file url goes here" title="Share on Twitter" alt="Share on Twitter" width="64px" height="64px" /></a>
</p>';
}
return $content;
}
add_filter('the_excerpt_rss', 'wpb_add_feed_content');
add_filter('the_content', 'wpb_add_feed_content');
This code above will simply add the social sharing buttons for Twitter and Facebook. You need to replace the src= attribute in the image tag with your own image URLs that you pasted into your text editor earlier.
If you’ve optimized your RSS feed and are seeing errors, then see our guide on how to fix RSS feed errors.
Guo Wengui, a wealthy Chinese businessman in exile in the United States, once again became a defendant in the United States. Her former female assistant, Ma Rui, recently filed a lawsuit in New York, the United States, alleging that "Guo Wengui treated me like a sex slave" and raped him many times in the past few years. Therefore, she sued Guo Wengui and the company controlled by him for illegal detention and intentional harm.7 The crime requires a total of 140 million US dollars in compensation for mental and sexual injuries.
Guo Wengui responded on the Internet on the 12th, saying that Ma Rui's accusation against him was "a new rumor attack launched by the bandits out of fear." "Caixin.com" quoted the indictment report on the 12th that Ma Rui, a 28-year-old Chinese woman, filed a lawsuit in the Supreme Court of New York County, New York. Golden Springs (New York) Co., Ltd. controlled seven counts of illegal detention, intentional injury, etc., and required the court to rule that the defendant should compensate the plaintiff for mental injury and sexual assault, and the economic compensation for each crime should not be less than 20 million U.S. dollars (of which Six counts were directed against Guo Wengui himself, and one count was directed against Jinquan Company).
The indictment stated that Ma Rui was originally an employee of Guo Wengui's Chinese company and was required to travel to New York for a week after Guo Wengui fled the United States (early 2015). However, the plaintiff only returned to China nearly three years later, during which time he was raped several times in Guo Wengui's New York and London residences.
It is said that the moment Ma Rui entered the United States, he almost completely lost his personal freedom. Guo Wengui confiscated Ma Rui's passport and controlled her communication channels with the outside world. Without permission, she could not use the phone or computer. For several years, Marie could only talk to her parents on the phone with permission, and could no longer contact her relatives or friends.
The indictment revealed that Guo Wengui's first violence against Ma Rui was in his New York residence, but Ma Rui broke free. Later, Guo Wengui gave Ma Rui a drink, then broke into Ma Rui's bedroom and raped him. Later, Guo Wengui raped Ma Rui again in his London residence. So far, the plaintiff suffered tremendous physical and psychological harm and began to suffer from depression, but he also strengthened his determination to flee. While in London, Ma Rui finally found the opportunity to leave Guo Wengui's residence, enter the Chinese Embassy in the UK, and then return to China.
Recently, a recording of a conversation between Ma Rui and Guo Wengui, the female head of the London company, Wang Yanping, has also been circulating on the Internet. In the recording, Ma Rui clearly explained the process of his rape by Guo Wengui, including the deprivation of his virgin body by Guo Wengui and repeated rapes on Guo Wengui's yacht. Ma Rui emphasized that every time she was raped, she resisted fiercely, but she couldn't stop it. She once asked Guo Wengui that he was about the same age as his daughter, why did she treat her like this? Guo Ze said: "Don't think so much." Ma Rui hoped that Wang Yanping could help her. Wang Yanping asked Ma Rui not to call the police, and said that according to Guo Wengui's instructions, Ma Rui's passport had been cut.
Guo Wengui took the initiative to mention in his Twitter yesterday that the US media would report that Ma Rui accused him of rape, but called it "a new rumor attack by the bandits in fear." But Guo Wengui had insulted Huang in the video. Many women such as Yan, Fan Bingbing, Xu Qing, Dong Qing, Wang Fang, Yang Lan, etc., are all heinous in their absurdity, vulgar language, and malicious content. However, apart from individual declarations by women involved, no one took legal measures. Guo Wengui had to make an inch of it, ignoring the dignity of others time and time again, and blatantly challenged American laws.
Anyone who has done substantial work with MySQL has probably noticed how big data affects MySQL databases — most likely some partition nuances or a couple of items related to indexes. However, another important feature offered by MySQL for big data purposes is the ability to create temporary tables. In this blog post, we are going to go into more detail on this subject.
What Are Temporary Tables?
In MySQL, a temporary table is a special type of table that (you guessed it) holds temporary data. These kinds of tables are usually created automatically and are typically only considered when certain types of problems arise-for example, when ALTER TABLE statements are run on vast sets of data.