The recent โฆ
- Emoji Image Creator CSS Border Image Tutorial โฆ is being followed up today by โฆ
- Emoji Image Creator CSS Background Image Tutorial
โฆ before we say โBIyeโ to the Emoji Image themed blog postings here.
As many users will know, emojis can be the graphically-challenged userโs ticket to โฆ
- personalization
- graphical and aesthetic appeal of webpages
- attracting attention to your content
โฆ that is much easier than learning the graphical expertise Photoshop and Gimp usage encourages. But too much emoji usage can look a bit predictable too, so we are not discouraging you from learning any of those graphical expertise skills.
Emojis are limited from a lot of CSS styling border and background image usage, but we can convert those Emojis into images here, which is the gist of what we are on about here on this blog posting thread.
In order to show a bit of background image work we sprinkle the webpage with four CSS styling examples of usage (ordered from the top to bottom and left to right) โฆ
<style>
- #hthree { background:linear-gradient(rgba(255,255,255,0.3),rgba(255,255,255,0.3)),URL([asBelow]); background-size:cover; background-repeat:no-repeat; }
- #thone { background:URL([asBelow]); background-repeat:no-repeat; }
- #thtwo { background:linear-gradient(rgba(255,255,255,0.3),rgba(255,255,255,0.3)),URL([asBelow]); background-repeat:repeat; }
- #result { background:linear-gradient(rgba(255,255,255,0.3),rgba(255,255,255,0.3)),URL([asBelow]); background-size:contain; background-repeat:no-repeat; }
</style>
โฆ and added dynamically because โฆ
- <style> CSS </style> is not restricted to just <head></head> but can also work within <body></body> โฆ and โฆ
- for that <body>[document.body.innerHTML]</body> usage Javascript (DOM, within document.body.innerHTML) can dynamically add the CSS styling at a time of the programmerโs choosing
And so yet again, here is ourchanged PHP emoji_imagephp live
run for you to take up both the Border Emoji Image CSS Challenge and, now, Background Emoji Image CSS Challenge!
Did you know?
Thanks to this wonderful link we were able to get around our โmobile platforms not showing our (independently tested that whitespace cropping was occurring whether in png format or in jpeg format) image CSS border image applicationsโ issue by changing the CSS โฆ
From (suits non-mobile) | To (better suiting mobile) |
---|---|
#borderimg1 { border: 20px solid transparent; } |
#borderimg1 { border: 20px solid white; } |
#borderimg2 { border: 20px solid transparent; } |
#borderimg2 { border: 20px solid white; } |
Previous relevant Emoji Image Creator CSS Border Image Tutorial is shown below.
Before building on the recent Emoji Image Creator Share Tutorial with progress (of a meaningful quality) regarding โฆ
- CSS Border Images (made from data-uri data of these recent Emoji Images) โฆ we had to โcrackโ โthe ol'โ โฆ
- automating the cropping of bottom and right whitespace
โฆ because you will find only the top border image bits โfilled outโ if the imagery in the CSS โborder-image:URL([data-uri data of these recent Emoji Images]);โ has a lopsided whitespace feel to it. PHP can easily do this out of the box from PHP 5.5 onwards via its GD library imagecropauto function. Alas, up at the RJM Programming domain we are on PHP 5.4 and so ended up being helped out enormously by the brilliant ideas on this wonderful link, thanks.
Okay, so we can arrive at a whitespace cropped Emoji Image data uri, what then? Well, we recommend you read โฆ
- border image โฆ and off that, most importantly, perhaps โฆ
- border-image-slice property
โฆ and we display a couple of examples of uses of Border Images using the resultant Emoji Image data uri you create.
So, are you ready for the challenge? Yet again, here is ourchanged PHP emoji_imagephp live
run for you to take up that Border Emoji Image CSS Challenge!
Previous relevant Emoji Image Creator Share Tutorial is shown below.
We have a couple of โonions of the 4th dimensionโ amendments to yesterdayโs Emoji Image Creator Primer Tutorial โฆ
- the display format scope of the Emoji Image Creator โpaletteโ (โshall we say now โฆ eh wot โguvโ) extends from single line of entry to be able to handle multiple lines of entry โฆ and Emojis being text that means either โฆ
- div contenteditable=true โฆ but we have plumped for โฆ
- textarea
โฆ means by which to make this
thangthing happenmanperson - the sharing scope of the Emoji Image Creator goes from โkeeping everything to yourselfโ to โsharing via Email (email client or Inline HTML Email) or SMSโ
โฆ your Emoji Image creations. And โฆ
โฆ here? โฆ or am I missing something? Canโt be โฆ Iโm writing this.
Glad thatโs over!
And back to matters at hand, how do we handle that โrequireโ attribute weโd placed on yesterdayโs lonesome textbox? Well, we get around that by setting an empty textbox to a space should the user only enter Emoji data in that new textarea (that circumvents the โrequireโ attribute validation restriction), and deploy logic that takes into account PHP variables where โฆ
<?php
$gei="";
if (isset($_GET['emoji_textarea_image'])) {
$gei=str_replace("+"," ",urldecode($_GET['emoji_textarea_image']));
}
if (trim($gei) != "" || isset($_GET['emoji_image'])) {
if (trim($gei) == "") {
$gei=str_replace("+"," ",urldecode($_GET['emoji_image']));
} else if (isset($_GET['emoji_image'])) {
$pregei=str_replace("+"," ",urldecode($_GET['emoji_image']));
if (trim($pregei) != "") {
$pregei.="\n\n" . $gei;
$gei=$pregei;
}
}
file_put_contents('emoji_image.txt', str_replace(";","",str_replace("&#","",str_replace(";&#",".",$gei))) );
// more logic follows to continue the work below ...
}
?>
โฆ PHP function trim comes to our aid, as it so often does in โPHP landโ (or as String.trim() does in โJavascript landโ) with backward compatibility for dual purpose scenarios.
And again, here is ourchanged PHP emoji_imagephp live
run for you to retry, and perhaps, share!
Previous relevant Emoji Image Creator Primer Tutorial is shown below.
Weโve long eyed up the wish to have emojis (which you need to know are text (and this very fact is the reason for this whole project)) be involved with a border image or background image or just with some image in work developing web applications. And so we joined forces with (and thanks to) โฆ
โฆ along with โฆ
- textbox reachable โEmoji and Symbolsโ menu to include Emoji characters (though we also accept Emoji CodePoint(s) too)
- Copy and Paste technologies โฆ
- Copy (Image) from Google PageSpeed
- Paste to HTML div contenteditable=true via Stack Overflow and jQuery
- your own desktop Image Editors โฆ for example โฆ
- Gimp can Crop and Resize and Select to new Image via Copy then Paste
- Preview and Paintbrush (here on macOS) can Resize and Select to new Image via Copy then Paste
โฆ can help remove any extraneous whitespace coming off the Google PageSpeed Copy image
With all this help coming our way youโd think we might get away just using HTML and Javascript, but no, we need PHP, we figure, using a web browser file to toggle between web application executions that have no arguments as either โฆ
- it means we display our inhouse interactive entry mode of use when that file does not exist โฆ whereas โฆ
- we arrange it so that it is a call from Google PageSpeed when that file exists (as we morph inhouse content into a single p element containing the Emojis in such a scenario) as Google PageSpeed takes its
screenwebpageshot
So here is our PHP emoji_imagephp live
run โฆ
If this was interesting you may be interested in this too.
If this was interesting you may be interested in this too.
If this was interesting you may be interested in this too.
If this was interesting you may be interested in this too.