If you want to list current user uploaded video in drupal, use below code. Drupal brightcove module provides an option to store the Drupal username of the user who uploaded a video. You need to create this field(custom field) in brightcove before using this feature. Click here to understand how to create cutsom field in BC Studio.
Goto drupal brightcove configuration page and add this field name in "Brightcove Drupal User Custom Field" field. Brightcove module automatically update drupal username in brightcove while uploading new video into video cloud. The below function will fetch all the videos which uploaded by the user.
// Make our API call $videos = $bc->search('video', $terms, $params); // $videos contains all video which uploaded by the current user //write your code for display the result }
Brightcove video cloud, a cloud based video hosting and publishing solution. Drupal is one of the most commonly used open source CMS.
To integrates brightcove video cloud into drupal, drupal community provides one module called Brightcove module. . Using this module you can add Brightcove video to your content and access the information from the Video Cloud in your site.
In brightcove module they are using Brightcove Media
API and this APi provides various methods to retrieve properties from brightcove video cloud. But this module is mainly focusing on find method. So here I am trying to explain how to use search method in drupal. Search method is also a simple function to retrieve properties and information from Brightcove.
To call search method we need to pass three arguments - method, terms and params.Using this method we can search custom fields from brightcove. Here I'm explaining how to search custom fields value from brightcove using search method.
Below codeshows how to search for a video with "jobs" in the title AND tags.
// Make our API call $videos = $bc->search('video', $terms, $params);
Below code will explain how to search video with custom fields. custom field name is drupal_user and this field is used for storing uploaded user name(Drupal Username) in brightcove.
Virtual Hosting is a method for hosting multiple sites/domains in a single server. It helps to reduce the cost and can share the memory and processor cycle. In local host also we can create Virtual host and we can call original domain name(production/live domain) from our development environment(localhost). Here I am providing the steps for creating Virtual host in Linux/Ubuntu workstation.
i. Assume your code resides at /var/www/yoursite
ii. You can access your site using http://localhost/yoursite.
iii. Edit vhosts file in sites-enabled. sudo gedit /etc/apache2/sites-enabled/vhosts.conf.
iv. Add below code in vhosts file
<VirtualHost *:80>
ServerName local.yoursite.com
ServerAlias www.local.yoursite.com
DocumentRoot /var/www/yoursite
</VirtualHost>
v. Open the file /etc/hosts in your editor.
vi. Add below lines of code.
127.0.0.1 local.yoursite.com
vii. Restart your apache server.
sudo /etc/init.d/apache2 restart
viii. Access http://local.yoursite.com to view your site in direct domain.
Normally date field is stored in database as timestamps format, the number of seconds since 00:00:00 UTC on January 1, 1970. Some times the date represented as the number of milliseconds.
There is no default function available in PHP to convert this milliseconds representation to human readable format. In PHP date function is used for converting timestamp format to local date/time format.
This following PHP function will convert milliseconds format to local date format
We can redirect the site url to "www" prefix, whether the user is accessing the site without "www" prefix by adding rewrite url in .htaccess file in root folder.
add following lines in .htaccess file to add www prefix.
RewriteEngine on
RewriteCond %{HTTP_HOST} ^yoursitename\.com$ [NC]
RewriteRule ^(.*)$ http://www.yoursitename.com/$1 [L,R=301]
Similarly we can remove "www" prefix from the url and redirect to without "www" by adding following lines in .htaccess file
Wordpress is a popular blogging platform like google blogger. It provides more flexibility than blogger. If you want setup a good looking blog site quickly without knowing more technical stuff, then Wordpress should be the most likely choice for you . It provides a lot of plugins that just enable to activate more user friendly functionalities.
Wordpress is a Content Management System(CMS) build around PHP and MySQL. Like Wordpress, Drupal is also a CMS build around PHP and MySQL with almost all the strengths of Wordpress. But Drupal is more developer centric and customizable and robustwhen compared to Wordpress and it useful for developing Medium and large Websites, other than just a blog site.
Due to the huge fanbase and ease of programming, Wordpress has numerous plugins at its disposal. There are Drupal equivalents for most of these. Here is our take on a few popular Wordpress plugins and their equivalent Drupal modules.
1. Akismet - It is a Wordpress plugin that check your comments against the Akismet web service to see if they look like spam
or not and lets you review the spam it catches under your blog's
"Comments" admin screen.
Mollom is the Drupal equivalent of Akismet and is a popular spam prevention service module. Drupal version of Akismet module also available
2. All in one SEO pack- Automatically optimizes your WordPress blog for Search Engines (Search Engine Optimization)
Drupal has several tested and proven modules available in the Drupal
core as well as in the contributed section. The most popular ones are
Nodewords ( A new module Metatagsis on development to replace nodewords. Currently there is a quick solution to use Metatags Quick available for Drupal
3. Bad Behavior - It prevents spammers from ever delivering their junk, and in many cases, from ever reading your Wordpress site in the first place.
Bad Behavior is available for Drupal and it is a set of PHP scripts which prevents spambots from accessing your site
by analyzing their actual HTTP requests and comparing them to profiles
from known spambots. It goes far beyond User-Agent and Referer, however.
4. Broken Line Checker - It will check your posts, comments and other content for broken
links and missing images, and notify you if any are found.
Link Checker is the Drupal module to detect broken hypertext links.
5. Contact Form 7 - Wordpress plugin that 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.
Drupal has core module
for Simple contact us form. Webform can be used to
create any type of custom forms. It supports csv export of the collected
information. It is also possible to use captcha with webforms.
8. GTranslate
is a Wordpress plugin that provides an automatic translation service to
translate your web page with Google power. With the ability to
translate over 58 available languages your site will be available to
more than 98% of Internet users.
GTranslate for Drupaldoes the same thing in Drupal and has been coded by the same author.
9. Lightbox Plus is a Wordpress plugin
that permits users to view larger versions of images, simple slide
shows, videos and content all in an overlay. It uses the popular
colorbox jquery plugin.
Colorbox module for Drupal will provide full integration of the colorbox plugin.
10. MapPress is is the most popular and easiest way to create great-looking Google Maps and driving directions in your Wordpress blog.
In Drupal Gmap is the advanced and complete google map solution in Drupal. If you just want a basic google map embedded in a page, use LocationMap or Simplemap as per your requirements.
11. Newsletter is a Wordpress plug-in
that lets you collect subscribers on your blog with a single or double
opt-in subscription process. Double opt-in is law compliant and it means
the user has to confirm the subscription following simple standard
instructions sent to him via email.
Simplenews Drupal module - It
can be used to send newsletters. Both anonymous and authenticated users
can opt-in to different mailing lists. HTML email can be send by adding
the Mime Mail module.
12. NextGEN Gallery Wordpress plugin
is a fully integrated Image Gallery plugin for WordPress with a
slideshow option. Before I started writing the plugin I studied all the
existing image and gallery plugins for WordPress. Some of them are
really good and well designed, but the gap I filled was a simple
administration system at the back end which can also handle multiple
galleries.
There are no equivalent ready made solutions available for Drupal, though there are some modules like Fast Gallery available, it will not stand anywhere near the features provided by the nextgen gallery.
The best way to create a custom image gallery in
Drupal is to use the content types, image field and views. You can use
modules like DDBlock, Views_Slideshow using views and content types.
13. Redirection is a WordPress plugin to manage 301 redirections and keep track of 404 errors without requiring knowledge of Apache .htaccess files.
14. Simple Tags
add some tools for taxonomies like Terms suggestion, Mass Edit Terms,
Auto link Terms, Ajax Autocompletion, Click Terms, Auto terms, Advanced
manage term
In Drupal: By default Drupal taxonomies support
tags with auto-complete option. Other features like tagcloud and manage
tags can be done using the
Community tags- allow users to tag content and track it.
15. Social Plugins - Wordpress comes with the popular social plugins Addtoany and Addthis.
Both of these plugins provide share icons of the
popular social bookmarking websites. Add-to-any allows integration with
google analytics and Addthis allows customization of the social icons.
BothAddtoany and Addthis are available as modules for installation in Drupal to enhance your social experience while using Drupal
16. WP e-Commerce is a free WordPress Shopping Cart Plugin that lets customers buy your products, services and digital downloads online.
Ubercart is
the popular tool for ecommerce applications in Drupal. It is a superior
e-commerce solution available when compared to the wordpress equivalent
and has tons of features.
17. WP-DB-Backup is a Wordpress plugin that allows you easily to backup your core WordPress database tables. You may also backup other tables in the same database.
In Drupal the Backup and Migrate module (is the best automated backup solution integrated with Drupal.)
Security review is the Drupal module that offers the same functionality will do the same kind of security check for Drupal.
19. WP-Super Cache is a Wordpress plugin
that generates static html files from your dynamic WordPress blog.
After a html file is generated your webserver will serve that file
instead of processing the comparatively heavier and more expensive
WordPress PHP scripts.
Boostis the popular alternative in Drupal for static page caching
20. Yet Another Related Posts Plugin (YARPP) gives
you a list of posts and/or pages related to the current entry,
introducing the reader to other relevant content on your site.
Similar Entries is the Drupal equivalent module that can do this same task.
Apache is the most commonly used web server. It is a free open source web server. PHP is an open source server scripting language. It has a lot of advantages. MySQL is also an open source database used for small and medium data storage. It can also used for large data storage also.
We can install apache, PHP and MySQL in two ways. 1. Download source code from their site and install. 2 the easiest way install it from synaptic package manager. If you use this method apt-get automatically manage all dependencies. So I explain the second method here.
1. Open the Terminal from Applications -> Accessories -> Terminal
2. Install apache2 copy paste command to terminal
sudo apt-get install apache2
3. Install PHP5
sudo apt-get install php5 libapache2-mod-php5
4. Restart apache
sudo /etc/init.d/apache2 restart
Now the PHP was installed. To test it create a php page in /var/www/ - the webroot and run it
Example sudo gedit /var/www/hello.php
write a basic php code in it
to run this script type http://localhost/hello.php in your browser and you can see "Hello World" in it.
7. If you need phpmyadmin follow this step. If you like to use MySQL GUI then skip this step
sudo apt-get install phpmyadmin
Restart apache
sudo /etc/init.d/apache2 restart
Add following lines in httpd.conf
# Enable PHPMyAdmin
Include /etc/phpmyadmin/apache.conf
To access httpd.conf copy paste following line to terminal
sudo gedit /etc/apache2/httpd.conf
Restart apache
8. If you need to access your url as http://localhost/~username, enable userdir module in apache2. enable mod_rewrite to allow clean url
9. Create folder /home/<username>/public_html -- > this is the folder which we are going to use as the document root for local development. So you will be accessing your local websites as http://localhost/~username/sitename
10. Edit /etc/apache2/mods-available/userdir.conf and change the AllowOverride line to just read AllowOverride All
Now you can use public_html as user document root
Now a days most of the websites are developed by PHP. The main reason is that, it is open source and free software and most of the web servers support PHP. In PHP based web development companies, they are using frameworks for the site development. Because it provides better stability and security for the sites. Also it provide good coding standards and good templates for the sits.
Here I providing a list of good, commonly used PHP based frameworks
1. Drupal (http://drupal.org)
Drupal is the most commonly used PHP framework. It provides better security and stability for the sites. A good development teams for drupal. They are providing security updates and patches in regular interval and more than 3000 contributed modules and themes are available in drupal.
Drupal strictly following PHP coding standard and its provide extensibility and good support. Drupal is used for blog sites, e-commerce site and medium and large websites.
In developer point of view, easy for extend, developer friendly and easy to understand the code.
2. Wordpress (http://wordpress.org)
Wordpress is commonly used for developing blog sites. It provides a lot of good templates for sites. And most of the common blogging functionalities are included in the package.
Now a days most of the blogging sites are uses wordpress as their back end.
3. joomla (http://www.joomla.org)
joomla is also a php based framework. It is commonly used for organizations and institutions websites. Joomla gives a lot of beautiful templates. It has vibrant volunteer community, that help you to build good web sites.
4. Cake PHP (http://cakephp.org)
Cake PHP is fee open source, rapid development framework for PHP that provides an extensible architecture for developing, maintaining, and deploying applications.
It Using MVC architecture for the development. So developer need to write a less code.
5. Zend Framework (http://framework.zend.com/)
Zend, the PHP based most featured framework. It's the most old and well-known framework. Zend Framework has hundreds of contributors and users number in the hundreds of thousands.