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

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"?

feedback module alternative for 4.6

anybody else doesn't like the feedback module?

i had a look at its code, and imho it isn't very clean. so i made a stripped down version of it (no validation of the email address by contacting SMTP server), but i implemented some features of the contact.module in 4.7.

the features i added, are

  • flood prevention
  • a optional configurable list of categories, like the new contact module

further i payed attention to secure the module, so that it's not possible to relay spam or spam you (flood prevention).

SimpleNews

Drupal 4.6.5

I finally had a need for a newsletter module. So, I decided to pick simplenews.mod from our choices.

Nice!... very nice!

I think it is one of the best newsletter modules I have "ever seen" or loaded.

I have only completed the simple test so far. Will have others test drive it tomorrow.

Big thanks!

Quicktags link fix

I modified the quicktags link button so now instead of returning "Link Text" between the a tags, it inserts the highlighted text (normal for most programs)

Change line 78 from
array('ed_link','link','','','l', -1, 'edInsertLink'),
to
array('ed_link','link','','</a>','l', -1, 'edInsertLink'),

Pages

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