Released Two More Plugins : WordPress

Hello Friends!!

I hope you are doing well and waiting for Christmas and New year:)

I want let you know all that i have released two more wordpress plugins

Tweets Slider and RG Responsive Gallery

Tweets Slider

“tweets-slider” is the very simple plugin to show your tweets as slider on your website.you can show your top 10 tweets as slider.

Features

  • Define to slider speed
  • Shortcode

Shortcode

[tweets_slider]

 

RG Responsive Gallery

“rg-responsive-gallery” is the very simple plugin for add to image gallery on your site. Using “rg-responsive-gallery” plugin we can easily add gallery on any page/post using shortcode. It’s a responsive plugin.

Features

  • Responsive gallery
  • Shortcode

Shortcode

[rr_gallery slider_slug=”ENTER SLIDER SLUG”]

 

Please don’t forget to give your suggestions and review about my both plugin.

Enjoy.

Tagged with: , , ,
Posted in Wordpress

How add Meta Title field on category pages: Opencart

Hello Friends,

I hope you all are doing very well:)

In my last post https://raghunathgurjar.wordpress.com/2015/11/17/how-add-meta-title-field-on-product-pages-opencart/, i have explain you instruction for add to “Meta Title” on product pages. Now here i am given you steps by steps instruction to add new meta title fields on category pages by edit in exist files, please follow given below steps:

First of all you will need to add new meta_title fields under “oc_category_description” table into your database. You will need to run given below mysql query.

ALTER TABLE oc_category_description ADD meta_title VARCHAR(100) NOT NULL

Now you will need to define text of meta title into catalog language file
admin/language/english/catalog/category.php

Search $_['entry_meta_keyword']      = 'Meta Tag Keywords:'; (around line no. 20) and add 
$_['entry_meta_title']      = 'Meta Title:';

Now you will need to add Meta Title field into category through add/edit form tpl file
admin/view/template/catalog/category_form.tpl
Search “$entry_meta_description” (around line no. 30) and add mew row

<tr>
<td><?php echo $entry_meta_title; ?></td>
<td><input type="text" name="category_description[<?php echo $language['language_id']; ?>][meta_title]" value="<?php echo isset($category_description[$language['language_id']]) ? $category_description[$language['language_id']]['meta_title'] : ''; ?>" size="100"/></td>
</tr>

In next step you will need to update catalog controller file
/admin/controller/catalog/category.php
Search

$this->data['entry_meta_keyword'] = $this->language->get('entry_meta_keyword');

add above OR below

$this->data['entry_meta_title'] = $this->language->get('entry_meta_title');

In next step you will need to update catalog model file
/admin/model/catalog/category.php
Under addCategory() function search $data[‘category_description’] foreach loop (around line no. 12) and add new meta title filed into mysql query.Updated loop will be look like this

foreach ($data['category_description'] as $language_id => $value) {
            $this->db->query("INSERT INTO " . DB_PREFIX . "category_description SET category_id = '" . (int)$category_id . "', language_id = '" . (int)$language_id . "', name = '" . $this->db->escape($value['name']) . "', meta_title = '" . $this->db->escape($value['meta_title']) . "' meta_keyword = '" . $this->db->escape($value['meta_keyword']) . "', meta_description = '" . $this->db->escape($value['meta_description']) . "', description = '" . $this->db->escape($value['description']) . "'");
        }

Now under editCategory() function search category description foreach loop (around line no. 66) and replace it with given below updated

foreach ($data['category_description'] as $language_id => $value) {
            $this->db->query("INSERT INTO " . DB_PREFIX . "category_description SET category_id = '" . (int)$category_id . "', language_id = '" . (int)$language_id . "', name = '" . $this->db->escape($value['name']) . "', meta_title = '" . $this->db->escape($value['meta_title']) . "', meta_keyword = '" . $this->db->escape($value['meta_keyword']) . "', meta_description = '" . $this->db->escape($value['meta_description']) . "', description = '" . $this->db->escape($value['description']) . "'");
        }

Now under getProductDescriptions() function search foreach ($query->rows as $result) { loop (around line no. 410) and add meta_titleUnder getCategoryDescriptions() function search foreach loop (around line no. 233)

foreach ($query->rows as $result) {
            $category_description_data[$result['language_id']] = array(
                'name'             => $result['name'],
                'meta_keyword'     => $result['meta_keyword'],
                'meta_description' => $result['meta_description'],
                'description'      => $result['description']
            );
        }

and replaced it with given below foreach field

foreach ($query->rows as $result) {
            $category_description_data[$result['language_id']] = array(
                'name'             => $result['name'],
                'meta_keyword'     => $result['meta_keyword'],
                'meta_title'     => $result['meta_title'],
                'meta_description' => $result['meta_description'],
                'description'      => $result['description']
            );
        }

Now you have done all work for admin section, you can test it by edit/add any category

Lets now implement meta title into front-end

shop/catalog/controller/product/category.php

Under index() function search

$this->document->setTitle($category_info['name']);

(around line no. 92) and replaced this line with given below code

if(isset($category_info['meta_title']) && $category_info['meta_title']!='')
{$metatitle=    $category_info['meta_title'];}
else{
$metatitle=$category_info['name']; //by default get category title
}
$this->document->setTitle($metatitle);    

That's ALL!!
Tagged with: , , ,
Posted in Opencart

How add Meta Title field on product pages: Opencart

opencart-product-meta-title

Hello Friends,

I hope you all are doing very well:)

As you all know that by default Opencart not provide an option for add to “Meta Title”. There are some SEO opencart modules aveliable for add to “Meta Title” option but almost they are paid. I am here given you steps by steps instruction to add new meta title fields on product pages by edit in exist files, please follow given below steps:

First of all you will need to add new meta_title fields under “oc_product_description” table into your database. You will need to run given below mysql query.

ALTER TABLE oc_product_description ADD meta_title VARCHAR(100) NOT NULL

Now you will need to define text of meta title into catalog language file
admin/language/english/catalog/product.php

Search $_['entry_meta_keyword']      = 'Meta Tag Keywords:'; (around line no. 30) and add
$_['entry_meta_title']      = 'Meta Title:';

Now you will need to add Meta Title field into product add/edit form
admin/view/template/catalog/product_form.tpl
Seach “$entry_meta_description” (around line no. 30) and add mew row

<tr>
<td><?php echo $entry_meta_title; ?></td>
<td><input type="text" name="product_description[<?php echo $language['language_id']; ?>][meta_title]" size="100" value="<!--?php echo isset($product_description[$language['language_id']]) ? $product_description[$language['language_id']]['meta_title'] : ''; ?>" />
</td>
</tr>

In next step you will need to update catalog controller file
/admin/controller/catalog/product.php
Search

$this->data['entry_meta_keyword'] = $this->language->get('entry_meta_keyword');

(around line no. 542)
add above OR below

$this->data['entry_meta_title'] = $this->language->get('entry_meta_title');

In next step you will need to update catalog model file
/admin/model/catalog/product.php
Under addProduct() function find foreach loop

foreach ($data['product_description'] as $language_id => $value)

(around line no. 15) and add new meta title filed into mysql query.

foreach ($data['product_description'] as $language_id => $value)
{
$legend_data = $value['legend_origin']."|".$value['legend_material']."|".$value['legend_stackable']."|".$value['legend_assemble']."|".$value['legend_outdoor']."|".$value['legend_warranty'];
$this->db->query("INSERT INTO " . DB_PREFIX . "product_description SET product_id = '" . (int)$product_id . "', language_id = '" . (int)$language_id . "', name = '" . $this->db->escape($value['name']) . "', meta_title = '" . $this->db->escape($value['meta_title']) . "', meta_keyword = '" . $this->db->escape($value['meta_keyword']) . "', meta_description = '" . $this->db->escape($value['meta_description']) . "', description = '" . $this->db->escape($value['description']) . "', tag = '" . $this->db->escape($value['tag']) . "', legends = '".$this->db->escape($legend_data)."', colour_info = '".$this->db->escape($value['colour_info'])."'");
}

Now under editProduct() function search foreach ($data[‘product_description’] as $language_id => $value) { loop (around line no. 132)

updated foreach loop will be look like this

foreach ($data['product_description'] as $language_id => $value) {
$legend_data = $value['legend_origin']."|".$value['legend_material']."|".$value['legend_stackable']."|".$value['legend_assemble']."|".$value['legend_outdoor']."|".$value['legend_warranty'];
$this->db->query("INSERT INTO " . DB_PREFIX . "product_description SET product_id = '" . (int)$product_id . "', language_id = '" . (int)$language_id . "', name = '" . $this->db->escape($value['name']) . "', meta_title = '" . $this->db->escape($value['meta_title']) . "', meta_keyword = '" . $this->db->escape($value['meta_keyword']) . "', meta_description = '" . $this->db->escape($value['meta_description']) . "', description = '" . $this->db->escape($value['description']) . "', tag = '" . $this->db->escape($value['tag']) . "', legends = '".$this->db->escape($legend_data)."', colour_info = '".$this->db->escape($value['colour_info'])."'");
}

Now under getProductDescriptions() function search foreach ($query->rows as $result) { loop (around line no. 410) and add meta_title field into this
updated loop will be look like this

foreach ($query->rows as $result) {
if ($result['legends'] != "")
{
$legend_data = explode("|", $result['legends']);
$product_description_data[$result['language_id']] = array(
'name'             => $result['name'],
'description'      => $result['description'],
'meta_title'     => $result['meta_title'],
'meta_keyword'     => $result['meta_keyword'],

'meta_description' => $result['meta_description'],
'tag'              => $result['tag'],
'legend_origin'    => $legend_data[0],
'legend_material'  => $legend_data[1],
'legend_stackable' => $legend_data[2],
'legend_assemble'  => $legend_data[3],
'legend_outdoor'   => $legend_data[4],
'legend_warranty'  => $legend_data[5],
'colour_info'  => $result['colour_info']
);
}
else
{
$product_description_data[$result['language_id']] = array(
'name'             => $result['name'],
'description'      => $result['description'],
'meta_title'     => $result['meta_title'],
'meta_keyword'     => $result['meta_keyword'],
'meta_description' => $result['meta_description'],
'tag'              => $result['tag'],
'legend_origin'    => "",
'legend_material'  => "",
'legend_stackable' => "",
'legend_assemble'  => "",
'legend_outdoor'   => "",
'legend_warranty'  => "",
'colour_info'  => $result['colour_info']
);
}
}

Now you have done all work for admin section, you can test it by edit/add any product/category

Lets now implement meta title into front-end

/catalog/model/catalog/product.php
Search getProduct() function (around line no.7) and add new field meta_title into MySql select query.
seach “meta_description” and add new meta_title field in same way into return array.

shop/catalog/controller/product/product.php
Under index() function search $this->document->setTitle($product_info[‘name’]); (around line no. 222) and replaced this line with given below code

if(isset($product_info['meta_title']) && $product_info['meta_title']!='')
{
$metatitle=    $product_info['meta_title'];
}
else
{
$metatitle=$product_info['name']; // set by default product title as meta title
}
$this->document->setTitle($metatitle);

That’s all!!

Tagged with: , ,
Posted in Opencart

How to override adminhtml view files in magento

Adminhtml uses the same theaming mathod as the we do on frontend. We need to do two things

1. We need to only declare a custom template theme for your installation in module config.xml:

Add following code in -> app/etc/config.xml
<stores>
<admin>
<design>
<theme>
<template>custom_theam_name</template>
</theme>
</design>
</admin>
</stores>

2.Then you need to create directory “custom_theam_name” in app/design/adminhtml/default/custom_theam_name

Now you put you file/module folder Like.
app/design/adminhtml/default/custom_theam_name/template/page/footer.phtml
Cheers:)

Posted in Magento

Custom Shortcodes Is Not Working In Sidebar Widgets?

Hello Friends!!

Hope you all are doing well:)

If you have created your own new custom shortcode and it’s not working in text sidebar widget then no need to worry. just add given below hooks filter in your theme function.php file OR in your plugin file where you are want to add new sortcode.

add_filter( 'widget_text', 'do_shortcode' );

Enjoy Code!!

Tagged with: , , ,
Posted in Wordpress

How Create a Custom Conversion Tracking Script

In some scenarios, an agency, advertiser, or other third party might decide to track impressions with a tracking pixel. A tracking pixel is simply code inserted into a custom or third-party creative that makes a server call and returns a transparent 1×1 image (normally a GIF file).

 

Sources of third-party tracking pixels

You typically get a third-party tracking pixel from a third party, in the form of a URL. You then insert the URL into the tracking pixel code and add the tracking pixel code to the Code snippet box in the third-party creative page.

 

Examples

Most tracking pixels have the same format with slight variations in the style variable. It is up to you and the advertiser to choose which format to use. Here are a few examples:

<img src="TRACKING-PIXEL-URL-GOES-HERE" style="position:absolute; visibility:hidden">

<img src="TRACKING-PIXEL-URL-GOES-HERE" style="display:none">

<img src="TRACKING-PIXEL-URL-GOES-HERE" width="0" height="0">
The tracking pixel will count an impression every time you view the creative, including previews.

 

Add tracking pixels to creative code

If you want to add a tracking pixel to the creative code of a custom or third-party creative, simply insert the tracking pixel code at the top of creative code in the Code snippet box.

Make sure there is a hard return between the pixel code and the rest of the creative code.

Example:

<img src="TRACKING-PIXEL-URL-GOES-HERE" width="0" height="0">
<!-- Template ID = 4439 Template Name = Image Banner - Open in New Window-->
<a href="%c%u" target="_blank">
<img width="728" height="90" border="0" src="%h/2315223/728x90Image.JPG">
</a>

Source code taken from https://support.google.com/dfp_premium/answer/1347585?hl=en
Tagged with: , , , ,
Posted in Drupal, Joomla, Magento, PHP, Wordpress

How to add Paypal donate form on your website?

Hello Friends,

I hope you all are doing well!

If you want add a donate form on your website then just copy and paste given below html code into your website pages where you want to publish Paypal donate form and just need to update item title and business email address

<form target="_blank" action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_donations"> 
<input type="hidden" name="business" value="raghunath.0087@gmail.com"> 
<input type="hidden" name="item_name" value="DONATE TO RAGHUNATH BLOG"> 
<input type="hidden" name="page_style" value="PayPal"> 
<input type="hidden" name="no_shipping" value="1"> 
<input type="hidden" name="currency_code" value="USD"> 
<input type="hidden" name="tax" value="0"> 
<input type="hidden" name="lc" value="US">
<input type="submit" value="Donate Now" class="et_pb_more_button" name="submit"> 
<img width="1" border="0" height="1" alt="" src="https://www.paypal.com/en_US/i/scr/pixel.gif"><br>
</form>

Enjoy!!

Tagged with: , , , ,
Posted in Drupal, Joomla, Magento, PHP, Wordpress
Follow

Get every new post delivered to your Inbox.

Join 173 other followers

%d bloggers like this: