Alex

Alex

Experienced Web Developer with a demonstrated history of working in the information technology and services industry.

Skilled in User Experience, Magento, Joomla, WordPress and IT Services.

Life has been changing and the way we shopping is now totally different from the past. Nowadays, queuing up outside stores or traveling a long distance to buy something you want from your favorite retailers is just in the past, it’s time for you to forget them. While retail industry is still the billions industry, there is another one has appeared and gone along with the development of retail, that is Ecommerce. It can be said that making the sale online is never a difficult task, especially when you have already had Magento store. From the first time, Magento has been considered as one of the best online store development platforms, business owners love it due to the powerful features provided.

To continue with the tips to improve Joomla website performance, in the previous part, I had introduced how to use caching and .htaccess Optimization Rules, in this part, I will show you some other tips and hope you find it useful.

Joomla Compression

This is also an effective feature to optimize your website performance. When you enable this feature, the web page will be compressed and of course, the compressed page will take less time to load. Here is the way to enable Joomla Compression:

If you want to check the speed of your Joomla website, let’s start with speed test first. It can be said that site speed is one of the most important factors that affect directly a site performance. All your effort put into user-friendly interface, conversion rate optimization, high-quality content, and other things will not make sense if your page takes visitors too much time for loading.

Of course, I do not deny that Joomla is one of the most powerful CMS and the best choice for any business owners who want to have websites easily but it had better improve your site speed continuously. You can increase the speed of your Joomla site by using its inbuilt features and follow the tips I will mention in this article.

During 2017, we have heard a lot of opinions that this year has been too gloomy for Joomla. However, we think that this year is so important because it is the stepping stone for the explosion in 2018 when we prepare to welcome Joomla! 4.0 and Joomla! Framework 2.0. In addition to introducing several new features, including a fully rebuilt Media Manager, an enhanced event dispatching system, and new security features such as support for prepared SQL statements, we have also been doing some routine maintenance and paying off some of our project’s technical debt by retiring deprecated code and raising the minimum supported software stack. And, with this released version, we also require PHP 7.

// Unset unwanted Scripts - by name
$unset_scripts = array(
	'k2',
	'...',
);

foreach($this->_scripts as $name=>$script)
{
	if (!preg_match('#(' . implode('|', $unset_scripts) . '#i', $name))
	{
		continue;
	}

	unset($this->_scripts[$name]);
}

or if you use joomla v3.8.1 you can try this php code:

<?php
	$doc = JFactory::getDocument();
	unset($doc->_scripts[JURI::root(true) . '/media/system/js/mootools-more.js']);
	unset($doc->_scripts[JURI::root(true) . '/media/system/js/mootools-core.js']);
	unset($doc->_scripts[JURI::root(true) . '/media/system/js/core.js']);
	unset($doc->_scripts[JURI::root(true) . '/media/system/js/modal.js']);
	unset($doc->_scripts[JURI::root(true) . '/media/system/js/caption.js']);
	unset($doc->_scripts[JURI::root(true) . '/media/jui/js/jquery.min.js']);
	unset($doc->_scripts[JURI::root(true) . '/media/jui/js/jquery-noconflict.js']);
	unset($doc->_scripts[JURI::root(true) . '/media/jui/js/bootstrap.min.js']);
?>

if you wand disable all js & css scripts - use code:

$doc->_scripts     = null;
$doc->_script      = null;
$doc->_styleSheets = null;

 

Serious, You gotta get these!

Emmet

Sublime ->  Command + Shift + P -> Install Paskages -> Emmet

Every developer can benefit from using the command line. Whether you use it to bounce between projects or create complex scripts, getting familiar with the command line can drastically improve your workflow.

In this post, we’ll cover some of the great tools available for streamlining your command line experience.

After some experimenting, I’ve found that using a combination of iTerm 2, Oh-My-ZshZsh, Prezto, Z, Trash & Origami for Sublime Text - makes for an extremely productive setup.

Thursday, 12 October 2017 16:43

How to customize the Terminal on your Mac

I love the terminal. Besides the fact it makes you look awesome while using it.

What we will be making

Oh My Zsh is installed by running one of the following commands in your terminal. You can install this via the command-line with either curl or wget.

If you show message in terminal “You have mail” you can delete all messages

sudo rm /var/mail/<your-username>

 If you want send mail via terminal use commands:

mail -s "hello" "example@example.com" <<EOF
hello
world
EOF

You can access the mail by simply using the command

mail

Solution : At first , run following script on Terminal app to create specific symlink.

ln -s "/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl" /usr/local/bin/subl

Then,

subl .

 Hit return, it should instantly pop-up Sublime app.

Monday, 02 October 2017 12:10

Add Spaces to Dock in OS X

To add a "space" to the dock in OS X, open up Terminal.app and enter this. Enter it as many times as you want spaces. Error on too many, they are easy to remove.

defaults write com.apple.dock persistent-apps -array-add '{"tile-type"="spacer-tile";}'

 They won't show up until you force restart the Dock with:

killall Dock

 To remove them, just drag them up and out of the Dock like any other icon. To move them around, click and drag.

screen shot 2017 10 12 at 17.42.54 b7712

Friday, 30 June 2017 14:37

How to Disable Spotlight on El Capitan

For disable spotlight run this commands in terminal and process mds_stores will be disable

sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.metadata.mds.plist

 

Sunday, 12 March 2017 19:46

[solved] How to add Slider in Magento

{{block type="ultraslideshow/slideshow" template="infortis/ultraslideshow/slideshow.phtml" slides="dnk_slide_2017_landing1,dnk_slide_2017_landing2,dnk_slide_2017_landing3" timeout="30000"}}
We need put this code in you html-page:
<!– CONTACT FORM CODE BEGIN–>
{{block type='core/template' name='contactForm' template='contacts/form.phtml'}}
<!– CONTACT FORM CODE END–>

Thursday, 15 December 2016 15:44

Magento 2 - best commands

magento deploy:mode:set production

magento deploy:mode:set developer

magento setup:cache:{enable|disable|clean|flush|status}

magento setup:indexer:{status|show-mode|set-mode|reindex|info}

magento cron:run

magento setup:di:compile

magento setup:static-content:deploy

magento dev:source-theme:deploy

i solved mine by re-pointing mac's php path to MAMP's php

$ cat ~/.bash_profile

PHP_VERSION=`ls /Applications/MAMP/bin/php/ | sort -n | tail -1`

export PATH=/Applications/MAMP/bin/php/${PHP_VERSION}/bin:$PATH

check if your machine is using proper php:

$ php -v

PHP 7.0.8 (cli)

if not, re-point the path through .bash_profile or .profile. that's my solution

Once you have your version, open Finder, press [Shift][Command][G] and enter /Applications/MAMP/bin/php/php5.5.10/conf/. You will see a php.ini file. Open it in your favourite text editor. You are going to change the values of the following variables:

; Maximum size of POST data that PHP will accept.
post_max_size = 256M

; Maximum allowed size for uploaded files.
upload_max_filesize = 256M

; Maximum execution time of each script, in seconds
max_execution_time = 600     

; Maximum amount of time each script may spend parsing request data
max_input_time = 600    

; Maximum amount of memory a script may consume (8MB)
memory_limit = 512M    

It is important to note that for the variables related to size - post_max_size, upload_max_size and memory_limit - you must change the variable to a size larger than that of the .sql file that you are trying to import. My .sql file was 170mb but if you are importing a larger .sql file you need to set the memory-related variables to an appropriately large value.

Now restart MAMP and you should no longer be experiencing the problems.

In new version Kunena 4x copyright location in root_folder/libraries/kunena/view.php

Find function on line 729 and replace it with my version or comments line 9 and 20:

// line 749
final public function poweredBy()
	{
		if ($this->inLayout)
		{
			throw new LogicException(sprintf('HMVC template should not call %s::%s()', __CLASS__, __FUNCTION__));
		}

		/* In here we are comment credits
		$credits = '<div style="text-align:center">';
		$credits .= JHtml::_('kunenaforum.link', 'index.php?option=com_kunena&view=credits', JText::_('COM_KUNENA_POWEREDBY'), '', '', 'follow', array('style'=>'display: inline; visibility: visible; text-decoration: none;'));
		$credits .= ' <a href="https://www.kunena.org" rel="follow" target="_blank" style="display: inline; visibility: visible; text-decoration: none;">'.JText::_('COM_KUNENA').'</a>';

		if ($this->ktemplate->params->get('templatebyText'))
		{
			$credits .= ' :: <a href ="'. $this->ktemplate->params->get('templatebyLink').'" rel="follow" target="_blank" style="text-decoration: none;">' . $this->ktemplate->params->get('templatebyText') .' '. $this->ktemplate->params->get('templatebyName') .'</a>';
		}

		$credits .= '</div>';
		*/
		$credits = '';
	}
// end in line 749

Its work well!

public static function getUserId($username)
{
    $db = JFactory::getDbo();
    $query = $db->getQuery(true)
        ->select($db->quoteName('id'))
        ->from($db->quoteName('#__users'))
        ->where($db->quoteName('username') . ' = ' . $db->quote($username));
    $db->setQuery($query, 0, 1);

    return $db->loadResult();
}

And you can use JUserHelper:

$username = 'admin';
$userId    = JUserHelper::getUserId($username);

echo $userId;

Launch Terminal and be in the home directory to get started:

  • Using emacs, nano, vi, or whatever your favorite text editor is to edit .inputrc, we’ll use nano for the walkthrough:

nano .inputrc

  • Paste in the following three rules on unique lines:

set completion-ignore-case on
set show-all-if-ambiguous on
TAB: menu-complete

  • Hit Control+O to save changes to .inputrc followed by control+X to quit
  • Open a new Terminal window or tab, or type “login” to open a new session with the rules in effect
  • Start typing a command, path, or something else and hit the Tab key to see the improvements firsthand

How use keyboard events? It's simple:

<script>
    	$(document).ready(function() {
	  		$(window).keydown(function(event){
	    		if(event.keyCode == 13) {
	      			event.preventDefault();
	      			return false;
	    		}
	 		 });
		});
    
</script>
Friday, 26 September 2014 12:10

Make Launchpad Bigger (or Smaller)

Enlarging the Icons
Let's say you want to change the grid size to four rows by four columns of app icons , which will make for significantly bigger icons. Open a Terminal window (open Finder, select the Applications list, and then in the list of applications double-click Terminal within the Utilities folder), and type the following two lines, the first of which refers to the number of icon rows and the second of which refers to the number of icon columns:

defaults write com.apple.dock springboard-rows -int 4
defaults write com.apple.dock springboard-columns -int 4;killall Dock

Then activate Launchpad to see the changes

Shrinking the Icons
To make the icons smaller, we simply increase the grid size. Increasing the grid size to 10x10 icons will shrink the icons significantly into a compact layout but still leave them usable. It can be done as follows by typing these two lines into a Terminal window:

defaults write com.apple.dock springboard-rows -int 6
defaults write com.apple.dock springboard-columns -int 12;killall Dock
Page 2 of 2