OpenGuides 0.64 (Default branch)


 
Thread Tools Search this Thread
Special Forums News, Links, Events and Announcements Software Releases - RSS News OpenGuides 0.64 (Default branch)
# 1  
Old 03-14-2009
OpenGuides 0.64 (Default branch)

OpenGuides is a wiki-like package for maintaininga collaborative city guide. It is written in Perland runs as a CGI program, and uses either theMySQL, PostgreSQL, or SQLite database. It offers featuresover a "normal" wiki such as metadata managementand a "find nearby things" function. The look andfeel is highly customizable thanks to use of theTemplate Toolkit.License: Perl LicenseChanges:
JSON support for node details and metadata discovery was added. The default database type was changed to SQLite. This release will set the content charset correctly in RDF. There were other bugfixes and changes.Image

Image

More...
Login or Register to Ask a Question

Previous Thread | Next Thread
Login or Register to Ask a Question
OpenGuides::Utils(3pm)					User Contributed Perl Documentation				    OpenGuides::Utils(3pm)

NAME
OpenGuides::Utils - General utility methods for OpenGuides scripts. DESCRIPTION
Provides general utility methods for OpenGuides scripts. Distributed and installed as part of the OpenGuides project, not intended for independent installation. This documentation is probably only useful to OpenGuides developers. SYNOPSIS
use OpenGuide::Config; use OpenGuides::Utils; my $config = OpenGuides::Config->new( file => "wiki.conf" ); my $wiki = OpenGuides::Utils->make_wiki_object( config => $config ); METHODS
make_wiki_object my $config = OpenGuides::Config->new( file => "wiki.conf" ); my $wiki = OpenGuides::Utils->make_wiki_object( config => $config ); Croaks unless an "OpenGuides::Config" object is supplied. Returns a "Wiki::Toolkit" object made from the given config file on success, croaks if any other error occurs. The config file needs to define at least the following variables: o dbtype - one of "postgres", "mysql" and "sqlite" o dbname o indexing_directory - for the Search::InvertedIndex or Plucene files to go get_wgs84_coords Returns coordinate data suitable for use with Google Maps (and other GIS systems that assume WGS-84 data). my ($wgs84_long, $wgs84_lat) = OpenGuides::Utils->get_wgs84_coords( longitude => $longitude, latitude => $latitude, config => $config ); get_wgs84_min_max Given a set of WGS84 coordinate data, returns the minimum, maximum, and centre latitude and longitude. %data = OpenGuides::Utils->get_wgs84_min_max( nodes => [ { wgs84_lat => 51.1, wgs84_long => 1.1 }, { wgs84_lat => 51.2, wgs84_long => 1.2 }, ] ); print "Top right-hand corner is $data{max_lat}, $data{max_long}"; print "Centre point is $data{centre_lat}, $data{centre_long}"; The hashes in the "nodes" argument can include other key/value pairs; these will just be ignored. Returns false if it can't find any valid geodata in the nodes. detect_redirect $redir = OpenGuides::Utils->detect_redirect( content => "foo" ); Checks the content of a node to see if the node is a redirect to another node. If so, returns the name of the node that this one redirects to. If not, returns false. (Also returns false if no content is provided.) validate_edit my $fails = OpenGuides::Utils->validate_edit( id => $node, cgi_obj => $q ); Checks supplied content for general validity. If anything is invalid, returns an array ref of errors to report to the user. parse_change_comment my $change_comment = parse_change_comment($string, $base_url); Given a base URL (for example, "http://example.com/wiki.cgi?"), takes a string, replaces "[[page]]" and "[[page|titled link]]" with <a href="http://example.com/wiki.cgi?page">page</a> and <a href="http://example.com/wiki.cgi?page">titled link</a> respectively, and returns it. This is a limited subset of wiki markup suitable for use in page change comments. send_email eval { OpenGuides::Utils->send_email( config => $config, subject => "Subject", body => "Test body", admin => 1, nobcc => 1, return_output => 1 ) }; if ($@) { print "Error mailing admin: $@ "; } else { print "Mailed admin "; } Send out email. If "admin" is true, the email will be sent to the site admin. If "to" is defined, email will be sent to addresses in that arrayref. If "nobcc" is true, there will be no Bcc to the admin. "subject" and "body" are mandatory arguments. Debugging: if "return_output" is true, the message will be returned as a string instead of being sent by email. in_moderate_whitelist if (OpenGuides::Utils->in_moderate_whitelist( '127.0.0.1' )) { # skip moderation and apply new verson to published site } Admins can supply a comma separated list of IP addresses or CIDR-notation subnets indicating the hosts which can bypass enforced moderation. Any values which cannot be parsed by "NetAddr::IP" will be ignored. AUTHOR
The OpenGuides Project (openguides-dev@lists.openguides.org) COPYRIGHT
Copyright (C) 2003-2008 The OpenGuides Project. All Rights Reserved. This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.14.2 2013-01-11 OpenGuides::Utils(3pm)