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

Module Docs; Volunteering to re-write

Hi there.

I'm one of those middling users who know very very little coding, but knows some basic site administration tasks. I am also an avid writer, and my background is in publishing. I'm prodding the main drupal-docs mailing list, but I would like to volunteer my services for any module developer who would like a readme/installation for non-programmers.

Music stream

Hi

I would like to know, if it is possible to make a drupal controlled site as a streaming music site.

the reason why i want to know is that I would like to my self composed music on the net, so people can listen to my work.

So if there is a modul that can stream music file let me, otherwise if there is something reletaed to it please let me know.

thanks
/roma

Nested node types

I was wondering if any module developers have been faced with representing m-n relationships between nodes and how this was accomplished. I'm currently faced with the task of mapping a user interface on top of a dozen or so distince data types (tables), each of which is somehow related to the others (through foreign key relationships).

I've seen how the project.module has projects that contain issue nodes and release nodes, but that seems like a much more laborious setup than anything I need. The table structures would look something like the following:

parent_table:
  nid int,
  parent_stuff varchar(255),
  other_stuff varchar(255)


child1_table:
  nid int,
  parent_nid int,  // foreign key into parent_table
  child1_data varchar(255),
  child1_more_data date


child2_table:
  nid int,
  child1_nid int,  // foreign key into child1_table
  child2_other_data varchar(255),
  child2_yet_more_data int

Each node of all types would exist on its own, but nodes of type child1 would have to be associated with a parent node, and nodes of type child2 would have to be associated with a child1 node.

Even if the child1 and child2 types didn't need to exist (as distinct nodes) outside of the scope of the parent node, there would be multiple child1 records for each parent record. Does anybody else do this sort of thing using the node system? I have some ideas for how to deal with this, but they're all kinda clumsy and/or very code intensive. Generally, there isn't much that needs to be done with each data structure other than providing edit facilities and rendering it for viewing. If I thought I could do this using flexinode.module, I certainly would.

Shell Script to Install Modules

Here's the beginings of a shell script that will install modules from shell. Currently it only installs the ones without the need for DB, but it should only take a few lines to do that, if someone else has time they are welcome to. I just thought i'd present the idea with some work done. Any improvements, suggestions, and code is welcome.

-------------------------------------------------------------------------

#!/usr/local/bin/php -q

#$dbusername = "";
#$dbpasswd = "";
#$dbname = "";

#absolute path to drupal with a trailing /
$abspath = "";

// YOU DO NOT NEED TO EDIT BELOW HERE

$modulepath = $abspath."modules/";
$filename = $argv[1];
if(isset($filename) && file_exists($filename) && (count(explode('.',$filename)) > 1)){
        $temp = explode('-', $filename);
        $modulename = $temp[0];
        //delete module directory
        //shell_exec("rm -rf $modulename");
        shell_exec("tar -xzf $filename");
        if(file_exists("$modulename/INSTALL"))
        	echo shell_exec("more $modulename/INSTALL"); 
        else if(file_exists("$modulename/README"))
        	echo shell_exec("more $modulename/README");
        else if(file_exists("$modulename/README.txt"))
        	echo shell_exec("more $modulename/README.txt"); 
        	 
        WHILE($bool == false){
          echo "\n\nDo you want (o)nly module file, (e)ntire directory, (a)ll files? (o/e/a)?";
          $input = trim(read());
          if($input == 'o' || $input == 'e' || $input == 'a'){
            $bool = true;
          }else
            $bool = false;
        }
        if($input == 'o'){
      		shell_exec("mv $modulename/*.module $modulepath");
      	}else if($input == 'e'){
                delcruft();
      		shell_exec("mv $modulename $modulepath");
      	}else if($input == 'a'){
                delcruft();
      		shell_exec("mv $modulename/* $modulepath");
      	}

        //find sql file, run mysql command to pipe the sql file to the db
        
}else{
        echo "File doesn't exist or not defined properly!";
}

function read() {
  $fp=fopen("/dev/stdin", "r");
  $input=fgets($fp, 4);
	fclose($fp);
	return str_replace("\n", "", $input);
}

function delcruft(){
	shell_exec("rm -rf $modulename/CHANGELOG");
	shell_exec("rm -rf $modulename/README*");
	shell_exec("rm -rf $modulename/TODO");
	shell_exec("rm -rf $modulename/CREDITS");
	shell_exec("rm -rf $modulename/INSTALL");
	shell_exec("rm -rf $modulename/LICENSE*");
}

simple up/down moderation per content type per role

The first time I went to ?q=admin/node/configure/defaults (administer > content > configure > default workflow) and checked moderate for stories, I then expected to be able to go to administer > users > configure > permissions and see a new row in the table for the story module that said "Moderate."

In other words, I thought I would be able to assign moderation privileges to select roles for select content types. Instead, it appears that the queue module allows me to specify roles that can moderate ALL content types that are not, by default, promoted to the homepage. But if I want role #1 to moderate only content type #1, and role #2 to moderate only content type #2, that's not possible -- if I understand correctly.

I don't know how difficult what I want would be to implement from the programming/db standpoint, but from the user interface standpoint, it would be quite easy... in fact, the UI, as it currently exists, is practically begging for this to be added.

The current system is excellent if you want the community to moderate a particular set of content types, and no other type of moderation is needed on the site (excepting comments). It's not so good, though, if what you really want is to give certain people simple up/down authority to publish or promote certain content types, and certain other people the same ability for other content types. This might at first seem inconsistent with the spirit of empowering the whole community to moderate content, but since Drupal aims to be a "content management platform" for a wide set of uses, this seems like appropriate (and needed) flexibility to grant to admins. And one could certainly imagine a community site where community moderation AND moderation per-role-per-content-type is needed... or where a wide portion of the community is called upon to moderate one set of content, and another wide portion of the community moderates a different set of content.

Image module changes help

I want to make a minor change in image module. I want that when an image is previewed or viewed the first links below should show Copyright information instead of current "By ".

I have gone through image module but cannot find the code that needs to be changed for achieving this. Where should i hack image.module/Drupal to achieve this.

Thanks
EM

Pages

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