Drupal is up and running but how do I ...?

How to add (lots of) Drupal content from the command line?

Hello,

I have just installed drupal 4.7 on a Linux server and created several sections/subsections, taxonomy and so on.

Now, I have a *lot* of already existing articles for this website on my hard disk, in HTML format, one file per article. The question is how can I insert all of them in Drupal with a shell/mysql/python/perl/whatever script?

Basically I want to make one single tarfile, of all HTML pages and the script, upload it on the server, launch the script via ssh
and have all articles inserted in the right section/subsection, with the correct creation date (that of the original HTML file, not the date when the script was run), title and teaser, taxonomy tags etc....

One thing which is not mandatory, but of course would be a huge time saver would be smart handling of internal links. Several of these HTML files refer to each other, like "to know more, read this page (= file:///main/some_section/some_subsection/specific_article)". Could the script also make so that all the resulting Drupal nodes
would also link correctly to each other?

I have no problem to modify an existing script or just code myself any missing part, but of course I'd really like to start with
a working example, or at least to know what exactly I should study to do this job.

Also scripts, explanations, tricks and comments on how to pre-process the HTML files before inserting them, so they are surely Drupal/CSS compatible would be great. Consider that many of these HTML files were just generated inside OpenOffice, converting existing openoffice files with paragraph styles with the "Save as" or "Export" functions.

Categories and searching

I would like to do a sort by category like what they have done on this auction site. www.trademe.co.nz.
1. You can browse auctions by category.
2. Once in the category you can have the auctions sorted by title, price, closing soon, etc.
3. You can search for words keywords. If you search for "kayak" the results are sorted by auctions with kayak as the only word in the title, ones with other words and kayak in the title then ones with kayak in the body.

How would I go about doing it in Drupal?

About Me block w/ custom links. Use this & help me add recent posts

I have a block that shows the info for the blogger when on a node or blog associated with that blogger(see code below). What I would like to do is add recent posts (just titles)to the bottom of it. I've tried to use the code listed here:

Display the (x) most recent weblog entries from a specific user
http://drupal.org/node/23230

but i can't get it to display the recent posts. The above snippet is for 4.6 and I am on 4.7. How can I get this to work? I'll bake you brownies for your insight...


<?php

$uid = arg(1);
$user = user_load(array((is_numeric($uid) ? 'uid' : 'name') => $uid, 'status' => 1));
profile_load_profile($user);
if (arg(0) == 'node' && is_numeric(arg(1))) {
// This line works for Drupal 4.7; if using 4.6 uncomment the line below it and comment this one.
$node = node_load(arg(1));
// $node = node_load(array('nid' => arg(1)));
if ($node->type != 'blog') {
return;
}
$user = user_load(array('uid' => $node->uid));

}
if (arg(0) == 'blog' && is_numeric(arg(1))) {
$user = user_load(array('uid' => arg(1)));
}
if (arg(0) == 'forum' && is_numeric(arg(1))) {
$user = user_load(array('uid' => arg(1)));
}
if (!$user) {
return;
}

// ... insert your snippet here. $user is loaded; if it's a blog node, $node is also loaded.

if ($user->picture){print "uid\">Only local images are allowed.picture\">";}
if ($user->profile_blog_title){
print l($user->profile_blog_title, "blog/$user->uid");}

if ($user->profile_blog_description){print "

Trying to install exiftran

Hello,

I need to install Exiftran for Acidfree and can not seem to find it. I'm running FreeBSD and have looked at the ports and tried to search and can not find it. Sorry for the studip question, but would someone please point me to a good download with a little help to get it installed? I'm not very good with the Unix box...

Thanks for any help.

Slimz

In moderation queue but no indication?

I've added a few stories 'In moderation queue', but don't see anything to identfy a story is waiting in queue. I was hoping to use to allow users to submit their own article awaiting my approval.

Where do items in moderation queue show up?

Gallery2 Image Filter Issue

I am working with a fresh install of Gallery2, TinyMCE, and g2image. Everything seems to be working except my images I am adding to posts stay as none filtered code (such as [G2:559]) instead of linking to the correct image from the gallery. I am inserting the image using the g2image TinyMCE plugin and everything else seems to work. I am not a code expert but it seems like Drupal is just not interpreting the G2 filter code as actual filtered code and just sees it as text. Have I missed a setting somewhere that anyone can think of?

Pages

Subscribe with RSS Subscribe to RSS - Post installation