drupal

Web application integration with Drupal

你。 提交于 2020-01-14 09:59:08
问题 We want to build a web application, that is specific to our domain, but also include forums, blogs etc in this application. Some integration points to Twitter and Facebook are also required. There will also be a desktop application that connects to our web application for uploading data and downloading configuration and reports. The question is, can we extend Drupal to host both the regular modules and our web application? (There will be business entities and their properties and daily data

Is a drupal View useful for this use case

瘦欲@ 提交于 2020-01-14 09:28:32
问题 I have a list of nodes that I want to present to the user. The user then picks 3 and I need to remember that decision so I can present them in a smaller list later (your choices list). To present the full list of nodes, I will just use views to get all published nodes. The question is how do I store those 3 choices so I can pull them in the "your choices list"? What structure should I use to save them? create a content type called list or use views. Not sure, or there's something more logical

Android to Drupal cookie transfer Q2

…衆ロ難τιáo~ 提交于 2020-01-14 03:37:08
问题 Previously I asked a question at Android to Drupal cookie transfer about sending cookies from my Android app back to my Drupal website to which I got a very good answer. The entire idea is to enable a persistent Client-Server interaction. I adjusted my code as was directed but I still can not get things working right. My code adjustments are below: protected Void doInBackground(Void... params) { // TODO Auto-generated method stub HttpResponse response; HttpClient httpClient = new

How do I add custom fields in a view?

北慕城南 提交于 2020-01-13 20:22:45
问题 I have created a view in Drupal 7, and used "Table" as format. How can I add my own fields to that table? 回答1: One method is, in your view, click 'add' for fields, then filter by 'Global', and you will get 4 types of custom fields to add. Global: Contextual Links Global: Custom text Global: Math expression Global: View result counter Another method is to make use of Views Custom Field module. 来源: https://stackoverflow.com/questions/15162343/how-do-i-add-custom-fields-in-a-view

Create multiple CCK nodes with single custom form in Drupal

拜拜、爱过 提交于 2020-01-13 19:12:07
问题 I need a form which will allow creation of several related nodes at the same time. All of the nodes involve CCK fields. I would like to use as much of CCK's built-in validation, submission, input widget, and security functionality as possible/practical. What is the best way to accomplish this in Drupal 6? Are there 'best practices' or docs anywhere? Here are 3 possibilities I can see. I would love feedback on whether any of these would work, or if there are even better options. 1. start with

Drupal module nested menu items

Deadly 提交于 2020-01-13 16:59:48
问题 In implementing hook_menu for a module, I am trying to put some items into a submenu. So far I have something like this $items['MyModule'] = array( //... 'page callback' => 'system_admin_menu_block_page', 'file' => 'system.admin.inc', 'file path' => drupal_get_path('module','system'), ); $items['MyModule/MenuItem1'] = array( //... ); $items['MyModule/SubMenu'] = array( //... 'page callback' => 'system_admin_menu_block_page', 'file' => 'system.admin.inc', 'file path' => drupal_get_path('module

Drupal database API query - row.update if exists, else row.insert

谁都会走 提交于 2020-01-13 13:05:25
问题 I've been trying to run a query in drupal that'll update entries if they already exists or insert a new entry if it doesnt. The code looks like this at the moment: db_query("IF EXISTS (SELECT %d FROM {uc_posten_packages.pid}) UPDATE {uc_posten_packages} SET title = '%s', label = '%s', cost = '%d', length = '%d', width ='%d', height = '%d', weight = '%d' WHERE pid = %d ELSE INSERT INTO {uc_posten_packages} VALUES ('%d', '%s', '%s', '%d', '%d', '%d', '%d', '%d')",$id, $title, $label, $rate,

Removing the navigation menu from the node menu settings in Drupal

江枫思渺然 提交于 2020-01-13 10:56:30
问题 How do you remove the "Navigation" menu (and others) from the menu settings on the node edit form? I suspect this can be achieved somehow using a hook like module_form_alter, but am not sure how to implement it. The motivation for this is to remove the confusion our users have when menus other than the standard primary links menu is in the drop down. The aim is to restrict the options to just the menus they will need/want to post content to. This question is in part related to an earlier

How to create a forum topic programmatically?

烈酒焚心 提交于 2020-01-12 10:39:50
问题 I just gone through how to create forums and containers programmatically with the below link http://www.unibia.com/unibianet/drupal/how-create-drupal-forums-and-containers-programmatically But never see any post(google) which create forum topic pro-grammatically, whether i should go with node_save() or any alternative. please help me guys, Thanks, Edvin 回答1: A quick, safe and easy way to create new nodes programmatically is to use node_save(): <?php // Construct the new node object. $node =

Drupal Templating/Theming Resources or Advice?

前提是你 提交于 2020-01-12 10:22:47
问题 I'm interested in creating a custom theme for a Drupal site I'm working on. I am new to Drupal, however I have a decent bit of experience in working with the underlying concepts that it seems are needed to build a theme (CSS, PHP, HTML). So, my question is - where do I start? Is there a canonical guide to creating Drupal themes? Resources that I should be aware of (other than the Theming Guide)? Gotchas that others have encountered, or just general words of wisdom from those who are more