plugin, wordpress

Announcing Release of “The Video Popup” plugin at WordPress Repository

My plugin “The Video Popup” got approved and is now available for download in wordpress repository. Its a light-weight plugin that generates a YouTube video popup when a¬†page is scrolled to the bottom. You can check it out here:

https://wordpress.org/plugins/the-video-popup/

The next version of the plugin is expected to have:

  • support for vimeo
  • custom point of trigger
  • overlay video popup

Feel free to suggest more features in comments below or rate the plugin in the repository. ūüėČ

Advertisements
Standard
wordpress

The Video Pop-up Plugin: WordPress

This plugin is still not released. You can access the source code here: https://github.com/meshivam/the-video-popup-plugin

Its been long since I originally wrote this plugin, however I think now it would be nice to get it out in the wordpress repository and let it live its life!

This post serves as the formal introduction to the plugin. Let’s start from the basics.

What do you mean by video pop-ups?
A Pop-up launches when you visit certain websites. Their main aim is to try to catch the visitors attention and to bring something to their notice. As the plugin name suggests, it will help you pop-up videos on your site.

Currently the plugin supports only youtube videos. I hope to extent support for vimeo soon by the next version upgrade.

When is the pop-up triggered?
The pop-up is triggered when the user scrolls to the bottom of the page (footer). This makes sure user has least distractions on the site, only when he reaches to the end, he gets the pop-up. This makes its less annoying for visitors. However future version may provide customization over trigger.

How to setup the plugin?
Once you install the plugin to your site, you need to activate it. After the plugin is activated, you can find ‘Video Popup’ ¬†settings in your dashboard left pane.

Selection_045

Click on the ‘Video Popup’ setting button to get the settings page. As below:

Selection_046

By default the height is 325px and width is 420px. You can however define your own custom dimensions.

Once you save changes, the popup gets activated.

Selection_047

Users have the option of minimizing/maximizing the video.

Standard
wordpress

Solving WordPress Pretty Permalink 404 Error

While working on a project recently I came across a weird error. I was examining the wordpress taxonomy tables for slugs when I realized pretty permalink was not working for my localhost wordpress setup. On making a few google searches I realized people face this quite often and yet I had to google and experiment for about 30 more minutes before solving the issue, and therefore I decided to write this post.

wordpress-404

First thing to check:

When WordPress creates custom permalinks or slugs, it overwrites the server’s defaults setups in its own .htaccess file. ¬†For those who don’t know what .htaccess file is, here’s a quick definition (wikipedia):

“A .htaccess (hypertext access) file is a directory-level configuration file supported by several web servers, that allows for decentralized management of web server configuration. They are placed inside the web tree, and are able to override a subset of the server’s global configuration for the directory that they are in, and all sub-directories.”

In simple words you describe your site specific server configurations in this file. As wordpress does most of such technical things all by itself, you should ideally not be worried about what goes in this file. However there may be situations when wordpress is not able to create/modify this file due to file permission issues. Make sure this is not the case.

Go to the wordpress folder. In my setup (debian/apache2) I go: /var/www/wordpress

To list all file permission do:

ls -al

Incase the file is not present. create a .htaccess file using

touch .htaccess

Now make sure wordpress has all the authority to modify it. If you are in your local system, you can safely do:

sudo chmod 777 .htaccess

To make sure this worked, re-enable to pretty permalinks from wordpress admin panel, save the settings and open the .htaccess file. It should contain something like;

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress

Meaning wordpress is able to modify it. Check if your issue is resolved.

 

Step Two

If 404 is still haunting your posts it means the problem is beyond the scope of your wordpress directory. We now need to look for master server configurations. You can find them in your httpd.conf file.simpson404

Note:  httpd.conf is empty (or nonexistent) in some distributions.

That was the case with me, so we can edit apache2.conf instead. Typically you can find this file here:

/etc/apache2/apache2.conf

In the conf file, look for:

<Directory /var/www/>
   Options Indexes FollowSymLinks
   AllowOverride None
   Require all granted
</Directory>

As you can see the¬†AllowOverride option is set to ‘None’,¬†therefore it is¬†blocking our .htaccess file to override the server configuration for our particular site. Replace ‘None’ with ‘All’ to fix this. conf file should now look like:

<Directory /var/www/>
   Options Indexes FollowSymLinks
   AllowOverride All
   Require all granted
</Directory>

Now restart the apache server by:

sudo service apache2 restart

Check the links in the browser. As we just edited the main server config file, our links should start working.

 

Still No Luck?

There maybe be possibility that your issue is still not solved. One explanation can be that this master configuration is getting overridden somewhere. Check the ‘sites-available folder’ inside apache2. Here:¬†/etc/apache2/sites-available

In 000-default.conf make the same changes as above i.e. setting AllowOverride All

Restart the server again and check the links in the browser.

Incase its not working yet, we come to the last thing that can go wrong. mod_rewrite is yet not enabled. To enable mod_rewrite for Apache do:

sudo a2enmod rewrite

sudo service apache2 restart

Check the links and they got to be frigging working now!!

Standard