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

Remembering contact information for anonymous comments

I'm setting up a Drupal-powered personal blog these days, and one of my visitors asked for persistent contact information in the comment submission form,
in accordance with what I think is common practice on weblogs. It's not at all difficult to store this contact information in the guest session, with a quick patch to comment.module.
Add:

      if(!$user->uid) {
         $_SESSION['comment_guest_name'] = $edit['name'];
         $_SESSION['comment_guest_mail'] = $edit['mail'];
         $_SESSION['comment_guest_homepage'] = $edit['homepage'];
      }

to the comment_save function (line 555, say), and modify the relevant parts of comment_form to take this into account—for example, the definition of the name field
in the form, in the COMMENT_ANONYMOUS_MAY_CONTACT case becomes:

    $form['name'] = array(
       '#type' => 'textfield',
       '#title' => t('Your name'),
       '#maxlength' => 60,
       '#size' => 30, 
       '#default_value' => $edit['name'] ? $edit['name'] :
           ( $_SESSION['comment_guest_name'] ?
             $_SESSION['comment_guest_name'] :
             variable_get('anonymous', 'Anonymous')
           )
    );

and similarly for the other two fields, and the COMMENT_ANONYMOUS_MUST_CONTACT case.

Now, my question is: are there good reasons for not doing something like this? I guess I'm not the first user looking for such a behaviour, and it's very easy to

theming admin pages

Good day

I am trying to avoid to have to scroll the entire page when viewing some of the admin pages, the admin/access page in particular. I have been sifting through the snippets documentation and found an explanation of how to use a different page template for the admin page, but looking closer, I just want to theme a function, user_admin_perm in this case.

This function does not appear in the api.drupal.org listing of themable functions.

How would I go about this without hacking the core?

Thanks in advance for any pointers.

Jan

Has anyone got a good example of user_profile.tpl.php to show picture and other fields in default profile

Has anyone got a good example of user_profile.tpl.php to show picture and other fields in default profile. I try to build somethinglike myspace.com (not so elaborate)

I have the following in thef user_profile.tpl.php now but would like to include
the default fields

Missing gettext string

Just noticed that a month's short name is missing, May. Its long form is also used as short something odd for languages that use longer names for months.
I'm sure that can be easily fixed.

Thanks

My SQL Lost COnnection Error for RSS Feeds

Hi All:

Whenever someone tries to access my RSS feeds - there is an error - which when I go to my admin page I see as:

Location /?q=node/feed
Message Lost connection to MySQL server during query query: UPDATE sessions SET uid = 0, hostname = '59.161.72.72', session = 'og_last|N;', timestamp = 1149307214 WHERE sid = '75d4d5ab4f2691c463bcbfb5f12f274e' in /home/myname/public_html/includes/database.mysql.inc on line 66.

I wonder why this is so??

Can someone pls help???

Thanks,
dkaps

Duplicate cache entry

Greetings,

Has anybody come across with such problem ?

After enabling Russian (or any other) language I constantly began to receive the following error:

Duplicate entry 'locale:en' for key 1 query: INSERT INTO cache (cid, data, created, expire, headers) VALUES ('locale:en', .....

It happens both for 'locale:en' and 'locale:ru' languages depending on the active language of the specific user.

Pages

Subscribe with RSS Subscribe to RSS - Deprecated - Drupal core