Hello everyone
I am trying to add to my Yii site some 3rd Party Library, and need help to do it properly..
I'm trying to integrate http://myServer/myYiiApp with this PHP search engine
http://www.sphider.eu/download.php
it's got its own directory structure and works great when deployed to the server by it self and configured. i.e.
http://myServer/sphi...1.3.4/admin.php
(settings, point to myYiiApp, search indexing, params etc.) or
http://myServer/sphi....3.4/search.php
(shows a input box and returns search results when submit)
But i need to be able to use these scripts within my Yii application, i.e. a search bar somewhere in myYiiApp to invoke sphider search and show sphider search results page or sphider admin page as part of myYiiApp screens.
First i don't know where to put the Sphider folder, should i put it in protected/extension?
The thing is in the Sphider php files, it uses things like <form action=admin.php method=post> to do things, and also <a href=\"admin.php?f=index=1\"/>
and basically this is how all its links/submit buttons are written.
Since myYiiApp doesn't have admin.php and search.php action controller,
this will not work as is if i simply include the sphider admin page by using include or renderFile "Sphider-1.3.4/admin.php"
because this doesn't exist: http://myServer/myYi...n.php?f=index=1
Does it mean if i want to move Sphider into myYiiApp, i have to change all these links/submits and create respective Yii Controllers to handle them?
Wouldn't that require configuring a lot of actions, params and update virtually all Sphider scripts?
I just hope there is a better way to make that happen
Please share your ideas, let me know if i could better explain my problem.
Best regards.
Page 1 of 1
need help: how to integrate 3rd party php
#2
Posted 10 July 2009 - 10:17 AM
Basically, you can write a Yii controller to wrap the spider search script; you can also take advantage of .htaccess rewrite rule to work with some standalone 3rd party software.
#3
Posted 11 July 2009 - 02:12 AM
Thanks Will
I want to try the first option you suggested,
what should my new 'admin' and 'search' action be doing?
I want to try the first option you suggested,
what should my new 'admin' and 'search' action be doing?
Share this topic:
Page 1 of 1