vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Simple Conditionals Question (https://vborg.vbsupport.ru/showthread.php?t=116158)

Rich 05-20-2006 12:37 PM

Simple Conditionals Question
 
I have created a Multiple-Selection Menu with the options set as "Right" and "Left". Right is the default value.

I want to be able to display "this code" if they choose "Right" as their option or "this code" if they choose "left".

The field in question is "field14".

What conditional statement would I use in a template to have the code displayed per the selection chosen?

Thanks.

peterska2 05-20-2006 12:46 PM

Code:

<if condition="$post[field14]=='1'">Stuff for first check box goes here<else />stuff for first checkbox unchecked goes here</if>

<if condition="$post[field14]=='2'">staff for second check box goes here<else />stuff for second checkbox unchecked goes here</if>


Rich 05-20-2006 12:47 PM

Thank you Kerry.

peterska2 05-20-2006 01:10 PM

No prob Rich. Happy to help as always. :)

Rich 05-20-2006 07:17 PM

I am not sure what I am doing wrong, but the conditions aren't working properly. (Notice I said what I am doing wrong. lol)

I am trying to allow my users the ability to choose between a left or right column in their journals using Andreas' modification.

I know I need to edit the journal_journalpage template.

This is what the template consists of after I have added both layouts that need to be controlled via the conditionals.

HTML Code:

$stylevar[htmldoctype]
<html dir="$stylevar[textdirection]" lang="$stylevar[languagecode]">
<head>
$headinclude
<title>$vboptions[bbtitle] - Reptile Blogs - <if condition="$journalinfo[journalname]">$journalinfo[journalname]<else /><phrase 1="$journalinfo[journalist]">$vbphrase[xs_journal]</phrase></if></title>
</head>
<body>
$header
$navbar

<!-- Start Locked Status -->
<if condition="$journalinfo[status]==1">
<table bgcolor="#FFFFFF" width="100%" border="1">
<tr>
<td align="center"><font color="#FF0000" size="4"><b>$vbphrase[this_journal_is_locked]</b></font></td>
</tr>
</table>
</if>
<!-- End Locked Status -->

<table align="center" width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td colspan="2">

<!-- Start Blog Information Table -->
<table class="tborder" cellspacing="$stylevar[cellspacing]" cellpadding="$stylevar[cellpadding]" border="0" align="center" width="100%" style="border-bottom-width:0px">
<tr>
<td class="tcat" align="$stylevar[left]" width="100%">$vbphrase[journal_information]</td>
<td id="journalopt" class="vbmenu_control"><a href="#journalopt">$vbphrase[journal_tools]</a> <script type="text/javascript"> vbmenu_register("journalopt"); </script></td>
<td id="journalsearch" class="vbmenu_control"><a href="#journalsearch">$vbphrase[search_this_journal]</a> <script type="text/javascript"> vbmenu_register("journalsearch"); </script></td>
<if condition="$can[rate]"><td id="journalrate" class="vbmenu_control"><a href="#journalrate"><if condition="$journalrating==0">$vbphrase[rate_journal]<else />$vbphrase[rating]: <img src="$stylevar[imgdir_rating]/rating_$journalrating.gif" border="0" /></if></a> <script type="text/javascript"> vbmenu_register("journalrate"); </script></td></if>
</tr>
</table>
<table class="tborder" cellspacing="$stylevar[cellspacing]" cellpadding="$stylevar[cellpadding]" border="0" align="center" width="100%">
<tr>
<td class="alt2" nowrap="nowrap" align="top">
<if condition="!empty($avatarurl)">
<a href="member.php?u=$journalinfo[journalist_id]"><img src="$avatarurl" border="0" alt="<phrase 1="$journalinfo[journalist]">$vbphrase[xs_avatar]</phrase>" /></a>
<else />
<div class="smallfont">$vbphrase[no_avatar_specified]</div>
</if>
</td>
<td class="alt1" nowrap="nowrap" width="100%">
<table width="100%">
<tr>
<td width="50%">
<div class="smallfont">
<b>Blogger</b>: <a href="member.php?userid=$journalinfo[journalist_id]">$journalinfo[journalist]</a>
</div>
</td>
<td width="50%">
<div class="smallfont">
<b>$vbphrase[status]</b>: <if condition="$journalinfo[private]=='1'"><b><font color="red">$vbphrase[private]</font></b><else /><b><font color="green">$vbphrase[public]</font></b></if>
</div>
</td>
</tr>
<tr>
<td>
<div class="smallfont">
<b>$vbphrase[entries]</b>: $journalinfo[entrycount] ($vbphrase[private]: $private[count])
</div>
</td>
<td>
<div class="smallfont">
<b>$vbphrase[comments]</b>: $journalinfo[commentcount]
</div>
</td>
</tr>
<tr>
<td>
<div class="smallfont">
<b>$vbphrase[start_date]</b>: $journal[startdate]
</div>
</td>
<td>
<div class="smallfont">
<b>$vbphrase[last_update]</b>: <if condition="$journalinfo[entrycount]==0">$journal[startdate]<else />$journalinfo[lastupdated]</if>
</div>
</td>
</tr>
<tr>
<td>
<div class="smallfont">
<b>Views</b>: $journalinfo[journalviews]
</div>
</td>
<td>
<div class="smallfont">
<if condition="$bbuserinfo[usergroupid]=='6'"><b>$vbphrase[start_ip]</b>: $journalinfo[ipaddress]<else />&nbsp;</if>
</div>
</td>
</tr>
<tr>
<td colspan="2">
<div class="smallfont">
<if condition="$journalinfo[journaldesc]"><b>$vbphrase[description]</b>: $journalinfo[journaldesc]</if>
</div>
</td>
</tr>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</table>
<!-- End Blog Information Table -->
<br />
<!-- Start Left Column Blog Table -->
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%">
<tr>
<td width="25%" align="center" valign="top">Left Column</td>
<td width="75%" align="center"> 
<table width="100%" border="0" cellpadding="3" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111">
<tr valign="bottom">
<td align="left" style="padding-bottom:3px;">
<if condition="$bbuserinfo[userid]==$journalinfo[journalist_id] AND $journalinfo[status]!=1"><form method="post" action="blogs.php?do=addentry&amp;j=$j">
<a href="blogs.php?$session[sessionurl]do=addentry&amp;j=$j"><img border="0" src="$stylevar[imgdir_button]/newentry.gif" width="100" height="26" alt="$vbphrase[new_entry]" /></a>
</if>
</td>
<td align="right" style="padding-bottom:3px;">
$pgnav
</td>
</tr>
<tr>
<td colspan="2" align="center">
$entrybits
</td>
</tr>
<tr valign="top">
<td align="left" style="padding-top:3px;">
<if condition="$bbuserinfo[userid]==$journalinfo[journalist_id] AND $journalinfo[status]!=1"><form method="post" action="blogs.php?do=addentry&amp;j=$j">
<a href="blogs.php?$session[sessionurl]do=addentry&amp;j=$j"><img border="0" src="$stylevar[imgdir_button]/newentry.gif" width="100" height="26" alt="$vbphrase[new_entry]" /></a>
</if>
</td>
<td align="right" style="padding-top:3px;">
$pgnav
</td>
</tr>
</table>
</td>
</tr>
</table>
<!-- End Left Column Blog Table -->
<!-- Start Right Column Blog Table -->
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%">
<tr>
<td width="75%" align="center" valign="top">
<table width="100%" border="0" cellpadding="3" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111">
<tr valign="bottom">
<td align="left" style="padding-bottom:3px;">
<if condition="$bbuserinfo[userid]==$journalinfo[journalist_id] AND $journalinfo[status]!=1"><form method="post" action="blogs.php?do=addentry&amp;j=$j">
<a href="blogs.php?$session[sessionurl]do=addentry&amp;j=$j"><img border="0" src="$stylevar[imgdir_button]/newentry.gif" width="100" height="26" alt="$vbphrase[new_entry]" /></a>
</if>
</td>
<td align="right" style="padding-bottom:3px;">
$pgnav
</td>
</tr>
<tr>
<td colspan="2" align="center">
$entrybits
</td>
</tr>
<tr valign="top">
<td align="left" style="padding-top:3px;">
<if condition="$bbuserinfo[userid]==$journalinfo[journalist_id] AND $journalinfo[status]!=1"><form method="post" action="blogs.php?do=addentry&amp;j=$j">
<a href="blogs.php?$session[sessionurl]do=addentry&amp;j=$j"><img border="0" src="$stylevar[imgdir_button]/newentry.gif" width="100" height="26" alt="$vbphrase[new_entry]" /></a>
</if>
</td>
<td align="right" style="padding-top:3px;">
$pgnav
</td>
</tr>
</table>
</td>
<td width="25%" align="center" valign="top">Right Column</td>
</tr>
</table>
<!-- End Right Column Blog Table -->
<br /><br />
<div class="vbmenu_popup" id="journalopt_menu" style="display:none">
<table cellpadding="4" cellspacing="0" border="0"
style="border-collapse: collapse" bordercolor="#111111">

<if condition="$canview[comments]">
<tr>
<td class="thead">$vbphrase[journal_tools]</td>
</tr>
<tr>
<td class="vbmenu_option"><a href="blogs.php?do=showcomments&amp;j=$j">$vbphrase[view_comments]</a></td>
</tr>
</if>
<tr>
<td class="thead">$vbphrase[download]</td>
</tr>
<tr>
<td class="vbmenu_option"><a href="blogs.php?do=downloadjournal&amp;j=$j&amp;type=txt">$vbphrase[txt_format]</a></td>
</tr>
<tr>
<td class="vbmenu_option"><a href="blogs.php?do=downloadjournal&amp;j=$j&amp;type=xml">$vbphrase[xml_format]</a></td>
</tr>
<if condition="$bbuserinfo[usergroupid]==6">
<tr>
<td class="thead">$vbphrase[admin_tools]</td>
</tr>
<tr>
<td class="vbmenu_option"><a href="blogs.php?do=lockjournal&amp;j=$j"><if condition="$journalinfo[status]==1">$vbphrase[unlock_journal]<else />$vbphrase[lock_journal]</if></a></td>
</tr>
<tr>
<td class="vbmenu_option"><a href="blogs.php?do=editjournal&amp;j=$j">$vbphrase[edit_journal_settings]</a></td>
</tr>
<tr>
<td class="vbmenu_option"><a href="blogs.php?do=delete&amp;j=$j&amp;t=j">$vbphrase[delete_journal]</a></td>
</tr>
</if>
<if condition="$bbuserinfo[userid]==$journalinfo[journalist_id] AND $journalinfo[status]!=1">
<tr>
<td class="thead">$vbphrase[journalist_options]</td>
</tr>
<tr>
<td class="vbmenu_option"><a href="blogs.php?do=addentry&amp;j=$j">$vbphrase[new_entry]</a></td>
</tr>
<tr>
<td class="vbmenu_option"><a href="blogs.php?do=editjournal&amp;j=$j">$vbphrase[edit_journal_settings]</a></td>
</tr>
<if condition="$candeleteown[journal]">
<tr>
<td class="vbmenu_option"><a href="blogs.php?do=delete&amp;j=$j&amp;t=j">$vbphrase[delete_journal]</a></td>
</tr>
</if>
</if>
</table>
</div>
<div class="vbmenu_popup" id="journalsearch_menu" style="display:none">
<form action="blogs.php" method="get">
<input type="hidden" name="do" value="searchresults" />
<input type="hidden" name="st" value="6" />
<input type="hidden" name="j" value="$j" />
<table cellpadding="4" cellspacing="1" border="0">
<tr><td class="thead">$vbphrase[search_this_journal]</td></tr>
<tr><td class="vbmenu_option" title="nohilite"><input type="text" name="sk" value="" size="20" maxlength="50" /> <input type="submit" value="Go" class="button" /></td></tr>
<tr><td class="vbmenu_option"><a href="blogs.php?do=search" title="$vbphrase[advanced_journal_search]">$vbphrase[advanced_search]</a></td></tr>
</table>
</form>
</div>
<div class="vbmenu_popup" id="journalrate_menu" style="display:none">
<if condition="$show[voteform]">
<form action="blogs.php?do=ratejournal" method="post">
</if>
<table cellpadding="4" cellspacing="1" border="0">
<if condition="$show[voteform]">
<tr>
<td class="thead">$vbphrase[rate_this_journal]</td>
</tr>
<tr>
<td class="vbmenu_option" title="nohilite">
<div><img class="inlineimg" src="$stylevar[imgdir_rating]/rating_5.gif" alt="$vbphrase[excellent]" /><label for="vote5"><input type="radio" name="rating" value="5" />$vbphrase[excellent]</label></div>
<div><img class="inlineimg" src="$stylevar[imgdir_rating]/rating_4.gif" alt="$vbphrase[good]" /><label for="vote4"><input type="radio" name="rating" value="4" />$vbphrase[good]</label></div>
<div><img class="inlineimg" src="$stylevar[imgdir_rating]/rating_3.gif" alt="$vbphrase[average]" /><label for="vote3"><input type="radio" name="rating" value="3" />$vbphrase[average]</label></div>
<div><img class="inlineimg" src="$stylevar[imgdir_rating]/rating_2.gif" alt="$vbphrase[bad]" /><label for="vote2"><input type="radio" name="rating" value="2" />$vbphrase[bad]</label></div>
<div><img class="inlineimg" src="$stylevar[imgdir_rating]/rating_1.gif" alt="$vbphrase[terrible]" /><label for="vote1"><input type="radio" name="rating" value="1" />$vbphrase[terrible]</label></div>
</td>
</tr>
<tr>
<td class="vbmenu_option" title="nohilite" align="center">
<input type="hidden" name="j" value="$j" />
<input type="submit" class="button" value="$vbphrase[vote_now]" />
</td>
</tr>
<else />
<tr>
<td class="alt1" nowrap="nowrap"><div class="smallfont">$vbphrase[already_rated]</div></td>
</tr>
</if>
</table>
<if condition="$show[voteform]">
</form>
</if>
</div>
<!-- / NAVBAR POPUP MENUS -->
$footer
</body>

I have tried all sorts of different variations of the conditionals displayed, but I can get it to detect which option I have chosen. Someone with more knowledge may be better inclined as to show me what I am doing wrong.

(I have commented both layouts within the code.)

peterska2 05-20-2006 07:56 PM

ok, use this as your journal_journalpage template

Code:

$stylevar[htmldoctype]
<html dir="$stylevar[textdirection]" lang="$stylevar[languagecode]">
<head>
$headinclude
<title>$vboptions[bbtitle] - Reptile Blogs - <if condition="$journalinfo[journalname]">$journalinfo[journalname]<else /><phrase 1="$journalinfo[journalist]">$vbphrase[xs_journal]</phrase></if></title>
</head>
<body>
$header
$navbar

<!-- Start Locked Status -->
<if condition="$journalinfo[status]==1">
<table bgcolor="#FFFFFF" width="100%" border="1">
<tr>
<td align="center"><font color="#FF0000" size="4"><b>$vbphrase[this_journal_is_locked]</b></font></td>
</tr>
</table>
</if>
<!-- End Locked Status -->

<table align="center" width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td colspan="2">

<!-- Start Blog Information Table -->
<table class="tborder" cellspacing="$stylevar[cellspacing]" cellpadding="$stylevar[cellpadding]" border="0" align="center" width="100%" style="border-bottom-width:0px">
<tr>
<td class="tcat" align="$stylevar[left]" width="100%">$vbphrase[journal_information]</td>
<td id="journalopt" class="vbmenu_control"><a href="#journalopt">$vbphrase[journal_tools]</a> <script type="text/javascript"> vbmenu_register("journalopt"); </script></td>
<td id="journalsearch" class="vbmenu_control"><a href="#journalsearch">$vbphrase[search_this_journal]</a> <script type="text/javascript"> vbmenu_register("journalsearch"); </script></td>
<if condition="$can[rate]"><td id="journalrate" class="vbmenu_control"><a href="#journalrate"><if condition="$journalrating==0">$vbphrase[rate_journal]<else />$vbphrase[rating]: <img src="$stylevar[imgdir_rating]/rating_$journalrating.gif" border="0" /></if></a> <script type="text/javascript"> vbmenu_register("journalrate"); </script></td></if>
</tr>
</table>
<table class="tborder" cellspacing="$stylevar[cellspacing]" cellpadding="$stylevar[cellpadding]" border="0" align="center" width="100%">
<tr>
<td class="alt2" nowrap="nowrap" align="top">
<if condition="!empty($avatarurl)">
<a href="member.php?u=$journalinfo[journalist_id]"><img src="$avatarurl" border="0" alt="<phrase 1="$journalinfo[journalist]">$vbphrase[xs_avatar]</phrase>" /></a>
<else />
<div class="smallfont">$vbphrase[no_avatar_specified]</div>
</if>
</td>
<td class="alt1" nowrap="nowrap" width="100%">
<table width="100%">
<tr>
<td width="50%">
<div class="smallfont">
<b>Blogger</b>: <a href="member.php?userid=$journalinfo[journalist_id]">$journalinfo[journalist]</a>
</div>
</td>
<td width="50%">
<div class="smallfont">
<b>$vbphrase[status]</b>: <if condition="$journalinfo[private]=='1'"><b><font color="red">$vbphrase[private]</font></b><else /><b><font color="green">$vbphrase[public]</font></b></if>
</div>
</td>
</tr>
<tr>
<td>
<div class="smallfont">
<b>$vbphrase[entries]</b>: $journalinfo[entrycount] ($vbphrase[private]: $private[count])
</div>
</td>
<td>
<div class="smallfont">
<b>$vbphrase[comments]</b>: $journalinfo[commentcount]
</div>
</td>
</tr>
<tr>
<td>
<div class="smallfont">
<b>$vbphrase[start_date]</b>: $journal[startdate]
</div>
</td>
<td>
<div class="smallfont">
<b>$vbphrase[last_update]</b>: <if condition="$journalinfo[entrycount]==0">$journal[startdate]<else />$journalinfo[lastupdated]</if>
</div>
</td>
</tr>
<tr>
<td>
<div class="smallfont">
<b>Views</b>: $journalinfo[journalviews]
</div>
</td>
<td>
<div class="smallfont">
<if condition="$bbuserinfo[usergroupid]=='6'"><b>$vbphrase[start_ip]</b>: $journalinfo[ipaddress]<else />&nbsp;</if>
</div>
</td>
</tr>
<tr>
<td colspan="2">
<div class="smallfont">
<if condition="$journalinfo[journaldesc]"><b>$vbphrase[description]</b>: $journalinfo[journaldesc]</if>
</div>
</td>
</tr>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</table>
<!-- End Blog Information Table -->
<br />
<!-- Start Columns Table -->
<table border="0" width="100%" align="center">
<tr>
<!-- peterska2 left column -->
<if condition="$post[fieldX]=='left'">
<td valign="top" width="25%">
<table class="tborder" border="0" width="100%" align="center">
<!-- left column code-->
Left column
<!-- / left column code -->
</table>
</td>
</if>
<!-- / peterska2 left column -->
<td>

<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%">
<tr>
<td width="100%" align="center"> 
<table width="100%" border="0" cellpadding="3" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111">
<tr valign="bottom">
<td align="left" style="padding-bottom:3px;">
<if condition="$bbuserinfo[userid]==$journalinfo[journalist_id] AND $journalinfo[status]!=1"><form method="post" action="blogs.php?do=addentry&amp;j=$j">
<a href="blogs.php?$session[sessionurl]do=addentry&amp;j=$j"><img border="0" src="$stylevar[imgdir_button]/newentry.gif" width="100" height="26" alt="$vbphrase[new_entry]" /></a>
</if>
</td>
<td align="right" style="padding-bottom:3px;">
$pgnav
</td>
</tr>
<tr>
<td colspan="2" align="center">
$entrybits
</td>
</tr>
<tr valign="top">
<td align="left" style="padding-top:3px;">
<if condition="$bbuserinfo[userid]==$journalinfo[journalist_id] AND $journalinfo[status]!=1"><form method="post" action="blogs.php?do=addentry&amp;j=$j">
<a href="blogs.php?$session[sessionurl]do=addentry&amp;j=$j"><img border="0" src="$stylevar[imgdir_button]/newentry.gif" width="100" height="26" alt="$vbphrase[new_entry]" /></a>
</if>
</td>
<td align="right" style="padding-top:3px;">
$pgnav
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
<!-- peterska2 right column -->
<if condition="$post[fieldX]=='right'">
<td valign="top" width="25%">
<table class="tborder" border="0" width="100%" align="center">
<!-- right column code -->
Right Column
<!-- / right column code -->
</table>
</td>
</if>
<!-- / peterska2 side column -->
</tr>
</table>
<!-- End Column Table -->
<br /><br />
<div class="vbmenu_popup" id="journalopt_menu" style="display:none">
<table cellpadding="4" cellspacing="0" border="0"
style="border-collapse: collapse" bordercolor="#111111">
<if condition="$canview[comments]">
<tr>
<td class="thead">$vbphrase[journal_tools]</td>
</tr>
<tr>
<td class="vbmenu_option"><a href="blogs.php?do=showcomments&amp;j=$j">$vbphrase[view_comments]</a></td>
</tr>
</if>
<tr>
<td class="thead">$vbphrase[download]</td>
</tr>
<tr>
<td class="vbmenu_option"><a href="blogs.php?do=downloadjournal&amp;j=$j&amp;type=txt">$vbphrase[txt_format]</a></td>
</tr>
<tr>
<td class="vbmenu_option"><a href="blogs.php?do=downloadjournal&amp;j=$j&amp;type=xml">$vbphrase[xml_format]</a></td>
</tr>
<if condition="$bbuserinfo[usergroupid]==6">
<tr>
<td class="thead">$vbphrase[admin_tools]</td>
</tr>
<tr>
<td class="vbmenu_option"><a href="blogs.php?do=lockjournal&amp;j=$j"><if condition="$journalinfo[status]==1">$vbphrase[unlock_journal]<else />$vbphrase[lock_journal]</if></a></td>
</tr>
<tr>
<td class="vbmenu_option"><a href="blogs.php?do=editjournal&amp;j=$j">$vbphrase[edit_journal_settings]</a></td>
</tr>
<tr>
<td class="vbmenu_option"><a href="blogs.php?do=delete&amp;j=$j&amp;t=j">$vbphrase[delete_journal]</a></td>
</tr>
</if>
<if condition="$bbuserinfo[userid]==$journalinfo[journalist_id] AND $journalinfo[status]!=1">
<tr>
<td class="thead">$vbphrase[journalist_options]</td>
</tr>
<tr>
<td class="vbmenu_option"><a href="blogs.php?do=addentry&amp;j=$j">$vbphrase[new_entry]</a></td>
</tr>
<tr>
<td class="vbmenu_option"><a href="blogs.php?do=editjournal&amp;j=$j">$vbphrase[edit_journal_settings]</a></td>
</tr>
<if condition="$candeleteown[journal]">
<tr>
<td class="vbmenu_option"><a href="blogs.php?do=delete&amp;j=$j&amp;t=j">$vbphrase[delete_journal]</a></td>
</tr>
</if>
</if>
</table>
</div>
<div class="vbmenu_popup" id="journalsearch_menu" style="display:none">
<form action="blogs.php" method="get">
<input type="hidden" name="do" value="searchresults" />
<input type="hidden" name="st" value="6" />
<input type="hidden" name="j" value="$j" />
<table cellpadding="4" cellspacing="1" border="0">
<tr><td class="thead">$vbphrase[search_this_journal]</td></tr>
<tr><td class="vbmenu_option" title="nohilite"><input type="text" name="sk" value="" size="20" maxlength="50" /> <input type="submit" value="Go" class="button" /></td></tr>
<tr><td class="vbmenu_option"><a href="blogs.php?do=search" title="$vbphrase[advanced_journal_search]">$vbphrase[advanced_search]</a></td></tr>
</table>
</form>
</div>
<div class="vbmenu_popup" id="journalrate_menu" style="display:none">
<if condition="$show[voteform]">
<form action="blogs.php?do=ratejournal" method="post">
</if>
<table cellpadding="4" cellspacing="1" border="0">
<if condition="$show[voteform]">
<tr>
<td class="thead">$vbphrase[rate_this_journal]</td>
</tr>
<tr>
<td class="vbmenu_option" title="nohilite">
<div><img class="inlineimg" src="$stylevar[imgdir_rating]/rating_5.gif" alt="$vbphrase[excellent]" /><label for="vote5"><input type="radio" name="rating" value="5" />$vbphrase[excellent]</label></div>
<div><img class="inlineimg" src="$stylevar[imgdir_rating]/rating_4.gif" alt="$vbphrase[good]" /><label for="vote4"><input type="radio" name="rating" value="4" />$vbphrase[good]</label></div>
<div><img class="inlineimg" src="$stylevar[imgdir_rating]/rating_3.gif" alt="$vbphrase[average]" /><label for="vote3"><input type="radio" name="rating" value="3" />$vbphrase[average]</label></div>
<div><img class="inlineimg" src="$stylevar[imgdir_rating]/rating_2.gif" alt="$vbphrase[bad]" /><label for="vote2"><input type="radio" name="rating" value="2" />$vbphrase[bad]</label></div>
<div><img class="inlineimg" src="$stylevar[imgdir_rating]/rating_1.gif" alt="$vbphrase[terrible]" /><label for="vote1"><input type="radio" name="rating" value="1" />$vbphrase[terrible]</label></div>
</td>
</tr>
<tr>
<td class="vbmenu_option" title="nohilite" align="center">
<input type="hidden" name="j" value="$j" />
<input type="submit" class="button" value="$vbphrase[vote_now]" />
</td>
</tr>
<else />
<tr>
<td class="alt1" nowrap="nowrap"><div class="smallfont">$vbphrase[already_rated]</div></td>
</tr>
</if>
</table>
<if condition="$show[voteform]">
</form>
</if>
</div>
<!-- / NAVBAR POPUP MENUS -->
$footer
</body>

There are two instances of $post[fieldX]. You need to replace the X with the field number that you are using. Also, use radio buttons not checkboxes, as I have coded it to check for the options 'left' and 'right' all in lower case, so please ensure that the options match this exactly.

If this doesn't work, let me know and I'll have another look at it.

Rich 05-20-2006 08:13 PM

Thanks for giving this a go Kerry. I have been playing with it for a few hours now and for some reason it isn't working. I created radio buttons with the options as left and right in lower case. I also changed the field value in the code but niether column appears.

I am beginning to wonder if it has something to do with his modification.

peterska2 05-20-2006 08:17 PM

try
Code:

$userinfo[fieldx]
in place of
Code:

$post[fieldx]

Rich 05-20-2006 08:38 PM

Unfortunantly, this too is not working.

peterska2 05-20-2006 09:09 PM

It's then something to do with the journal hack and it obviously is not happy about standard conditionals. You could take out one or other of the sets and make it a fixed column for all, but I have a feeling that if standard vB conditionals, such as the ones we have tried, do not work, then getting other info in the columns using vB functions is also going to be difficult.


All times are GMT. The time now is 09:04 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01296 seconds
  • Memory Usage 1,909KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_code_printable
  • (1)bbcode_html_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete