!variable, which indicates that the text should be inserted as-is. This is useful for inserting variables into things like e-mail.
<?php $message = t("If you don't want to receive such e-mails, you can change your settings at !url.", array('!url' => l(t('My account'), "user/$account->uid"))); ?> @variable, which indicates that the text should be run through check_plain, to escape HTML characters. Use this for any output that's displayed within a Drupal page. <?php $title = t("@name's blog", array('@name' => $account->name)); ?> %variable, which indicates that the string should be HTML escaped and highlighted with theme_placeholder() which shows up by default as emphasized. <?php $message = t('%name-from sent %name-to an e-mail.', array('%name-from' => $user->name, '%name-to' => $account->name)); ?>
0 Comments
Perform cleanup tasks.
This hook is run at the end of each page request. It is often used for page logging and printing out debugging information. Only use this hook if your code must run even for cached page views. If you have code which must run once on all non cached pages, use hook_init instead. Thats the usual case. If you implement this hook and see an error like 'Call to undefined function', it is likely that you are depending on the presence of a module which has not been loaded yet. It is not loaded because Drupal is still in bootstrap mode. Parameters $destination: If this hook is invoked as part of a drupal_goto() call, then this argument will be a fully-qualified URL that is the destination of the redirect. Modules may use this to react appropriately; for example, nothing should be output in this case, because PHP will then throw a "headers cannot be modified" error when attempting the redirection. Return value None. Syn: hook_preprocess(&$variables, $hook)
hook_preprocess used to Preprocess theme variables for template files. This hook allows modules to preprocess theme variables for theme templates. It is only called for theme hooks implemented as template files, but not for those implemented as theme functions. The purpose of this hook is to allow modules to add to or override variables for all template files. Parameters: $variables: The variables array (modify in place). $hook: The name of the theme hook.
Syn: custom_url_rewrite_outbound(&$path, &$options, $original_path)
This function should change the value of $path and $options by reference. Parameters: $path: The alias of the $original_path as defined in the database. If there is no match in the database it'll be the same as $original_path $options: An array of link attributes such as querystring and fragment. See url(). $original_path: The unaliased Drupal path that is being linked to. Syn: custom_url_rewrite_inbound(&$result, $path, $path_language)
This function should change the value of $result by reference. Parameters: $result: The Drupal path based on the database. If there is no match in the database it'll be the same as $path. $path: The path to be rewritten. $path_language: An optional language code to rewrite the path into. Hook Allow modules to interact with the Drupal core.
Drupal's module system is based on the concept of "hooks". A hook is a PHP function. Each hook has a defined set of parameters and a specified result type. Using a hook_update_n() function we can able to add New Columns to the table.
Here, 'n' represents the number. Suppose if we want to add a new column called 'newcol' to mytable1. First, we have to update our schema structure in modulename_schema() so that newly created tables get the new column. Then, add an update function to modulename.install: <?php function modulename_update_1() { $ret = array(); db_add_field($ret, 'mytable1', 'newcol', array('type' => 'int')); return $ret; ?> Message: HTML Parsing Error: Unable to modify the parent container element before the child element is closed (KB927917) Line: 0 Char: 0 Code: 0
If you face this issue. Just do the below steps. 1. Check whether you have any Popup page in you website. Like Thickbox, Lightbox, etc.. 2. Don't open the popups directly in the pages. 3. Open the Popups inside the Document Ready state. Example: $(document).ready(function(){ open_thickbox('logout/popup', 450, 600, true, true); }); 4. This solution for IE related browsers only. Because Firefox and other browsers will not trigger this issue. 5. This solution for IE7, IE8 etc.. 6. Enjoy.. ! If you still face issue .. Please post comments here.. !! |