drupal-7

Creating list of similar nodes in Drupal 7/Views 3

[亡魂溺海] 提交于 2019-12-17 21:26:58
问题 Copy from drupal.stackexchange.com hoping to get more answers here: I face a rather common problem of displaying a list of nodes similar to current one. Similar node is defined as one having at least one taxonomy term that current node has. There are few solutions available as modules, however the modules I've found (specifically Similar By Terms) are in beta stage (as in "not working properly") for Drupal 7. I've also found a couple of solutions based on Views and contextual filters (such as

Behance-like content filter possible in drupal?

谁说胖子不能爱 提交于 2019-12-14 04:04:50
问题 Asked the same question here but got no answer, so I'm trying here instead :) Hey, I'm working on a site somewhat similar to Behance. To make you understand what I'm talking about, I'll explain a little bit; I got a content type called say... "Content", which can go into three different categories, "Category 1", "Category 2" and "Category 3". Then, I got a page called "Content filter" where I can see all the content in the different categories. On this page I'm able to filter what should be

Unable to enable Clean URLs in drupal 7 website after migration

一曲冷凌霜 提交于 2019-12-14 03:57:25
问题 Recently, I migrated my website from local machine to server machine. The website URL is http://www.example.com/myweb I noticed that only front page is visible and other pages are showing 404 error. After reading this answer, I got to know that this is happening because of clean URL module. I enabled RewriteBase myweb in .htaccess file but It doesn't work out. Finally I thought of disabling Clean URL temporary as told here. This works well. Now I wanted to enabled it again. It is showing

Injecting field content to html.tpl.php in Drupal 7

懵懂的女人 提交于 2019-12-14 02:35:01
问题 I'm trying to make one content type that can reuse a jQuery-gallery with different styles depending on what page you're on. So i made one field called field_CSS where I put the CSS. However for performance reasons (and for the sake of cleaning up the code) I want to put it in the HEAD-section. The content in the head section is rendered in the html.php.tpl-filde and the field is in the content type of the specific node. I've tried <?php print render($content['field_CSS']) ?> <?php print

Signing into drupal website remotly using C#.net and json

◇◆丶佛笑我妖孽 提交于 2019-12-14 02:23:32
问题 I want to create a form in C#.net which can sign me in through a drupal website. Service 3.x module is enabled and Rest server is running on my website correctly. My only problem is how to serialize the username and password into json format? 回答1: Finally a solution : I've got a windows form , contains a textbox , a masked-textbox and a button (called button3 below) , on button click event , the textbox and maskedtextbox contents will placed in the user object which is constructed using this

Change redirect in Drupal 7 for Password Recovery

五迷三道 提交于 2019-12-14 01:08:40
问题 In Drupal 7 there is a way to reset your password by going to '/user/password'. If you fill in your email address you should get an email in your inbox with an url to reset your password. On that page you need to click 'login' and you get redirected to your profile page ('/user'). Is there maybe a way to edit this last redirect? Thanks! 回答1: You can change the content of the email sent to the user in admin/config/people/accounts. The default content is the following one: [user:name], A

CSRF validation IOS SDK DRUPAL [closed]

六月ゝ 毕业季﹏ 提交于 2019-12-14 00:06:23
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 5 years ago . I'm having problem with error 401 CSRF Validation failed By the way, i'm using Drupal IOS SDK. I managed to do the login and register to my drupal website. However, after logging in I couldn't do task like Changing Password or Logging Out due to the error of 401 CSRF Validation failed. I have done alot of

Drupal 7: naming node with Theme Developer

血红的双手。 提交于 2019-12-13 19:46:07
问题 I'm working on a Drupal 7 website. I need a custom node for a page, and I used Theme Developer module to find the candidate name for the node which I attached screenshot below. But it doesn't take action when I name as node__28.tpl.php What am I missing?! Thanks a lot! appreciate helps! 回答1: It should work with node--##.tpl.php . And don't forget to clear cache. 来源: https://stackoverflow.com/questions/5178751/drupal-7-naming-node-with-theme-developer

Execute JavaScript on node creation of a specific content type

坚强是说给别人听的谎言 提交于 2019-12-13 18:29:37
问题 I would like to execute a JavaScript function only on node creation and node edit of one specific content type. It is only one small function call. Let's call the Drupal 7 content type " tear ", and the JavaScript function " doitnow(); " Any ideas how to do this? Thank you very much. Nils 回答1: You have to create your own module and implement hook_node_insert(), hook_node_update() and hook_node_view() and take the appropriate steps. You also have to create some JavaScript codes with Drupal

Send one-time login link via hook_mail

断了今生、忘了曾经 提交于 2019-12-13 17:16:31
问题 This is my first real attempt at a "module" (I recognize that this isn't something fit for contribution back to the drupal community - I'm just trying my hand at getting the APIs to do what I want.) Unfortunately, this isn't working and I'm not sure why. Wonder if anyone has any input on the approach or sees my error(s). My questions: Is there a better way to do this so I don't have to call rsvp_query() more than once? Is this a sensible approach to recursively generating an email for all