What?
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.

What I have:
A CSV file exported from Excel along with double-quotes
copyraw
label1,label2
item1a,item2a
item1c,"item2c,c"
item1b,item2b
  1.  label1,label2 
  2.  item1a,item2a 
  3.  item1c,"item2c,c" 
  4.  item1b,item2b 

What I want:
To read the file (stored on the server) and convert to a JavaScript array of objects
copyraw
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' }
];
  1.  var my_object_array = [ 
  2.       { my_col1_val: 'item1a', my_col2_val: 'item2a' }, 
  3.       { my_col1_val: 'item1b', my_col2_val: 'item2b' }, 
  4.       { my_col1_val: 'item1c', my_col2_val: 'item2c,c' } 
  5.  ]
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?
Category: Excel :: Article: 635

What?
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:
  1. Sort the array by its values
    copyraw
    my_records.sort();
    1.  my_records.sort()
  2. Iterate through and output these in HTML
    copyraw
    for(i=0;i<my_records.length;i++){
            // do something to my_records[i]
    }
    1.  for(i=0;i<my_records.length;i++){ 
    2.          // do something to my_records[i] 
    3.  } 

Category: JavaScript :: Article: 632

What?
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:

What?
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:

What?
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:
  1. Backups
  2. Install
  3. Users
  4. Categories -- unstable
  5. Content
  6. Weblinks
  7. 3rd-party: JComments


What?
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:
    copyraw
    <link rel="stylesheet" href="/path/to/font-awesome/css/font-awesome.min.css">
    1.  <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
    copyraw
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css">
    1.  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css"> 
You then add the icon to your webpage using a CSS reference:
copyraw
<i class="fa fa-facebook-square"></i> My facebook social icon
  1.  <i class="fa fa-facebook-square"></i> My facebook social icon 
Further 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).
Category: Web-Development :: Article: 610

What?
So I'm getting an error like this:
The requested page can't be found.
An error has occurred while processing your request.

You may not be able to visit this page because of:
- an out-of-date bookmark/favourite
- a mistyped address
- a search engine that has an out-of-date listing for this site
- you have no access to this page

If difficulties persist, please contact the System Administrator of this site and report the error below.
404 Component not found.
Just because I'm doing something like this:
Joomla SEF 404 Error

How?

Applies to:
  • TravelPort Universal API
  • PHP 4 or 5
  • cURL
What?
An article on how to resolve errors and setup a standard ping request using the TravelPort Universal API. This is to be achieved using PHP as the server-side programming language and cURL, a sub-component of PHP that allows you to send and receive requests as the server (as opposed to the client device).

Why?
Yes there's documentation online that TravelPort provide you with but it didn't help. The error I'm going to address has to do with getting the latest schemas but as I couldn't find anything using Google regarding these errors or how to set up a basic ping request, I thought I'd write this article.

How?
Using PHP and cURL, here is the full script for a standard ping request. Before you say it doesn't work, it has to be updated every time a new schema is introduced to the system. See my errors section for how you can resolve this.

Previously titled
Fix PHP cURL: parser error: Document labelled UTF-16 but has UTF-8 content

What?
This is an article with notes for me on how to convert some received XML encoded in UTF-16 to some JSON in UTF-8. If it were entirely in UTF-8, I would simply load the received XML with SimpleXML and use the built-in PHP JSON_encode function. I ran into the following errors:
Warning: SimpleXMLElement::__construct() [<a href='simplexmlelement.--construct'>simplexmlelement.--construct</a>]: Entity: line 1: parser error : Document labelled UTF-16 but has UTF-8 content in /public_html/.../.../my_script.php on line ###

Warning: simplexml_load_string() [<a href='function.simplexml-load-string'>function.simplexml-load-string</a>]: Entity: line 1: parser error : Document labelled UTF-16 but has UTF-8 content in /public_html/.../.../my_script.php on line ###
Why?
So I've googled, binged and yahoo'd for this and although there are some solutions that deal with loading UTF16 content into SimpleXMLElement or simplexml_load_string, it doesn't solve my problem. I'm receiving XML data within a cURL result but I get the above error with using either "SimpleXMLElement" or "simplexml_load_string". Returning the XML with cURL isn't a problem, but I want to convert it to JSON and I usually use a PHP function to load the data into an XML array and use the built-in PHP function: "json_encode".

How?

What?
A quick article for Joomla CMS version 3.x on resolving a menu item alias conflict:
Menu Item has the same alias
Warning
Save failed with the following error. Another menu item has the same alias in Root. Root is the top level parent

You will need:
  • Access to the Joomla Administration Panel (to check for and remove expired menu items)
  • A good database administrator who is comfortable with making changes to the database

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

RSS Feed

Related Articles

Joes Revolver Map

Joes Word Cloud

display   following   database   first   files   creator   version   zoho   license   case   using   google   joomla   deluge   uploaded   order   data   file   need   table   parameter   function   added   work   client   where   report   name   source   time   script   find   date   code   user   would   system   value   page   field   list   note   mysql   server   form   windows   website   create   error   used   JoelLipman.Com

Accreditation

Badge - Certified Zoho Creator Associate
Badge - Certified Zoho Creator Associate

Donate & Support

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

Paypal:
Donate to Joel Lipman via PayPal

Bitcoin:
Donate to Joel Lipman with Bitcoin bc1qf6elrdxc968h0k673l2djc9wrpazhqtxw8qqp4

Ethereum:
Donate to Joel Lipman with Ethereum 0xb038962F3809b425D661EF5D22294Cf45E02FebF
© 2024 Joel Lipman .com. All Rights Reserved.