User login

Documentation

Drupal, project, life documentation. This is where notes go to try to earn their way onto Drupal.org.

User Image Gallery (Avatar page) with Views: Basics and Beyond

(Changing the options on an avatar gallery page created from user's profile pictures with Views Bonus Pack's grid view. The instructions and options here are for Drupal 4.7 but should apply equally to Drupal 5.)

Administer > Views

Click "edit" next to member_gallery

Scroll down to "Arguments" and click to expand.

Under "Argument Handling Code" change:

$view->gridcount = 3;

to:

$view->gridcount = 5;

Scroll all the way down and press the "Save" button.

Click on member_gallery to have a look at your view.

(Changing the options on an avatar gallery page created from user's profile pictures with Views Bonus Pack's grid view. The instructions and options here are for Drupal 4.7 but should apply equally to Drupal 5.)

Administer > Views

Click "edit" next to member_gallery

Scroll down to "Arguments" and click to expand.

Under "Argument Handling Code" change:

$view->gridcount = 3;

to:

$view->gridcount = 5;

Scroll all the way down and press the "Save" button.

Click on member_gallery to have a look at your view.

Photo Albums on Agaric Sites: How to Upload Pictures

Adding pictures to an Agaric site with an image gallery can be done photograph by photograph, like any other content, by categorizing it into a picture gallery vocabulary (category).

However, for people who have an expensive digital camera and have discovered that it frees them from 24 or 36 pictures at a time by a factor of 10 to 100, Drupal sites made by Agaric (OK, any Drupal site with image module) can take mass upload and import of photos (or any digital image).

Adding pictures to an Agaric site with an image gallery can be done photograph by photograph, like any other content, by categorizing it into a picture gallery vocabulary (category).

However, for people who have an expensive digital camera and have discovered that it frees them from 24 or 36 pictures at a time by a factor of 10 to 100, Drupal sites made by Agaric (OK, any Drupal site with image module) can take mass upload and import of photos (or any digital image).

Using the Banner Module

Agaric is experimenting with the Drupal Banner module, and as some of it is less than intuitive, we thought we'd document some of it here.

Agaric is experimenting with the Drupal Banner module, and as some of it is less than intuitive, we thought we'd document some of it here.

<

ul>

  • Don't forget to follow its installation instructions and put those two PHP files in your root directory.
  • And put at least &lt;?php print banner_display(4, 1); ?&gt; in your page.tpl.php where you want the banner to appear, with "4" being the taxonomy term ID of the banner group (see docs, and "1" is the number of banners from that group at a time.)
  • Modular Homes and Custom Content

    This will be Agaric Design's live experiment with working on content with an eye toward key words. This is for the site Driscoll Associates Modular Homes.

    First step was just adding nodewords, to throw some of the below on the site.  (Another thing adding the nodewords module did was provide meta tags for geolocation so Driscoll Modular Homes now shows up on lists of places near Natick and Framingham, at least.)

    This will be Agaric Design's live experiment with working on content with an eye toward key words. This is for the site Driscoll Associates Modular Homes.

    First step was just adding nodewords, to throw some of the below on the site.  (Another thing adding the nodewords module did was provide meta tags for geolocation so Driscoll Modular Homes now shows up on lists of places near Natick and Framingham, at least.)

    <

    blockquote>House
    Houses

    Easier to edit, keep domain name, professional?

    [These were asked by a friend of ours who suggested our services to an organization where she was a long-time volunteer.]

    So, if you were to remake the site, these are my questions:

    [These were asked by a friend of ours who suggested our services to an organization where she was a long-time volunteer.]

    So, if you were to remake the site, these are my questions:

    <

    ul>

  • Would it be easier for them to perhaps be able to edit on their own?
    • YES!!!

  • Would we be able to host through you guys and keep the same domain name?
    • Yes-- provided you know who has access to the domain name, it can be directed at any server (and for real, not just forwarded with masking).

  • Get secondary links to show up under front (home) page in Drupal 5

    Do you, for some strange reason, want secondary links to show up under your primary links when users are at your front, home page?

    After a bit of frustration ourselves, here is Agaric Design Collective's very short guide to getting secondary links to show up when you are at your front page menu item.

    Change your menu declaration for "Home" (or whatever you call it) from &lt;front&gt; to whatever you actually have &lt;front&gt; set to in your site settings, such as node/1.

    Do you, for some strange reason, want secondary links to show up under your primary links when users are at your front, home page?

    After a bit of frustration ourselves, here is Agaric Design Collective's very short guide to getting secondary links to show up when you are at your front page menu item.

    Change your menu declaration for "Home" (or whatever you call it) from &lt;front&gt; to whatever you actually have &lt;front&gt; set to in your site settings, such as node/1.

    That's it, everything will work now, move along, nothing more to see...

    Taxonomy_switch update to Drupal 5

    Just for the hell of it, Agaric Design Collective updated the the taxonomy_switch module to Drupal 5.

    Less of a learning experience than hoped for now, the forms are not in best practice form yet.

    It is attached below. It is also mentioned on taxonomy_switch's issue queue.

    From Agaric's README:

    Just for the hell of it, Agaric Design Collective updated the the taxonomy_switch module to Drupal 5.

    Less of a learning experience than hoped for now, the forms are not in best practice form yet.

    It is attached below. It is also mentioned on taxonomy_switch's issue queue.

    From Agaric's README:

    <

    blockquote>This is a pre-alpha Drupal 5 version of the excellent 4.7 module by Joel Guesclin (http://drupal.org/user/4321) available at http://drupal.org/project/taxonomy_switch

    Step-by-step instructions to Edit Content in WordPress

    Here are Agaric Design's step by step directions for logging into a WordPress site and administering or editing content.

    Here are Agaric Design's step by step directions for logging into a WordPress site and administering or editing content.

    <

    ol>

  • Go to http://example.com/wp-login.php
    • If you've forgotten your password, click "forgot your password?" and type in your username and e-mail address. If you've forgotten one of these as well, you need to know someone's administrative login for your WordPress blog or the login to your MySQL database, where you can look up the username and e-mail address.

  • PHP Security Audit

    This is a general review of ensuring security in PHP and is a background for and supplement to Drupal Handbook's writing secure code.

    Filter all incoming data

    Create a tree diagram for every input. Every time information is assigned to another variable, it taints that one also. Just like zombie bites.

    Escape all outgoing data

    Includes SQL queries and HTML.

    $html = array();
    $html['username'] = htmlentities($clean['username'], ENT_QUOTES, 'UTF-8');

    This is a general review of ensuring security in PHP and is a background for and supplement to Drupal Handbook's writing secure code.

    Filter all incoming data

    Create a tree diagram for every input. Every time information is assigned to another variable, it taints that one also. Just like zombie bites.

    Escape all outgoing data

    Includes SQL queries and HTML.

    Customize Drupal page if user logged in or not

    The trick here is that you have to use PHP code as your input format and then get the user id (0 means an anonymous user).

    $user = load_user(); // should get it

    but it's not necessary. It's already in the global variables:

    $GLOBALS['user']->uid

    So...

    Make sure you select PHP for the content filter for your page, and before you use full HTML when writing the page because the default PHP filter doesn't do line breaks.

    Then put something like this in your page:

    The trick here is that you have to use PHP code as your input format and then get the user id (0 means an anonymous user).

    $user = load_user(); // should get it

    but it's not necessary. It's already in the global variables:

    $GLOBALS['user']->uid

    So...

    Make sure you select PHP for the content filter for your page, and before you use full HTML when writing the page because the default PHP filter doesn't do line breaks.

    Then put something like this in your page:

    Syndicate content