drupal-6

Can I make the second or later button in a Drupal form the default button?

人走茶凉 提交于 2019-12-25 03:54:50
问题 I have a form in a custom Drupal 6 module built with the Form API, it has 1 or more image_button elements in a list followed by the Save and Cancel buttons. Everything is working fine when clicking the image and standard buttons, they call the submit functions they should, but if I hit the [ENTER] key within any of the text fields in the form the first button in the form is submitted, which unfortunately in this case is an image_button in the list rather than the Save button. This is a

Create Content Type Button

£可爱£侵袭症+ 提交于 2019-12-25 03:30:44
问题 I'm pretty new to drupal development. I have a group node and inside it a content type called efforts. To this efforts i need to add a calendar and I also need to a add a create event button inside the effort page. the event is another content type that I created for the calendar. I already created the two content types for handling events and efforts. I also added a calendar view to the effort. I need to add a create event button to the effort page. Can some one tell me how do i do this ?

Drupal Views Relationships and Arguments

≡放荡痞女 提交于 2019-12-24 10:58:31
问题 I have a Person content type. It has a node reference field of a company which is also a content type. I then have a content type called Project. A project has a node reference to a company content type. I want to list all the projects related to a person id (nid) If I abstract this away from views and Drupal and each content type had it's own table I would use something like. Select ProjectName from Projects where CompanyID IN (select CompanyID from Perons where PersonID = 10) Can I do

Add subitem to second level

℡╲_俬逩灬. 提交于 2019-12-24 09:50:29
问题 I have primary links created manually. The are links to node (content type 'page') like -About --About Us --About company I need to add subitems About/About company/company1 and About/About company/company2 from my module. Next lines create menu item in first level (in one level with -About ) $items['about2'] = array( 'menu_name' => 'primary-links', 'title' => 'About2', 'page callback' => 'ninegm_about2', 'access callback' => TRUE, 'weight' => -10, ); 回答1: Check out the documentation at the

Why is ColorBox not loading properly?

不打扰是莪最后的温柔 提交于 2019-12-24 08:30:29
问题 The error I get is: $ is undefined Line 8 which is: $.colorbox({html:'<p>TEST TEST</p>'}); This is how the page renders: <script type="text/javascript" src="/sites/all/modules/jquery_update/replace/jquery.min.js?Y"></script> <script type="text/javascript" src="/misc/drupal.js?Y"></script> <script type="text/javascript" src="/sites/all/modules/fivestar/js/fivestar.js?Y"></script> <script type="text/javascript" src="/sites/all/modules/extlink/extlink.js?Y"></script> <script type="text

how do i make diffrent registration form in drupal?

好久不见. 提交于 2019-12-24 06:57:52
问题 Is there a module that can make different registration forms for different roles during sign up? (ex. each Editor,Main User,Sub User role have different form) 回答1: There is :) http://drupal.org/project/autoassignrole to assign by path you will also need Content Profile: http://drupal.org/project/content_profile check out this tutorial on how to pull it off: http://www.web-a-team.com/blog-post/user-registration-more-one-role 回答2: Here's what you should do start with install profile2-7.x-1.2

checkbox for Drupal CCK

北战南征 提交于 2019-12-24 05:14:06
问题 I'm new at Drupal. love it so far :) I'm creating a CCK custom content type. I need to make a amenities list in checkbox format. so I made; File Type: Text Widget Type: checkboxes/radiobuttons and Allowed values list: onsite_dining|Onsite Dining meeting_space|Meeting Space business_center|Business Center and it creates Radio Buttons which only 1 selection :( How can I make it Check Box to give ability to select more than 1? Appreciate helps! 回答1: There as an option: Number of values You have

Wrap tables in div with CKEditor in Drupal textarea input

感情迁移 提交于 2019-12-24 01:42:23
问题 I'm working in Drupal, got CKEditor set up and have the tables plugin going on. The design I'm working with requires some visual elements that would be made A LOT easier if I had a div with a class wrapped around the tables in the output (because tables can't have padding on their sides in IE)... SO.. I'm can think of 2 ways to do it, but don't know and can't figure out how to do either: 1)Use CKEditor to wrap all table elemnts in a div with a class.. 2)Use Drupal input filter to wrap all

Drupal performing a query against the database

巧了我就是萌 提交于 2019-12-24 00:38:37
问题 I wish to retrieve some nids from my drupal database. I have a query that I wish to run. SELECT node.nid AS projectnid FROM node node INNER JOIN content_type_project node_data_field_project_client ON node.vid = node_data_field_project_client.vid WHERE node_data_field_project_client.field_project_client_nid = (SELECT node_data_field_profile_company.field_profile_company_nid AS company_nid FROM node node LEFT JOIN content_type_profile node_data_field_profile_company ON node.vid = node_data

How to implement 'category' based newsletter

こ雲淡風輕ζ 提交于 2019-12-23 23:40:04
问题 Working on my small classified site; i'd like to give the users the ability to choose some categories, for example : cars, boats and receive daily/weekly notifications based on their choices. A user that has subscribed to 'cars' category will receive daily newsletter saying 'there are 30 new interesting classifieds for you in category : cars'. Don't know where to start; 'simplenews' module seems too simple for my usage. Any idea ? 回答1: The Subscriptions module seems to do this really well. It