This forum is for module development and code related questions, not general module support. For general support, use the Post installation forum.

Validating checkboxes

Hi,

Again, I'm not far from getting mad :(. I'm developing a module for witch I'm developing a adminpanel. The module I'm creating will enable users to use swf's to replace fonts in their HTML. Something like Sifr, but easier to use.

In the adminpanel I've added an option to manage uploaded fonts. Combined with lots of frustration, I've managed to create a table with the uploaded fonts and checkboxes, witch should enable the administrator to delete fonts. (Thanks to http://drupal.org/node/112358).

Now the next step would be validating the form. This is where I'm stuck. All form elements are accessible, but from the checkboxes I can't get the values (whether they are checked, or not). I must be overlooking something but I can't find it! Please help!

The form:
<?php
function flash_text_fonts_form() {

$font_list_table_rows = array();
$font_folder = variable_get("flash_text_font_folder", "files/flash_text");

if($handle = opendir($font_folder)) {
while (false !== ($file = readdir($handle))) {
if(preg_match("/^(.+?).swf$/", $file, $matches)) {
array_push($font_list_table_rows, array("title" => $matches[1], "file" => $matches[0]));
}
}
}

$form['header'] = array('#type' => 'value', '#value' => array(array('data' => 'nid'), array('data' => t('Title'))));

New posting module

I need a news posting module with the following functionality,
1. administrator can only post news.
2. news with heading & some detail with more link will be displayed on page.
3. user can only read news & there should be no other information like extra info on forum.
4. news looks different then forum.

if there is such a module then plz let me knwo about that.

Thanks

database query/rewrite question

$res = db_query_range(db_rewrite_sql("SELECT n.nid, n.title, n.created FROM {node} n WHERE n.status = 0 AND n.uid='$curUserId'  ORDER BY n.created DESC"), 0 , $listlength);

what i want to do is add '/edit' to the end of each retrieved n.nid. any ideas?

Script for EZdrupalCVS

I made a very small, hastily made and, frankyly, hacky as hell script for listing tags available for a given module, checking modules out of CVS and updating them without needing to type too too much. Still not as easy as it should be, but in case it helps anyone, see attached, or see below.

examples:

drupal_get-mod -x list -m cck 
drupal_get-mod -x get -m cck -d cck -t DRUPAL-5
drupal_get-mod -x update -m cck

Ps. (anyone know a better way of listing available tags for a path without scraping the viewcvs page?...I should be ashamed of myself, I know...)

Auto registration module - call for help!

Recently I've created a full spec for the auto registration module. This module may highly improve the usability of Drupal sites by allowing to register by filling the email (&confirmation) while posting content.

Please review the updated spec in the bottom and answer the open issues:

1. Should it be implemented as part of logintoboggan, or a separate module?

2. Can somebody review my suggested spec & suggest an architecture?

Display image-galleries in reverse order

Is there a way to display image-galleries in reverse order. (image.module)

I have galleries shown with a rewritten fgallery.module but I want to reverse the view order

Today it list the gallery like this!

gallery1
--date 2007.01.22
--date 2007.01.26
--date 2007.02.02
--date 2007.02.04

I want it to list like this (reverse order)

gallery1
--date 2007.02.04
--date 2007.02.02
--date 2007.01.26
--date 2007.01.22

Pages

Subscribe with RSS Subscribe to RSS - Module development and code questions