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

"blog it" for other node types

I've been searching around but couldn't find much on this.

I'm interested in converting the 'blog this' function, which allows users with access to blog.module to create new nodes from aggregator links, to a more generalised function. There seems like a few possibilities for it though, and I'm not a coder, so thought it'd be worth posting this to keep track of ideas and see if anyone else has done or is trying to do the same thing:

Most of the relevant code is here in blog.module


/**
* Implementation of hook_form().
*/
function blog_form(&$node) {
global $nid;
$iid = $_GET['iid'];

if (empty($node->body)) {
/*
** If the user clicked a "blog it" link, we load the data from the
** database and quote it in the blog:
*/

if ($nid && $blog = node_load($nid)) {
$node->body = ''. $blog->body .' ['. l($blog->name, "node/$nid") .']';
}

if ($iid && $item = db_fetch_object(db_query('SELECT i.*, f.title as ftitle, f.link as flink FROM {aggregator_item} i, {aggregator_feed} f WHERE i.iid = %d AND i.fid = f.fid', $iid))) {
$node->title = $item->title;
// Note: $item->description has been validated on aggregation.
$node->body = 'link) .'">'. check_plain($item->title) .' - '. $item->description .' [flink) .'">'. check_plain($item->ftitle) ."]\n";

have problem editting custom node content

Below is my problem. Any comments or help appreicate.

My problem:

I created a module that adds two additional data fields to the node by implementing hook_form, which in essence I have the usual node fields plus a dropdown and textfield.

The best way to start a new node type?

Looking for some good folks with a great understanding of Drupal inside and out to answer this one...

I am about to undertake converting an existing website from a proprietary CMS and converting it to Drupal. Why would I want to do this? Because the existing CMS infastructure is bloated, messy, and I think drupal could do a much better job of managing all of the content.

Porting over the article content on the existing site will be a breeze; however these is a huge aspect of the site which is going to require quite a bit of custom development; essentially what I want to do is create a node type "Establishment", and have the following elements:

- Establishment Name
- Establishment Contact Info (name, address, etc)
- Establishment Location (e.g. a local neighborhood that its located in...)
- Establishment Picture (and a thumbnail picture for search results)
- Establishment Categories (not taxonomy) more like searchable options, such as smoking, non-smoking, under 18, etc.

For a better understanding of what I'm talking about, check out the website here:

http://www.sotanlife.com/

Write now, all of the establishment veriables are stored in a database, and I'd probably just port that same db structure over to drupal and create some new tables.

Suggestions on the best way to start this process? Start with creating a simple node type,

Embedded Gallery 2 Problem

Hello,

I Have Drupal 4.6 and Gallery 2.1.1 installed. They work fine independently. They work together embedded, except for the site admin menu items. In drupal I get a page not found screen and a log entry that says main.php not found.

Since this is a multisite gallery 2 build I can't figure out how to work with the url re-write mod stuff. I know I could install multiple gallery 2 full installs to accomplish what I need but I am being stubborn about configuring it multisite.

So I believe I need help with the .htaccess lines in Drupal

Here is the info about URL and Path -

I Host on 1and1 with no root access

Gallery 2 Codebase

Base URL: http://myuniquenumbershere.onlinehome.us/gallery2/
Path relative to root: /kunden/homepages/8/myuniquenumbershere/htdocs/gallery2/

Gallery 2 Site

Base URL: http://myuniquenumbershere.onlinehome.us/drupal/maha/gallery2/
Path relative to root: /kunden/homepages/8/myuniquenumbershere/htdocs/drupal/maha.gallery2/

Drupal 4.6 is here (multisite, so I have a sites folder within Drupal)

Base URL: http://myuniquenumbershere.onlinehome.us/drupal/
Path relative to root: /kunden/homepages/8/myuniquenumbershere/htdocs/drupal/

Here is the current .htaccess lines (I know they need cleaned up, I don’t know php and proper coding crap, so forgive me for the sloppiness.

#
# Apache/PHP/Drupal settings:
#

# Protect files and directories from prying eyes.

Character Encoding (w/ number value and not name)

My database contains un-encoded characters, but how do I encode those using the numeric-style rather than the name-style?

For example...

ü (in database)
ü (does not work in XML)
ü (does work in XML)

I've tried htmlentities(), but that provides name-style and I can't find a way to force the numeric-style.

FORM POST GET

Hi

Is there way to send data from nodo to another node (node1->node2) like forms POST GET method.
I want to use this becase i have in one node a form data what i want use in another node.

Pages

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