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

another simple page module that doesn't work

I am trying to cut and paste the examples to create a module. ver 4.7 HEAD
I did register the module.
What am I missing here?

help with installing Discnode module

I Am Having Trouble Installing The Discnode Module Because Of The Various File Extentions

[edit. I removed the H1 tag and edited the subject to be more truthful. chx]

I am having trouble installing a module

I might have posted this already and forgotton, but can someone tell me how to install a module?

aggregator

I have added a feed to show stock quotes on my site... is there a way to change the name that shows up?
ex: I added the stocks ^dji which is the dow jones but it shows up on my site as "^dji" is there a way i can change it so it says "dow jones"? same with ^gspc which is the s&p...

www.1northernvirginiarealestate.com

thanks

Node.module fails if I make ANY modification, even white space

I and some friends have been building a drupal site for the last few months and today I tried merging our code with the most recent code from Drupal CVS. If I make ANY modification to node.module (and I mean ANY modification, even adding a space after the end of a line) then my site fails to load and I get this error:

Warning: Unexpected character in input: '\' (ASCII=92) state=1 in D:\website\htdocs\dev\modules\node.module on line 1548

Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING in D:\website\htdocs\dev\modules\node.module on line 1548

Line 1547 of node.module onwards reads:

  $output = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n";
  $output .= "<rss version=\"". $channel["version"] . "\" xml:base=\"". $base_url ."\" "\"". implode(' '', $namespaces) .">\n";
  $output .= format_rss_channel($channel['title'], $channel['link'], $channel['description'], $items, $channel['language']);
  $output .= "</rss>\n";

I can fix my site by copying an un-touched copy of node.module from the Drupal CVS. But as soon as I try modifying that file the error comes back.

This is driving me nuts! The only possible reason I can think of is something to do with UNIX / Windows text files... i.e. I assume most developers are using Linux but I'm using Windows... maybe my Windows system screws up the end-of-line formatting in some way? Any help would be very greatfully received!

simple page module

Hi,

I'm a newbie to drupal and read the module developers tutorial but it left me still a bit puzzled.

i need to integrate my webapp to drupal as a module. front-end usage is quite simple, i just need to show one page that queries data from the database and formats it according to a html template.

i'm know how to use hook_menu() to create the link to the page, but can really figure out what method should i use to show the data.

there shouldnt be any edit/submit pages. just the plain html page that is generated in the correct method. The method should also be able to get the logged user name from the framework so the module is able to query user specific data (how do i request the logged uid, or username, from drupal?)

function modulename_menu($may_cache) {
  $items = array();

  if ($may_cache) {
$items[] = array('path' => 'modulename/parameter', 'title' => t('view generated html'),
      'access' => user_access('view datapage'));
  return $items;
}

i understand that the modulename defines the module, and parameter defines the page somehow? how do i read that parameter? what hook is called to create the html in the middle column of the page shown in the browser?

this must be pretty simple, and most likely found easily in some tutorial, but i just dont seem to figure out where it is.

what is the minimum skeleton module for showing a link in the left menu to "datapage" page that you just can view (no add/edit form at all) and shows a bare page with text "datapage"?

Pages

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