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

Could I get help editing this module. (Node List)

I'm not fluent with PHP, what would I edit in this PHP file to have it display just a list of node cotent and not the letters? Output is this:

* f
* g

f

* First Date Tips. Things To Do On First Date.

g

* Getting Ones Phone Number Aint That Hard

I just want:

* First Date Tips. Things To Do On First Date.
* Getting Ones Phone Number Aint That Hard

It's the node list module. Any help is very much appreciated!

<?php
/**
* File: nodelist.module
* Version: $Id: nodelist.module,v 1.3.2.4 2005/05/02 16:12:48 njivy Exp $
* Author: Nic Ivy (nji@njivy.org)
* Description:
*
* This module provides a page listing nodes by their titles, linking to
* the nodes directly. The list is sorted alphabetically.
*/

/**
* Implementation of hook_help()
*/
function nodelist_help($section = 'admin/help#nodelist') {
switch ($section) {
case 'admin/modules#description':
return t('List all nodes by title');
}
}

/**
* Implementation of hook_menu()
*/
function nodelist_menu($may_cache) {
$items = array();

if ($may_cache) {
$items[] = array('title' => t('node list'),
'access' => user_access('access content'),
'path' => 'node/list',
'callback' => 'nodelist_page',
'type' => MENU_SUGGESTED_ITEM);
}
else {

Taxonomy dhtml and translated vocabularies

Hi,

is there a simple way to show taxonomy dhtml sitemap with vocabularies strings based on language user has (or site default is) and not default (in English language)? I see that Taxonomy Menu works fine with this localization "feature" so if any developer/site admin has solved that please post a solution here.

Thanks, Sergej

Schedule front page

I'm working on a new module for scheduling the home page. I manage a small newsletter that updates every week and I hate having to remember to go into "settings" and change the front page node. So... using 4.7 beta4 I started work on a module for scheduling the home page. One thing that I really like about the 4.7 code base is the use of form generation.

checkboxes default value ( new form api)

am i correct in thinking that to give non-standard default values to a set of checkboxes, i just need to pass into the #default option an array of checkbox_key => default_value_desired?

multiple ecommerce sites with different autoreturn addresses

Guckie has written some great code and explanations of how to use paypal IPN with multiples sites. here it is.

Adding an HTML img src in the forward.module

Okay, this is going to sound dumb, but I have a site that uses the forward.module. As you probably know, it's made so a link appears at the bottom of a blog post that says "email this page."

Anyway, the client wants a little envelope graphic to appear after the "email this page" text. (Gag.) So, me, being new to Drupal, looks at the forward.module and pretty much panic because I don't want to explode the site if I screw up the PHP code.

It looks like I'd need to add a HTML img src blurb in the function forward_link, but like I said, I'm a newbie and don't want to kill the site.


// This var is set in the settings section under the admin/modules/forward section
// It shows 'email this $nodetype' or 'email this page'
$forward_link_type = variable_get('forward_link_type', 0);
if ($forward_link_type) {
if ($type == 'comment') {
$forward_link_type = 'comment';
$links[] = l(t('email this %type', array('%type' => $forward_link_type)), "forward/$node->nid&cid=$node->cid", array('title' => FORWARD_TITLE), NULL);
return $links;
}
$forward_link_type = $node->type;
}
else $forward_link_type = 'page';

if ($main) { // not on an index page
if (variable_get('forward_show_on_main', 0)) {
$links[] = l(t('email this %type', array('%type' => $forward_link_type)), "forward/$node->nid", array('title' => FORWARD_TITLE), NULL);

Pages

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