It works pretty good. I initially built a script that will let you insert a href tag. Now this is just a quick script so don't expect much.
The file that I add into phped integration, contains this code:
filename: call_phpdock.php
<?php
exec('C:\dev\xampp\SITES\ah_apps\phpdock.exe');
//read values from file
$file = './insert_text.txt';
$fh = fopen($file,'r');
$string = fread($fh,filesize($file));
print $string;
fclose($fh);
?>
|
The theform.php (contains the form) file that phpdock calls looks like this:
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<?php
if(isset($_POST['submit_form']))
{
//write values to file
$fh = fopen('./insert_text.txt','w');
fwrite($fh,'<a href = "' . $_POST['test'] . '"></a>');
fclose($fh);
$body = " onLoad='self.close();'";
}
?>
</head>
<body<?php echo "$body"; ?>>
<form name="test_param" action="" method="post">
<input type="text" name="test" size="25">
<input type="hidden" name="submit_form" value="true">
<input type="submit" name="save" value="save">
</form>
</body>
</html>
|
So when I run the script 'call_phpdock.php' from the scripts menu, it then starts phpdock and displays a form. Then I fill out the form and click submit, data is written to a file and the window auto closes. Then the text is inserted into my current document.
The only problem I noticed, is that I have to set absolute paths in my ini file, or else I get an error saying that phpdock can't find the 'appicon.ico' and then the window won't close not even if I click the red x. I have to use the task manager to kill the window.
Any ideas or suggestions?
Jeff