B2 Extra Options

// $Id: b2extraoptions.html,v 1.2 2002/11/28 23:31:33 zed1 Exp $
//
// B2 Extra Options
// Copyright (C) 2002 Mike Little -- mike@zed1.com
//
// This is an add-on to b2 weblog / news publishing tool
// b2 is copyright (c)2001, 2002 by Michel Valdrighi - m@tidakada.com
//
// **********************************************************************
// Copyright (C) 2002 Mike Little
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful, but
// WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
//
// Mike Little (mike@zed1.com)
// *****************************************************************

B2 Extra Options is an add-on to b2 weblogging software.

You can download it from http://zed1.com/b2extraoptions/b2options-0.2.zip
Also available as a tar ball: http://zed1.com/b2extraoptions/b2options-0.2.tar.gz

Files:

b2extraoptions.readme.txt
this file
b2extraoptions.sql
sql to create the necessary database tables
b2extraoptionsmanager.php
admin plugin to manage links
b2extraoptions.php
template functions
b2extraoptions.install.php
alternate installation method
license.txt
GNU General Public License Version 2

Installation:

  1. Execute the SQL from the file b2extraoptions.sql. This will create the two tables and add two extra options. Alternatively, upload the file b2extraoptions.install.php to your B2 installation directory and load it into your browser.
    ***Note***:
    There is a bug in the file b2extraoptions.install.php: You need to insert

    $connexion = mysql_connect($server,$loginsql,$passsql) or die("Can't connect to the database<br>".mysql_error());
    $dbconnexion = mysql_select_db($base, $connexion);
          


    before the line $got_options = false;
    You can fins an updated version here
  2. Edit the b2-include/b2menutop.txt file to add in the new command.
    5      b2extraoptionsmanager.php       Extra Options
    Note: there should be a tab character after the 5 and after the filename.
  3. Add the files b2extraoptions.php and b2extraoptionsmanager.php into your b2 install directory.
  4. Login and click on the Extra Options command to edit options.
  5. You will be presented with a list of existing extra options.
  6. If your admin level is high enough you will have a 'Change' button next to each option you are allowed to change. This will allow you to change the VALUE of an option.
  7. If your admin level is even higher you will also have an 'Edit' button next to each option. You will also have a 'New Option' Button.
  8. If you are editing or creating a new option, the fields mean the following:
  9. In your template include_once("b2extraoptions.php")
  10. There is a special, reserved extra option: 'add_options_min_level'. This is used to set the admin level at which a user can edit the details of an option, or create new options.

To Do:

  1. Support, integer, string, and date types properly.
  2. Allow deletion of an option.
  3. Think of some more/better examples!

Changes


Thats about it really. This is beta software, and has not been extensively tested. Use with caution.


--
Mike Little
mike@zed1.com