Correct way of passing variables between hook and tpl.php

I asked a similar question a few months ago, but the true is that there is very few information about the correct way of doing this.

The simplest is using arg() functions, but as you can read in the docs, is the most wrong way of doing it. Trying to follow the correct steps, that is what I have so far:

A menu with the paths which we need:

	/*
	 * Category search section
	*/
	$items['products/search/%/%'] = array(
			'title'             => 'Products search filtering',
			'description'       => 'Show review categories.',
			'page callback'     => 'ThemeSearchProducts',
			'page arguments'    => array(2,3),
			'access callback'   => 'user_access',
			'access arguments'  => array('access content'),
			'type'              => MENU_NORMAL_ITEM,
			'file'              => 'includes/mymodule_reviews.inc',
	);

This arguments are sended via ... arguments (sorry for the joke). to the themesearchproducts function

/**
 * THEME List of reviewable products
 *
 */
function ThemeSearchProducts($arg1, $arg2){

// 	$output = theme('search_products', $arg1);
  $output = theme('search_products', 'test');

  echo 'args in theme: ' . $arg1 . $arg2 . ' || ';
  
  
  return $output . theme('pager', 10);
}

Drupal For Social Networking like facebook.

I would like to make a drupal site like facebook or a social network clone.

Can someone recommend me the modules I need for a distribution that would suit my needs?

Basically I need
Profiles with ability to leaves comments on them, For example "nice pics", or "It was great talking to you last night"
Chat
Forum
Member picture gallery
etc.

basically they way boonex dolphin 7 comes out of the box, except I would like to use drupal because it is GPL and it has multi site abilities.

Thanks for any suggestions.

Features for Drupal 8

I have been a Drupal User and front and back-end developer since the late 1990's and one thing that I have waited for was a more comprehensive means to install modules. Even until 7.x developers still have to manually search for some of the most fundamental modules. A wise choice would be to have a links in modules with the leading http://www.drupal.org/[module_name] where the missing module can be cut and pasted or even found with links to the pages.

Site doesn't work anymore

Hello Drupal,

Since yesterday evening my site doesn't work yet. I didn't changed anything (but maybe other people who work on my site.. I don't know). I get this error:

The website encountered an unexpected error. Please try again later.

PDOException: SQLSTATE[28000] [1045] Access denied for user 'tevekijker_drup1'@'localhost' (using password: YES) in lock_may_be_available() (line 167 of /home/tevekijker/domains/tevekijker.be/public_html/includes/lock.inc).

Does anybody know how I can make my site work again?

How to manage data of an external table

Hi all,
I'd like to show in a Drupal site data contained in an external table.
The table is on the same database of Drupal but is not a Drupal table.

Which is the best way to manage this table?

Thank you

claudio

Only drupal bones

I am developing drupal 7 since 2011, but only now i thought is it possible do not use core drupal themes and adminstration and some basic modules, is it possible?

Pages

Subscribe with RSS Subscribe to RSS - Drupal 8.x