Yii Framework Forum: need help: how to integrate 3rd party php - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • This topic is locked

need help: how to integrate 3rd party php Rate Topic: -----

#1 User is offline   jojo5544 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 2
  • Joined: 28-April 09

Posted 10 July 2009 - 02:45 AM

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.

0

#2 User is offline   will 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 179
  • Joined: 21-March 09

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.
0

#3 User is offline   jojo5544 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 2
  • Joined: 28-April 09

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?
0

#4 User is offline   bonnie 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 62
  • Joined: 08-February 11

Posted 20 December 2011 - 09:41 PM

View Postjojo5544, on 11 July 2009 - 02:12 AM, said:

Thanks Will
I want to try the first option you suggested,
what should my new 'admin' and 'search' action be doing?


Did you succeed to create a wrapper for Sphider search please help I need it to.
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • This topic is locked

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users