Tags » Drupal

How add thumb image in custom Facebook share window? Part 2

Hello Friends!

Facebook has done some changes in his API so that’s why we are unable to define the “Share Image” in facebook share window in a way that was given on my last post… 139 more words


Drupal 7 функції для роботи з базою даних


$uid = 1;
$result = db_query(
  'SELECT n.nid, n.title, n.created FROM {node} n WHERE n.uid = :uid',
   array(':uid' => $uid)
// Result is returned as a iterable object that returns a stdClass object on each iteration
foreach ($result as $record) {
  // Perform operations on $record->title, etc. 803 more words

Drupal 7 перевірка на відсутні модулі

function MYMODULE_init() {

    $startingtime = microtime(true); 
    $o = '<p>Checking for dead modules ...</p>';
    $result = db_select('system')
      ->fields('system', array('filename'))
      ->condition('status', '1', '=')
      $n = 1;
      $m = 0;
    foreach ($result as $row) {
      $path = DRUPAL_ROOT.'/'.$row->filename;
      If (!file_exists($path)) { 
          $o .= "#$n $path<br>";
    $timedif =  round(microtime(true) - $startingtime,3);
    $o .= "Total of $n active modules registered in database. 27 more words

Drupal Release Versions 7.27 and 6.31 to Fix Security Vulnerabilities

Drupal versions 7.27 and Drupal 6.31 which now available for download, containing several fixes for security vulnerabilities. Drupal is an open source platform maintained and developed by a community of 630,000+ users and developers. 

Drupal get theme path

<img src="/<?php print path_to_theme(); ?>/images/logo.gif" alt="<?php print t('Home') ?>" id="logo" />


Drupal 7: How to get user's IP or hostname ?

In Drupal 7 how to find out any guest user or registered user’s IP address or hostname?

The answer is we can use session_id() which is stored in the ‘session’ table in the D7. 39 more words


Core Upgrade - 7.26 - 7.27

It has been a relatively long time for this update but it is finally here and should be installed as soon as possible. I followed the same procedure as always and have had no issues with the install. 12 more words