I'd like to know how to override the destination URL of the comments titles.
Usually, the link of a comment title refers to this comment but I don't need this feature.
I only want to do this :
When you click on the title of a comment and if you are authorized to do this (if you're registered and you are the author of the comment) you go on the Edit page of this comment.
Since I'm not a php developer, I'd make it like that. Is it correct ?
i'm using phptemplate engine, have several nodetype based nodetemplates, and i'd like to display nodes with the same nodetype on the same page with different nodetemplates (like: node-ntype-1.tpl and node-ntype-2.tpl ) with calling node_view - dont want to build the node in the custom module, just calling nodeapi functions (load/view)
is there any way, to force node_view using given template file - not touching core files of course? or pass an extra parameter somehow to template.php and i make a fork with template_path in $vars ?
If you have a taxonomy list of articles (displaying the full node, like a blog) how do you conditionally style/code (ie. background colour, title, javascript etc) nodes that are sticky? Clearly node.tpl.php is going through a loop, how do you access it and modify the display of each node/article in the list? Basically I need sticky items to display their full text, and all others to have javascript and css wrapped around them to make them expandable. Any thoughts?
I'm sure I've fixed this same problem a while back - in 4.6 and now it seems to have reappeared. I can't for life of me remember how I fixed it (and didn't have CVS back then). Just spent a couple of hours on it and it's driving me crazy now! Nothing in the forums about this one from what I can see.
I was in need of a solution that allowed me to override a single or multiple drupal specific css files in my theme. I started by searching the handbooks for a solution but I only found fragments of what I needed. I ended up writing this code and I quess I would like some comments and feedback. I am new to Drupal. Do you see any possible issues with this code?
The code was placed inside the template.php file in the theme folder.
<?php
function _phptemplate_variables($hook, $vars) {
if ($hook == 'page') {
if (file_exists($theme_style = path_to_theme() ."/style.css")) {
drupal_add_css($theme_style);
}
$css = drupal_add_css();
$css_override = array();
foreach ($css as $media => $types) {
foreach ($types as $type => $files) {
if ($type != "theme") {
foreach ($files as $file => $preprocess) {
//Check if css file exist in the current theme/css folder
if (file_exists($override = path_to_theme() ."/css/". basename($file))) {
$css_override[$media][$type][$override] = $preprocess;
}
else {
$css_override[$media][$type][$file] = $preprocess;
}
}
}
}
}
//Update template variables