Internet Commerce

Partners & Affiliates

Developer Channel


Featured Flash FLA
Gallery Downloads 11401 Flash Movies | 5 New Flash Movies Added
What's New | Top 100

Featured FLA

»  Author: Nick Kouvaris
»  Title: Znax
»  Description: Znax is a board game. Click 4 tiles of the same color and form squares as big as you can. You will erase all the tiles inside the square and collect points. Get maximum score if you make a square with game edges.
»  More by: Nick Kouvaris


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

Featured Site

»  Author Agence WOP Digital Agency
»  Title: Electricdrum
»  Description: French WOP Agency, 3D websites, Flash (Papervision, Away 3D), event or institutional projects. The agency operates on all digital projects: consulting, design, graphic design, development, online communication. The WOP agency follows you on the implementation of original, creative and optimized digital projects.


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

» How To Make A Simple Animation Using Christmas Clips
» Simple Step by step flash game tutorial Spot the diffrence
» How To Make A Moving Text Slide
» Create Flash Banner With Text Float Effect
» How To Make Zoo Photos Slideshow
» How To Make A Dolphin Photos Slideshow
» How To Make A Fathers Day Slideshow
» How To Make A Transparent Background of Your Flash File
» Create Flash Banner With Text Disco Light Effect Today we will introduce you a Text Disco Light eff
» Unknown Tag: Title10
Random Tutorial | Add Site


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: 3984
» 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