Best bets look and feel

Post Reply
edev
Posts: 127
Joined: Wed Sep 14, 2005 5:10 pm

Best bets look and feel

Post by edev »

Hi,

I'm trying to create a new look and feel for our best bets, including customizing the size, color of the font, and adding titles for bothe English and French search script (we are a billingual site). The problem is that the search scripts doesn't seem to accept my changes.

I created a local varaible $bbTitleString, and commented out the sql line where $bbtitle is retrieved from the database, but nothing seems to work. Here is a part of the code:

<$bbtitle="We suggest:">
...

<sql db=$controldb "select Name, String from options where Profile=$pr and Name in ('SSc_tbbtoptitle','SSc_tbbtopid','SSc_tbbtopcolor','SSc_tbbtopborder')">
<switch $Name>
<case "SSc_tbbtopborder"> <$bbbox=$String>
<case "SSc_tbbtopcolor"> <$bbcolor=$String>
<case "SSc_tbbtopid"> <$gid=$String>
<!-- <case "SSc_tbbtoptitle"> <$bbtitle=$bbTitleString> -->
</switch>
</sql>
<if $gid ne "">
<getbestbet>
<if $bbresult ne "">
<if $SSc_resultstyle eq "8">
<sum "%s" $bbresult>
<sum "%s" "<TopBestBets>
<BBTitle>" $bbTitleString "</BBTitle>
" $ret "</TopBestBets>
">
<$top=$ret>
<else>
<if $bbbox eq "grp">
<$border=1>
<else>
<$border=0>
</if>
<if $bbcolor ne "">
<sum "%s" "BGCOLOR='" $bbcolor "'">
<$bbcolor=$ret>
</if>
<!-- <sum "%s" $bbresult> -->
<!-- <sum "%s" "<FONT FACE='" $SSc_font "' SIZE='+1'><b>$bbTitleString</b></FONT><TABLE CELLPADDING=0 WIDTH='" $SSc_resultwidth "' CELLSPACING=0 BORDER=" $border " " $bbcolor "><TR><TD>" $ret "</TD></TR></TABLE>"> -->

<TABLE CELLPADDING=0 CELLSPACING=0 BORDER="1">
<tr><td>$bbTitleString</td></tr>
<TR><TD>$ret</TD></TR></TABLE>
<$top=$ret>
</if>
</if>
</if>
User avatar
John
Site Admin
Posts: 2622
Joined: Mon Apr 24, 2000 3:18 pm
Location: Cleveland, OH
Contact:

Best bets look and feel

Post by John »

Had you done some other edits or search and replaces? It looks as if it is printing $bbTitleString, but you are setting $bbtitle.
John Turnbull
Thunderstone Software
edev
Posts: 127
Joined: Wed Sep 14, 2005 5:10 pm

Best bets look and feel

Post by edev »

Thanks John - no I did not do any replace. The problem is the variable $bbTitleString doesn't even show up at all if I do this:
<$bbtitle="We suggest:">
<TABLE CELLPADDING=0 CELLSPACING=0 BORDER="1">
<tr><td>$bbTitleString</td></tr>
<TR><TD>$ret</TD></TR></TABLE>
User avatar
John
Site Admin
Posts: 2622
Joined: Mon Apr 24, 2000 3:18 pm
Location: Cleveland, OH
Contact:

Best bets look and feel

Post by John »

Try setting $bbTitleString instead of $bbtitle, as those are different variables, and it looks as if $bbTitleString is being displayed.
John Turnbull
Thunderstone Software
edev
Posts: 127
Joined: Wed Sep 14, 2005 5:10 pm

Best bets look and feel

Post by edev »

Oh I'm sorry I made a typo: I actually did set $bbTitleString not $bbtitle.

This is what I did and it did not work:

<sum "%s" $bbresult>
<$bbTitleString="We Suggest">
<sum "%s" "<FONT FACE='" $SSc_font "' SIZE='+1'><b>" $bbTitleString "</b></FONT><TABLE CELLPADDING=0 WIDTH='" $SSc_resultwidth "' CELLSPACING=0 BORDER=" $border " " $bbcolor "><TR><TD>" $ret "</TD></TR></TABLE>">
<$top=$ret>
User avatar
mark
Site Admin
Posts: 5519
Joined: Tue Apr 25, 2000 6:56 pm

Best bets look and feel

Post by mark »

In what way did it not work? No change? Error? ??

Make sure the script you're editing the same one you're running.

View the source of the resulting page and check for error messages within html comments.
Post Reply