array('url' => NULL, 'title' => NULL), ); // @TODO: Needs detailed comments. Patches welcome! return $hooks; } /** * implementation of theme_more_link */ function myzen_more_link($url, $title) { // watchdog("template.php","myzen_more_link"); return ''; } /** * Override or insert variables into all templates. * * @param $vars * An array of variables to pass to the theme template. * @param $hook * The name of the template being rendered (name of the .tpl.php file.) */ /* -- Delete this line if you want to use this function function myzen_preprocess(&$vars, $hook) { $vars['sample_variable'] = t('Lorem ipsum.'); } // */ /** * Override or insert variables into the page templates. * * @param $vars * An array of variables to pass to the theme template. * @param $hook * The name of the template being rendered ("page" in this case.) */ function myzen_preprocess_page(&$variables) { if (module_exists('path')) { $path_alias = drupal_get_path_alias($_GET['q']); $alias_parts = explode('/', $path_alias); $last = array_reverse($alias_parts); $last_part = $last[0]; if ($last_part != "edit") { $templates = array(); $template_name = "page"; foreach ($alias_parts as $part) { $template_name = $template_name . '-' . $part; $templates[] = $template_name; } $variables['template_files'] = $templates; if (arg(0) == "node" && is_numeric(arg(1))) { $node_type = $variables['node']->type; $variables['template_files'] = array("page-node-$node_type.tpl.php"); //watchdog("zen preprocess",dvr($variables['template_files'], $return=TRUE, NULL), NULL, WATCHDOG_NOTICE, NULL); } } } } /** * Override or insert variables into the node templates. * * @param $vars * An array of variables to pass to the theme template. * @param $hook * The name of the template being rendered ("node" in this */ /* -- Delete this line if you want to use this function function myzen_preprocess_node(&$vars, $hook) { $vars['sample_variable'] = t('Lorem ipsum.'); } // */ /** * Override or insert variables into the comment templates. * * @param $vars * An array of variables to pass to the theme template. * @param $hook * The name of the template being rendered ("comment" in this case.) */ /* -- Delete this line if you want to use this function function myzen_preprocess_comment(&$vars, $hook) { $vars['sample_variable'] = t('Lorem ipsum.'); } // */ /** * Override or insert variables into the block templates. * * @param $vars * An array of variables to pass to the theme template. * @param $hook * The name of the template being rendered ("block" in this case.) */ /* -- Delete this line if you want to use this function function myzen_preprocess_block(&$vars, $hook) { $vars['sample_variable'] = t('Lorem ipsum.'); } // */ function myzen_get_clisp($lispprog) { $handle = popen('/usr/home/yi/lisp/'.$lispprog, 'r'); while($read = fread($handle, 2096) ){ print $read; } pclose($handle); } function myzen_get_clisp1() { $handle = popen('/usr/home/yi/lisp/dr-test2.cl', 'r'); while($read = fread($handle, 2096) ){ print $read; } pclose($handle); } function myzen_get_clisp2() { $handle = popen('/usr/home/yi/lisp/dr-hol.cl', 'r'); while($read = fread($handle, 2096) ){ print $read; } pclose($handle); } function myzen_get_prog($path) { $handle = popen($path, 'r'); while($read = fread($handle, 2096) ){ print $read; } pclose($handle); }