drupal-7

How do I completely disable cache?

别说谁变了你拦得住时间么 提交于 2019-12-09 14:42:38
问题 Drupal 6's cache can be set to disabled, normal or aggressive. I cannot find these options for my Drupal 7 installation. There is only a button that flushes all the cache but it has to be clicked for every change I made to a module or a template. By change I mean adding some HTML tags to a module or a template. Thanks to mirzu's response, I already installed the devel module but it doesn't work either. The only way I get so see my changes is by disabling and enabling the module. The hello

Drupal 7 - Insert taxonomy into node object

こ雲淡風輕ζ 提交于 2019-12-09 12:57:48
问题 I have a script which successfully creates new nodes. But I'm having trouble setting the taxonomy before saving. I believe in Drupal 6 I would use this method. $cat1_tid = taxonomy_get_term_by_name($data[$i]['cat1']); $cat2_tid = taxonomy_get_term_by_name($data[$i]['cat2']); $cat3_tid = taxonomy_get_term_by_name($data[$i]['cat3']); $node->taxonomy = array($cat1_tid, $cat2_tid, $cat3_tid); I think in Drupal 7 I would do this (my field name is Catalog) $node->taxonomy_catalog['und'][0] = array(

Drupal 7:Pathauto patterns from menu structure hierarchy

陌路散爱 提交于 2019-12-09 06:33:31
问题 I'm trying to create a Pathauto pattern which looks like "Drupal root/parent_menu_item_name/node_title" where "node_title" is a child of "parent_menu_item_name" in the menu hierarchy. I've tried many different variations, and nothing works. I've tried the suggestions in Menu path in Pathauto, and none of them works at all. It just ends up outputting the node-title, with nothing before it. I've got the latest versions of the Token and Pathauto modules installed. 回答1: I believe this question

Prev/Next node navigation with a thumbnail in a full node

醉酒当歌 提交于 2019-12-09 03:23:54
问题 I've been trying to figure this out and make it work, but as I'm not a programmer, just a designer with limited coding knowledge I've been hitting a wall on this one. I'm making my own photo gallery and I would like to display two previous or next images as linked thumbnails. I've found this script that works and shows textual links, but don't know how to adapt it to my needs. template.php <?php function dad_prev_next($current_node = NULL, $op = 'p') { if ($op == 'p') { $sql_op = '<'; $order

Drupal 7 system redirect through rules module

北城以北 提交于 2019-12-08 11:44:27
问题 I hope someone might be able to clarify exactly what the rules module for Drupal 7 does when it executes a system redirect. I've created a rule (through the rules module in Drupal 7) which executes a redirect whenever specific content is accessed. The rule does not appear to be generating an apache redirect, and the rules module does not specify the type of redirect it is executing (301, 302, etc). Ultimately, my concern is getting in trouble with search engines for cloaking. Thank you in

Drupal 7 views Contextual filters with Page & Blocks

我们两清 提交于 2019-12-08 09:33:21
问题 I have an issue and i'm hoping to get some advise. I have a view created that show content based on the url: eg: domain.com/item/one Shows fields for my node with the title one domain.com/item/two Shows fields for my node with the title two etc etc. The path for the PAGE in views is set to /item What I'm having trouble with is I need to have a BLOCK (becuase I'm making it collapsable) show under that page with the specific URL show the body field for that node. eg: domain.com/item/three Shows

How can I have access to the Drupal 7 $database variable?

旧巷老猫 提交于 2019-12-08 06:32:15
问题 I have written some php/mysql queries inside node.tpl.php and page.tpl.php. The username and password that these pages use to connect to MySQL are specified within the files. Instead of doing this, I would like to be able to use the MySQL connection settings that are defined in Drupal's settings.php file. I am trying, unsuccessfully include the settings.php file into node.tpl.php and page.tpl.php. <?php include("sites/default/settings.php") ?> Then I am trying to access the $databases array

How to grant user User Points equal to certain field's value / calculated value?

▼魔方 西西 提交于 2019-12-08 06:08:51
问题 I've a content type 'Content' with the field 'Value' (an integer) and a flag called 'Publish Content and grant points to user'. Every time a Content is flagged with this flag, I'd like to grant the Content's author some User Points, equal to the value in the 'Value' field . I tried solving the first part of my problem with the Rules module like this: *Event: A node has been flagged, under "Publish Content and grant points to user" *Conditions: Content is of type 'Content' *Actions: Grant

@fontface in IE7 (IETEster) not working properly

女生的网名这么多〃 提交于 2019-12-08 03:43:41
问题 I am using the Sansumi @fontface kit by Fontsquirrel.com. It works properly in IE6 and IE8 in the program IETester, but in IE7, it doesnt. My CSS Code looks like this: @font-face { font-family: 'SansumiExtraBoldRegular'; src: url('../fonts/Sansumi-ExtraBold-webfont.eot'); src: url('../fonts/Sansumi-ExtraBold-webfont.eot?#iefix') format('embedded-opentype'), url('../fonts/Sansumi-ExtraBold-webfont.woff') format('woff'), url('../fonts/Sansumi-ExtraBold-webfont.ttf') format('truetype'), url('..

dynamic view by date arguments in drupal 7

半世苍凉 提交于 2019-12-07 20:21:13
问题 I'm new to drupal, currently im stuck with this problem. I want to create a article view ("tip of the day") wherein the content of the will automatically changed accordingly. The default value would be the current date. For example: http://localhost/test this will get the current date as the default filter. If no items found it will give no results found. when i go to http://localhost/test/20111220 the view will automatically get the value of the date parameter in the url and output the