how can i use ajaxsearch with this php code to load a result page for the users input value
$xmlDoc = new DOMDocument();
$xmlDoc->load("links.xml");
$x=$xmlDoc->getElementsByTagName('link');
//get the q parameter from URL
$q=$_GET["q"];
//lookup all links from the xml file if length of q>0
if (strlen($q) > 0)
{
$hint="";
for($i=0; $i<($x->length); $i++)
{
$y=$x->item($i)->getElementsByTagName('title');
$z=$x->item($i)->getElementsByTagName('url');
if ($y->item(0)->nodeType==1)
{
//find a link matching the search text
if (stristr($y->item(0)->childNodes->item(0)->nodeValue,$q))
{
if ($hint=="")
{
$hint="<a href='" .
$z->item(0)->childNodes->item(0)->nodeValue .
"' target='_blank'>" .
$y->item(0)->childNodes->item(0)->nodeValue . "</a>";
}
else
{
$hint=$hint . "<br /><a href='" .
$z->item(0)->childNodes->item(0)->nodeValue .
"' target='_blank'>" .
$y->item(0)->childNodes->item(0)->nodeValue . "</a>";
}
}
}
}
}
// Set output to "no suggestion" if no hint were found
// or to the correct values
if ($hint == "")
{
$response="no suggestion";
}
else
{
$response=$hint;
}
//output the response
echo $response;
Mysql 5.1.52
Apache 2.2.17
PHP 5.2.12
Linux
did u see the link above?
Mysql 5.1.52
Apache 2.2.17
PHP 5.2.12
Linux
-
☆ A M B ☆
- 24,524 Posts
I don’t think this is a stock MODx since adding /manager to that link doesn’t get a manager login; at least this isn’t 0.9.6x or 1.0.x evolution. Either that or they’ve done some fancy .htaccess rewriting for the manger, maybe? Or could it be Revo?
Interesting, how the developer of that site describes how they "have built up a system" for a CMF, especially considering how their support file structure and several features are obviously MODx (AjaxSearch and MaxiGallery).
http://www.rossco-designs.com/Services/content-management-framework
http://www.rossco-designs.com/Portfolio/websites/battlefield-nations
May be Rossco can give us the answers ?
Mysql 5.1.52
Apache 2.2.17
PHP 5.2.12
Linux
-
☆ A M B ☆
- 1,231 Posts
coroico messaged me to say that one of my sites is in question...
My battlefieldnations website is using modx but it’s heavily modified to suit some ideas I have for the site. Regardless of the modifications, it’s modx I am using and ajaxsearch.
Ross
thats good

im trying to install this but wont give me any luck... will give it a try again
Mysql 5.1.52
Apache 2.2.17
PHP 5.2.12
Linux