CVS edit link for binford2k

I've been participating in the Drupal community for years, helping on the forums, posting bug reports and patches, etc. I think it's time to start returning some of the themes and modules I've developed.

I can start with three themes:
http://lug.wsu.edu/~ben/drupal6/ (may be broken at any given time, used for dev)
http://www.wheatberriesbakeshop.com/drupal/ (site is under development, theme should be complete)
http://village.anth.wsu.edu/ (production)

and three modules:
Devsite: shows a simple info bar when the current site matches a regex. I use it so I can mirror a live server for development and the bar is shown on the dev site and not the live site without any db or filesystem changes.
IRC logs: I've implemented a handful of ZNC modules for Drupal integration, including Drupal Auth, which allows Drupal users to use your ZNC bouncer, and a MySQL logger. This module displays the IRC logs in your site and allows for searching. This started life as a fork of Bot Log, and my eventual goal is to merge them again. Our logs are not public, but a snapshot can be seen at http://lug.wsu.edu/~ben/irclogs.html
Reminders: A user can set reminders on a node, and this will send nag emails to each user in a given role at a given interval until the user has logged in to view the node. Useful on a forum when an admin type user periodically posts important information for all users to read.

More will come later, but this is what I can contribute now.

Comments

binford2k’s picture

StatusFileSize
new13.3 KB
new30.86 KB
new25.4 KB

Comment upload is wedging on one attachment. I'll try uploading the others and come back to it.

Here are all but the wheatberries theme. I'll have to post that tonight after work. These can also be browsed from our subversion repository.

https://lug.wsu.edu/svn/wsulug/projects/drupal/modules/devsite/
https://lug.wsu.edu/svn/wsulug/projects/drupal/modules/irclogs/
https://lug.wsu.edu/svn/wsulug/projects/drupal/modules/reminders/
https://lug.wsu.edu/svn/wsulug/projects/drupal/themes/vino/
https://lug.wsu.edu/svn/wsulug/projects/drupal/themes/wsuidentity/

binford2k’s picture

Status: Postponed (maintainer needs more info) » Needs review

comment upload wedges on both themes. Dunno why, but I'm at work, so I can't spend time debugging. In any case, you can check them out from svn easily.

I'll post tarballs tonight.

binford2k’s picture

StatusFileSize
new235.81 KB
new432.01 KB
new37.61 KB

Wow, they attached flawlessly. I wonder if it's a safari issue.

Also wheatberries has been committed:
https://lug.wsu.edu/svn/wsulug/projects/drupal/themes/wheatberries/

avpaderno’s picture

Status: Needs review » Postponed (maintainer needs more info)

We review only a theme / module per application. Choose the one you want to be reviewed, and let us know it.

binford2k’s picture

Status: Postponed (maintainer needs more info) » Needs review

You mean I have to have each project approved? ...... that seems like crazy overkill. I really don't care .... look at reminders.

avpaderno’s picture

You mean I have to have each project approved?

No. I meant that we don't review more than one theme/module per application; a CVS application is made just once.

avpaderno’s picture

Status: Needs review » Needs work
      $form['reminders']['reminders_roles'] = array(
        '#type' => 'checkboxes',
        '#title' => 'Send reminders to',
        '#default_value' => _reminders_node_get_roles($node-nid),
        '#options' => user_roles(TRUE),
      );
      // interval is in minutes, you can add more intervals by converting to minutes and adding them to #options
      $form['reminders']['reminders_interval'] = array(
        '#type' => 'select',
        '#title' => 'Send reminders',
        '#default_value' => _reminders_node_get_interval($node->nid),
        '#options' => array(
            '60' => t('hourly'), 
            '1440' => t('daily'), 
            '10080' => t('weekly'), 
            '40320' => t('monthly'), 
            '524160' => t('yearly')
        ),

Strings used in the user interface needs to be translated; this includes also the strings used as options for the form fields.

function _reminders_node_get_interval($nid) {
  $result = db_query('SELECT send_interval FROM {reminders} where nid = %d', $nid);
  if($row = db_fetch_array($result))
    return $row['send_interval'];
  else
    return 1440; // minutes in a day
}

The code could use db_result().

  if(in_array(2, $roles)) {
    // get all authenticated users
    $result = db_query('SELECT u.uid FROM {users} u
	                 WHERE u.uid NOT IN (SELECT uid FROM {reminder_logs} WHERE nid = %d)
                   OR TIMESTAMPDIFF(MINUTE, (SELECT MAX(ts) FROM reminder_logs WHERE uid = u.uid), NOW()) >= %d',
                   $nid, $interval);
  }
  else {
    $roles = implode(',', $roles);     
    $result = db_query('SELECT u.uid FROM {users} u
	           INNER JOIN {users_roles} r ON u.uid = r.uid WHERE r.rid IN (%s)
	           AND (u.uid NOT IN (SELECT uid FROM {reminder_logs} WHERE nid = %d))
	           OR TIMESTAMPDIFF(MINUTE, (SELECT MAX(ts) FROM {reminder_logs} WHERE uid = u.uid), NOW()) >= %d',
	           $roles, $nid, $interval);
  }

The first query is specific for a database engine; both the queries have securities issues as they don't filter the returned users in the right way.

avpaderno’s picture

Status: Needs work » Closed (won't fix)

There have not been replies from the OP in the past 7 days. I am marking this report as won't fix.