drupal

Drupal 6 user password import to Drupal 7

北战南征 提交于 2019-12-20 14:05:23
问题 I don't really need to import any data into my D7 build other than users. I have (by SQL) imported my user data however, the D7 password encryption method is now different. I'm not an expert by any stretch of the imagination and I've never used Drush, but I have come across this user_update_7000 code snippet found user.install (http://api.drupal.org/api/drupal/modules--user--user.install/function/user_update_7000/7) <?php require_once DRUPAL_ROOT . '/' . variable_get('password_inc', 'includes

how to get all the menu items below a certain parent in drupal?

送分小仙女□ 提交于 2019-12-20 09:38:02
问题 I really only need the mlid and title text for the first level below a certain menu item. Here's what I'm doing at the moment. (It works, but I suspect there may be a more drupal-y way.): /** * Get all the children menu items below 'Style Guide' and put them in this format: * $menu_items[mlid] = 'menu-title' * @return array */ function mymod_get_menu_items() { $tree = menu_tree_all_data('primary-links'); $branches = $tree['49952 Parent Item 579']['below']; // had to dig for that ugly key

How to hide Edit | View tabs?

蹲街弑〆低调 提交于 2019-12-20 09:24:24
问题 Can I hide the Edit | View tabs on top of each node ? I've searched for this option in theme settings (both global and standard theme but I couldn't find it). I still want to be able my customer to edit / administer content, so I cannot just remove the permission for it. thanks 回答1: This really is a presentational thing, not a functionality thing, so it should be done at the theme level. The problem with overriding theme_menu_local_tasks() is that you override/take a hatchet to the entire

How can I theme the template for edit or add a node for a specific content type?

不羁的心 提交于 2019-12-20 09:24:06
问题 I want to theme the template for edit or add a node for a specific content type. For example, to theme all the content type forms I use the file page-node-{add|edit}.tpl.php (depending what I need to do add or edit). But I didn't found the template name for a custom node type, for example Products. I need to theme only for Products, but not for the other content types. I've tried with page-node-edit-product.tpl.php and page-node-product-edit.tpl.php but no luck. 回答1: Hmm. There may be a

How can I theme the template for edit or add a node for a specific content type?

独自空忆成欢 提交于 2019-12-20 09:21:06
问题 I want to theme the template for edit or add a node for a specific content type. For example, to theme all the content type forms I use the file page-node-{add|edit}.tpl.php (depending what I need to do add or edit). But I didn't found the template name for a custom node type, for example Products. I need to theme only for Products, but not for the other content types. I've tried with page-node-edit-product.tpl.php and page-node-product-edit.tpl.php but no luck. 回答1: Hmm. There may be a

Is Drupal ready for the enterprise? [closed]

北慕城南 提交于 2019-12-20 08:18:39
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 6 years ago . Is anyone out there using Drupal for large scale, business critical enterprise applications? Does Drupal's lack of database

multi step form with upload & save to node type

为君一笑 提交于 2019-12-20 06:15:06
问题 im trying about a week to do multistep form usin form api in drupal 6 and in the step 2 there is 2 upload fields and then its should proceed until step 5, after user fill the step 1 he can skip the whole form and submit the data... im trying to do it and im not success, i glue some pices of code and its not work , and multiform plugin is kinda buggy anyone did something like that and can share the code or just explain me what functions i should use and how? 回答1: Try multiform, but be careful

Drupal node demystified

半城伤御伤魂 提交于 2019-12-20 05:46:08
问题 I'm new to Drupal, and wish to understand how this platform works. Specifically, I'm mystified by the Node object. What is it, how does Content-Type get in?! It seems like the whole of Drupal is just nodes, nodes, nodes. Would love to hear you insights. 回答1: The node, in Drupal, is an odd animal when you first encounter Drupal, but once you get it you'll find that it's quite useful. A Drupal Node is a unit of information. Usually, it's a unit of interrelated information that for the site is

Virtual Host with MAMP

旧巷老猫 提交于 2019-12-20 04:23:18
问题 I installed Drupal 8 with MAMP. My MAMP preference number for Apache Port : 80 , Nginx Port: 80 and MySQL Port: 8889 In etc/hosts file, I add 127.0.0.1 mmcast.test In httpd.conf file, Listen 80 and uncomment the following line. # Virtual hosts Include /Applications/MAMP/conf/apache/extra/httpd-vhosts.conf In httpd-vhosts.conf file, NameVirtualHost *:80 <VirtualHost *:80> DocumentRoot /Applications/MAMP/htdocs ServerName localhost </VirtualHost> <VirtualHost *:80> ServerName mmcast.test

Drupal: how can I remove the links from taxonomy terms?

主宰稳场 提交于 2019-12-20 02:38:10
问题 I like the taxonomy terms in my nodes pages, but I don't want user being able to click on them. I just want to remove the links. I'm trying to remove them from taxonomy module php files, but I cannot find them. Thanks 回答1: You never want to edit a core module like taxonomy, as this makes it very complicated to upgrade your Drupal install. See also. You can use hook_link_alter to alter/remove the links in your own module. Adding them back in as non-links is a little more complicated, but can