Wednesday, June 13, 2012

Setting up variables for use in a template (preprocess and process functions)

The main role of the preprocessor is to set up variables to be placed within the template (.tpl.php) files. Plain theme functions do not interact with preprocessors.
Notes:
  • Preprocessors are also used for providing template suggestions.
  • In versions 5 and below, the function _phptemplate_variables served the same purpose. It has been deprecated in 6.
  • Prior to Drupal 6.7, for your theme to have its preprocessors recognized, the template associated with the hook had to exist inside the theme. When a default template exists, copy it to your theme and clear the registry (or you should really be upgrading to a later version of Drupal anyway for security reasons, at which point you don't have to worry about this).
Read More..
www.drupal.org

Wednesday, June 6, 2012

Last Updated

<div class="ftr_last_updated clear"> <?php print t('Last Updated on:'); ?>
  <?php
       $format2 = 'd-m-Y';
       $result2 = db_query("SELECT title, changed FROM {node} WHERE status = 1 ORDER BY changed DESC");
        if ($node = db_fetch_object($result2)) {
           $output2 .= date($format2, $node->changed);
         }
          print $output2;
  ?>
</div>

Module - CKEditor - WYSIWYG HTML editor

This module will allow Drupal to replace textarea fields with the CKEditor - a visual HTML editor, sometimes called WYSIWYG editor. This HTML text editor brings many of the powerful WYSIWYG editing functions of known desktop editors like Word to the web. It's very fast and doesn't require any kind of installation on the client computer.

What is CKEditor?

CKEditor is the next version of FCKeditor. The editor has been rebranded and completely rewritten. It is now much faster (the code has been optimized), loads faster (the number of files has been reduced, so the browser will perform less HTTP requests) and developers friendly.

Read More 
www.ckeditor.com/ckeditor-for-drupal 
www.drupal.org/project/imce
www.drupal.org

Friday, June 1, 2012

page.tpl.php

General utility variables:
  • $base_path: The base URL path of the Drupal installation. At the very least, this will always default to /.
  • $css: An array of CSS files for the current page.
  • $directory: The directory the theme is located in, e.g. themes/garland or themes/garland/minelli.
  • $is_front: TRUE if the current page is the front page.
  • $logged_in: TRUE if the user is registered and signed in.
  • $is_admin: TRUE if the user has permission to access administration pages.
Read More

www.drupal.org

Wednesday, May 30, 2012

Drupal Accessibility Statement


As an inclusive community, we are committed to making sure that Drupal is an accessible tool for building websites and that Drupal helps you create websites that are themselves accessible.
This initiative started with advancements with Drupal 7 accessibility. We have committed to ensuring that all features of Drupal core conform with the Worldwide Web Consortium (W3C) guidelines: WCAG 2.0 and ATAG 2.0. Where possible we will also update the previous version of Drupal core, version 6, to enhance its accessibility.

Accessible Features in Drupal

If you rely on a screen reader or other assistive technology, you will be glad to know that we have built Drupal to encourage and support the proper use of semantic markup. For example, you should be able to use headings reliably for page-level navigation.
The accessibility team has worked to identify barriers to accessibility with Drupal and worked to resolve them. We've identified and resolved a number of issues in the core code of Drupal 7 and raised awareness within the community. We've added some additional support for Rich Internet Applications by adding some WAI-ARIA support. There have been many improvements to both the visitor and administrator sides of Drupal, especially:
  • Search engine form and presentation
  • Drag and Drop functionality
  • Color contrast and intensity
  • Adding skip navigation to core themes
  • Image handling
  • Form labeling
  • Removing duplicate or null tags

Tuesday, May 29, 2012

Module - Visitors

This module used for displaying a visitors info.

Reports

  • View pages that have recently been visited.
  • View pages that have been hit frequently.
  • View pages count per month.
  • View pages count per day of month.
  • View pages count per day of week.
  • View pages count per hour.
  • View pages count per host.
  • View access log.
  • View user activity report (hits, nodes, comments).
  • View referer list.

Visitors Block

  • Total Visitors.
  • Unique Visitor.
  • Registered Users.
  • Last Registered User.
  • Published Nodes.
  • Your IP.
Read More

www.drupal.org

Module Counter

Counter module counts how many visitors on your website. This module provides real time counting. All data saved to database.
Features:
  • Count Site Counter per day, minute even second!
  • Count Unique Visitor
  • Count Registered and Unregistered User
  • Count Published and unpublised Node
  • Display Web Server IP and Client IP
  • Report: Client IP, Access Date, Access Page
  • Initial values
  • Visitor Statistic per day, week, month and year!
Read More
www.drupal.org

only show translated menu items into current language (Drupal 8)

function MY_THEME_preprocess_menu(&$variables) {   if ($variables['menu_name'] == 'brancott-header-menu') {    $langu...