A Flash Developer Resource Site














Internet Commerce

Partners & Affiliates














Developer Channel

internet.com


Featured Flash FLA
Gallery Downloads 11336 Flash Movies | 2 New Flash Movies Added
What's New | Top 100

Featured FLA

» Author: Surjit Dhami
» Title: Book
» Description: Book
» More by Surjit Dhami


Random FLAs | Add Flash Movie
Featured Flash Site
Gallery Downloads 5848 Flash Sites | 0 New Flash Links
What's New | Top 100 Flash Site

Featured Site

» Posted in the Flash Kit Links section
» Title: All-American Rejects
» Description: Get to know this great band by exploring their "practice room".


Random Links | Add your own Flash Related Links
Flash Tutorials 1277 Tutorials 7 New Tutorials Added!
What's New | Top100

» Create xml slideshow with free template
» How to Insert a Multilingual Subtitle Into Your Flash Video Studio
» How to Create Cool Halloween Slideshow
» Debugging flash using the Firebug console
» Create Flash Slideshow on Blogger
» FLASH TRICKS IN WEB ADVERTISING: FLASH BANNERS
» HTML Photo Gallery Tutorial
» Create your first flash site – PART 1
» How to Make a Flash Photo Gallery
» Unknown Tag: Title10
Random Tutorial | Add Site

Sr Instructional Designer D2L-Moodle,Clearance
WSI Nationwide, Inc.
US-NJ-Fort Monmouth

Justtechjobs.com Post A Job | Post A Resume


Tutorials Home What's New Top Rated Submit myTutes Random!

Search Tutorials


Tutorials Tutorials » Backend

Categories Keyword search using MySQL / PostgreSQL / MSSQL / InterBase / ODBC, PHP and Flash 4
Author: James Greenhalgh | Website: http://www.odslinux.com |

 
Page 4
«prev 1 2 3 4 5 6 7 8 9 next»

DGS Search Setup


Once you've added a few database entries, you need to download DGS Search v0.9.5. DGS Search is the set of PHP scripts I used for the database search. I specifically liked it because it is modular, so creating the Flash integration was easy.

DGS Search v0.9.5 (it also comes included in the attached zip)

After you have unzipped it into your web directory, edit the config/config.php file to look like below. (Alternatively, I have included this file in the attached zip as well. It is titled config_flash.php You can make your changes with that file and then overwrite config/config.php with the config_flash.php)
<?
/*
** DGS Search
** config.php used for flash db by James Greenhalgh
** http://www.odslinux.com
** based on config.php written by James M. Sella
** Copyright (c) 2000 Digital Genesis Software, LLC. All Rights Reserved.
** Released under the GPL Version 2 License.
** http://www.digitalgenesis.com
*/
/* Change options below that are in bold */
   /* General Options */
   $config["installBase"]       = "/path/to/dgssearch";                 /* Absolute location of the directory of scripts. */
   $config["searchModules"]     = array("db");                          /* Modules to search for results. */
   $config["displayModules"]    = array("flash");                       /* Customized for Flash */
   $config["fileSeparator"]     = "/";                                  /* Would be "\\" for Win9x/NT/2000. */
   $config["header"]            = "config/header.php";                  /* The page header. */
   $config["footer"]            = "config/footer.php";                  /* The page footer. */
   $config["displayHeader"]     = "";                                   /* Header on the Display Results page. */
   $config["headerColor"]       = "666699";                             /* The color of the header on the Display Results page. */
   $config["infoColor"]         = "008000";                             /* The color of the info sections on the Display Results page. */
   $config["fonts"]             = "Arial, Sans-Serif, Helvetica";       /* Fonts to be used on the Display Results page. */
   $config["dateFormat"]        = "M j, Y H:i:s";                       /* Date format for Last Modified on Display Results. */
   $config["results"]           = 10;                                   /* Default results per page. 0 is unlimited. */
   $config["boldQuery"]         = true;                                 /* Bold the query string in description. */
   $config["timed"]             = true;                                 /* Displays search time to user. */
   $config["translate"]         = false;                                /* Displays a 'Translate' link for each result. */
   $config["translateFrom"]     = "en_de";                              /* Sets the default translation to be preformed. See INSTALL. */
   $config["warn"]              = true;                                 /* Displays warnings (ie: SAFE MODE warnings). */
   $config["debug"]             = false;                                /* Displays a lot of slightly useful or annoying information. */
   /* Database Options -- Search module 'db' */
   $database[0]["type"]         = "mysql";                              /* Supports mysql, mssql, odbc, ibase and pgsql. */
   $database[0]["server"]       = "localhost";                          /* The SQL Server. (Ignored by ODBC). */
   $database[0]["username"]     = "username";                           /* Username to connect to database. */
   $database[0]["password"]     = "password";                           /* Password to connect to database. */
   $database[0]["database"]     = "mydatabase";                         /* The database or DSN you will be accessing. */    
   $database[0]["persistent"]   = true;                                 /* Use persistent database connections. */
   $database[0]["table"]        = array("keyword_data");                /* The table in database to search. */
   $database[0]["answertable"]  = "keyword_data";                       /* The table in database where the answer will come from. */
   $database[0]["tableAssoc"]   = "answer is not null";                 /* A rules for associating the tables. See INSTALL. */
   $database[0]["returnField"]  = array("id", "keywords", "question");  /* Fields returned from db. Can be used to sub into link, url and desc. */
   $database[0]["searchField"]  = array("keywords");                    /* The fields to search. */
   $database[0]["link"]         = "@2@";                                /* This is the question returned. */
   $database[0]["url"]          = "@0@";                                /* This is the ID returned on a match. */
   $database[0]["desc"]         = array("@3@");                         /* The description to display. */
   $database[0]["wildcard"]     = "both";                               /* Wildcard support: none, left, right or both */
   $database[0]["orderByDepth"] = -1;                                   /* OrderBy Depth. Default of -1 is all. See INSTALL. */
   $database[0]["forceLower"]   = true;                                 /* Forces a case-insensitive search by lowercasing everything. */
   /* Generic */
   $config["version"]           = "v0.9.5";
   $config["hideCredits"]       = true;
   $config["maxResults"]        = 65535;
   /* FindExt() - utils.php */
   $config["extSeparator"]      = ".";
   $config["thisDir"]           = ".";
   $config["parentDir"]         = "..";
?>


Once your config is setup, you have to go and edit the footer.php and header.php in the config/ directory.

It is imperative that both of these files have no data at all (0 byte file). I've also included those files in the attached zip

«prev 1 2 3 4 5 6 7 8 9 next»

» Level Advanced

Added: : 2001-02-19
Rating: 8.07 Votes: 47
Hits: 3975
» Author
I work for a Canadian software company as a logisitics director. We provide custom configured Linux distributions. In my spare time I sleep.
» Download
Download the files used in this tutorial.
Download (103 kb)
Get conversion and unzipping tools for PC and Mac here!

» Forums
More help? Search our boards for quick answers!

Please rate this tutorial, 10 is the top rating, you can also click the comments link to read/write a review.
10 9 8 7 6 5 4 3 2 1
Read or Post Comments
 
   
 

internet.commediabistro.comJusttechjobs.comGraphics.com

Search:

WebMediaBrands Corporate Info

Legal Notices, Licensing, Reprints, Permissions, Privacy Policy.
Advertise | Newsletters | Shopping | E-mail Offers | Freelance Jobs