This website is composed of information connected through taxonomy. It is simultaneously a proof-of-concept and a means to allow Agaric to share and store information both within the collective and the world as part of our open documentation philosophy.

User login

This website is composed of information connected through taxonomy. It is simultaneously a proof-of-concept and a means to allow Agaric to share and store information both within the collective and the world as part of our open documentation philosophy.

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:

    Node Relativity Access Control description

    This module enables access control based on (and requires) the Node Relativity module.

    Node Relativity "allows parent-child relationships between nodes to be established, managed and searched" and makes it very easy to create child nodes with a click. Node Relativity Access Control, then, restricts access to nodes in relativity relationships.

    Node Relativity Access Control is unique as a user access module in that it gives a user granted access to a node relativity node access to all that node's progeny as well.

    This module enables access control based on (and requires) the Node Relativity module.

    Node Relativity "allows parent-child relationships between nodes to be established, managed and searched" and makes it very easy to create child nodes with a click. Node Relativity Access Control, then, restricts access to nodes in relativity relationships.

    Node Relativity Access Control is unique as a user access module in that it gives a user granted access to a node relativity node access to all that node's progeny as well.

    Agaric guide to Drupal image gallery sites

    • Image_import works even though the project page says it doesn't: it is now a contributed module packaged with image.
    • You should create your image gallery category before doing a big import.
    • And if you're going to be importing lots of pictures, you probably want "promote to front page" turned off by default for images.

    Don't promote images to front page:
    /admin/content/types/image

    ...

    So to fix this after the fact, get all those pictures off your front page:

    • Image_import works even though the project page says it doesn't: it is now a contributed module packaged with image.
    • You should create your image gallery category before doing a big import.
    • And if you're going to be importing lots of pictures, you probably want "promote to front page" turned off by default for images.

    Don't promote images to front page:
    /admin/content/types/image

    ...

    So to fix this after the fact, get all those pictures off your front page:

    Ask Agaric: Turning off display of errors

    Question: I've given up trying to solve the problem. I just want to hide the error messages. Where do I turn error reporting off?

    Agaric Answer:

    In Drupal 5:

    Administer » Site configuration » Error reporting
    admin/settings/error-reporting

    Another day saved by Agaric Design Collective, sweep-it-under-the-rug division.

    Question: I've given up trying to solve the problem. I just want to hide the error messages. Where do I turn error reporting off?

    Agaric Answer:

    In Drupal 5:

    Administer » Site configuration » Error reporting
    admin/settings/error-reporting

    Another day saved by Agaric Design Collective, sweep-it-under-the-rug division.

    CSS Trouble in Safari? Check your comments

    If you're having CSS display problems in the Apple Macintosh Safari browser, for an otherwise great-looking web site, your issue may be incorrect commenting etiquette.

    /*  Comment   */

    is cool.

    //  Comment

    could cause issues.

    If you're having CSS display problems in the Apple Macintosh Safari browser, for an otherwise great-looking web site, your issue may be incorrect commenting etiquette.

    /*  Comment   */

    is cool.

    //  Comment

    could cause issues.

    The former is simply proper cascading style sheet comment markup, and the latter is wrong, but it seems other browsers are more forgiving than Safari. We had people saying how much they liked the site, how good it looked, and I kept testing it in Safari and getting into a really bad mood.

    Changing the order of pages in the menu

    First thing: we're talking pages here, for changing the order of links you have fewer options with get_links_list or more with a plugin.

    Strangely, the default sort order of pages is alphabetical, not the order you set with the page order ranking. To fix that, and &amp;sort_column=menu_order to your wp_list_pages command.

    First thing: we're talking pages here, for changing the order of links you have fewer options with get_links_list or more with a plugin.

    Strangely, the default sort order of pages is alphabetical, not the order you set with the page order ranking. To fix that, and &amp;sort_column=menu_order to your wp_list_pages command.

    &lt;?php wp_list_pages('title_li=&lt;h1&gt;&lt;a href="http://example.com/" title="Example Site Home"&gt;Example.com&lt;/a&gt;&lt;/h1&gt;&amp;sort_column=menu_order'); ?&gt;

    Path to theme

    Looking for the drupal path to your current theme? It can be helpful if you're making a theme and, for a change, you want to link directly to

    print theme('stylesheet_import', base_path() . path_to_theme() ."/modules.css");

    For our purposes, something like:

    <img src="<?php echo base_path() . path_to_theme() . "/sample.png"; ?>" />

    Now I'm not sure that "." in echo will work. Feel free to test it out for us!