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

Form_Select problem

Hi,
I've got a problem with the form_select function: I can't get back any results, probably 'cause there's an error in my "_POST section" code...

This is the code

function ruoli_form($node, $param) { // --- FUNZIONE OK ---
  
  //Chiama la funzione per caricare gli elementi
  $elementi= riempi_casella_nodi();
  //ottenuti gli elementi li inserisce nella casella a discesa
  $output .= form_select(t('Materiale'), materiale, $edit['materiale'],    $elementi,t('Seleziona il materiale'),0,0,1);  
  return $output;
}


function riempi_casella_nodi (){

//esegue la ricerca
$results = db_query("SELECT title FROM {node} WHERE type = 'video' OR type = 'story' OR type = 'image'  ORDER BY title");
//conta i record 
$num_rows = db_num_rows($results);
//e con due cicli magici riempie due array
for ($counter = 0; $counter < $num_rows; $counter++) {
 $users[] = db_fetch_array($results);
 }

while(list($key, $setting) = each ($users)){
 $user_list[] = $setting[ "title" ];
 }
//ritorna una rray come valore
return $user_list;
}


function ruoli_insert($node) {

 $data = $_POST['edit'];

$result = db_query("Select nid from {node} where title = '%s'", $data['materiale']);
$n = db_fetch_object($result);
db_query("INSERT INTO {materiali_ruoli_utenti} (nid_materiale) VALUES ('%d')", $n);
}

Do you have any suggestion?
Thanks in advance
Albosch

Without www - Gallery working not correctly

Hello together,

maybe so. of you could help me. My Domain is the www.feierplanet.de!

If i start it without the www, the gallery is empty. The Log says with a lot of entries:

"Could not find the page http:/www.feierplanet.de/gallery2/ima..."

After the http:/ is one slash missing. What must I do, is here so. who managed it?

bye and thx,
padcx

Best Practices: Include Patched Versions

As a lowly windows user, patching is usually an immediate turn off to a new module. Compared to other CMSes, Drupal has a much more complicated module install, which is only made more difficult when people have to patch. It causes annoyances for those patching and for command line users sick of trying to teach everyone how to patch. A simple solution would be if all modules that require a patched version of a file include that patched version. This is a simple solution, not a perfect one, but it would save headaches for many.

override node_teaser()

I'm working on a small filter module that uses XML as input language and translates to HTML using XSLT. This all works fine but I run in to some troubles due to the way node_teaser() works. Since the input $text must be valid XML the default teaser stripping won't create valid XML. As a quick fix I set the Length of trimmed posts: to Unlimited.

What I would like to do is to override the default teaser behavior for my XML input format (generate the teaser from a special section in the xml...).

add sub-nav menu items to node page

I would like to add several sub-nav menu items underneath the node default "view" and "edit". I suspect the defined URL path is the problem. For instance the URL path of "view" is "node/[nid]" and "edit" is "node/[nid]/edit". The trick seems to be adding the current node value dynamically to the URL path like this:

css.module : css editing on node creation

Hi!

I use drupal to create websites with lot of pages (as nodes)
using xhtml to organize contents.
For my html pages I always use css to style.

It would be really useful for me a css.module wich could:

add a text area into node creation page

use the text inserted to create a STYLE entry into head
zone of the drupal rendered page

links a node to another node's style text
(multiple nodes can use the same style)

Then user with enought rights could use complex xhtml/css
to create complex styled pages.

Pages

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