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

hook_user: additional operation needed?

I'm using hook_user to add a few additional fields to the new user registration page (q=user/register). Works great, but I need these same fields to appear when adding a new user from the administer menu (q=admin/user/create).

According to the documentation hook_user doesn't include such an operation (presumably "create".)

Before hacking the function is another way to achieve this?

Mod Rewrite alternative for non-Apache webservers

Hello,

I have searched around for Mod Rewrite alternatives for non-Apache webservers but I can't find any, although I found a patch-dependent solution for IIS - which was still inapplicable to us non-IIS and non-Apache needs. I use Abyss webserver and Drupal 4.6.5, and I found this neat little code from Aprelium's website but I'm not yet PHP-coding savvy to make it work. Hopefully somebody out there can apply edits on this code so that us non-Apache users can also enjoy clean URLs too.

The main idea is to put PHP code in the default 404 resource so that a silent redirection is made to the correct resource. This idea is summarized in the code logic as follows:
Let's say a surfer wants to browse http://site/foo/bar. Since the surfer really wants http://site/index.php?q=foo/bar and that the resource http://site/foo/bar is really non-existent, the following PHP'd 404 code will be executed:

    if http://site/index.php?q=foo/bar exists then
        redirect requested http://site/foo/bar to http://site/index.php?q=foo/bar using http status code 302 or an unconventional 307 to make it silent(?)
    elseif http://site/index.php?q=foo/bar does not exist then
        serve the actual 404 - resource not found
    endif

The code below has been taken from Aprelium's website: http://www.aprelium.com/forum/viewtopic.php?t=7865
< ? php

/* Add in this array the list of (old path = > new path) pairs */

Changing size of first teaser node...

On some sites the first article displayed is larger than the articles below it (in terms of font size and aesthetics). Is there a way to tell drupal to enlarge the first node in a list (lets say the homepage). If this involves just isolating the top node and wrapping it in different div tags, thats fine; just not sure where to place the code.

Can this be accomplished with the Front Page module and would this be the only way?

Thanks,
-=Vince

non-embedded gallery2 and a random image block

Is it possible to have gallery2 not embedded into drupal (i have heard a number of issues...) yet still have a random image block that draws thumbs from the gallery2 installation?

Those who will be using the site i am working on are not all computer literate (this is for a site i am putting together for free) so i am keeping them separate:

I have the gallery2 install in a subfolder of the root, as i do have with drupal, ie:

root/gallery
root/drupal

Can i just create a block with some php to display random pics from gallery?

Random HTML in Left / Right Column

Hello,

I'm spanking new and was wondering what module would be useful for posting content in either the left or right column. For example I have "related links" and "news and announcements" portions I'd like to include here, but reading through the module list it isn't clear which one to use.

I know there's got to be something I can use or modify...

Thanks in advance

Newbie Dave

How to use Form API to edit existing database record

I've been able to use the Form API (following the Quickstart Guide) to create a drupal node with a form to fill in information. I can validate the form and submit the form. When I submit, I INSERT the data into a table in my MySQL database.

I see that when I fail any part of the validation (required text field not filled in or email address invalid format), the same form page is displayed with fields in red that need to be corrected.

Pages

Subscribe with RSS Subscribe to RSS - Post installation