Okay, my turn to be berated and talked-down to. ;)

I'm trying to integrate PHP/SWF Charts
(http://www.maani.us/charts/index.php) into my stats reporting system
at work.  I read the manual and saw how I can create an app/vendors
directory and put the code in there.  I can then access code by doing
'vendor("foo")' and it will include foo.php in my script.  The thing
I'm having problems with is how do I tell my app to use a *directory*
that is in teh app/vendors directory.

Here's how it's supposed to work:

You create a file called sample.php that looks like this:

<?php

//include charts.php to access the SendChartData function
include "charts.php";

SendChartData ();

?>

So, I created a controller/action pair to handle this

class GraphsController extends AppController
{
        var $name = 'Graphs';
        var $uses = NULL;
        
        public function users()
        {
                // setup things for PHP/SWF Charts
                vendor('charts');
                SendChartData ();
        }
}

Now, the file you want to output the graph into should have this in it:

<HTML>
<BODY bgcolor="#FFFFFF">

<?php

//include charts.php to access the InsertChart function
include "charts.php";

echo InsertChart ( "charts.swf", "charts_library", "sample.php" );

?>

</BODY>
</HTML>

Now, I've added the following code into the thml template I want the
graph to appear in:

vendor('charts');
echo InsertChart($html->image('charts.swf'), "charts_library",
$html->url('/graphs/users'));

"charts_library" is supposed to represent the location
/app/vendors/charts_library so the PHP/SWF code can find some support
stuff.  How do I tell Cake where to find that directory?

-- 
Chris Hartjes

"The greatest inefficiencies come from solving problems you will never have."
-- Rasmus Lerdorf

@TheBallpark - http://www.littlehart.net/attheballpark
@TheKeyboard - http://www.littlehart.net/atthekeyboard

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~----------~----~----~----~------~----~------~--~---

Reply via email to