Example?

2 views
Skip to first unread message

Gordon

unread,
Oct 3, 2006, 9:43:11 PM10/3/06
to PHPSimpl
You say an example is included, but I can find no such thing. :S

I'm currently using SVN revision 108.

Once I see this thing working, I might like to join up and help
develop.

Thanks,
Gordon

Nick DeNardis

unread,
Oct 4, 2006, 8:29:48 AM10/4/06
to PHPSimpl
Gordon,
We are currently working on the examples. There is going to be some
basic ones to advanced ones, I will be getting the basic ones in the
Repo shortly and will post when they are up. This is a big push for us
right now is to get all the documentation in order and these examples
up before adding any more features. Thank you for your interest.

Nick D.

Gordon

unread,
Oct 4, 2006, 8:38:58 AM10/4/06
to PHPSimpl
Okay then. Thanks for your reply. :) I'll keep an eye out...

-Gordon L..

KDCinfo

unread,
Nov 1, 2006, 12:06:03 AM11/1/06
to PHPSimpl
Hi there,

I too would love an example of how to get this app working. I'm not
familiar enough with classes to figure out what parameters and such to
use.

So far as I can figure, which is probably incorrect, I should define
DIR_ABS to point to where the script is at (although I'm not sure if
this is from /home/user/public_html/scriptfolder or if its just from
/scriptfolder. Then I should include (or include_once, or require, or
require_once?) the simpl.php file. Then I should define my database
variables maybe? Then make a call to whichever function I'm looking to
execute, like loading the form (provided in an earlier thread).

So as you can see, the little I have guessed thus far is probably
wrong, and is far too little anyway to get full use of this (what
appears to be a really nice) advanced searching application.

And being I haven't found anything else that comes close to being a
decent "advanced search" for searching within mysql tables, I'll again
just have to create my own (my pevious search creations are procedural
and far too custom to be able to be used again.

Thanks for allowing us here.

Keith D Commiskey
http://kdcinfo.com
http://giftsforyou.biz

Nick DeNardis

unread,
Nov 5, 2006, 7:45:58 PM11/5/06
to PHPSimpl
Okay there is an example up in the SVN repo, as of revision 125 we will
be continuously expanding this base example.

Basic steps to get the example up an running.
1. Put it in a web viewable directory with SIMPL on the same server.
2. Import the post.sql file into a MySQL database
3. Edit the define.php to include the correct file system directory of
the example, SIMPL, and the login information of your MySQL server.
4. Goto the directory of the example in a web browser and your done!

The example is a basic blog/post manager. You can Add/Edit/Delete blog
posts and view an example blog. This is the basic functions of SIMPL
and should get you up and running. If you have any questions just let
us know, we are dedicated to getting this framework out to the world.


On Nov 1, 12:06 am, "KDCinfo" <goo...@kdcinfo.com> wrote:
> Hi there,
>
> I too would love an example of how to get this app working. I'm not
> familiar enough with classes to figure out what parameters and such to
> use.
>
> So far as I can figure, which is probably incorrect, I should define
> DIR_ABS to point to where the script is at (although I'm not sure if
> this is from /home/user/public_html/scriptfolder or if its just from
> /scriptfolder. Then I should include (or include_once, or require, or
> require_once?) the simpl.php file. Then I should define my database
> variables maybe? Then make a call to whichever function I'm looking to
> execute, like loading the form (provided in an earlier thread).
>
> So as you can see, the little I have guessed thus far is probably
> wrong, and is far too little anyway to get full use of this (what
> appears to be a really nice) advanced searching application.
>
> And being I haven't found anything else that comes close to being a
> decent "advanced search" for searching within mysql tables, I'll again
> just have to create my own (my pevious search creations are procedural
> and far too custom to be able to be used again.
>
> Thanks for allowing us here.
>

> Keith D Commiskeyhttp://kdcinfo.comhttp://giftsforyou.biz

KDCinfo

unread,
Nov 7, 2006, 2:00:58 AM11/7/06
to PHPSimpl
Good example! Thank you. Finally got it going. Had to comment out:
... include_once(DIR_INC . 'functions.php');
in the "application_top.php" file.

Now I just need to play around with the locations of where all the
files/folders can be (for better control for my own app). Just need to
put the config/define file outside (above) the public folder structure,
and group the simpl core files into a more general location for use
throughout my site. Not a big problem. Part of the fun of learning the
app.

More importantly, I'll need to study how you're using the files,
classes, and methods. That way, I can figure out the search aspects of
your app. For my current app, that's the most important feature. I
could make one, but I'm hoping your app might provide future use in
other apps.

Thanks!

Nick DeNardis

unread,
Nov 7, 2006, 6:01:39 AM11/7/06
to PHPSimpl
Yea, you can put Simpl outside of the web viewable directory, the only
thing you will need to do is if you are using the calendar is to move
the "calendar.css" and "calendar.js" into a web viewable directory to
be usable. About search ability, what i will do is add some search into
the example.

Currently there is two ways to do a search, one is a "filter" and the
other is a pure search.

Filter:
$myClass->search = 'search term'; // Set a filter term
$myClass->GetList(); // Get a list but filter thorough all the fields
for search
$myClass->results; // This is where all the results will be stored

Real Search:
$keywords = 'search term'; // Set the Keywords
$search_fields = array('title','post','author'); // Set the fields to
look in
$return_fields = array('post_id','title','author','date_entered'); //
Set the fields to return
$myClass->Search($keywords,$search_fields,$return_fields); // Actually
do the search
$myClass->results; // This is where all the results will be stored

The Search uses regular expressions with MySQL so it is pretty quick,
but if you are getting record sets > 100,000 you may need to use
another method.

Nick D.

On Nov 7, 2:00 am, "KDCinfo" <goo...@kdcinfo.com> wrote:
> Good example! Thank you. Finally got it going. Had to comment out:
> ... include_once(DIR_INC . 'functions.php');
> in the "application_top.php" file.
>
> Now I just need to play around with the locations of where all the
> files/folders can be (for better control for my own app). Just need to
> put the config/define file outside (above) the public folder structure,
> and group the simpl core files into a more general location for use
> throughout my site. Not a big problem. Part of the fun of learning the
> app.
>
> More importantly, I'll need to study how you're using the files,
> classes, and methods. That way, I can figure out the search aspects of
> your app. For my current app, that's the most important feature. I
> could make one, but I'm hoping your app might provide future use in
> other apps.
>
> Thanks!
>

> Keith D Commiskeyhttp://kdcinfo.comhttp://giftsforyou.biz

Nick DeNardis

unread,
Nov 11, 2006, 9:45:01 AM11/11/06
to PHPSimpl
Example has been updated as of rev. 130 with:
* An Author Class
* Drop down example on the Post form
* Filtered Search on the Author and Post list pages
* Join() Example to join more than one class on the GetList()
* New Database structure, please re-import

Nick D.

Reply all
Reply to author
Forward
0 new messages