Foreign Characters create symbols in PHP and MySQL
- Category: Personal Home Page
- Hits: 18527
- PHP 5.4
- MySQL 5.1.4
- Databases initially setup with collation 'latin1_swedish_ci'
What
Another article trying to help people display foreign characters on their website without the funny question marks in diamond symbols and how I solved it in my case.
Protecting your Joomla Administrator Section
- Category: Joomla
- Hits: 16811
This is a quick article to remind me how to move a Joomla administration section and to lock it down to a specific IP address. The below does not involve installing any third-party extensions and will remain in place even if you update your Joomla CMS.
Why?
When checking audit logs, I sometimes see that my administrator url is accessed more than my front-end. The below has worked for me on Joomla websites in general and prevents the administrator URL showing up at all in the stats (unless you were using it).
Leaving this unchecked means that the crackers/hackers will get through ultimately whether it be by brute-force, DoS, Injection, etc. I'm not saying these are silver bullets, but they will slow down some people.
How?
The below will a) change the /administrator location and b) limit access to a single IP address. Note that you will need to ensure you have a static IP (most ISPs now assign static IPs to home broadband users as well as larger corporations). But just in case you don't have one, let me do this in two stages.
Import Excel CSV file as JavaScript array
- Category: Excel
- Hits: 16193
A CSV file exported from Excel along with double-quotes
label1,label2 item1a,item2a item1c,"item2c,c" item1b,item2b
What I want:
To read the file (stored on the server) and convert to a JavaScript array of objects
var my_object_array = [ { my_col1_val: 'item1a', my_col2_val: 'item2a' }, { my_col1_val: 'item1b', my_col2_val: 'item2b' }, { my_col1_val: 'item1c', my_col2_val: 'item2c,c' } ];What I want again:
- Read a CSV file already uploaded with JavaScript
- Populate a JS array with each row
- Account for strings containing double-quotes (and commas to ignore)
- Sort the resulting object array
How?
Sort an associative array by values in Javascript
- Category: JavaScript
- Hits: 16641
An article on how to quickly adapt an array code and sort by its values. Surprising how many examples are on the web and everyone saying you're doing it wrong... Which is true but quite unhelpful. The original code is not my own either but that's not an excuse. I also found that examples across the web were only partial and thought I'd write a full example here. No jQuery and using the Google Chrome browser. I wanted to:
- Sort the array by its values
my_records.sort();
- Iterate through and output these in HTML
for(i=0;i<my_records.length;i++){ // do something to my_records[i] }
SELECT COUNT(DISTINCT name) FROM table
- Category: Joomla
- Hits: 10517
A quick article to remind me about this issue. Not sure whether it is specific to the Joomla Content Management System, but within the Joomla! CMS, an error 1054 comes up if you use the above statement.
Why?
The MySQL statement SELECT COUNT(DISTINCT name) FROM table is valid but I get what you mean and it's sometimes difficult to explain why you want to use it.
How?
Method #1: Add an alias to the field:
VBScript to retrieve Windows Product Key
- Category: Windows OS
- Hits: 10338
A quick article with the code to retrieve your product key in Windows 7 with a small VB script file. There are other articles on the web about this but the ones I found returned errors such as WshShell not valid. This article has a working example applicable to Windows 7 Professional.
Why?
With the Windows 10 operating system offered as a free upgrade (for Windows 7 or later at time of print), I needed the serial number / product key from my Windows 7 Professional 32-bit operating system. I didn't want to dig through my CD/DVDs to find my original windows 7 disc and no longer have access to the email account when I purchased Windows 7 (my university one).
How?
I'm going to use my trusty notepad program, copy the following code to it, and run it:
Migrating from Joomla 2.5.x to 3.4.x
- Category: Joomla
- Hits: 36694
This is an article to document the migration of a Joomla! CMS running version 2.5.11 to an instance of Joomla! CMS version 3.4.1. I would consider the below instructions an ALPHA version as it is considered unstable for official use... Saying that this is how I upgraded my own personal website: www.joellipman.com.
This article assumes you are familiar with upgrading a Joomla! CMS and running MySQL statements against your database.
For the purposes of this article, we will refer to the live/current/production website running Joomla v2.5 as "v25" and the new Joomla instance as "v34". Their respective database tables are prefixed with "v25_" and "v34_". So an example MySQL statement will be:
`v25_db`.`v25_tablename` -- with the database name and table prefix of database you are READING from (eg. `myuser_joellipmancom_mysitedb`.`lkdjf_content`) `v34_db`.`v34_tablename` -- with the database name and table prefix of database you are WRITING to (eg. `myuser_joellipmancom_mysitedb`.`ejf1r_content`)
How?
Here's a brief outline of the whole process:
- Backups
- Install
- Users
- Categories -- unstable
- Content
- Weblinks
- 3rd-party: JComments
List of Font Awesome
- Category: Web-Development
- Hits: 11588
I needed to use these in a template I was working on. Font awesome is a brilliant tool for webdevelopers who want icons that can be any size of any color without compromising on image quality or overhead maintenance. It's basically a font set that has all the icons you would want in a modern website design.
How?
To use this list, you can either:
- Copy the font files to your template folder (my preference) and add the linked stylesheet in the head section of your webpage. I'm selective of what icons I copy over but the full directory can be found at https://github.com/FortAwesome/Font-Awesome:
<link rel="stylesheet" href="/path/to/font-awesome/css/font-awesome.min.css">
- OR add the linked stylesheet to the head section of your webpage
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css">
<i class="fa fa-facebook-square"></i> My facebook social iconFurther examples are on the following site at https://fortawesome.github.io/Font-Awesome/examples/.
The List
This is a copy of the cheat sheet version 4.4. If some icons don't appear on this page, it is because I have only copied over some of the entire directory (the icons I want to use).
Page 31 of 73
Credit where Credit is Due:
Feel free to copy, redistribute and share this information. All that we ask is that you attribute credit and possibly even a link back to this website as it really helps in our search engine rankings.
Disclaimer: Please note that the information provided on this website is intended for informational purposes only and does not represent a warranty. The opinions expressed are those of the author only. We recommend testing any solutions in a development environment before implementing them in production. The articles are based on our good faith efforts and were current at the time of writing, reflecting our practical experience in a commercial setting.
Thank you for visiting and, as always, we hope this website was of some use to you!
Kind Regards,
Joel Lipman
www.joellipman.com
Latest Articles
Accreditation



Donate & Support
If you like my content, and would like to support this sharing site, feel free to donate using a method below:

bc1qf6elrdxc968h0k673l2djc9wrpazhqtxw8qqp4
0xb038962F3809b425D661EF5D22294Cf45E02FebF
Paypal:

Bitcoin:

Ethereum:
