Подскажите пожалуйста как получить в переменную ID открытой страницы, чтобы потом сравнить с id комментария?
Или может эта проблема как то по другому решается?
вот так, вроде:
interface FelineInterface {
public function meow();
public function eatLasagna($amount);
}
class GarfieldTheCat implements FelineInterface {
protected $lasagnaEaten = 0;
public function meow() {
return t('Meow!');
}
public function eatLasagna($amount) {
$this->lasagnaEaten += $amount;
}
}
function make_cat_speak(GarfieldTheCat $cat) {
print $cat->meow();
}
function make_cat_speak(FelineInterface $cat) {
print $cat->meow();
}
$result = db_query("SELECT title FROM {node} WHERE nid = :nid", array(':nid' => 42));
$title = $result->fetchField();
$title = db_query("SELECT title FROM {node} WHERE nid = :nid", array(':nid' => 42))->fetchField();
class WidgetNotFoundException extends Exception {}
function use_widget($widget_name) {
$widget = find_widget($widget_name);
if (!$widget) {
throw new WidgetNotFoundException(t('Widget %widget not found.', array('%widget' => $widget_name)));
}
}
function seoblock_admin() {
$form = array();
$form['sitename'] = array(
'#type' => 'textfield',
'#title' => t('Sitename'),
'#default_value' => variable_get('sitename', ''),
'#size' => 20,
'#maxlength' => 20,
'#description' => t('without "http://"'),
);
$form['alexa'] = array(
'#type' => 'checkbox',
'#title' => t('Display Alexa rank'),
'#default_value' => variable_get('alexa', false),
);
$form['tic'] = array(
'#type' => 'checkbox',
'#title' => t('Display Yandex.Tic'),
'#default_value' => variable_get('tic', false),
);
$form['pr'] = array(
'#type' => 'checkbox',
'#title' => t('Display Google.PR'),
'#default_value' => variable_get('pr', false),
);
return system_settings_form($form);
}