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.
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.
After the release of drupal 7 in earlier this year, drupal developers beginning to plan for new version, Drupoal 8. In annual DrupalCon conference this week, Drupal founder Dries Buytaert detailed what lessons were learned in the Drupal 7 development process and how those lessons will be applied to Drupal 8.
Drupal is among the most popular open source content management system in use. Thousands of websites uses drupal. Major sites like Mozilla, NASA, Whitehouse.gov and among others used drupal for their sites.
Development is now beginning on Drupal 8 and Buytaert is restructuring the project to ensure that the lessons of Drupal 7 are not forgotten. Dealing with bugs is one of Buytaert's top priorities.
"At no point in time will there be more than 15 critical bugs," Buytaert said. "I will not pull in a big change if we know there are known bugs. This gives us the ability to do timely releases because we know at most the release is only 15 critical bugs away from being ready."
"The biggest risk to Drupal is getting so big that we become slow," Buytaert said. "Our ability to be open to change, accept change and be agile is key."
AwardSpace is a web hosting provider, to provide both free and paid services. In free hosting service a lot of people facing issues in drupal-6 installation. So they are switching the free hosting account to paid or switching drupal to other frameworks. So here I am trying explaining how to install drupal CMS in Awardspace web hosting server. Drupal 6 needs PHP5 for the installation.
For installing drupal, first download the installation files from Drupal site (drupal 6.20).Once you have downloaded Drupal and created an account in Awardspace, we need to upload the files to our Awardspace account. The easiest way to do this is using and FTP client, filezilla or other FTP client. Now you can install drupal. But before starting please check the PHP version that installed in your server. For checking go to PHP settings on the Web Manager of the Awardspace Control Panel, Make sure the PHP installed is PHP5 otherwise change the version to PHP5 (Some times they provide PHP4. If you have PHP4 then change it to PHP5). Otherwise this error might appear:
register_globals is enabled. Drupal requires this configuration directive to be disabled. Your site may not be secure when register_globals is enabled. The PHP manual has instructions for how to change configuration settings. (Currently using PHP register globals Enabled ('1'))
After changing PHP version, access your site through the browser. You will get a installation page on your browser. But some times it will throw an "500 Internal Server Error" but don't worry. To fix this, connect to your file manager from the Hosting Control Panel (or using your FTP client) and rename the .htaccess file in the drupal root directory to another name eg: .htaccess.old.
Then try again the install.php script, the page will let us access the install page. The first page is the Choose language screen where you can choose whether to install Drupal in English or another language.
You can install Drupal 7 also with the same steps.
Drupal is one of the most commonly used open source CMS. In this CMS most of the developers are not aware of how to modify existing forms. Drupal providing a functionality to modify existing form, custom validation or submitting or adding extra fields to a existing form or core module's form. In my experiences most of the developers are not know this feature in drupal. So they are going to write new module for the same functionalities. This will cause the performance of the site and it make the site to costly.
This document helping you to customize an existing form mainly modifying core module's forms. The solution is use form_alter_hook "hook_form_alter()". It perform alterations before a form is rendered. You can use this function any where in your module. The hook_form_alter() is called for all forms, you can also use hook_form_FORM_ID_alter() to alter a specific form.
Example code
In this example, I am adding additional field in User Login form and add custom validation for this.
function mymodule_form_alter(&$form, &$form_state, $form_id) {
if($form_id=='user_login'){
$form['key'] = array(
'#title' => 'key Value',
'#type' => 'textfield',
);
//adding custom validation
$form['#validate'] = array('_custom_form_validate');
}
return $form;
}
/**
*You custom validation function
**/
function _custom_form_validate(){
//your validation code here
}
The above example is for all forms, you can use this function for modifying one or more forms by using if condition,.
If you want to modify specific form you can use hook_form_FORM_ID_alter() function
eg: