drupal-6

How add trigger to mysql Through Schema API

我们两清 提交于 2019-12-23 05:36:11
问题 Through Schema API (file mymodule.install in Folder sites\all\modules\mymodule). trigger in mysql: delimiter | CREATE TRIGGER testref AFTER INSERT ON users FOR EACH ROW BEGIN INSERT INTO beep SET uid = NEW.uid; END; | delimiter ; 回答1: There is no specific API for that. Try http://api.drupal.org/api/drupal/includes--database.pgsql.inc/function/db_query/6 Also remember that triggers are not standardised across different databases. It would be a better idea (or maybe as a fallback) to do that

Drupal: multilanguage.. looking for the right module to build multiple versions of the node

南笙酒味 提交于 2019-12-23 03:48:31
问题 I have a multi-language website. I want a module to add multiple version of my nodes and selecting the right one for each language of my website. In other terms, for each node, I want to have more versions, a version for each language. I don't want to create new nodes, in order to avoid confusion for my customer. I want to be able to fill the content for each language version of the same node. If I'm not wrong, the core module Content Translation allows me to select for each node to which

How to just show NodeQueue block on included nodes?

可紊 提交于 2019-12-23 02:03:20
问题 On my blog I have a series of posts on a common subject that I'd like to link together with a common navigation block, so that readers can easily jump forwards or backwards through the series. I've used NodeQueue to collect all the blog entries together in sequence. Putting the associated block in my sidebar gives me the navigation that I want BUT the block appears on every page of my site. What I want to do is limit the visibility of the block so that it only appears on pages that are

Changing the Admin Theme in Drupal 6 Directly in Database

你。 提交于 2019-12-22 13:58:54
问题 I'd like to restore the default admin theme in Drupal 6 via the database. Anyone know where this is stored? Btw, there is a great answer describing how to change your site's public theme in the database here ...I just could not get it to update my admin theme. 回答1: List of themes you can find in {system} table, filter by type = theme, there you can set status = 1 Default theme you can find in {variable} table, filter by name = theme_default, change it to you theme name, as it is written in

Adding images into blocks html

南楼画角 提交于 2019-12-22 08:17:32
问题 I've added some html code in my Blocks content and enabled Full HTML filter. I've used relative paths for my images, such as "sites/all/themes/zen/zen/image.png" I guess this is not correct because I need to change my paths depending on I'm in the home page or "node/id" page. I guess I cannot use PHP inside blocks, thus I cannot use $base_url... how can add images path with only html ? thanks 回答1: The previous answers provide a part of the solution, but here's a fuller scoop: Hand-written

How to get rid of Drupal CSS stylesheets?

回眸只為那壹抹淺笑 提交于 2019-12-22 04:08:24
问题 I am trying to accomplish the following. I need to use Drupal 6 as a project requirement, but I want to use it with my own HTML and CSS stylesheets for each node/view/panel etc. The problem is, whatever the theme, I always found that Drupal applies to my HTML content both my CSS stylesheets and the CSS related to the theme chosen. I have also tried, without success, using the stylestripper module (installed in sites/all/modules). No matter what I do, additional CSS stylesheets are applied to

Drupal Views display newest content per taxonomy limit to one node

巧了我就是萌 提交于 2019-12-21 22:29:50
问题 I want to create a view where all 5 of my taxonomy terms are displayed and it then displays the latest node published but this is limited by 1. For Example: Tax Term 1 Latest node published Tax Term 2 Latest node published etc etc Currently I'm grouping by taxonomy term so it's displaying all nodes published then sorted by published date desc. I can't quite figure out how to limit the nodes to only show one item per taxonomy term. Any help would be greatly appreciated. 回答1: This is possible

How do I decide between theme('node', $node) and drupal_render($node->content) for programmatic $node output

别来无恙 提交于 2019-12-21 16:22:39
问题 Given a $node , I'm trying to decide between the following two ways of outputting that $node. either $output = theme('node', $node); or node_build_content($node); $output = drupal_render($node->content); They both seem to give similar results, but is there something I should consider before I choose one way over the other? 回答1: Your output is similar if there are no other modules and themes altering the output via the theme layer. But! If you bypass the theme layer, you'll probably start

Fundamental understanding of how Views and Pathauto work together

好久不见. 提交于 2019-12-21 09:17:08
问题 I am having fundamental problems understanding when to use a pathauto rule, and when to use a views page path. I have several custom content types, and I am using blocks to display certain parts of nodes on certain paths. Then I use a views page to display the main node on a path. When I do this, I can't use pathauto, as it overrides the paths I set in views. Eg.. If I set up a views page path of "location/%", and set a pathauto rule for Location content types of "location/[title-raw]", when

How do you migrate CCK fields between environments in Drupal?

拟墨画扇 提交于 2019-12-21 05:44:09
问题 The Content Construction Kit (CCK) is one of the most useful Drupal modules. It allows you to easily add custom fields to a content type. However, these new fields are created through Drupal itself and stored in the database. This means that if you change a CCK field in your development environment you need to manually make the same change in your test and production environments. Worse, there's no simple way to determine if your environments have gotten out of sync. So if you ever