NAME

FWS::V2 - Framework Sites Version 2

VERSION

Version 0.006

SYNOPSIS

    use FWS::V2;

    my $fws = FWS::V2->new(	DBName		=> 'myDB',
				DBUser		=> 'theUser',
				DBPassword	=> 'superSecret',
				DBHost		=> 'localhost',
				DBType		=> 'MySQL');
	

DESCRIPTION

Framework Sites Version 2 content management, eCommerce and web based development platform.

METHODS AND PARAMETERS

new

Construct a FWS Version 2 object. Like the highly compatible web optimized distribution this will initiate access to all the FWS methods to access data, file, session, formatting and network methods. You can pass a variety of different parameters which could be required depending on what methods you are using and the context of your usage. MySQL and SQLite are supported with FWS 2, but MySQL should always be used if it is available. On medium or high traffic sites and sites with any significance of a data footprint, you will see quite a bit of latency with SQLite.

Example of using FWS with MySQL:

	use FWS::V2;

        #
        # Create FWS with MySQL connectivity
        #
        my $fws = FWS::V2->new(       DBName          => "theDBName",
                                      DBUser          => "myUser",
                                      DBPassword      => "myPass");

Example of using FWS with SQLite:

	use FWS::V2;

        #
        # create FWS with SQLite connectivity
        #
        my $fws = FWS::V2->new(      DBType          => "SQLite",
                                     DBName          => "/home/user/your.db");

Any variable passed or derived can be accessed with the following syntax:

print $fws->{'someParameter'}."\n

With common uses of FWS, you should never need to change any of these settings. If for some reason, although it is NOT recommended you can set any of these variables with the following syntax:

$fws->{'someParameter'} = 'new settings';

Required Parameters

  • DBName (MySQL and SQLite Required)

    For MySQL this is the DB Name. For SQLite this is the DB file path and file name. MySQL example: user_fws SQLite example: /home/user/secureFiles/user_fws.db

  • DBUser (MySQL Required)

    Required for MySQL and is the database user that has full grant access to the database.

  • DBPassword (MySQL Required)

    The DBUser's password.

  • DBHost (MySQL Required if your database is not on localhost)

    The DBHost will default to 'localhost' if not specified, but can be what ever is configured for the database environment.

  • DBType (SQLite Required)

    The DBType will default to 'MySQL' if not specified, but needs to be added if you are connecting to SQLite.

Non-Required Parameters

Non-required parameters for FWS installations can be added, but depending on the scope of your task they usually are not needed unless your testing code, or interacting with web elements that display rendered content from a stand alone script.

  • adminPassword

    For new installations this is the admin password until the first super admin account is created. After an admin account is created this password is disabled.

  • adminURL

    The url defined to get to the typical /admin log in screen. Default: 'admin'

  • affiliateExpMax

    The number of seconds an affiliate code will stay active after it has been received. Default: 295200

  • cookieDomainName

    The domain to use for cookies. Almost always it would be: '.whatEverYourDomainIs.com' For more complex scenario with host names you would want to make this more specific.

  • domain

    Full domain name with http prefix. Example: http://www.example.com

  • encryptionKey

    The encryption key to be used if encryptionType is set to 'blowfish'.

  • encryptionType

    If set this will set what encryption method to use on sensitive data. The only supported type is 'blowfish'.

  • filePath

    Full path name of common files. Example: /home/user/www/files

  • fileSecurePath

    Full path name of non web accessible files. Example: /home/user/secureFiles

  • fileWebPath

    Web path for the same place filePath points to. Example: /files

  • googleAppsKeyFile

    For google apps support for standard login modules this is required

  • scriptTextSize

    If your element scripts are larger than 'text' and get truncated you might want to set this to 'mediumtext'

  • secureDomain

    Secure domain name with https prefix. For non-secure sites that do not have an SSL cert you can use the http:// prefix to disable SSL. Example: https://www.example.com

  • sendmailBin

    The location of the sendmail bin. Default: /usr/sbin/sendmail

  • sendMethod

    The method used to process queue requests internal or custom. Default: sendmail

  • FWSLogLevel

    Set how verbose logging is for FWS is. Logging will be appended: $fws->{'fileSecurePath'}.'/FWS.log' 0 - off , 1 (default)- Display errors

  • SQLLogLevel

    Set how verbose logging is for SQL statements ran. Logging will be appended: $fws->{'fileSecurePath'}.'/SQL.log' 0 - off (default), 1 - updates/deletes/inserts only, 2 - everything

Accessible after setSiteFiendly() is called

These should not be set directly. They are set by calling other methods that discover what the values should be.

  • siteId

    The site id of the site currently being rendered. Version 1 of FWS refered to this as the SID. This will be set via setSiteValues('yourSiteId') if setSiteFriendly is not being used.

Accessible after setSiteValues() is called

The following variables should never be passed or set externaly

  • email

    The default email address for the site being rendered. This is set via 'Site Settings' in the administration.

  • fileFWSPath

    The file location of FWS packaged distrubution files. This is normaly not used except internally as the files in this directory could change with an upgrade.

  • homeGUID

    The guid of the home page. The formValue 'p' will be set to this if no 'p' value is passed.

  • siteGUID

    The guid of the site currently being rendered

  • sessionCookieName

    If there could be conflict with the cookie name, you can change the name of the cookie from its default of fws_session to something else.

  • siteName

    The site name of the site currently being rendered

  • queryHead

    The query head used for links that will maintain session and have a unique random cache key. Example return: ?fws_noCache=asdqwe&session=abc....123&s=site&

Accessible after setSession() is called

  • affiliateId

    Is set by passing a value to 'a' as a form value. Can be accessed via $fws->{'affiliateId'};

  • affiliateExp

    The time in epoch that the affiliate code will expire for the current session

AUTHOR

Nate Lewis, <nlewis at gnetworks.com>

BUGS

Please report any bugs or feature requests to bug-fws-v2 at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=FWS-V2. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT

You can find documentation for this module with the perldoc command.

perldoc FWS::V2

You can also look for information at:

LICENSE AND COPYRIGHT

Copyright 2012 Nate Lewis.

This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.

See http://dev.perl.org/licenses/ for more information.