drupal

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

Programmatically add menu item/link to Drupal menu?

徘徊边缘 提交于 2019-12-14 04:01:19
问题 I have a Drupal Menu which I created through the interface. I wish to add an entry which says Hi, John Doe Where "John Doe" is a link to the User's profile page. I would like to do this programmatically or if it can be done through the interface then that would be great. 回答1: You cannot add HTML-ified items to the menu. Menu-items are always wrapped in an anchor tag and will filter out HTML. Changing this behaviour is technically possible, but will cause a lot of unknown side-effects. What

Drupal Ubercart: multi-currency?

余生长醉 提交于 2019-12-14 03:42:10
问题 what's the safest way to integrate multi-currency support to Ubercart ? I found this module: http://drupal.org/project/multicurrency but it is still under development and it says it requires custom installation procedure to be installed. Is this the main way to do it ? Or am I missing something ? thanks 回答1: I've solved with this great tutorial: http://vintagedigital.net/content/how-add-multicurrency-support-ubercart 来源: https://stackoverflow.com/questions/3195279/drupal-ubercart-multi

Validation on user registration form?

耗尽温柔 提交于 2019-12-14 03:19:08
问题 i have made module in which i am trying to add validation like if the user had entered the characters in "Phone No" text filed and same on "Mobile No". This will run when user had open the user registration form. I have made this.... <?php function form_intro_form_alter($form_id,&$form){ if($form_id == 'user_register' || $form_id == 'user_edit'){ $form['Personal Information']['profile_pno']['#validate'] = array('form_intro_pno_validate' => array()); //profile_pno is for Phone No. $form[

Project management app for web developers? [closed]

六月ゝ 毕业季﹏ 提交于 2019-12-14 03:17:09
问题 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 months ago . I am tired of having to manage projects manually. We use subversion for version control, but ultimately, I want an app that can: Send out notifications to clients on the progress of their projects Allow clients to log in and see screenshots of projects Keep track of money paid, as well as invoice due dates and

Multiple sections in Content Block for Drupal

有些话、适合烂在心里 提交于 2019-12-14 02:57:46
问题 How to create multiple sections in Content block in Drupal? When a user visits my homepage, a mainpage will be displayed; this page will contain a few sections at the middle panel. One of these sections would be a news update section, another would be a video channel, much like how mtv UK is looking in the middle portion of the homepage. http://lh6.ggpht.com/_SDci0Pf3tzU/Sd7SEwzEbhI/AAAAAAAAEqc/ROuP7fXkRSk/s400/section.png What modules are needed to create this kind of website layout? 回答1:

Retrieved date, time off by 7 hours?

我怕爱的太早我们不能终老 提交于 2019-12-14 02:40:36
问题 I am having trouble displaying the correct date, well actually its only the time. In the db the date is stored in this form: '2012-09-28 23:30:00' (off by 7 hours of actual date time) That is the value for a date of an event. When I retrieve it using this script(for drupal): $ttdate = $obj->field_date_test_value; $nttdate = strtotime($ttdate); $okdate = format_date($nttdate, $type = 'medium'); print $okdate; ...it works fine but the time is off by 7 hours. So instead of showing 'Fri, 9/28

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

PHP: Truncate text at word boundaries

佐手、 提交于 2019-12-14 01:28:39
问题 Does anybody have the exact name of the function Drupal uses to turn the following string: "Hello, how are you. Some more text." into "Hello, how..." I.e. The function that's used to cut off a sentence after x words, and then add an elipsis. Alternatively, if anybody has a php snippet that does this, that would be great too! 回答1: function getFirstWords($string, $words = 1) { $string = explode(' ', $string); if (count($string) > $words) { return implode(' ', array_slice($string, 0, $words)) .

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