drupal

Drupal 6 & 7 unset Javascript from header

本小妞迷上赌 提交于 2019-12-22 18:10:06
问题 EDIT: My question applies to Drupal 6 & 7, though my code example is Drupal 6. People have provided answers are useful for both versions of Drupal. I'm currently working in Drupal creating a mobile theme for a Drupal 6 website and trying to remove all unnecessary core and module JavaScript and css through the preprocess_page function in my template.php file. The css files are successfully removed, but I can't seem to get the JavaScript to be removed. Here's what I've got. In this example,

How do I get most commented posts in disqus?

流过昼夜 提交于 2019-12-22 17:55:08
问题 I was looking into disqus api for most commented posts but it leads me to nowhere. Can somebody share with me how to get thread/posts ordered comment count? Something like this: listPosts.json?orderby=comment_count&order=desc 回答1: The Disqus API seems not to support this directly. But threads/list has a posts element for each response . 回答2: I was dealing with the same issue and the answer is on: http://disqus.com/api/docs/threads/listPopular/ You can set these parameters...and more... $api

How can I migrate a Drupal site to Amazon Web Services EC2?

半世苍凉 提交于 2019-12-22 14:18:35
问题 I have a working local Drupal 7 site (with local MySQL Database), but now I'm trying to migrate it to Amazon Web Services (which is currently running a test Drupal site successfully). I have all of my drupal files in a directory mydrupalsite on the EC2 instance server and the database has been added to the remote MySQL, but I don't know what to do now in order to configure apache to show the new site. What I have tried so far: I added the file in /etc/apche2/sites-available (copied the old

How can I migrate a Drupal site to Amazon Web Services EC2?

好久不见. 提交于 2019-12-22 14:18:04
问题 I have a working local Drupal 7 site (with local MySQL Database), but now I'm trying to migrate it to Amazon Web Services (which is currently running a test Drupal site successfully). I have all of my drupal files in a directory mydrupalsite on the EC2 instance server and the database has been added to the remote MySQL, but I don't know what to do now in order to configure apache to show the new site. What I have tried so far: I added the file in /etc/apche2/sites-available (copied the old

Changing the Admin Theme in Drupal 6 Directly in Database

你。 提交于 2019-12-22 13:58:54
问题 I'd like to restore the default admin theme in Drupal 6 via the database. Anyone know where this is stored? Btw, there is a great answer describing how to change your site's public theme in the database here ...I just could not get it to update my admin theme. 回答1: List of themes you can find in {system} table, filter by type = theme, there you can set status = 1 Default theme you can find in {variable} table, filter by name = theme_default, change it to you theme name, as it is written in

How to get the field values of a content type in drupal

二次信任 提交于 2019-12-22 13:31:39
问题 How can I get the field value of a custom content type. I have created a custom content type using the CCK module. Is there any function to get the array of the fields of a particular content type. For example: I can get the profile details using content_profile_load() function. Is there any function similar to this. 回答1: If you are viewing the node, the values are all stored in the $node variable. Do a print_r($node); to see all the available values in the node object. Otherwise use node

Where is the user's picture stored in Drupal 7?

▼魔方 西西 提交于 2019-12-22 10:38:28
问题 I'm using a SelectQuery object to retrieve and display a list of users, but I don't know where to get the user's picture from. The users table has a column called picture, but the data in there is just an integer. Is the picture stored in a blob field somewhere or is there a link to the picture in another table? 回答1: The image file itself is stored (usually) somewhere in /sites/default/files . The reference to that image is stored in the file_managed table, the picture column in the users

programming a contest based on cupon codes in drupal

天涯浪子 提交于 2019-12-22 10:27:38
问题 Is there any module that can ask upon user registration so that the user can have a cupon code? I want to use them later to draw prizes. Just like a lottery 回答1: Have you give a try to Registration code? It sounds like it could do the job that you are asking for. 来源: https://stackoverflow.com/questions/5632683/programming-a-contest-based-on-cupon-codes-in-drupal

Very strange Drupal 7 404 behaviour

一世执手 提交于 2019-12-22 08:54:57
问题 I am having some very strange behaviour in D7 that I have not seen before. I have migrated a new site from my dev machine to a test machine, so code and DB are identical. On the dev machine (Ubuntu 13.04, Apache, PHP 5.5.3), everything works fine, but on the test box which is a Raspberry Pi running PHP 5.4.4 on Raspbian, I seem to get 404 errors on form submission. What seems to happen is that the form is not processed and the original page is returned but with a 404 status code when you look

Change admin password in drupal 7

社会主义新天地 提交于 2019-12-22 08:25:43
问题 I am using built in Drupal 7 user module, fore user registration, forgot-your-password-emails and all that stuff. I have forgotten my admin password. I have access to my website which is hosted on 1and1.com and also have access to mysql? Is it possible to change password or email address through SQL so that I can access the admin page? If it possible how? Can you somebody help me with this? Thanks! 回答1: If you have Drush installed, you just have to enter the following command in the terminal