Archives

Creating and Editing Menus

Video guide

 

d8f893bcebefb0323123e6d47b1f39f7.jpg

#The Menu Manager Layout.

*This article is about customizing your menu, not only main menu.

Explanation:

12f22196e4aa280b405b4720f5906738.jpg

#1 This is the area of PagesLinksHeader Title for your menu to add

#2 The Menu name, and Setting are for displaying your menu Horizontal or Vertical

#3 The Menu Structure settings, in this area, you can config the plugin or page enabled/disabled to users, change names, change order…etc

#4 Save Menu button after changes.

I/How to add a new page as an item in your menu:

fd72bad66f4c9e08ba7bb40316028609.jpg

#1 Check on the checkbox of the page you want to add.

#2 Press on Add to Menu.

#3 Press on Save Menu to finish.

On Front End, it will look like:

f009941c7e6520e1726a1fdd8bb7639f.jpg

#The page you added, now displayed in Main Menu

II/How to add link:

31b460b588101cb14817ed71be6b07dc.jpg

#1 Enter the URL that you wanted to lead users to.

#2 Enter the text for displaying on the menu

#3 Press on Add to Menu

#4 Save Menu.

At the Front-end, it will be like:

75c7c32c97e97b119edd3cc13721705c.jpg

#Link added now displaying at Main Menu.

When a user clicks on this, it will lead a user to URL you added.

III/How to add Header Title:

9ead0eb59c0c27d56beaca215584304f.jpg

#1 Enter the Header Title.

#2 Press on Add Header to Menu.

#3 Press Save Menu.

After finished, front-end will be displayed as:

89c7fff0de3ec6f07a0ad5edfa03280e.jpg

# The Header after added to Main Menu

IV/How to change menu order:

Simply just drag & drop the cards at Menu Structure, replace or moving these cards as the order you preferred.

An example, we decided to move Events at the end of the order to the 2nd position on Main Menu.

afb701c0b05adcbdf9d843394699a589.jpg

#Drag Event card and then drop it below Home card.

#Hit Save Menu button.

4ec208f763acbdb76fcad6d4e2de2bea.jpg

#After moved

And at Front-end, we have:

a9351e622eabfe03080c40ee74a0cd6d.jpg

# Events has been moved to 2nd position.

V/How to set Sub-Menu:

Just like moving menu, we drop & drag cards in Menu Structure to the position below others to make them as sub-menus for these cards.

Now, example, we set Events as a sub-menu for Home:

e65e5eb73fdbd992122978c04f578ed4.jpg

#Drag then Drop Events card to a position below Home and a little bit to the right to make it as Sub-Menu of Home.

078d54f91fdd83616862c10adab9c881.jpg

#The Events is now Sub-Menu of Home, you can see Events card now has the sub item next to it.

At the Front-End:

2d61df9a52fedfc1a1f6f1905a71aaf2.jpg

#Events now is a Sub-Menu of Home, when you point your mouse at Home, its submenu will fly out.

VI/How to customize your menu’s item:

You can start customizing your menu’s item by clickin’ on drop-down button of the card.

9a2273bc18500ea3ff550f00bf721612.jpg

#Click on drop-down button and the menu settings will show.

You can change the item name:

0085cdc4d3b82667c566c00d2a707d81.jpg

#At the Navigation Label, type in anything you want for displaying as the title for the item.

You can add Title Attribute to your item:

92371c4e3600ddfd0e4349345ca360c7.jpg

#Fill in your content to display as Title Attribute then Hit on Save Menu button.

At the Front-end we will see:

a4ea48f2cd9435938a7c3cede1f8da48.jpg

# The Title Attribute will display when you pointing your mouse at the item.

Font Awesome Class:

You can add Font Awesome to your menu’s items, just get the code icon from the link we provided.

da3c5d3a3d135462799dfb4282055843.jpg

#Click on the Font Awesome link.

At the Font Awesome site, click on any icon you like, after that:

5672a51b575c630860027618d1c1c169.jpg

#Copy the highlighted as above Font Awesome Class.

Now we’re about to add it to Font Awesome Class field:

c07f80f946912ff4e4df4adca6f4890c.jpg

#Add code to your Font Awesome Class field and hit Save Menu button.

What will happen at Front-end:

72677e292042605ffddd307e8f7c4090.jpg

#You can see the icon is added to Groups.

Enable/Disable item to users:

Example, we want to disable Groups.

80e7448d24c8053d55d828cd9d480745.jpg

#Switch to No at Active options and press Save Menu button.

All the users will not see Groups anymore at front-end.

eb3407a4f2975648b3b66998e5b93645.jpg

#The Groups is disabled to users, did not display on your menu.

Open in a new tab when clicked on item:

After enabled Open In New Tab, the item will open in a new tab after users clicked on it.

Example, we want the Groups open in new tab

3575fff4ee527642a628a49445e0f37e.jpg

#Enable Open in new tab and hit Save Menu button.

Making User Group Access:

You can make User Group Access, for simple, if you do not want Guests to access your Groups, remove the tick from Guest role.

1d04e4af9833ddb95b12a28693ab7d8b.jpg

#Remove the tick from Guest role and hit Save Menu button to make it performed its function.

Then, at the Front-end:

9c278d432b3be7fd644b4fedc41f06c6.jpg

#The unregistered users (Guests) cannot see Groups after you disabled user’s role Guest to access.

Remove your item out of the menu:

If you wanted to remove the item out of your menu, just press Remove button at the bottom of the item customizer.

cec3c1aba404d558ad22297de62fca18.jpg

#Press Remove button then Save Menu.

VII/Add new Menu:

Simply press on Add New Menu:

5dce48656e5415b90055c2cb38fc39e3.jpg

#Press on Add New Menu to begin

Then you have to fill in this New Menu’s name, Style Vertical or Horizontal

be8da5dc0ed5737ed45c1c82d5868aa1.jpg

#1/ Enter your new menu name.

#2/ Select your menu style.

#3/ Click on Create button.

To select menu for editing, you will have to select it from the drop-down list next to Add New Menu button.

cf9a876462a402f5461f49a38bc34b34.jpg

#Select your menu from drop-down list next to Add New Menu

Setting up Cronjob

How To Configure a Cron Job (cPanel)

Do you find yourself wasting hours on tedious and repetitive server administration tasks? If you answered yes, you’re going to love this article, which explores how cron and cPanel & WHM help you automate these boring but essential aspects of web hosting.

Cron is a time-based scheduler. It allows server administrators to run scripts known as cron jobs automatically at scheduled intervals. cPanel & WHM runs several essential server maintenance scripts in this way, and you or your users can schedule scripts too. You might, for example, configure a custom backup script to run at 7 a.m. each morning.

We’re going to look at some common uses of a cron, including how to schedule scripts, and how to add new jobs to automate server admin tasks.

Typical Uses of a Cron Job

Cron can run simple commands, shell scripts, and programs written in languages such as PHP, Python, and Perl. If a task can be completed on the command line or in a script, you can automate it with the task scheduler.

Cron job use-cases include:

  • Log rotation — rotate old logs to an archive at pre-set intervals to stop them from growing to an unmanageable size.
  • Emailing users — alert users when they’re approaching resource limits.
  • Triggering updates — schedule checks for security updates and apply them automatically.
  • Content management system and database backups — ensure you never forget to complete essential backups.

Configuring a Cron Job in cPanel

Cron uses a compact notation to represent times and days. A typical configuration line might look like this:

30 23 25 * * myscript.sh

The format has five white-space separated fields for time intervals followed by a command.

The schedule is stored in a “crontab” file, a list of jobs with additional directives. You can edit the file over SSH with the crontab command, but using cPanel & WHM is faster, easier, including two interfaces for scheduling jobs: one for cPanel’s maintenance scripts and one for user scripts, which we’ll take a look at in the next section.

Before we get to cPanel’s cron configuration interface, you should have a firm grasp of the interval notation.

The time fields represent the following, from left to right:

  • Minutes — a number between 0 and 59.
  • Hours — a number between 0 and 23. Cron uses the 24-hour format, so 4 p.m is 16, 11 p.m. is 23, and so on.
  • Days of the month — a number between 1 and 31.
  • Months — a number between 1 and 12.
  • Days of the week — a number between 0 and 7, with Sunday represented as either 0 or 7.

Fields with an asterisk indicate that the job will run at every relevant interval compatible with the other fields.

Our first example specified the time interval “30 23 25 * *”.  This is the 30th minute of the 23rd hour of the 25th day of the month. Or, to put it another way, 11:30 in the evening on the 25th of each month. Because the Month and Day of Week fields contain asterisks, the script runs on days and months for which the other fields are valid; in this case, every day and month.

Let’s look at some more complex examples. You have a monitoring script that you would like to run every hour, on the hour, between 9 a.m and 5 p.m., but only on weekdays. To achieve this, we have to introduce another piece of notation, the range.

00  9-17   *   *   1-5   myscript.sh

Ranges are values separated by a hyphen. The example breaks down as:

  • 00 — the first (or, more accurately, the zeroeth) minute of the hour.
  • 9-17 — each hour between 9 a.m and 5 p.m.
  • * — every day.
  • * — every month.
  • 1-5 — the first to the fifth day, so Monday to Friday.

What if, instead of every hour between 9 a.m. and 5 p.m, you wanted the script to run at 9 a.m, 12 p.m., 3 p.m., and 6 p.m on weekdays. For intervals of this type, you need one more piece of notation, the list.

00  9,12,15,18  *  *  1-5 myscript

This example is the same as the previous one, but with a list in the Hours field instead of a range.

The basics we have outlined here should cover almost every situation, but cron has an incredibly flexible notation with additional shortcuts and directives. If you want to learn more, take a look at this article or the man page on your CentOS server with the command “man 5 crontab.”

Configuring cPanel Cron Jobs in WHM

cPanel & WHM schedules several scripts, including the upcp update script, backup, and cpbackup. Server administrators can adjust when these scripts run in WHM.

Select Configure cPanel Cron Jobs in Server Configuration in the sidebar menu.

00-WHM-configure-cPanel-cron-jobs

 

For each script, you will see five boxes to enter the notation we described above. We have selected sensible defaults, but you can change them to your preferred times.

Configuring Cron Jobs in cPanel

In cPanel, select Cron Jobs in the Advanced section of the Main Page menu.

02-cPanel-Cron-Job-Interface

To simplify configuration, we include a drop-down menu with common settings such as Once Per Week or Once Per Month.

03-cpanel-cron-job-common-settings

If you don’t find a setting that fits your needs in the main drop-down menu, enter a time interval in the boxes on the left or use the menus on the right to select from typical entries for each period.

Finally, enter the command or the path to your script in the Command field and hit the “Add New Cron Job” button to save. Cron will run the script automatically at the intervals you selected.

Cron is a simple but powerful tool for automating mundane, repetitive and easily forgotten server administration tasks. The interval format can be confusing at first, but a few minutes of study will save you many hours of work in the future, especially if you combine your knowledge with cPanel and WHM’s quick and easy configuration tools.

Mailing Template & SMTP Mail Settings

This article is about mooSocial’s Mailing template and how to configure the mailing system.

I/How to configure your mailing system:

e1f0e8a038b49991e7e96b1fe43dcc2d.jpg

1. Enter your From Name, ex: mooSocial

Enter your “From Address”, email address that you want the emails from the system to come from.

2. Check on Send Through SMTP server. (If you intended to use built-in mail, skip this step)

SMTP Host: enter your Host.

SMTP Username: enter your SMTP server username. Ex: http://mail.socialloft.com

SMTP Password: enter your SMTP server password.

SMTP Port: enter your SMTP server’s port. Ex: 25

3. Email Queue, 2 options, Yes to enable email queue or No to send emails immediately.

4. Choose between TLS & SSL or none of them.

5. Input numbers of emails you want to send each time Background Mail Task is running.

Then click on Save Changes button below to save all the settings.

II/ Manage Mailing Template:

You can configure Mails content that will send to users. There are many templates of emails for cases or roles.

7bf4203800d37f4f85b4464f9eed1fbb.jpg

#Mail templates manager layout.

Let’s take a look at the Templates list:

6bbeafcc77f18720771fcc2945a6db62.jpg

#Templates.

Now we take example on Welcome Mail:

First, select Welcome at Choose Email field to config, this email template is used for sending to new Members signed up.

8800231e0eb99da8c1aba9747b8451c7.jpg

#1: Select Language for the template.

#2: Emails Templates.

#3: Description of the template.

#4: Subject of the Email Template.

#5: Message to users.

#6 Save Changes button.

*In #5: Message to users[header] and [footer] are templates, they will display in your emails sent to users, you can config them by selecting Choose Emails field.