drupal

In drupal how to add name textfield to simple news block

夙愿已清 提交于 2019-12-25 04:42:53
问题 In drupal how to add name field to simple news block.If we install simple news module we can get a email field,radio buttons Subscribe Unsubscribe and save button .how can i add Name and text box 回答1: You can add a Name field using hook_form_alter(). You will also need to add a submit handler so you can store the name in the database. Something like this... function mymodule_form_alter(&$form, &$form_state, $form_id) { switch($form_id) { case 'simplenews_block_form_5':// <-- change 5 to the

How can I execute a custom script after purchase with Ubercart for Drupal

旧时模样 提交于 2019-12-25 04:39:15
问题 I hope I'm not using stackoverflow.com in the wrong way: asking this question! Recently I ventured in to starting my own business to Sell software without realising the terrible implications that come with ecommerce - the only way to buy my software I offer. This would be fine if I was just selling the file downloads and/or shipping...But I'm not! I the hope that it would be easier (and alot cheaper) I am only offering digital downloads! All this is fine, and I only have one hurdle to

Creating Drupal Multisite with Subdirectory from different Domain

混江龙づ霸主 提交于 2019-12-25 04:29:15
问题 I'm attempting to create Drupal Multisite. Currently lets say we have below Live Sites in the form abc.example.com def.example.com xyz.example.com All the Sites are present on the Same server (Nginx Server) in the directories /var/www/vhosts/abc.example.com/httpdocs /var/www/vhosts/def.example.com/httpdocs /var/www/vhosts/xyz.example.com/httpdocs Now we have to create Blogs for each Live Site, we are looking into Drupal Mutlisite Architecture for the same, so all Sites should point to same

Can't remove punctuation in Solr

别等时光非礼了梦想. 提交于 2019-12-25 04:28:44
问题 I have a solr install to query content on a Drupal site. Many of the title fields have punctuation at the start of the string and so when I sort by title the punctuation appears top of the list. I would like to get solr to ignore the the title when sorting by title but none of the solutions I have tried work. I am fairly new to solr and so it may be something really simple that I am doing wrong... I don't really understand much of what is going on in the schema.xml file! The title field is

Using multiple form field widgets for the same field in Drupal

自作多情 提交于 2019-12-25 04:18:04
问题 I would like to be able to use multiple form field widgets for the same field and to be able to switch it based on session data from the user. But I am not really sure how to accomplish this. This is for Drupal 6. Any ideas on how to accomplish this? 回答1: You might be able to accomplish this with one of the field access modules but to do it properly you'd probably need to create a custom widget. Your widgets can return existing widgets by calling their handles, so your widget would more or

Drupal 7 issue with programmatically set user picture

偶尔善良 提交于 2019-12-25 04:08:58
问题 I am using a script to programmatically set the user picture in Drupal 7. The script is depicted here: Drupal 7 save user picture programmatically. The script works fine, but once the user picture has been set for a specific user, and if I try to delete that picture (as an admin or as the user himself) the server returns: Warning: unlink(/home/hkdepot/public_html/drupal_dev_4/sites/default/files/avatars/upload/b8f1e69e83aa12cdd3d2babfbcd1fe27_101.jpg): Permission denied in drupal_unlink()

Drupal: slow and modules don't work

南笙酒味 提交于 2019-12-25 03:56:08
问题 I try to work with Durpal as first time, I'm installing all the basic recommended modules but now the site is very slow (very very in particular in the admin panel) and lot of models are not enabled even if I enable them. For example I installed the Admin menu and if I open a new window I can see it but whenever I do some operation (go in blocks or go in configuration for examples) the bar disappear! And won't come back till i open a new window. I enable View module and view UI module but I

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

How to make Drupal on Apache work together with Tomcat?

我怕爱的太早我们不能终老 提交于 2019-12-25 03:54:00
问题 I have gone through installation and configuration of both, Drupal on Apache server, and Tomcat server. Currently they both work on their respective urls like: 127.0.0.1 for Drupal on Apache 127.0.0.1:8080/projectname/ on Tomcat But my goal was to make the pretty drupal templates be the UI for the things I output in Tomcat. How can I make them work together? :) What am I misunderstanding here? :) Thanks, Alex 来源: https://stackoverflow.com/questions/5707855/how-to-make-drupal-on-apache-work

How to change sub-theme of zen to find files in other folders?

▼魔方 西西 提交于 2019-12-25 03:44:29
问题 Im using Zen as my base theme for creating custom themes in Drupal 6. When I look at the source code of my sub-theme, I see that zen are searching for css files in the sub-theme's folder, at the current state it looks for its css files in : /themes/zen/elementals/css/ how do I tell it to just search in /css folder ? thanks! 回答1: Look at theme-settings.php file of zen theme. Try to implement THEMEHOOK_settings() function in your own template.php 来源: https://stackoverflow.com/questions/5334048