Page 1 of 1

Best bets look and feel

Posted: Tue Feb 27, 2007 3:12 pm
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>

Best bets look and feel

Posted: Tue Feb 27, 2007 3:48 pm
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.

Best bets look and feel

Posted: Wed Feb 28, 2007 10:11 am
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>

Best bets look and feel

Posted: Wed Feb 28, 2007 11:22 am
by John
Try setting $bbTitleString instead of $bbtitle, as those are different variables, and it looks as if $bbTitleString is being displayed.

Best bets look and feel

Posted: Wed Feb 28, 2007 1:42 pm
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>

Best bets look and feel

Posted: Wed Feb 28, 2007 2:58 pm
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.