drupal

Drupal shared tables, but from another database

倖福魔咒の 提交于 2019-12-20 02:08:44
问题 I have a Drupal Multisite set up with hundreds of sites. I want to make some tables shared (like banners, and roles) so I don't have to update hundreds of sites when changing a banner (for example). I know this can be done using these strings in settings.php: $db_url = 'mysql://user:pwd@localhost/example_db'; $db_prefix = array( 'default' => '', 'users' => 'subsite2_', 'sessions' => 'subsite2_', 'authmap' => 'subsite2_', ); But ... what if I have a multiple database setup as well? I have one

How can I set a different homepage per language in Drupal?

一个人想着一个人 提交于 2019-12-19 11:43:40
问题 How can I set a different homepage per language in Drupal ? I'm only using locale module (not i18.. or other translations module). thanks 回答1: You can do it without path module in a very simple fashion: First of all, go to sites/default/settings.php and define the frontpage as multilingual variable: $conf['i18n_variables'] = array('site_frontpage'); After that, clear cache and go to admin > Site Information. You will see that below "Default front page" there will be: "This is a multilingual

Drupal Views2 Exposed Form how to change

僤鯓⒐⒋嵵緔 提交于 2019-12-19 10:09:05
问题 I have a View with an exposed form . I am trying to a few things on it. Ideally I would like to have a dropdown that fires the form with no button. If that is not possible then I would like to have the button text something different than apply. I hacked it for now and change views_form in views.module but that does not seem like the right way to do it. I only have one exposed form right now, but what if I add more? Please see http://www.wiredvillage.ca/News for my example. I am poking around

Drupal — disable CSS cache

房东的猫 提交于 2019-12-19 07:10:59
问题 I am using Drupal 6. Every time I modify the CSS files, I need to clear the cache to see the updated result, which is a waste of my time. Is there any way to disable the cache system? 回答1: The reason the CSS cache needs refreshing is because Drupal optimizes all individual CSS files from various modules and themes into one CSS file which is optimized into a single file. So that this file is not recompiled every page load, which would loose the benefit of optimization, Drupal needs to know

Drupal 7 Browser specific css

时光毁灭记忆、已成空白 提交于 2019-12-18 18:04:13
问题 How can i have a browser specific css in Drupal 7 . I would like to load chrome.css if browser is chrome . Please help 回答1: You can do this in your template.php file with a preprocess_html theme hook and drupal_add_css function. You will find example in drupal 7 theme, for example in bartik : // Add conditional stylesheets for IE drupal_add_css(path_to_theme() . '/css/ie.css', array('group' => CSS_THEME, 'browsers' => array('IE' => 'lte IE 7', '!IE' => FALSE), 'preprocess' => FALSE)); drupal

Drupal 6/jQuery Ajax update a field

筅森魡賤 提交于 2019-12-18 17:15:10
问题 I'm on a different path on the same site, and I need to allow the user to change the contents of a field on a node s/he wrote in a different location. I have the nodeid and the field name, and ids, etc np. I don't believe this is too difficult, but a tutorial or an explanation would be wonderful. Thanks. Edit: Thank you anschauung for asking, so to clarify: It is a CCK textarea. As for why, well there's a central node type, with many linked node reference nodes. From the edit page of any node

How can a custom Drupal date format be added?

为君一笑 提交于 2019-12-18 14:03:41
问题 How do you add a custom Drupal date format. I want to display the date without hours and minutes, but the options don't include it. 回答1: Do the following: Administration » Configuration » Regional and language » Date and Time There you will see a tab for format. Create a new format string "Y-M-d". Make this as your default for all date fields and you won't see the seconds any more. You don't need the date module for basic formatting. Cheers, Vishal Below is the image so that you know where it

What is the best way to create standards-based, cross-browser compatible rounded corners in Drupal?

吃可爱长大的小学妹 提交于 2019-12-18 13:26:26
问题 I am currently working on a Drupal 6 theme, for which designer is explicitly requesting to use A LOT of rounded corners. I could of course create the rounded corners - traditionally - with images. But I know there must be also better and easier ways of creating rounded corners. Optimally, I would like to write my CSS as standards-compliant CSS3, with selectors like: h2 {border-radius: 8px;} Use of browser-specific is CSS is very OK also, like h2 {-moz-border-radius: 8px; -webkit-border-radius

How to change the label of the default value (-Any-) of an exposed filter in Drupal Views?

ε祈祈猫儿з 提交于 2019-12-18 12:55:24
问题 I created a view which has three exposed filters. Everything works fine except the fact that I can neither translate or change the default string (-Any-) for the dropdowns. Is there a way to change this string to something more meaningful like "Please Select" and make it translatable so the German version displays "Bitte wählen"? I have two screen captures that may be helpful: and A further improvement would be the ability to change the text "any" to something like "please select a (field

Open a file directly from a GitLab private repository

喜欢而已 提交于 2019-12-18 11:07:55
问题 I have a private repository on a GitLab server and using the SSH I can pull a project using git clone. But I want to run a script on linux command line directly from the server (more specific, a Drupal / Drush .make file) I tried to run it using the raw file: drush make http://server.com/user/project/raw/master/file.make (for the convenience of non Drupal users let’s say) curl http://server.com/user/project/raw/master/file.make Without success. Of course, it returns me the login page. Is it