drupal

Can I clone drupal site on the same server?

為{幸葍}努か 提交于 2019-12-25 06:55:29
问题 We would like to upgrade our D6 site to D7 version. It's a kinda big site but we tried to clone the site on the same server using the same files and database. So the set up is : Production - database: db folder: www/drupal Clone: database:db2 folder: www/drupal2 anything from production has been copied. We just updated the settings.php, The idea is to make all upgrades to clone site then just switch by just renaming the folder and updating settings.php again. However, we can only have the

Drupal form ahah element, problem with empty $_POST

半世苍凉 提交于 2019-12-25 06:40:21
问题 I'm making a module for ubercart. It's nearly finished, but now I'm working on the admin page. I want the admin to be able to add options, like the poll module adds choices. The problem I have is that the admin form is generated through drupal_get_form, which leaves the $_POST empty. $_POST['form_build_id'] seems to be needed to get the form from cache. Is there a way that the $_POST['form_build_id'] can be accesses after a drupal_get_form? I read that it could be saved to the $form_state

Drupal Installation can't connect to MySQL server but it's there

家住魔仙堡 提交于 2019-12-25 06:21:12
问题 I'm getting the following error installing drupal 7: Failed to connect to your database server. The server reports the following message: SQLSTATE[HY000] [2003] Can't connect to MySQL server on 'myservername' (13). I am running MySQL on one windows server and httpd on another linux. MySQL is running just fine and on the httpd server I can connect just fine to the MySQL, as follows: mysql -h dbserver -p --port=3001 -u drupal Similarly I can run mysqli and pdo and it connection just fine too

Adding TabSlideOut javascript to Drupal 7

我是研究僧i 提交于 2019-12-25 05:36:33
问题 There is no module for Drupal that acts as a sliding tab (on hover) so I would like to incorporate this one, http://www.building58.com/examples/tabSlideOut.html into my site. In the process of trying to add the above slide-out tab to my Drupal site, I have tried arbitrarily adding the code to the html.tpl.php and the tab partially worked (with conflict errors). However I kept receiving a conflict error with my Superfish menu. I read up on Drupal.org to add the javascript using the hook

Drupal 7 date popup default value is blank

左心房为你撑大大i 提交于 2019-12-25 05:28:31
问题 I am trying to get a default value in for the default value of a date_popup that exists within a fieldset and I have followed the other suggestions here but the value is always blank. $format = 'm/d/Y'; $primary_start1 = null; if(isset($vals["primary_start"])){ if("-1" != $vals["primary_start"]){ $primary_start1 = (int)$vals["primary_start"]; } } $form['dates']['primary']['primary_start'] = array( '#title' => t('Start date'), '#name' => 'primary_start', '#type' => 'date_popup', '#date

Drupal 7 Views: Which type of output to use for re-render of link

余生颓废 提交于 2019-12-25 05:28:17
问题 When selecting theming information in views what type of output will enable me to re-render the links? The links require title attributes and the views gui is not an option. Display Style Row Field 回答1: Resolved: Used 'Row output' as the theme suggestion and manipulated the $fields variable before looping its properties. 来源: https://stackoverflow.com/questions/10105740/drupal-7-views-which-type-of-output-to-use-for-re-render-of-link

How to redirect from HTTPS to HTTP?

ε祈祈猫儿з 提交于 2019-12-25 04:56:29
问题 I have a Website. Where I need to redirect all the pages from HTTP to HTTPS. But there are two page which should not served over HTTPS. Home Page - www.hellomysite.com Dealers Page -www.hellomysite.com/dealers Even if user has entered the url as https://www.hellomysite.com/dealers, it should be served over HTTP. http://www.hellomysite.com/dealers I googled & found number of links but none of them is redirected. .htaccess #Redirect all request to HTTPS RewriteCond %{HTTPS} off [OR] RewriteCond

drupal 6 form module not calling hook_theme

巧了我就是萌 提交于 2019-12-25 04:55:16
问题 I'm trying to build a table with form elements by theming the form. I have created a form with 9 elements #type textfield: a1,a2,a3,b1,b2,b3,c1,c2,c3. I would like to put them into a table using theme_table($header,$row). To do this I create a _theme(){} function and another function that creates the $header and $rows for the form and uses drupal_render to create the form. The form renders only when I have return $form in the form hook. But really i don't want to render the form there, but

Converting constantly updated SQLite3 db into Drupal site

好久不见. 提交于 2019-12-25 04:44:08
问题 I have a constantly updated SQLite3 db that records game data. One table for game information, another for events in a game, and the third for player information, including who won/lost: http://schema.ccgames.db.94y.info/ (schema) http://ccgames.db.94y.info/ (arbitrary readonly queries) I want to create a Drupal site with three content-types (one for each table) and a node for each record in each table. I know about "Import Node", but that's a one-time thing. How can I keep my Drupal nodes

How to work with hook_nodeapi after image thumbnail creation with ImageCache

此生再无相见时 提交于 2019-12-25 04:43:32
问题 A bit of a followup from a previous question. As I mentioned in that question, my overall goal is to call a Ruby script after ImageCache does its magic with generating thumbnails and whatnot. Sebi's suggestion from this question involved using hook_nodeapi. Sadly, my Drupal knowledge of creating modules and/or hacking into existing modules is pretty limited. So, for this question: Should I create my own module or attempt to modify the ImageCache module? How do I go about getting the generated