View Full Version : Modify "Welcome Block"
apokalupsis
07-17-2004, 07:54 PM
Brian, I'm having the same troubles with the Welcome Block as I did with the Calendar. You fixed the Calendar (http://www.vbadvanced.com/forum/showthread.php?t=1849) just fine (ty). ;)
I thought I had fixed the Welcome Block, but it had troubles logging people in. So I reverted it. It's the conditionals that screw me up. I can't seem to find where to put in the code as a result.
Could you (or anyone else) help a brotha out? I'm trying to get the Welcome Block to have rounded corners just like the rest of the blocks that I have.
My site: www.myfamilycorner.net
Brian
07-17-2004, 11:04 PM
That one shouldn't be too hard...
<td class="tcat"><span class="smallfont"><strong>$vba_options[portal_blockbullet]
<if condition="$bbuserinfo['userid']">
<a href="$vboptions[bburl]/usercp.php?$session[sessionurl]">$vbphrase[user_cp]</a><else />$vbphrase[log_in]
</if></strong></span></td>
</tr>
<tr>
<td class="$getbgrow">
Needs to be changed to something like this (not the exact code since I'm being lazy and don't feel like looking for your other post, but should give you a good enough idea ;))
<td> Your Left Image Here </td>
<td class="tcat"><span class="smallfont"><strong>$vba_options[portal_blockbullet]
<if condition="$bbuserinfo['userid']">
<a href="$vboptions[bburl]/usercp.php?$session[sessionurl]">$vbphrase[user_cp]</a><else />$vbphrase[log_in]
</if></strong></span></td>
<td> Your Right Image Here </td>
</tr>
<tr>
<td class="$getbgrow" colspan="3">
apokalupsis
07-18-2004, 03:33 PM
It's very close, and that was simple nuff. But there is an alignment problem w/ the table contents. www.myfamilycorner.net
It's just slightly off to the left, and there is no border. Now I had to change the table info for the above code to work. Your code was:
<table align="center" border="0" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" class="tborder" width="100%">
I changed that to:
<table align="center" width="100%" border="0" cellpadding="0" cellspacing="0">
As it was the only way I could get it to work correctly.
However, as you can see now...the alignment is off and there is no border. I understand that class="tborder" will create that border and will align the text properly...but it also gives the border around the rounded graphics themselves.
I tried using 2 tables (that's what we did last time), but I fall back into the problem I've had before, where the title graphics are separated by white spaces, and the "tcat" image is taller than the rounded graphics.
The thread where you helped before, was linked in my first post above: "You fixed the calendar".
Ordinarily, I could just take a look at the code from the other template that had conditionals...but the calendar was different because it uses 2 templates (your's and vb's) for it to be created.
The WelcomeBack template here, may be a little similar, but it is different enough to give me a difficult time on trying to solve this seemingly easy problem.
I appreciate all your hard work and help. We are almost done, I'm sure it's just an easy fix that I've not thought of or have overlooked, and would very much be grateful for any further help you can provide.
apokalupsis
07-19-2004, 02:09 PM
btw, it displays the alignment of the table contents incorrectly in Firefox, but it has the table header correct.
In IE, the table header is screwed up.
Brian
07-19-2004, 03:22 PM
Try this and see if it looks any better. :)
<!-- Welcome / Login Block -->
<if condition="!$bbuserinfo['userid']">
<script src="$vboptions[bburl]/clientscript/vbulletin_md5.js" type="text/javascript"></script>
<form action="$vboptions[bburl]/login.php" method="post" onsubmit="md5hash(vb_login_password,vb_login_md5password)">
<input name="vb_login_md5password" type="hidden" />
<input name="s" type="hidden" value="" />
<input name="do" type="hidden" value="login" />
</if>
<if condition="!$vba_options['portal_shownavbar'] AND $bbuserinfo['userid']">
<script type="text/javascript">
<!--
function log_out()
{
ht = document.getElementsByTagName("html");
ht[0].style.filter = "progid:DXImageTransform.Microsoft.BasicImage(grayscale=1)";
if (confirm('$vbphrase[sure_you_want_to_log_out]'))
{
return true;
}
else
{
ht[0].style.filter = "";
return false;
}
}
//-->
</script>
</if>
<table align="center" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td height="22" valign="top" width="22" ><img src="http://www.myfamilycorner.net/forums/odnimg/misc/postbit/top_l.gif" alt="" width="22" height="22" /></td>
<td align="center" class="tcat" background="http://www.myfamilycorner.net/forums/odnimg/misc/postbit/top_bg.gif">$vba_options[portal_blockbullet]
<if condition="$bbuserinfo['userid']">
<a href="$vboptions[bburl]/usercp.php?$session[sessionurl]">$vbphrase[user_cp]</a><else />$vbphrase[log_in]
</if></strong></span></td>
<td width="22" valign="top"><img src="http://www.myfamilycorner.net/forums/odnimg/misc/postbit/top_r.gif" alt="" width="22" height="22" /></td>
</tr>
</table>
<table align="center" border="0" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" class="tborder" width="100%">
<tr>
<td class="$getbgrow">
<if condition="$bbuserinfo['userid']">
<span class="smallfont"><phrase 1="$bbuserinfo[username]">$vbphrase[welcome_back_x]</phrase></span><br />
<if condition="$vba_options['portal_welcome_avatar']">
<table cellpadding="3">
<tr>
<td><a href="$vboptions[bburl]/profile.php?do=editavatar"><img src="$avatarurl" border="0" alt="$vbphrase[edit_avatar]" /></a>
</td>
</tr>
</table>
</if>
<span class="smallfont"><phrase 1="$lastvisitdate" 2="$lastvisittime">$vbphrase[last_visited_x_at_y]</phrase><br />
<if condition="$vba_options['portal_welcome_newpms']"><a href="$vboptions[bburl]/private.php?$session[sessionurl]">$vbphrase[new_pms]</a>: $bbuserinfo[pmunread]<br /></if>
<if condition="$vba_options['portal_welcome_newposts']"><a href="$vboptions[bburl]/search.php?$session[sessionurl]do=getnew">$vbphrase[new_posts]</a>: $newposts<br /></if>
<a href="$vboptions[bburl]/login.php?$session[sessionurl]do=logout&u=$bbuserinfo[userid]" onclick="return log_out()">$vbphrase[log_out]</a></span>
<else />
<table width="100%">
<tr>
<td>
<span class="smallfont"><b>$vbphrase[user_name]:<br />
<input class="bginput" name="vb_login_username" size="12" type="text" /><br />
$vbphrase[password]:</b></span><br />
<input class="bginput" name="vb_login_password" size="12" type="password" /><br />
<input checked="checked" class="bginput" name="cookieuser" id="cb_cookieuser" type="checkbox" value="1" /><span class="smallfont">$vbphrase[remember_me]</span>
</td>
</tr>
<tr>
<td>
<input class="button" type="submit" value="$vbphrase[log_in]" />
</td>
</tr>
<tr>
<td>
<span class="smallfont"><phrase 1="$vboptions[bburl]">$vbphrase[not_a_member_yet_register_now]</phrase>
</span>
</td>
</tr>
</table>
</if>
</td>
</tr>
</table>
<br />
<if condition="!$bbuserinfo['userid']">
</form>
</if>
<!-- End Welcome / Login Block -->`
apokalupsis
07-19-2004, 03:53 PM
Sweetness! That was it man! Thank you so much. ;)
vBulletin® v3.8.4, Copyright ©2000-2012, Jelsoft Enterprises Ltd.