Moderated by: FocalMedia Team, Miles, Gerrit, Rian

FocalMedia.Net Forums » Other Products »  FM SiteSearch Pro

Page: 1 of 1

« Back to Topic Index Page 1 | Replies: 0

 Author  Topic: Cheap and Chearful Auto-Indexing
AgentX

New Member
  

    
Post a Reply To This Topic    Reply With Quotes     Edit Message     View Profile of AgentX 

Ok, well I couldn't figure out how
to do what you suggest, but I have found a way to automatically run the search
index. It ain't elegant, and it ain't clever - but it works, and it doesn't
require cron.


Basically the search is run in a
javascript pop-up that is triggered when a visitor hits the page containing
the script.


Only it's a self-closing pop-under,
contrived to run (almost) invisibly behind the main page.


The javascript to put in the head
of the page you choose should look something like this:


<script type="text/javascript" language="JavaScript"><!--


function goPopUnder() {

ThePopUnder=window.open("http://www.mysite.com/cgi-bin/fmsearch/admin4.cgi?ftc=web","","width=100,height=100,top=1000,left=1000,scrollbars=0,resizable=0,toolbar=0,location=0,menubar=0,status=0,directories=0,alwaysLowered=1");
ThePopUnder.blur();

closetime = 20;

if (closetime)
setTimeout("ThePopUnder.close();", closetime*1000);

}


//--></script>


I think the line
beginning ThePopUnder=window.open
and ending
alwaysLowered=1");
should all be on one line.


Then you need to
place into the same page the body attribute:
onLoad="goPopUnder()"


Obviously admin4.cgi?ftc=web
would be substituted for whichever of the search scripts you are employing.
This is the mySQL database version.


I've set the closetime
to
20
seconds to ensure that enough time is given to complete the indexing before
the hidden window closes.


That's it. Provided someone happens
upon your page once in a while, your search will be automatically reindexed.


I've chosen to combine this idea with the pseudo-cron refered to above, so
my site only gets indexed once every 24 hours.


 


 


Total Posts: 22 | Joined: Oct 11, 2002 - 9:33am | IP Logged


Lock Topic

 

Forum Legend

New Member

Reply to topic

More than 50 posts | Member

Reply to topic with quoted message

More than 100 posts | Full Member

Edit Message

More than 150 posts | Advanced Member

View profile

More than 200 posts | Advanced Member

Email member