Install Apache Solr on Windows with Wamp

Apache Solr is useful for Searching, Indexing, Faceted Search, Dynamic clustering. You can see full feature of Apache Solr Here. It is based on Apache Lucene Search Library and extends it. Here I will show you how to install Apache Solr on Windows and integrating it with WAMP Server. (Integration with WAMP is not mandatory if you are not using it)

The easiest way to install Apache Solr on Windows is to use Solr installer from BitNami. This can be found here http://bitnami.com/stack/solr. Download the installer and run it with administrative rights. Try to keep the installation path simple something like “c:/solr/” will be appropriate.

It will also install an Apache Server so if you don’t have WAMP or Apache already installed than its super easy, just go with the flow. If you already have WAMP installed than make this Apache listen on some available port  other than 80 (where WAMP ‘s Apache is listening).

Once the setup is complete Solr will be available for use in port selected during setup (see no big deal). Now if you have WAMP and you don’t want to have two Apache services running do the following steps.

  • Enable proxy_module and proxy_http_module via WAMP menu or directly from Apache conf file.
  • Open httpd.conf file and add following line at the end of the file

    Note that the path here should be correctly pointing to the solr.conf file. Use the path where you installed the Solr.
  • Now restart the WAMP Apache via WAMP menu. If it starts correctly than its cool, otherwise check if you have correctly enabled the said modules, and path to solr config file.
  • Now check http://localhost/solr/ this should show the dashboard for solr.
  • Remember the extra Apache service we need to disable it so it does not start automatically as we don’t need it. So goto Control Panel > Administrative Tools > Services , double click “solrApache” service and change its “Startup Type” to “Manual”. Now it will not start once your system is restarted.

 

 

Thanks to sphinxconsultant.com

Opencart – Category Carousel of Product

Category Product Carousel – Opencart is new Opencart extension module by TheDigiLife. Category Product Carousel – Opencart is very useful in displaying products of particular category in carousel. This Opencart module is easy to use as it looks like core Opencart module. This module not update any core files.

Category Product Carousel – Opencart supports multilanguage. You can visit this plugin on Opencart marketplace here. This module uses jQuery Carousel which comes bundled with Opencart installation so no extra file is added.

Category Product Carousel – Opencart is light weight module. Installation instruction are as follow.

  1. Download the zip file, extract somewhere on your computer. 
  2. From extracted file, upload the the files/folder under “upload” folder to server using FTP, in root folder (where admin,catalog,system folder are available) of Opencart installation 
  3. Go to admin area of you Opencart website and Click on Extension > Modules
  4. Install Category Product Carousel
  5. Edit Category Product Carousel
  6. At last add module on you desired page.

Below are the screenshots

admin-area-configuration

category-carousel-example

logoimage

You can download Category Product Carousel – Opencart Here

Opencart – Shopping cart in Pop Up and Buy Now Button

Recently we released new Opencart plugin named “Product Buy Now button and Cart in Popup – Opencart – VQMOD“. This is useful extension of Opencart for replacing the “Add to cart” button with “Buy Now” button. Clicking on Buy Now button opens shopping cart in popup. Popup shopping cart is fully functioned. User can change quantity, remove any product, Apply coupon code, etc. in popup itself.

Product Buy Now button and Cart in Popup – Opencart – VQMOD extension of Opencart makes your site User friendly and easy access to shopping cart. Shopping cart popup is displayed using Colorbox jQuery plugin popup. Colorbox jQuery comes bundled with Opencart installation so no extra file include.

This Opencart plugin is developed using vQmod so no core files will be changed. Installation is very easy.

This Opencart extension support multilanguage.

Here is the screenshot of extension.

You can download the plugin Here

OpenCart – Options Mouse Hover ToolTip Help

Recently new Opencart extension launched on Opencart market place. It is Options Mouse Hover ToolTip Help. Plugin is really cool and useful in showing ToopTip Text for product option in Opencart.

Opencart is E- Commerce / Shopping Cart  Open Source solution. Its stands on second place when comparing to similar solution like Magento, PrestShop etc.  OpenCart is really useful for medium businesses. It is a feature rich open source shopping cart solution.

Opencart is missing feature to add help text for Available Options for products. This plugin help administrator to add text from admin and show it to Customer for more information on Options.

This plugin can also be useful in showing some options Notes, disclaimer or simple information. Extension interface is really easy.

Also it supports “vqmod” so that no core file will be updated. You can find more information on vqmod here.

Visit the extension page on opencart market place. Click Here

Here are some screenshot of plugins.

Admin Multiple Value Tooltip

Admin Single Value Tooltip

Customer / Front end View

 

WordPress Essential Plugins – Every Website Required

Plugins are tools to extend the functionality of WordPressWordPress Plugins allow easy modification, customization, and enhancement to a WordPress blog. Instead of changing the core programming of WordPress, you can add functionality with WordPress Plugins.

What is WordPress Plugins?

Here is a basic definition: A WordPress Plugin is a program, or a set of one or more functions, written in the PHP scripting language, that adds a specific set of features or services to the WordPress weblog, which can be seamlessly integrated with the weblog using access points and methods provided by the WordPress Plugin Application Program Interface (API).

SEO Related WordPress Essential Plugins

SEO is something which every site requires to make their business increase. SEO is a technique which helps search engines find and rank your site higher than the millions of other sites in response to a search query. SEO thus helps you get traffic from search engines.

WordPress SEO by Yoast

Improve your WordPress SEO: Write better content and have a fully optimized WordPress site using the WordPress SEO plugin by Yoast. WordPress SEO is the most complete and advanced WordPress SEO plugin that exists today. It incorporates everything from a snippet preview and page analysis functionality that helps you optimize your pages content, images titles, meta descriptions and more to XML sitemaps. This plugin helps you to optimize your page content, image titles, meta descriptions, comes with tons of other features like Robots Meta configuration, breadcrumbs, permalink cleanup, canonical link element support, and optimized post titles.

 All in One SEO Pack

All in one SEO WordPress PluginWordPress SEO plugin to automatically optimize your WordPress blog for Search Engines. Another free WordPress seo plugins which can be used to Optimizes your WordPress blog for Search Engines (Search Engine Optimization).

Comes with features to support google analytics,custom post types, Advanced Canonical URLs, Built-in API so other plugins/themes can access and extend functionality.

Google XML Sitemaps

This plugin will generate a special XML sitemap which will help search engines to better index your blog. Google XML Sitemaps plugin generates XML sitemaps for your WordPress website, so that it becomes easy for search engine crawlers like Google and Bing, to index your site better. It notifies all the major search engines when you create new content, helping your site be more thoroughly indexed.

SEO Friendly Images

SEO Friendly Images automatically adds alt and title attributes to all your images improving traffic from search engines. SEO friendly Images automatically adds alt and title attributes to your images. If your images inside post or page content don’t have alt or title attribute then this plugins adds them according to your plugins settings so images inside your content becomes seo optimized.

Broken Link Checker

This plugin will check your posts, comments and other content for broken links and missing images, and notify you if any are found. This plugin is very helpful to find all the broken links on your website. This plugin Monitors links in your posts, pages, comments, the blogroll, and custom fields (optional). Detects links that don’t work, missing images and redirects. Notifies you either via the Dashboard or by email.

WordPress Essential Any-Spam and Security Plugins

Every Website require to stop spamming. Stopping bot generated comments. Many Plugins are available to stop span. Here I have listed some good plugin available in WordPress.

Akismet

akismetAkismet filters out your comment and track-back spam for you, so you can focus on more important things. Akismet is the best wordpress anti spam plugin to protect your website from web spam. Akismet plugin filters comments and trackback spam. It runs on autopilot and provides 24-hour protection. Akismet is the best automated spam killer that actually gets better as it learns.

SI CAPTCHA Anti-Spam

SI CAPTCHA Anti-SpamAdds CAPTCHA anti-spam methods to WordPress on the forms for comments, registration, lost password, login, or all. For WP, WPMU, and BuddyPress. SI CAPTCHA Anti-Spam plugin prevents spam from automated bots by adding a CAPTCHA in comment, registration, login and lost password forms. So your websites comment,login and registration forms becomes more secure from spams.

WP-reCAPTCHA

WP-reCAPTCHAIntegrates reCAPTCHA anti-spam methods with WordPress including comment, registration, and email spam protection. reCAPTCHA is popular and widely accepted CAPTCHA systems on many websites. WP-reCaptcha plugin integrates reCAPTCHA anti-spam methods in WordPress as comment, registration forms and email protection.

Login LockDown

Login LockDown records the IP address and timestamp of every failed login attempt. If more than a certain number of attempts are detected within a short period of time from the same IP range, then the login function is disabled for all requests from that range. This helps to prevent brute force password discovery.

Better WP Security

Better WP Security

The easiest, most effective way to secure WordPress. Improve the security of any WordPress site in seconds. This plugin can Remove the meta “Generator” tag, Change the urls for WordPress dashboard including login, admin, and more, Completely turn off the ability to login for a given time period (away mode), Remove theme, plugin, and core update notifications from users who do not have permission to update them, Remove Windows Live Write header information, Remove RSD header information, Rename “admin” account, Change the ID on the user with ID 1, Change the WordPress database table prefix, Change wp-content path, Removes login error messages and Display a random version number to non administrative users anywhere version is used.

Essential Polls and Comments WordPress plugins

 

CommentLuv

Reward your readers by automatically placing a link to their last blog post at the end of their comment. Encourage a community and discover new posts. CommentLuv Pro has even more amazing features that can bring even more traffic and comments to your blog by giving you the ability to fight spam, add keywords, integrate twitterlink, add a top commentators widget, social enticements and by having it installed on your site, you get advanced backlink features on EVERY CommentLuv blog when you comment (there are 10’s of thousands of CommentLuv blogs).

Facebook Comments For WordPress

Allows your visitors to comment on posts using their Facebook profile. Supports custom styles, notifications, combined comment counts, recent comments. This plugin integrates the Facebook commenting system (new, old or both) right into your website. If a reader is logged into Facebook while viewing any comment-enabled page or post, they’ll be able to leave a comment using their Facebook profile.

Disqus Comment System

Disqus Comment SystemDisqus, pronounced “discuss”, is a service and tool for web comments and discussions. Disqus makes commenting easier and more interactive, while connecting websites and commenters across a thriving discussion community.  The Disqus for WordPress plugin seamlessly integrates using the Disqus API and by syncing with WordPress comments.

Subscribe To Comments

Subscribe to Comments allows commenters on an entry to subscribe to e-mail notifications for subsequent comments. The plugin includes a full-featured subscription manager that your commenters can use to unsubscribe to certain posts, block all notifications, or even change their notification e-mail address!

WP-Polls

Adds an AJAX poll system to your WordPress blog. You can also easily add a poll into your WordPress’s blog post/page. WP-Polls is extremely customizable via templates and css styles and there are tons of options for you to choose to ensure that WP-Polls runs the way you wanted. It now supports multiple selection of answers.

Essential Social WordPress Plugin

AddThis

AddthisAddThis Share Buttons help drive traffic to your site by helping visitors share, bookmark and email your content to over 330 services. Get more traffic back to your site by installing the AddThis WordPress plugin.With AddThis, your users can promote your content by sharing to over 330 of the most popular social networking and bookmarking sites (like Facebook, Twitter, Pinterest, Google+ and LinkedIn).

ShareThis: Share Buttons and Sharing Analytics

ShareThis Share Buttons and Sharing AnalyticsQuick & easy sharing service that allows your users to share content – features Open Graph Sharing, Hovering Bar and CopyNShare! Increase social activity on your site with the ShareThis and ShareNow widgets. With access to 120 social channels (including Facebook, Twitter, Like, +1, Email and more), The ShareThis widget is a quick and easy sharing solution for your site to keep your audience engaged in your content and increase traffic to your site. You can also customize your widget for seamless integration to your site. You have the option to use small or large buttons, add counters and place the widget in a clear location for your users to share.

Sociable

Sociable plugin adds a bar of icons of different social networking and bookmarking sites that you can choose for your articles. Using sociable plugin visitors of your website can easily share posts from your website on their social bookmarking accounts.

Essential Stats and Tracking Plugins

WassUp Real Time Analytics

WassUp Real Time AnalyticsAnalyze your visitors traffic with real-time statistics, a lot of chronological information, charts, a sidebar widget. WassUp is a WordPress plugin to track your visitors in real-time. It has a very readable and fancy admin console to keep track of your visitors that gives you a detailed view into almost everything your users are doing on your site. It is very useful for SEO or statistics maniacs.

WP-UserOnline

Enable you to display how many users are online on your WordPress blog with detailed statistics. This plugin enables you to display how many users are online on your WordPress site, with detailed statistics of where they are and who they are (Members/Guests/Search Bots).

Count per Day

Count per DayVisit Counter, shows reads and visitors per page, visitors today, yesterday, last week, last months and other statistics. This plugin count reads and visitors, shows reads per page, shows visitors today, yesterday, last week, last months and other statistics on dashboard, shows country of your visitors, you can show these statistics on frontend per widget or shortcodes too.

Jetpack by WordPress.com

Jetpack by WordPress.comJetpack is a WordPress plugin that supercharges your self-hosted WordPress site with the awesome cloud power of WordPress.com. This plugin can Simple, concise stats with no additional load on your server. Previously provided byWordPress.com StatsEmail subscriptions for your blog’s posts and your post’s comments, Social networking enabled comment system, Likes, allowing your readers to show their appreciation of your posts, Monitor and manage your site’s activity with, Notifications in your Toolbar and on WordPress.com, Simple, Akismet-backed contact forms.

Google Analytics for WordPress

Google Analytics for WordPressTrack your WordPress site easily and with lots of metadata: views per author & category, automatic tracking of outbound clicks and pageviews. Simple installation through integration with Google Analytics API: authenticate, select the site you want to track and you’re done. This plugin uses the asynchronous Google Analytics tracking code, the fastest and most reliable tracking code Google Analytics offers. This plugin have option to manually place the tracking code in another location.

Other Essential Plugin for WordPress

Contact Form 7

Contact Form 7Contact Form 7 can manage multiple contact forms, plus you can customize the form and the mail contents flexibly with simple markup. The form supports Ajax-powered submitting, CAPTCHA, Akismet spam filtering and so on.

 

WordPress PopUp

WordPress PopUp allows you to display a fancy popup (powered as a popover!) to visitors sitewide or per blog, a *very* effective way of advertising a mailing list, sp. Good plugin to add popup ads or banners inside popup on your website. Comes with option to restrict popup from any particular page or posts.

Nrelate

nrelateNrelate display related content in a cool flyout box. nrelate is not just another related posts plugin. Patent-pending technology continuously analyzes your website content and displays other related posts from your website. This ultimately leads to higher page-views for your site, and a better user experience for your visitors.

 

Bulk Email Script in PHP and MySQL Database

In this post, I will show you how we can send an email to multiple receivers using simple PHP script. This script also shows how we can send bulk if we have server limitation on number of emails can be sent in period of time.  Many web hosting provider do not support bulk emails so I have set this script to come out of this limitation.

This Bulk Email script can send HTML email. You can also use this script to send promotional and marketing emails.

In this tutorial we will create three files. First file is HTML content of email, second file is the actual code which sends emails to multiple address one at a time and third file is allowing receivers to unsubscribe from email list.

sample.html

sendmail.php

Replace “http://yourdomain.com/path-to-folder/” with your path to unsubscribe.php

You can set the cron job on sendmail.php on particular time frame. For example if you hosting provider support only 100 mail per hour than you can set cron job par hour and update the value here

unsubscribe.php

 

Comment here if you have any queries. 

Setting Different Template/Design for Post per Category – WordPress

WordPress is providing various ways to set different template on category page but How about if I want to set different template for each category for Single Post Page.

Today I will show how can we achieve this with simple code in single.php

First We need to create single post template for various categories as follow

Above three files i create because i want to use different single post page template for my music, SMS, and news category respectively. You can create as much file as you can

You can simply create copy of your single.php file and rename it with new template and do the changes that you want for each category single page.

After that open your single.php file remove all code and add following code.

Please comment here if this post is help to you or you have any queries.

 

Find Distance in km and Miles from latitude and longitude value in PHP

I was wondering How can I find distance between two places using latitude and longitude in PHP. Today I will show you How easily we can calculate the distance between to places in Kilometer and Miles. The example here, takes two values for each place ( latitude and longitude ).

Lets create form to accept latitude and longitude value.

 

Function to find the distance is as follow:

This function accept one parameter which is not mandatory. To get the result in mile pass ‘miles’ as parameter. Otherwise it returns result in kilometer.

Comment here if you have any queries.

Live Demo Here

Thanks,

WordPress How to set SESSION Custom Variable While Login

Hello friends,

Sometimes we need to set custom session variable for using in our custom code or any other web application which also running parallely with our wordpress installation. Also some time there is need to set and destroy our session variable for our custom web application when wordpress user login or logout.

So first of all we need to enable session in wordpress. I have tested this code in wordpress 3.X. First we need to start the session every time wordpress initialize. To initialize session in wordpress we can use below code.

This will start the session every time wordpress loads. In this function you can write any other session variable that you need to set default. Then we also need to destroy the session when wordpress user logout. To destroy the session and unset any variable we can use below code:

In this function you can write any other session variable that you want to unset.

Now, How can we set user data into the session variable? Answer is very simple see the below code:

Here we add authentication filter of wordpress to set the session. Also we can use this authenticate filter to restrict certain user from login into the wordpress. This function will set the session and later we can use it any where in the wordpress. Also you can set other system session variable so that when any user logs in wordpress he also get logs in other Custom system but condition is both wordpress installation and custom system need to be on same server.

Please post your comment here if this information helps you. I will keep posting more as I come to know more things.

Thank you 🙂

 

 

 

WordPress query posts by page id

It is very simple just use page_id argument and pass the page_id to query post.

 

Thanks