زکات علم

زَکاةُ العِلمِ أن تُعَلِّمَهُ عِبادَ اللّه‏ِ امام باقر (ع)
زکات علم

مطالبی در زمینه کامپیوتر و علاقه مندی های شخصی من مطالب این وبلاگ غالبا مطالبی ست که در جای جای اینترنت کتاب یا دانشته های شخصی خودم می باشد که به عنوان مرجعی برای رجوع دوباره در اینجا جمع آوری شده اند .
ehsunitd.ir personal website

پیوندها

1. Add constant to wp-confing.php

define('WP_ADMIN_DIR', 'secret-folder');
define( 'ADMIN_COOKIE_PATH', SITECOOKIEPATH . WP_ADMIN_DIR);

2. Add below filter to functions.php

add_filter('site_url',  'wpadmin_filter', 10, 3);
 function wpadmin_filter( $url, $path, $orig_scheme ) {
  $old  = array( "/(wp-admin)/");
  $admin_dir = WP_ADMIN_DIR;
  $new  = array($admin_dir);
  return preg_replace( $old, $new, $url, 1);
 }

3. Add below line to .htaccess file
RewriteRule ^secret-folder/(.*) wp-admin/$1?%{QUERY_STRING} [L]

Done...!!!

Now your admin URL will be like: http://www.yourdomain.com/secret-folder/

  • ehsan gholami

Child Theme

A child theme is a theme that inherits the functionality and styling of another theme, called the parent theme. Child themes are the recommended way of modifying an existing theme.


There are a few reasons why you would want to use a child theme:Why use a Child Theme?

  • If you modify a theme directly and it is updated, then your modifications may be lost. By using a child theme you will ensure that your modifications are preserved.
  • Using a child theme can speed up development time.
  • Using a child theme is a great way to to learn about WordPress theme development.

How to Create a Child Theme

Child Theme directory structure

A child theme consists of at least one directory (the child theme directory) and two files (style.css and functions.php), which you will need to create:

  • The child theme directory
  • style.css
  • functions.php

The first step in creating a child theme is to create the child theme directory, which will be placed inwp-content/themes. It is recommended (though not required, especially if you're creating a theme for public use) that the name of your child theme directory is appended with '-child'. You will also want to make sure that there are no spaces in your child theme directory name, which may result in errors. In the screenshot above we have called our child theme 'twentyfifteen-child', indicating that the parent theme is the Twenty Fifteen theme.

The next step is to create your child theme's stylesheet (style.css). The stylesheet must begin with the following (the stylesheet header):

/*
 Theme Name:   Twenty Fifteen Child
 Theme URI:    http://example.com/twenty-fifteen-child/
 Description:  Twenty Fifteen Child Theme
 Author:       John Doe
 Author URI:   http://example.com
 Template:     twentyfifteen
 Version:      1.0.0
 License:      GNU General Public License v2 or later
 License URI:  http://www.gnu.org/licenses/gpl-2.0.html
 Tags:         light, dark, two-columns, right-sidebar, responsive-layout, accessibility-ready
 Text Domain:  twenty-fifteen-child
*/

A couple things to note:

  • You will need to replace the example text with the details relevant to your theme.
  • The Template line corresponds to the directory name of the parent theme. The parent theme in our example is the Twenty Fifteen theme, so the Template will be twentyfifteen. You may be working with a different theme, so adjust accordingly.
  • The only required child theme file is style.css, but functions.php is necessary to enqueue styles correctly (below).

The final step is to enqueue the parent and child theme stylesheets. Note that the previous method was to import the parent theme stylesheet using @import: this is no longer best practice. The correct method of enqueuing the parent theme stylesheet is to usewp_enqueue_script() in your child theme's functions.php. You will therefore need to create a functions.php in your child theme directory. The first line of your child theme's functions.php will be an opening PHP tag (<?php), after which you can enqueue your parent and child theme stylesheets. The following example function will only work if your Parent Theme uses only one main style.css to hold all of the css. If your theme has more than one .css file (eg. ie.css, style.css, main.css) then you will have to make sure to maintain all of the Parent Theme dependencies. Setting 'parent-style' as a dependency will ensure that the child theme stylesheet loads after it. See here a more detailed discussion :

add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' );
function theme_enqueue_styles() {
    wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' );

}

Your child theme is now ready for activation. Log in to your site's administration panel, and go to Administration Panels >Appearance > Themes. You should see your child theme listed and ready for activation. (If your WordPress installation is multi-site enabled, then you may need to switch to your network administration panel to enable the theme (within the Network Admin Themes Screen tab). You can then switch back to your site-specific WordPress administration panel to activate your child theme.)

Note: You may need to re-save your menu (Appearance > Menus, or Appearance > Customize > Menus) and theme options (including background and header images) after activating the child theme.

Template Files

If you want to change more than just the stylesheet, your child theme can override any file in the parent theme: simply include a file of the same name in the child theme directory, and it will override the equivalent file in the parent theme directory when your site loads. For instance, if you want to change the PHP code for the site header, you can include a header.php in your child theme's directory, and that file will be used instead of the parent theme's header.php.

You can also include files in the child theme that are not included in the parent theme. For instance, you might want to create a more specific template than is found in your parent theme, such as a template for a specific page or category archive. See the Template Hierarchy for more information about how WordPress decides what template to use.

Using functions.php

Unlike style.css, the functions.php of a child theme does not override its counterpart from the parent. Instead, it is loaded in addition to the parent’s functions.php. (Specifically, it is loaded right before the parent’s file.)

In that way, the functions.php of a child theme provides a smart, trouble-free method of modifying the functionality of a parent theme. Say that you want to add a PHP function to your theme. The fastest way would be to open its functions.php file and put the function there. But that’s not smart: The next time your theme is updated, your function will disappear. But there is an alternative way which is the smart way: you can create a child theme, add a functions.php file in it, and add your function to that file. The function will do the exact same job from there too, with the advantage that it will not be affected by future updates of the parent theme. Do not copy the full content of functions.php of the parent theme into functions.php in the child theme.

The structure of functions.php is simple: An opening PHP tag at the top, and below it, your bits of PHP. In it you can put as many or as few functions as you wish. The example below shows an elementary functions.php file that does one simple thing: Adds a favicon link to the head element of HTML pages.

<?php // Opening PHP tag - nothing should be before this, not even whitespace

// Custom Function to Include
function favicon_link() {
    echo '<link rel="shortcut icon" type="image/x-icon" href="/favicon.ico" />' . "\n";
}
add_action( 'wp_head', 'favicon_link' );

TIP FOR THEME DEVELOPERS. The fact that a child theme’s functions.php is loaded first means that you can make the user functions of your theme pluggable —that is, replaceable by a child theme— by declaring them conditionally. E.g.:

if ( ! function_exists( 'theme_special_nav' ) ) {
    function theme_special_nav() {
        //  Do something.
    }
}

In that way, a child theme can replace a PHP function of the parent by simply declaring it beforehand.

Referencing / Including Files in Your Child Theme

When you need to include files that reside within your child theme's directory structure, you will use get_stylesheet_directory(). Because the parent template's style.css is replaced by your child theme's style.css, and your style.css resides in the root of your child theme's subdirectory, get_stylesheet_directory() points to your child theme's directory (not the parent theme's directory).

Here's an example, using require_once, that shows how you can use get_stylesheet_directory when referencing a file stored within your child theme's directory structure.

require_once( get_stylesheet_directory() . '/my_included_file.php' );

Other Useful Information

Using Post Formats

A child theme inherits post formats as defined by the parent theme. When creating child themes, be aware that usingadd_theme_support('post-formats') will override the formats defined by the parent theme, not add to it.

RTL support

To support RTL languages, add rtl.css file to your child theme, containing:

/*
Theme Name: Twenty Fourteen Child
Template: twentyfourteen
*/

rtl.css is only loaded by WordPress if is_rtl() returns true.

It's recommended to add the rtl.css file to your child theme even if the parent theme has no rtl.css file.

Internationalization

Child themes, much like other extensions, may be translated into other languages by using gettext functions. For an overview, please see Translating WordPress & I18n for WordPress Developers.

To internationalize a child theme follow these steps:

  • Add a languages directory.
    • Something like my-theme/languages/.
  • Add language files.
    • Your filenames have to be he_IL.po & he_IL.mo (depending on your language), unlike plugin files which are domain-he_IL.xx.
  • Load a textdomain.
    • Use load_child_theme_textdomain() in functions.php during the after_setup_theme action.
    • The text domain defined in load_child_theme_textdomain() should be used to translate all strings in the child theme.
  • Use GetText functions to add i18n support for your strings.

Example: textdomain

<?php
/**
 * Setup My Child Theme's textdomain.
 *
 * Declare textdomain for this child theme.
 * Translations can be filed in the /languages/ directory.
 */
function my_child_theme_setup() {
    load_child_theme_textdomain( 'my-child-theme', get_stylesheet_directory() . '/languages' );
}
add_action( 'after_setup_theme', 'my_child_theme_setup' );
?>

Example: gettext functions

<?php
_e( 'Code is Poetry', 'my-child-theme' );
?>


To sum up, all strings that use "my-child-theme" textdomain will be translatable. The translation files must reside in "/languages/" directory.

Resources

Be aware that some of these resources recommend using @import from your child theme's stylesheet as the method of importing the parent theme stylesheet. Please use the wp_enqueue_script() method described above.

  • ehsan gholami

Update Types

Automatic background updates were introduced in WordPress 3.7 in an effort to promote better security, and to streamline the update experience overall. By default, only minor releases – such as for maintenance and security purposes – and translation file updates are enabled on most sites.

In WordPress, there are four types of automatic background updates:

  1. Core updates
  2. Plugin updates
  3. Theme updates
  4. Translation file updates

Core Updates

Core updates are subdivided into three types:

  1. Core development updates, known as the "bleeding edge"
  2. Minor core updates, such as maintenance and security releases
  3. Major core release updates

By default, every site has automatic updates enabled for minor core releases and translation files. Sites already running a development version also have automatic updates to further development versions enabled by default.

Update Configuration

Automatic updates can be configured using one of two methods: defining constants in wp-config.php, or adding filters using a Plugin.

Configuration via wp-config.php

Using wp-config.php, automatic updates can be disabled completely, and core updates can be disabled or configured based on update type.

Constant to Disable All Updates

The core developers made a conscious decision to enable automatic updates for minor releases and translation files out of the box. Going forward, this will be one of the best ways to guarantee your site stays up to date and secure and, as such, disabling these updates is strongly discouraged.

To completely disable all types of automatic updates, core or otherwise, add the following to your wp-config.php file:

define( 'AUTOMATIC_UPDATER_DISABLED', true );

Constant to Configure Core Updates

To enable automatic updates for major releases or development purposes, the place to start is with the WP_AUTO_UPDATE_COREconstant. Defining this constant one of three ways allows you to blanket-enable, or blanket-disable several types of core updates at once.

define( 'WP_AUTO_UPDATE_CORE', false );

WP_AUTO_UPDATE_CORE can be defined with one of three values, each producing a different behavior:

  • Value of true – Development, minor, and major updates are all enabled
  • Value of false – Development, minor, and major updates are all disabled
  • Value of 'minor' – Minor updates are enabled, development, and major updates are disabled

Note that only sites already running a development version will receive development updates. For other sites, settingWP_AUTO_UPDATE_CORE to true will mean that it will only get minor and major updates.

Configuration via Filters

Using filters allows for fine-tuned control of automatic updates.

The best place to put these filters is in a must-use plugin.

Note: Do not add add_filter() calls in wp-config.php - causes conflicts with WP-CLI and possibly other problems.

Disabling All Updates Via Filter

You can also disable all automatic updates using the following filter:

add_filter( 'automatic_updater_disabled', '__return_true' );

Core Updates via Filter

To disable all core-type updates only, use the following filter:

add_filter( 'auto_update_core', '__return_false' );

But let's say rather than enabling or disabling all three types of core updates, you want to selectively enable or disable them. That's where the allow_dev_auto_core_updatesallow_minor_auto_core_updates, and allow_major_auto_core_updates filters come in.

There are two shorthand functions built into WordPress that will allow you to enable or disable specific types of core updates with single lines of code. They are __return_true and __return_false. Here are some example filters:

To specifically enable automatic updates even if a VCS folder (.git, .hg, .svn etc) was found in the WordPress directory or any of its parent directories:

add_filter( 'automatic_updates_is_vcs_checkout', '__return_false', 1 );

To specifically enable development (nightly) updates, use the following:

add_filter( 'allow_dev_auto_core_updates', '__return_true' );

To specifically disable minor updates, use the following:

add_filter( 'allow_minor_auto_core_updates', '__return_false' );

To specifically enable minor updates, use the following:

add_filter( 'allow_minor_auto_core_updates', '__return_true' );

To specifically disable major updates, use the following:

add_filter( 'allow_major_auto_core_updates', '__return_false' );

To specifically enable major updates, use the following:

add_filter( 'allow_major_auto_core_updates', '__return_true' );

Plugin & Theme Updates via Filter

Automatic plugin and theme updates are disabled by default. To enable them, you can leverage the auto_update_$type filter, where$type would be replaced with "plugin" or "theme".

To enable automatic updates for plugins, use the following:

add_filter( 'auto_update_plugin', '__return_true' );

To enable automatic updates for themes, use the following:

add_filter( 'auto_update_theme', '__return_true' );

Translation Updates via Filter

Automatic translation file updates are already enabled by default, the same as minor core updates.

To disable translation file updates, use the following:

add_filter( 'auto_update_translation', '__return_false' );

Disable Emails via Filter

// Disable update emails
add_filter( 'auto_core_update_send_email', '__return_false' );

This filter can also be used to manipulate update emails according to email $type (success, fail, critical), update type object $core_update, or $result:

/* @param bool   $send        Whether to send the email. Default true.
 * @param string $type        The type of email to send.
 *                            Can be one of 'success', 'fail', 'critical'.
 * @param object $core_update The update offer that was attempted.
 * @param mixed  $result      The result for the core update. Can be WP_Error.
 */
apply_filters( 'auto_core_update_send_email', true, $type, $core_update, $result );

Resources

  • ehsan gholami

Product labels describe a product as well as help it to stand out from competitors on the shelf. There are no set rules to follow when creating product labels and you have many choices in the layout, size, shape, colors and more. However, adhering to certain guidelines can certainly lead to a well-designed product label and, ultimately, more sales.

This article will outline the main aspects of creating an effective product label and provide tips you can use during the design process.

Choose the Right Design Software

The first step to creating your product label is deciding which software to use in the design process. There are many good graphic design software choices (Adobe InDesign, PagePlus, CorelDrawAdobe Illustrator, Xara Designer Pro, Microsoft Publisher, etc.) available today. The best advice we can give here is to choose an application that you are comfortable using. It is important to know, however, that whichever software you choose should have the ability to save or export your artwork as an EPS file or PDF file. You may also want the ability to convert all fonts in the design file to outlines. Some printers will request that you do this because converting fonts to outlines transforms all text in your artwork into vector objects, ensuring that the appearance of the text remains as you see it on your screen when the art file is sent from your software to the printer. And obviously, you won't have any problems with missing or altered fonts if there are no fonts used in a document. For these reasons, Adobe Illustrator is highly recommended for the creation of your product label.

Spot versus Process Colors

Colors

The colors used on your product label are very important as they can directly influence the buyer's purchasing decisions. Several factors should be considered when choosing the coloring for your product labels. For example, you should take into account the coloring of the container or, if the container is clear, you need to consider the color of the product and so on, as you don't want your product label to negatively impact these items.

Traditionally, red and yellow are colors that "urge" consumers to make a purchase, but this is not always the best choice. Fortunately, you don't have to make this decision all by yourself. There are several very good online tools that can assist you in your product label color decisions.ColorBlender and Adobe Kuler are two very good tools, but there are others out there as well.

And, again, remember that you want the product to stand out on the shelves when it's seen next to its competitors. So, before you start the design process for your product labels, do a little competitive research and analysis in some local stores.

Spot Color Versus Full Color-Printing

Directly related to the above, you should consider whether you want your product labels to be printed using spot or full-color (also called process or CMYK) printing. With spot colors, you are typically limited to choosing one, two or three single colors. In this type of printing, you may have just black ink on the printed piece, you may have black and blue ink, or you might choose black, red, and blue ink, and so on. Full-color printing is more complex and uses all four main printing colors (Cyan, Magenta, Yellow and Black) blended together to create the printed piece. Full-color printing is usually need if you want to reproduce a color photograph on your label.

Spot color printing has traditionally been the lower cost option, but the prices for many full-color printed label items are now very comparable in price. Most printers offer several options for product labels using both spot and full-color printing choices.

Fonts

Your font choices are important and deserve careful consideration and planning. Don't settle for the typical system fonts like Arial, Times New Roman, etc. when designing your product labels. Choose a font that will help the product to stand out, or one that captures the personality of the product. For example, if the product is a hot taco sauce, try a font that is fun or plays up to the spicy aspect of the product. Or, if the product is in the automotive market, try a bold font or one that portrays an aspect of toughness or longevity.

One of the most important considerations of font choice, however, is to ensure your text is easily readable - both from a distance of several feet (for the main text on the font) and from up close. You literally only have a few seconds to attract the attention of potential buyers, so your font must be easy to read at just a quick glance.

Obviously, there are tens of thousands of font choices. And, there are many online sources likeFonts.com and dafont.com for you to obtain fonts either at a low cost or completely free of charge. While you're here at CreativePro, just search for free fonts and you'll find literally hundreds of great fonts for your label projects. So, have some fun. Pick a font that goes well with the product and that is easy to read and you'll be fine.

Product / Company Name

It should go without saying, but be sure to feature the product and/or company name prominently on the label design, so that it is easily identifiable and the first thing the consumer notices. It is also important to stay as consistent with the look of the brand as possible so that customers can quickly find the product on the shelf next time they visit a retail center to purchase merchandise.

Label Material

Before beginning the actual design process, it is a good idea to choose the product label's material. Whatever your design, it ultimately needs to be in sync with your label material. Common label material choices are white, clear, cream colored, or even gold or silver foil. Choosing a white or foil material can help your design to stand out from the packaging, while choosing a clear label material may be useful to create a custom shape or to make the label better blend in with the product's container, which can be handy if the packaging is colored.

Graphics / Images

Professional graphics such as drawings or photographs can go a long way in regards to drawing attention to your product. If you don't have your own graphics or product photos, there are numerous sources online including iStockphoto and Bigstock where you can find inexpensive, highly professional images. You can choose from vector illustrations or photographs and the pricing is very reasonable, as little as just a few dollars per image. But be sure to check any licensing agreements for restrictions on usage. Remember the old adage that "a picture is worth 1,000 words"? Well, this is especially true on product labels.

Bleed or No Bleed

Bleed or No Bleed?

"Bleed" essentially means that your artwork flows off the edges of the label. No bleed means your label has a white (or other label material color) border around the artwork. Bleed can refer to the overall layout, as well as text or graphics / pictures that extend to the edge of the label. Product labels that extend all the way to the edge of the label without margins are referred to as "bled off."

Label Size

Your label size choice will largely depend on the product's container / packaging. You will also have the option of designing a single label or using multiple labels for the front / back of the product. Front and back labels allow you to separate the branding / design on the front of the label from smaller-sized items like ingredients, instructions, etc. that can be placed on the back. But, purchasing two separate labels for the product may not be the most cost effective choice. Alternatively, you can also design a single "wrap-around" label in such a manner that would still allow you to design a front panel that is appealing and enticing, while leaving the smaller, more text-based items to the side or back, depending on how your packaging is configured.

Label Shape

The shape of your label can certainly help to draw attention to the product on the shelf. Most online and local label print shops offer many stock label shapes including rectangles, squares, ovals, circles, seals, hearts, and others. And, these same printers typically also offer the ability to order any custom shape you may need. Ordering a custom shape label may incur a one-time die charge. Whether there is a charge and the pricing varies from printer to printer. Another option would be to choose a clear label stock and then create a custom shape using a background color designed in that shape.

Label Finish

Adding a matte or glossy finish to your label is something that can also impact the appeal of your product label. Laminating your product labels also adds longevity to the life of the label and helps to prevent smearing. A standard matte laminate can help to add a classic, subdued look to your product label, while a hi-gloss laminate adds impact to colors and offers a shiny, almost reflective quality to the label.

Barcode

The barcode is the portion of the label that tells electronic scanners information about your product. First used in grocery stores, barcodes now make it easier for a product to be sold in stores of all kinds. UPC (Universal Product Code) barcodes are also used to help companies track inventory or add security to their products.

UPC barcodes can best be described as a sort of optical Morse code. Typically a series of black bars and white spaces of different widths, UPC barcodes are read with an optical scanner that interprets the code into numbers and letters that are passed along to a computer.

Product UPCs must be obtained through a company called the Uniform Code Council (UCC). Manufacturers apply to the UCC for permission to enter the UPC system, which requires a small annual fee. In return for membership, the UCC issues each manufacturer a unique six-digit "manufacturer identification number" and outlines guidelines on how to use the number. Once a manufacturer has this information, they can then pass it along to any printer capable of producing barcode labels and the printer can handle the job from there.

Contact Information

Aside from creating a product label that stands out on the shelf, adding the company's contact information may be the single most important aspect of an effective product label's design. Clearly listing contact information is an essential step in enhancing a product and encouraging communication with customers. The company's 800 number, website address, physical address, and social media information (Twitter, Facebook, etc, etc.) should all be included on every product label to ensure they can receive feedback from their customers and to enable those customers in turn to promote the products!

So, there you have it. This list covers the basics of creating an effective product label. Use this information when you, or your graphic designer, get started designing your new product labels.

Mark Trumper, CEO
MaverickLabel.com

  • ehsan gholami

10 Elements of Good Product Label Design

 

There are no hard and fast rules that you can follow in order to create a well crafted product label design. However, most of us recognize an appealing design when we see one. Why? Because there are certain elements that will make a product label design attractive and compelling. This article will guide you through the main design elements of a product label design and provide tips on how to use these elements to your advantage.

 

1. Color

To grab the attention of someone who is casually walking the aisles of the supermarket you need to use color well. The color you choose for your label is dependent on a number of things. What color is your container? If you are using a clear container, then what color is the product? You need to make sure that the colors you choose for the label don’t clash in a negative way to lessen the visual appeal of the entire package. Luckily there are tools to help you choose colors that will work well together. Adobe Kuler (kuler.adobe.com), ColourLovers (www.colourlovers.com) and ColorBlender (www.colorblender.com) are tools that you can use to help choose attractive color combinations for your labels.

 

 

2. Graphics

An eye catching graphic will also help draw attention to your product. With stock photography and illustrations so inexpensive these days you can find a graphic for your labels at places like iStockphoto.com or Photos.com for just a few dollars. You can then use these images on your product labels, just be sure to check the license agreement. In the case of iStockphoto you can use most images for up to 500,000 product labels without buying an extended license. A picture really can be worth 1,000 words on a product label as a compelling graphic draws the eye to your product.

 

 

3. Readability

Speaking of type, your choice of fonts is a critical decision and deserves just as much attention as choosing color and graphics. Don’t choose one of the standard Windows fonts such as Times New Roman or Arial, and also avoid overused fonts such as Papyrus or Monotype Corsiva. Don’t be afraid to try something new and different – there are thousands of unique fonts available online – just go to fonts.com or 1001freefonts.com. The important point to remember is that you want good looking type that is easy to read.

 

 

4. Fonts

Speaking of type, your choice of fonts is a critical decision and deserves just as much attention as choosing color and graphics. Don’t choose one of the standard Windows fonts such as Times New Roman or Arial, and also avoid overused fonts such as Papyrus or Monotype Corsiva. Don’t be afraid to try something new and different – there are thousands of unique fonts available online – just go to fonts.com or 1001freefonts.com. The important point to remember is that you want good looking type that is easy to read.

 

5. Material

Before you even begin the design process you need to consider the label material. Your design needs to "fit" the material. Common material choices include white, clear, or a cream textured paper. Clear material allows for a "no label look" that can be very striking if you have a colored container or product. Take a look at Palmolive original dish soap – this is a product that uses a clear label very well. A simple design with white ink, it really shows off the striking green liquid inside. White material gives you the most flexibility with design, because you can make white into any color you like, or you can just use the white background. For an old world look, a textured cream paper can be very effective and is popular with wineries where you want to convey a handcrafted image.

 

 

6. Label Finish

Whether you choose a glossy or matte finish to your labels is a judgment call depending on the kind of image you want to convey. A matte laminate can provide a more classic look that is very easy to read, whereas gloss will add some impact to the colors on the label and provide a shiny, reflective look. A good example of the matte look is the Honest Tea brand of bottled teas. In the highly competitive beverage market they have a more subdued look with a simple product label design that works really well with the matte finish. If you can’t decided between matte and glossy then do a small order of both and test it – see what people find most attractive.

 

 

7. Label Size

If you are using a round container then you most likely have a choice – do you want one large label or separate front and back labels? Front and back labels allow you to elegantly separate the front branding information from the ingredient and regulatory information but they can be more expensive than a large wrap around label. If you go with a wraparound label then it is important to keep a front "panel" with the vital branding information because that is what the consumers will see as they are browsing the aisles.

 

 

8. Shapes

You can really draw attention to your label by using an unusual shape. This will require the initial investment of a new die which can cost several hundred dollars depending on the size and complexity of your design. Heinz ketchup is one example of an unusual shape done well – the keystone label shape has become part of their brand after more than 130 years. Here is one trick that can save you the money of buying a special die. Use a clear label and simulate an unusual shape by using white ink to create your desired shape, so it will appear that your label has a unique shape even if it is a simple rectangle label.

 

 

9. A Theme for Different Flavors

With multiple flavors of the same product it is important to keep major design elements of your label consistent. Whether someone is looking at the peach, orange or lime flavor they should be able to recognize instantly that it is all the same company and brand. A company that does an excellent job of keeping a consistent yet different look between flavors is Nantucket Nectars. Each flavor has a simple illustration encompassing the flavor with a similar scene from Nantucket Island in the background.

 

 

10. Contact Information

In the 21st century every company should have contact information on their product labels. This is obviously not about making your label design more appealing, but rather having your label be more than just a passive selling and marketing tool. An 800 number, a web site and a physical address can all be easily included on the label. You could provide a special web site on your label for customers to sign up for an email list, so you can gather information and start to interact with your good customers.

 

When designing your label it is important to take into account what your competition is doing. If most companies in your space have very colorful and glossy labels, then maybe a more plain and subdued look will allow you to stand out on the supermarket shelf. Take many of the elements mentioned here and differentiate yourself from the competition. Providing a new and interesting look invites customers to pick up your product.

As we said in the beginning of this article there are no hard and fast rules for good product label design, but if you stroll the grocery store aisles and look at the labels of products that have been successful you will see that they have many elements in common. Of course, most of these successful products have labels that were created by professional graphic designers, so if you can afford one I firmly believe that is money well spent. But if you don’t have the budget or prefer to do it yourself then consider these ten elements when creating your product label.

(Peter Renton)

  • ehsan gholami

Backup & Recovery in Windows

Subscribe to Backup & Recovery in Windows 8 post(s), 4 voice(s)

 

Avatarsyed

16 post(s)

What is the best possible way to “backup redmine” in Windows OS.
Please help.

Thanks & Best Regards,
Syed

 

AvatarBeltrán Rueda

Administrator

3,714 post(s)

You can create a backup using several methods. I will comment two of them.

1. If you want to create a backup of the database only.

Go to the “use_redmine” shortcut and type the follwing in the command prompt:

> mysqldump -u root -p bitnami_redmine > backup.sql

The password is the same than your administrator password in Redmine application or the same that you write during the installation. You should also copy the files that you have uploaded to the application, which are into the /apps/redmine folder.

2. If you want to backup the whole Stack.

This method is very quick and let you move your Redmine application to another Windows machine easily.

IMPORTANT: Stop the servers. You can stop the servers using the shortcut or you can stop the services in the Windows service panel ( you can type in a command prompt “services.msc”). The name of the services are redmineApache, redmineMySQL and redmineMongrel. It is possible that you have more than one Mongrel.

- Once you have stopped the services, copy your installation directory in a USB, CD or to the other machine directly. It is important that the installation directory is the same in the new machine. For example if you have installed the Stack in C:\Program FIles\BitNami Redmine Stack, this is the same location where you should copy the backup in the new machine.

- Install the services in the new machine. Go to a command prompt and type:

> cd “C:\Program Files\BitNami Redmine Stack”
> servicesinstall.bat INSTALL

That’s all, I hope it helps.

 

Avatarsyed

16 post(s)

Dear Beltran,

I prefer the second solution..and it is working without any problem.
Thanks you very much for the excellent help.

Thanks & Best Regards,
Syed

 

AvatarBeltrán Rueda

Administrator

3,714 post(s)

Great! I’m glad to hear this.

 

Avatarekasadevelop...

11 post(s)

Dear, Beltran

I´ve sent a topic similar to this to do a question (https://bitnami.com/forums/forums/redmine/topics… for recovery the backup.sql before the command
mysqldump -u root -p bitnami_redmine > backup.sql

I don´t Know how to do this and i don´t see anything about this in the forum to recovery de backup in Windows

Thanks

 

Avatarekasadevelop...

11 post(s)

Dear all,

Finish, i find the command to recovery the backup.

Apologize for the inconvenients.

 

AvatarSriram Chitturi

5 post(s)

Before installaing I did the following, which helped me backing up and moving the Bitnami redmine to another machine easily.
a) create or pick up some directory (say for eg. C:\MyProjects\Redmine) where you want to install the stack
b) use Windows “subst” command and assing a uncommon drive letter to the directory, eg. subst X: “C:\MyProjects\Redmine”
c) Now when you install the Bitnami stack give this drive (X:) as the destination folder to install
d) Make sure to place the subst command in autoexec.bat file, so that the drive letter is correctly assigned whenever the machine is rebooted

Now you can back up the complete Bitnami stack as it is.
Not only that if you run out of space on the current disk, or if you attach anoter drive or what ever, just move the contents to that folder and change the subst command. Hope this helps.

 

AvatarBeltrán Rueda

Administrator

3,714 post(s)

Great quick guide for backups. Thanks for sharing with other BitNami users.

  • ehsan gholami

change the opencart logo and footer in the admin panel 

 





easiest way to do this would be just to replace the main logo for admin site:

CODE: SELECT ALL
/public_html/admin/view/image/logo.png



for footer, edit the file:

CODE: SELECT ALL
/public_html/admin/language/english/common/footer.php
 
  • ehsan gholami

When operating an e-store in OpenCart sometimes store owners want to edit or delete Powered by OpenCart title, which is positioned right below in the footer. Usually to enhance presentation they put their store name or completely get rid of the title for various reasons. In this tutorial we will lead you through the necessary steps on how to edit and delete the Powered by OpenCart.

 
Editing Powered by OpenCart:
 
In order to edit the Powered by OpenCart you need to go to Catalog/Language/(The current language you are using)/Common/Footer and look for the line that reads:
$_['text_powered']      = 'Powered By <a href="http://www.opencart.com">OpenCart</a><br /> %s &copy; %s';
You can basically substitute the text with whatever message you want to send to your website visitors.
 
Removing Powered by OpenCart:
 
In order to remove the Powered by OpenCart you need to go to Catalog/View/Theme/(The Name of your Theme)/Template/Common/Footer.tpl
 
Look for the line that reads:
 
<div id="powered"><?php echo $powered; ?>
You can delete the line if you think you won't need to retrieve the Powered by OpenCart one day or you can comment it by putting:
 
/* <div id="powered"><?php echo $powered; ?> */
 
In case you are using iCustomFooter, things are even easier. All you need to do is go to the admin and click on Support & Settings/Settings and select Hide 'Powered By' message to No and click onSave.
 
  • ehsan gholami

You seem to be missing the following line in your config.php file which appears usually after define('DIR_SYSTEM', '../system/');

define('DIR_DATABASE', '../system/database/');

I would go back to relative paths, keep in mind there are two config files, one in the root of the site and one in admin. You need to add the '../system' in the admin one if the one in root is 'system'

  • ehsan gholami
This post is part of a series called Create a Custom Theme With OpenCart.
Create a Custom Theme With OpenCart: Part Three

If you've followed the series thus far, you should be able to find the location of home page layout template. Although a quick look at the templates here and there inside "€œdefault"€ theme should give you a hint that it's located at €œdefault/template/common/home.tpl

But if you may have noticed the route of the home page, it contains the value€œcommon/home. So, as we discussed earlier, you can always map this route to find the appropriate layout template file.

Homepage Layout Elements

Looking at the œhome.tpl€ file, you'll realize that most of the content is generated via the generic elements like $header$footer etc. We won't discuss the $headerand $footer elements as you already know that the contents of those variables are coming from œheader.tpl and €œfooter.tpl€ files underneath  template/common directory, respectively. 

In the case of default OpenCart home page, there are no modules assigned at the "€œColumn Left"€ or "€œColumn Right"€ position so you can say that $column_left and$column_right variables are not doing anything. So everything you see on the home page except for the header and footer, is coming from either $content_topor $content_bottom variable. "€œSlideshow"€ and "€œFeatured"€ modules are assigned to "€œContent Top"€ position and "€œCarousel"€ module is assigned to "€œContent Bottom"€ position to the "€œHome"€ layout.

Now lets go further and see how exactly these modules are assigned to "€œHome"€ page layout.

Get logged into the back-end and go to "€œExtensions > Modules"€. This will list out all the modules available in the system. Now, click on the "€œEdit"€ link for the "€œSlideshow"€ module which will display the module assignment interface.

Slideshow Module Configuration

Although there is quite a bit of configuration available here, the important column for us are "€œLayout"€ and "€œPosition"€. As per the values assigned there, "€œSlideshow"€ module will be displayed at "€œContent Top"€ part in the "€œHome"€ layout. 

From here, you can also assign a "€œSlideshow"€ module to any layout at any position using "Add Module" button. Now let's take a look at an another example, on the module listing page click on the "€œEdit"€ link for the "€œFeatured"€ module.

Featured Module Configuration

Again you can see that, the "€œLayout"€ and "€œPosition"€ values are same as that of the "€œSlideshow"€ module. So now you should be familiar with how exactly these modules are displayed in the home page. As you may have noticed that there is also "€œRemove"€ button available which is used to un-assign a module from the specific layout. Go ahead and explore the settings for "€œCarousel"€ module yourselves!

Now that you are aware with how module is assigned and unassigned to a specific page and position, we'll go through the same to tweak the home page layout. Jump into the admin section, and go to the "€œExtension > Modules"€ to bring the module listing page on the table.

In this step, we'll remove all the assigned modules from the home page.

  • Click on the "Edit" link for the "Slideshow" module. Now, click on the "Remove" button to un-assign a module from "Home" layout. After that click on "Save" button to apply the changes. Repeat the same procedure for the "Carousel" and "Featured" modules. 

At the end of this step if you check your home page, you should see almost an empty home page except "header" and "footer" parts. Don't worry, that's what we really intended to do! In the next step, we'll assign a bit different set of modules to "€œColumn Left"€ and "€œColumn Right"€ positions in home page. Let's go to the module listing page again.

  • Click on the "€œEdit"€ link for the "€œCategory"€ module. At the bottom right of the page, you'll see an "€œAdd Module"€ button, clicking upon which would add a new row to the listing. In that row, in the "€œLayout"€ column select "€œHome"€ and in the "€œPosition"€ column select "€œColumn Left"€. After that click on "€œSave"€ button to apply the changes.
  • Click on the "€œEdit"€ link for the "€œAccount"€ module. Click on the "€œAdd Module"€ button to add a new row. In the newly added row, in the "€œLayout"€ column select "€œHome"€ and in the "€œPosition"€ column select "€œColumn Right"€. Apply your changes using the "€œSave"€ button.

So now let's have a look at our front-page:

Partial Homepage

So far we have done all the layout related tweaking from the back-end itself. In this section, we'll add a bit of static text content to the œhome.tpl. Whenever you need to add a static text in any template, instead of putting the text directly inside the template you should follow the standard way of the OpenCart. Let's exercise the same. 

Of course, you won't directly edit the œhome.tpl file in the "€œdefault"€ theme, lets override it in your custom theme!

Go ahead and open €catalog/language/english/english.php. Add the following line at the end of the file just before the line which contains œ?>.

Now go ahead and open œcatalog/controller/common/home.php. We'll include the language variable added in the english.php file in this controller file so it's available in the œhome.tpl file for display.

In "€œhome.php"€ before the following line,

Add this one,

This will make sure that the $welcome_text variable is available in the layout template file just like any other variables. Now the only thing remaining is to include$welcome_text in the home.tpl file. So your home.tpl should look like this,

I've done very few changes in this file. I've added the variable $welcome_textsurrounded by <div> tag. I've also removed the display:none from the <h1> tag so the title is displayed. Finally, a bit of formatting of the code is done for better readability. Here's the final snap!

Complete Homepage

There are a couple of important things to note here, although we've directly modified english.php and home.php files but it's strictly discouraged to do so. It was just done to keep this example simple. In fact, you should use "vQmod" OpenCart extension in the case in which you need to modify the core files.

So this was a pretty simple example to demonstrate the layout modifications on the home page layout. Although we added a simple static text, you can fetch more dynamic information from the database and display the same in the template! 

Of course, that is something requires a bit of knowledge of how OpenCart model works. You're encouraged to go further and assign couple of more modules to the different positions to see how things work.

I hope this series helped you to understand what exactly OpenCart theme is all about and how to customize the default theme with your own. You can always shoot your comments and questions in the feed below.

  • ehsan gholami