Meta Description Display

Post Reply
tech14
Posts: 12
Joined: Mon Mar 18, 2002 3:57 pm

Meta Description Display

Post by tech14 »

Hello,

Thanks to mark and kai, I finally have an indexed site on Webinator 5.0, and now I'm trying to tweak the UI.

In the Admin I've set:

Results Style - Concise
Abstract Style - Description

You can search this here: http://www.khouse.org/

It's almost there, except instead of a meta description it displays ellipsis.

texis -s "select Description from html" returns a ton of meta description tag contents.

Any suggestions? Thanks for your help.
User avatar
mark
Site Admin
Posts: 5513
Joined: Tue Apr 25, 2000 6:56 pm

Meta Description Display

Post by mark »

Looks like an oversight in the search script. A small edit should fix you up. Edit search and in the
<A NAME=search>
function change
"select Url,Depth,Title,Body
to
"select Url,Depth,Title,Description,Body
tech14
Posts: 12
Joined: Mon Mar 18, 2002 3:57 pm

Meta Description Display

Post by tech14 »

Here's my edited search function in /www/khouse/htdocs/webinator/search which corresponds to http://www.khouse.org/cgi-bin/texis/webinator/search

I'm still not getting the descriptions. Is there something I need to restart or some cache file to reset or something like that?


<!-- central search function -->
<A NAME=search>
<local savenext saveindexcount>
<if $arg ne ""><$query=$arg></if><!-- ver 1 back compatibility -->
<if $refine ne ""><!-- add previous query to this query -->
<$query=($refine+ ' ' +($query-$refine))><!-- make sure not redundant -->
<$refine=>
</if>
<IF $notq neq ""><!-- add not'd notq to query -->
<rex "[^\space\-\+]+" $notq><!-- get rid of junk, keep "words" -->
<sum " -%s" "" $query $ret><!-- place - in front of each word -->
<substr $ret 4 -1><!-- remove leading " - -" -->
<$query = $ret>
<$notq = >
</IF>
<IF $query eq "" and $mlt eq ""><!-- no query of any kind -->
<showform>
<IF $submit eq Submit>
<FL><p><b>Please enter a query.</b></F>
</IF>
<ELSE><!-- there's a query -->
<$null= ""><!-- ignore empty settings -->
<qpar><!-- parse query settings -->
<$next=$jump><!-- set next to first in case nothing else -->
<$sq=$q>
<$stq=$tq>
<$suq=$uq>
<$sdq=$dq>
<$scq=$cq>
<fmtcp query "%mblH" $mmfmt><!-- setup hit markup -->
<if $SSc_sherlock eq Y>
<send "<!-- RESULT LIST START -->">
</if>
<!-- may need to do this part of sql twice, so put in variable instead
of coding it redundantly -->
<$sql="from html
where Title\Description\Keywords\Meta\Body " $liketype " $$sq
and Title like $$stq
and Url matches $$suq
and Depth <= $$sdq
and Catno matches $$scq
">
<!-- perform query on database -->
<SQL ROW SKIP=$jump MAX=$SSc_hitsperpage
"select Url,Depth,Title,Description,Body,Size,Visited,id,$$rank rawrank "
$sql $sqlorder>
<!-- gw COMPATIBILITY - prepend http:// "select 'http://'+Url Url" -->
<IF $loop eq 0><!-- If this is the first hit -->
<$savenext = $next><!-- preserve $next -->
<showform refine=y><!-- show the search form w/refine button -->
<IF $count eq 1><!-- need to count rows to get precise hit count -->
<SQL "select count(*) ic " $sql></SQL>
<$indexcount=$ic><!-- reset texis's indexcount to actual count -->
</if>
<$next = $savenext><!-- restore $next -->
<$start=$next><!-- Start/end hit # for this page -->
<$end= (-1 + $SSc_hitsperpage + $start)><!-- last hit on page -->
<if $indexcount lt $end><!-- less than full page -->
<$end=$indexcount>
</if>
<if $mlt neq "" and $maxr eq "">
<!-- a "more like this" query and max rank not set yet -->
<!-- remember rank of first rank as "best" to scale ranks -->
<$maxr=$rawrank>
<sum "%s" $mltvar "&maxr=" $maxr><!-- remember this for state -->
<$mltvar = $ret>
</if>
<summary><!-- display the query summary (next,prev,how many) -->
</IF>
<IF $Title eq ""><!-- no page title, give something to click on -->
<$Title="Untitled">
</IF>
<result><!-- display the result record -->
</SQL>
<$xloop=$loop>
<$noResults=0>
<SWITCH $loop>
<CASE 0><!-- no hits this page -->
<$tQuery=$query>
<IF $next eq 0><!-- this is the 1st page -->
<$noResults=1>
<showform>
<FL><b><p>No documents match the query.</b></F><!-- tell 'em -->
<else><!-- 2nd or later page: make sure form gets shown -->
<showform refine=y>
</IF>
<CASE gt 5><!-- over 5 hits -->
<summary><!-- enough to warrant a summary at bottom too -->
<CASE lte 5><!-- 5 or fewer hits -->
<if $SSc_resultstyle ne "8">
<BR><!-- few on page -->
</if>
</SWITCH>
<if $SSc_sherlock eq Y>
<send "<!-- RESULT LIST END -->">
</if>
</IF>
</A>
<!---------------------------------------------------------------------------->
User avatar
mark
Site Admin
Posts: 5513
Joined: Tue Apr 25, 2000 6:56 pm

Meta Description Display

Post by mark »

That's an old v4 script, Changes to that won't be noticed as that's not the script being run. Scripts are now in INSTALLDIR/texis/scripts/webinator

The install would have said something about that.
tech14
Posts: 12
Joined: Mon Mar 18, 2002 3:57 pm

Meta Description Display

Post by tech14 »

How clever yet simple.

Thanks for your help mark. I missed that change. This explains a lot of things really.
Post Reply