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

Improving Multi-user Blogging capabilities?

I'm wondering if any of this is possible or desirable. That's the reason for the question mark at the end of the title. I'm not demanding or ranting here, just thinking aloud.

It seems to me that one of the weaknesses of Drupal is its multi-user blogging capabilities. There are some really useful tweaks and changes that I think could really improve things in that area. Here's my list, but I'm well aware that some of this may already by possible, or at least in the pipeline. If so, I'd appreciate a pointer in the right direction.

1) User Themes

I know that there is the blog theme module, but that's not quite what I'm thinking here. I'm not really interested in letting someone style how they see the whole site, but I do think it is useful for them to be able to decide how their own blog looks. I guess that means I'd like the Blog themes module to do less!

However, it would also be a nice addition if users were able to edit their own themes, via some kind of control panel, e.g. the presentation editor in Wordpress. I'm aware that this would bloat things pretty significantly, as it would require duplicating the theme files for each user, but perhaps there's a way round that which I can't see.

On a related note, perhaps there's some way of allowing users to edit and place blocks simply for their own blog?

2) Comments

(Any) voting possible in a list view?

I need to create a list view of my node titles with the voting gadget showing for each row.

Either Fivestar or vote up/down... Any suggestions for making them show in a list view?

Thanks,
Keysar.

Services and Associative Array Arguments

I was messing around with the system.mail service to try and understand how to pass an associative array as an argument. The 'headers' argument is identified as an associative array, but I cannot seem to use it to specify Cc or Bcc. What is the proper format to specify the 'headers' associative array argument on the Administer->services->system.mail page?

Any help greatly appreciated.

Thanks
-Timothy

Import/Export API on entities without primary keys?

I'm trying to write an Import/Export API module for the Station Playlist type. Playlist is a node type, but there's a separate Tracks table, which does not have a primary key -- it just references the playlist's node ID. I've tried all sorts of different ways, but I can't get the exporter to include the tracks. It's just left out. Any ideas?

Here's what I have currently. Can anyone see the problem?
<?php

function playlist_export_def() {
$defs = array();
$type = 'program_playlist';
$def = importexportapi_node_get_def($type);

$type_info = module_invoke('station_schedule', 'node_info');
$type_info = $type_info[$type];
$def['#title'] = $type_info['name'];
$def['#title'][0] = strtoupper($def['#title'][0]);

$def['#xml_plural'] = $def['#csv_plural'] = 'program-playlists';
$def['revisions']['#csv_plural'] = 'program-playlist-revisions';

$def['type']['#db_filter'] = array(
'values' => array($type)
);

$def['tracks'] = array(
'#type' => 'array',
'#title' => t('Playlist tracks'),
'#db_default_table' => 'station_playlist_track',
'#xml_plural' => 'tracks',
'#xml_mapping' => 'track',
'#csv_plural' => 'playlist-tracks',
);
$def['tracks']['nid'] = array(
'#type' => 'int',

Help making a module views-compliant

Hello,

I am the developer of the simple karma module:

http://drupal.org/project/simple_karma

I am completing the module right now. I am currently working full time on it.
An user asked me to make the module compliant with the "views" module. Now... I have never used "views", and I must admit I find it very confusing.

Problem with dynamic checkboxes. Returning even unchecked ones?

Right now I don't have any theming or validation. I just want to find out why it is returning all the checkboxes it finds even if they aren't checked. I want the submission to use the file_delete method to delete the files they check, but i'm not going to do that if it is returning every file. It is probably something stupid in how i'm creating them. Please take a look.


<?
function topright_page() {
$output = t('This page contains my form.');

$newoutput = drupal_get_form('topright_delfilesform');
if($newoutput) $output .= $newoutput;

return $output;
}

function topright_delfilesform() {
$my2form = array();
global $user;
$folderwherefilesare = "/public_html/artcrush/files/topright/".$user->uid."/";
$options = array();
$i = 0;

if(!is_dir($folderwherefilesare)){
mkdir($folderwherefilesare);
}

if ($handle = opendir($folderwherefilesare)){
while (false !== ($file = readdir($handle))){
if ($file != "." && $file != ".."){
array_push($options,$file);
$my2form[$file] = array(
'#title' => $file,
'#type' => 'checkbox',
// '#value' => 0
// '#attributes' => array('checked' => 'unchecked'),
// '#default_value' => 0
);
}
}
} else return 0;

$my2form['submit'] = array(
'#type' => 'submit',
'#value' => t('Submit')
);

return $my2form;
}

Pages

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