Configure Mail Settings in Web.Config

If you have a contact form that sends messages to email accounts, there is some extra configuration that you have to make so that it can work. In this article I will give give you a step-by-step guide on how to configure mail settings in Web.Config:

1. Open your ASP.Net project.

2. Then open the Web.Config file of your project:

webconfig-open-asp-tutorials

3. We are going to use three tag elements:

The <system.net> element which contains the specifics on how the .net framework connect to the network.

The <mailSettings> element lets you configure mail sending options.

The <smtp> element lets you configure the delivery method and the email address.

4. Look for the <configuration> section:

configuration-tag-webconfig-arvixe-asp-hosting

5. Add this code in the web.config file:

===================

<system.net>
<mailSettings>
<smtp from=”emailaccount@exampleemail.com”>
<network host=”smtp.exampleemail.com”
port=”25″
userName=”emailaccount@exampleemail.com”
password=”emailpassword”
enablessl=”false”/>
</smtp>
</mailSettings>
</system.net>

===================

6. Save your changes and that’s it! The email has been configured!

This concludes Configure Mail Settings in Web.Config 🙂

Cloning your Joomla website with Softaculous

Sometimes it is necessary to test new functions on your Joomla website, and it is a bit tedious, it could have complications and damage the website. Therefore in this article I’ll show how to create a clone of your Joomla website using Softaculous. Follow these steps: –

  1. Log into your cPanel. and go to the section “Software and Services”, click on “Softaculous”: –

softaculous

2. Being inside Softaculous, in the left menu click Portals / CMS -> Joomla:

click-joomla-Cloning-your-Joomla-website-with-Softaculous

3. Then it will show the different options you can do with Joomla using Softaculous, the bottom it shows the current installations. To start the process of cloning / duplicate your joomla website, click on the icon of cloning:

clone-icon-Cloning-your-Joomla-website-with-Softaculous

4. In the form of cloning, it displays information about the web page you want to clone. Enter the clone installation details that will have the cloned website:

edit-settings-Cloning-your-Joomla-website-with-Softaculous

And that is! With the help of Softaculous duplicate a website Joomla is very easy.

Looking for Joomla webhosting. Check here

How to improve your WordPress skills with Javascript

WordPress is evolving every day, well every update to be fair, but how can you step ahead of it and make it useful?

According to Matt Mulleweg, WordPress founder, “You need to learn Javascript, and fast.”

So, you need to learn JavaScript if you want to build WordPress themes, or WordPress plugins. Besides it will give you more knowledge to make better websites.

But how to learn JavaScript?
Let me list some of the greatest sites to do it.

JavaScript For Cats –

Eloquent JavaScript –

How To Learn JavaScript Properly –

CodeAcademy –

W3Schools –

 

There are tons of sites for you add to the list, the time you spend will help you understand the new “technologies” that will be use in the next releases of WordPress later this year.

Looking for WordPress Hosting. Checkout here

Mistakes to avoid in PrestaShop Development

PrestaShop development is a bit difficult to handle. The software’s architecture requires a few good practices that are often ignored, making bug fixing an even more troublesome process for developers. In this article, we will see which are the most common mistakes you can make when developing for PrestaShop, and how to avoid them.

1. You don’t keep PS_DEV_MODE enabled

On your dev sites, always keep development mode. If you don’t know how to, just reach outconfig/defines.inc.php, locate define(‘_PS_MODE_DEV_’, false) and set it to true. If you need to test out performance, you might want to turn on _PS_DEBUG_PROFILING_ as well

2. Not enough testing

It’s obvious, but again often overlooked. Always make sure you test your modules on all the PrestaShop versions you want it to work with.. Test it not only locally, but online as well. If it involves category pages, make sure it works and it’s compatible with the Layered Navigation module. Also, try to have as many standard modules installed as you can, when you run your tests; this ensures your addon is compatible with at least the basic functionalities of the software.

3. Core files modification

I will never stress this highly enough: do not ever apply your modifications directly to core files (unless it’s impossible to do otherwise). Always use overrides, since it’s easier to point out a modification added with this method, rather than having to scrub through all the original files.

4. Not enough comments

Even if you use overrides, make sure you point out which part of the code you amended. I often found myself lost in overridden methods, since they were an almost identical copy of the original, with the tiniest modification to a single sql query, without anything pointing it out.

5. Breaking the MVC pattern

If you need to query the database, always use a class. It’s bad practice to run queries directly from controllers, so make sure you always use them exclusively to bind a class to a view. You will have to create another file, but the result is going to be cleaner and easier to maintain. For example, if you need you get a list of entries from your module’s table, you might want to have a class included in your controller with require_once at the very beginning of it. Alternatively, you can always access the module’s core file’s methods from any controller, using $this->module.

6. Including CSS and Javascript in templates

PrestaShop has two methods for inclusing Javascript and CSS: AddCSS and AddJS (please refer to: Essential Prestashop Functions). It’s not advised to use «style» tags directly within templates. You can use script tags, but only if it’s strictly necessary.

7. Too much Javascript

The modern web is full of fancy animations and pretty things that make a page render nice to the viewer, but also slower. Make sure you do not over-rely on javascript for page rendering. I have come across templates that could not be used at all without Javascript, and this is potentially harmful to any shop. Consider this: a single javascript error can kill the whole website’s accessibility. For this reason, always make sure your addon/theme runs fine without Javascript (just disable it from any browser console and test)

8. No indentation indentation/formatting

Try to format your code a bit. It’s not necessary to slavishly follow the standards PrestaShop requires to validate a module for the addons store, if you are selling it on your site. However, it’s a lot easier for us other developers to read your code, if it has a decent formatting.

9. Extensive usage of custom code for the back office

PrestaShop has tons of helpers for the back office, it’s better to rely on those instead of writing huge blocks of code with custom styling. It’s always better to output things with a template, whenever possible, and in any case use the standard css classes/boxes even when outputting directly from PHP.

You can check more about prestashop development you can http://nemops.com/prestashop-modules-course/

Allow users to access specific locations in ASP

We will discuss on how we can allow specific users to access from specific locations.

Some projects require to set permissions to access specific locations within your project.  In this article I will show you in a step-by-step guide how to restrict access to users in ASP.Net

  1. Open your ASP project

2. In the file explorer, open the web.config file of your project and find the <System> tag.

open-webconfig-Allow-users-to-access-specific-locations-in-ASP

3. Add the <location path = -> tag with the specific file. Then, add the users that will have access to the location specified

edit-code-Allow-users-to-access-specific-locations-in-ASP

====================

<location path=”MonthlyReports.aspx”>
<system.web>
<authorization>
<deny users=”?” />
<allow users=”Reports\user2, Reports\user3, Reports\userChief” />
<deny users=”*” />
</authorization>
</system.web>
</location>

====================

4. The code above specifies the users who have access to the specified location. This is important when projects are large and are developed by different users. It is important to establish the type of authentication, in this code that I’ve used is authentication mode to Windows.

5. And that’s it! You are done in defining access to users. 🙂