See the Mailing lists or Drupal Issue queue. There are also various working groups on groups.drupal.org

Comments on user's profile

Hello everybody.

I've just came across with a necessity to post comments on users' profiles. Profile is not a NODE so it is impossible. But may be someone ever solved this problem or may be there are any modules which implement something like that ?

Thanks.

duplicate database field names "vid"?

I'm working on a module to create a custom node type, and in browsing through the existing database tables, I notice that it seems that the field name "vid" is used in for two totally different purposes- one the the "version ID" for node revisions, and the other the "vocabulary ID" for taxonomy. Perhaps I'm just new to this, but it seems like this creates an unnecessary potential for confusion?

My issue/bug report deleted from queue completely; no answers given. Why?

A couple of days ago I flagged what was, I thought, a fairly significant problem with Drupal core. I submitted at first as a support request, but when a couple of days went by and I could see it getting buried in other bug reports, I resubmitted it as a bug.

Today, it looks like both submissions have been summarily deleted from the issue review queue.

The bug/issue was this: when my host rebooted my database server, my site was temporarily unable to connect to the database.

Fix to column shifting on tablesort

Greetings,

This is my first post about a possible fix to code so please be patient.

Issue. When you click on different column headers in a sorted table, the indicator arrow will shift from the current sorted column to the newly chosen sort column. This causes the width of the columns (at least in Firefox) to change, and the whole table shifts. I find that annoying.

My solution. I made a 13x13 pixel png image which is transparent and blank. All columns now get that instead of no image, and when you change column sorts, the table doesn't jiggle.

form api - pass timestamp with date type form element

Beginning to toy with impressive form api in 4.7.

I found I needed to do some validation against a date element. I used the nice automatic item, i.e.:

$form['details']['date'] = array(
  '#type' => 'date',
  '#title' => t('Start date')
);

Then I needed to do some validation. First I wanted to check if the user had set any date at all, but since the date #value automatically defaults to today's date there's no immediately obvious way to distinguish between "not set" and "set for today". Also, no way to doublecheck that a date in the past hasn't been chosen. Other scenarios too..

Anyway, to cut to the chase - I hacked form.inc to pass the timestamp of the default date along with the other info. In the form.inc function expand_date I replaced the first few lines at 788:

// Default to current date
  if (!isset($element['#value'])) {
    $element['#value'] = array('day' => format_date(time(), 'custom', 'j'),
    'month' => format_date(time(), 'custom', 'n'),
    'year' => format_date(time(), 'custom', 'Y'));
  }

with the following. Note that I've moved generation of date element values outside the conditional because, in the event of a form_error on another form element, we would lose the "today" info if user has already set a date.
<?php
$this_day = format_date(time(), 'custom', 'j');
$this_month = format_date(time(), 'custom', 'n');

respond to a module's "save configuration"

I make Prado apps.
I'm starting to create custom 4.7 modules.
so far, so good.

but isn't it possible to respond to the module's [Save Configuration] function?

I figured I could just write a hook_update() function but it seems not.

I know that my form params are automatically saved for me but I need to post process something when a save happens.

I wish drupal had some nice docs made with phpDocumenter.

chris.

Pages

Subscribe with RSS Subscribe to RSS - Deprecated - Drupal core