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

Duplicating page.module

I was thinking of duplicating page.module which would only differ in name, but the fields inside it are pretty much the same.

The reason I'm doing this is to attach a different taxonomy tag to each x.page.module.

Will just renaming this file work or do I need to do something within the code so that it is recognized as a different module?

Thanks!

Still with form redering

I'm still working on form theming and I didn't get why a form (below) that I put in a module doesn't respect my #MAX issues and on the contrary if I put it in a funcion _page it does.

It seems the form overwrite all my directives.
<?php
function mud_form(&$node) {

// In order to be able to attach taxonomy terms to this node, we need
// to display the appropriate form elements.
if (function_exists('taxonomy_node_form')) {
$output .= implode('', taxonomy_node_form('mud', $node));
}
$form['numerazione'] = array(
'#tree' => TRUE,
'#type' => 'fieldset',
'#title' => t('Riferimenti della registrazione'),
'#collapsible' => TRUE,
'#collapsed' => FALSE,
//'#theme' => 'mud_form',
);
$form['numerazione']['car_num'] = array(
'#type' => 'textfield',
'#title' => t('carico/scarico:'),
'#required' => TRUE,
'#default_value' => $node->car_scar,
'#size' => 10,
'#maxlength' => 10,
'#inline' => TRUE
);
$form['numerazione']['car_num'] = array(
'#type' => 'textfield',
'#title' => t('N° registrazione'),
'#required' => TRUE,
'#default_value' => $node->car_num,
'#size' => 80,
'#maxlength' => 255,
'#inline' => TRUE
);
$form['numerazione']['formulario'] = array(
'#type' => 'textfield',
'#title' => t('N° formulario'),
'#size' => 80,
'#maxlength' => 255,

automagically generate content from file directory

Hi:

I am new to drupal development here, but I have a contract to develop a cms for a medium-sized corporate intranet. Part of their motivation is providing a central repository for their internal forms and templates (pdfs and excel files, mostly), which will keep track of revisions and whatnot.

They like the idea of being able to simply upload the file into a directory and have the system take care of it from there. That is, no need for manual node creation, while retaining the ability to add information/descriptions to the nodes.

tagging and pinging (social bookmarking)

hi!
Thank you all for great drupal and plugins! I'm very new in content management and have installed drupal on my site only recently. I have a few Q...

1) first, I'd like to make sure what you call taxonomy is what others (like social bookmark sites, like del.icio.us) call "tags"? it looks to me the same, does it also function the same?

2) how can I add more sites to the automated pinging list drupal uses whenever there's new content?
and is there a way to ping the tags?

3) i've purchased a tag&ping tutorial which came with 2 plugins - but to wordpress. i'd like to stick to drupal. does anyone know an alternative or a drupal solution that's similar?

  1. here's the first WP plugin:

    Plugin Name: WP-Sociable
    Plugin URI: http://www.maxpower.ca/sociable/2006/01/26/
    Version: 0.35 Beta
    Description: A simple plugin which lists a range of social bookmarking sites allowing visitors to quickly socially bookmark the post/page they are currently viewing. Usage instructions are available at maxpower.ca. Based on the work of Paul Stamatiou (visit his blog -- its good).
    Author: Kirk Montgomery

    example:

    // Check to see if user wants to fark [heh]<br>
    if(strstr($wpsoc_sites_wanted,"fark")) { <br>
    // Fark This <br>
    echo "&nbsp;&nbsp;&nbsp;&nbsp;";<br>
    echo "<a href=\"http://cgi.fark.com/cgi/fark/edit.pl?new_url=";<br>
    echo $wpsoc_the_perm."&amp;new_comment=";<br>
    echo $wpsoc_the_title_urlencode;<br>
    echo "&amp;new_link_other=";<br>
    echo $wpsoc_the_blogname;<br>
    echo "&amp;linktype=".$wpsoc_the_fark_cat;<br>
    echo "\" title=\"".$wpsoc_the_title_plain."\" rel=\"nofollow\" target=\"_blank\" />";<br>
    echo "<img src=\"";<br>
    echo $wpsoc_the_imgurl."fark.png\" class=\"socialbkmark\" ";<br>
    echo "alt=\"Fark ";<br>
    echo $wpsoc_the_title_plain." at Fark.com\"/></a>";<br>
    //Fark'd it good<br>
    }<br>

    this thing works with del.icio.us, Spurl, wists, simpy, newsvine, blinklists, furl, reddit, fark, blogmarks.

  2. the second plugin:
    Plugin Name: My Tags
    Plugin URI: http://www.raoul.shacknet.nu/
    Description: Constructs URLS for your categories, which have the tag relation set and appends a tags section to your post's body in single post view and to the feed item's content.
    Version: 0.5

    Info:
    This plugin automatically creates "tag directory" tags from WPO categories, then sticks these specially formatted tags into each of your blog posts and the WP RSS feed.


    php code:

    function mt_add_my_tags($PostBody) {
    global $feed, $my_tags_url, $my_tags_style;

    if ( is_single() || ( is_feed() && !empty($feed)) ) {

    $MyCatTagStr = "

    Tags: ";
    foreach((get_the_category()) as $cat) {
    if ( empty($my_tags_url) ) {
    $MyCatTagStr .= "\ncat_ID), 0, -1) . "\" rel=\"tag directory\">" . $cat->cat_name . ", ";
    } else {
    $MyCatTagStr .= "\ncat_name . "\" rel=\"tag directory\">" . $cat->cat_name . ", ";
    }
    }
    $MyCatTagStr = substr($MyCatTagStr, 0, -2) . "\n

view module add more nodes ie. NODE: published, NODE: Front Page

Want to have 3 sections on the frontpage.

So I have added 3 new ones called frontpage_top, frontpage_left and frontpage_right.

Have them working and choosable when adding content in the same way as promoted to frontpage.
called promoted to left frontpage, right.. etc.

Have installed VIEWS-module but cant figure out where to add the 3 new NODES so they can be chosen under filter so 3 types could be made.

filter: node: published equals yes
node: frontpage left yes

Pages

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