View Full Version : News Container
Ian Gordon
06-05-2004, 12:01 AM
I don't want the news to appear as separate blocks, I want to group them under a module called news, how can I do that, here is what I mean:
[News Module]
News Item One Title
Text here and over here and don't forget here
-----------------------------------------------
News Item Two Title
Text here and over here and don't forget here
-----------------------------------------------
News Item Three Title
Text here and over here and don't forget here
[END OF NEWS MODULE]
ogetbilo
06-05-2004, 12:09 AM
news module is already one module.
if you do not want a seperation between two news, just erase the <br/> at the end of the adv_portal_newsbits template. I am not sure I understood your problem
Ian Gordon
06-05-2004, 02:29 AM
I want to change the News module into something different, I have created two images to help illustrate what I mean, look at the one of before, what the news module looks like by default and then what I am trying to turn it into...
Before
http://www.ian-gordon.net/example/before.gif
After
http://www.ian-gordon.net/example/after.gif
Any help would be greatly appreciated :D
ogetbilo
06-05-2004, 05:59 AM
try this
replace the contents of the vba_portal_newsbits module with this (if you don't like it you can always revert).
<table align="center" border="0" class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" width="100%">
<tr>
<td align="$stylevar[left]" class="alt1">
<if condition="$news['subscribed']">
<span style="float:$stylevar[right]"><img alt="" class="inlineimg" src="$stylevar[imgdir_misc]/subscribed.gif" title="$vbphrase[you_are_subscribed_to_this_thread]" /> </span>
</if>
<if condition="$show['threadicon']">
<img alt="" border="0" src="$news[threadiconpath]" title="$news[threadicontitle]" />
</if>
<strong><a href="$vboptions[bburl]/showthread.php?t=$news[threadid]">$news[title]</a></strong>
</td>
</tr>
<tr>
<td align="$stylevar[left]" class="alt1" border="0" valign="top">
<if condition="$vba_options['portal_news_showavatar'] AND $newsavatarurl">
<table align="$stylevar[left]" cellspacing="4"><tr><td><img alt="" border="0" src="$newsavatarurl" title="$news[postusername]'s $vbphrase[a_avatar]" /></td></tr></table>
</if>
$news[message]
<if condition="$show['signature']">
<div>__________________<br />
$news[signature]</div>
</if>
</td>
</tr>
<if condition="$news['attachmentid']">
<tr class="alt1">
<td>
<fieldset class="fieldset">
<legend>Attached Files</legend>
<table>
$attachment
</table>
</fieldset>
</td>
</if>
<td align="right" border="0" class="alt1">
<if condition="$vba_options['portal_news_showrating'] AND $news['votenum'] > 0">
<span style="float:$stylevar[right]"><img alt="" src="$stylevar[imgdir_rating]/rating_$news[rating].gif" title="<phrase 1="$news[votenum]" 2="$news[voteavg]">$vbphrase[thread_rating_x_votes_y_average]</phrase>" /></span>
</if>
<span class="smallfont">- <phrase 1="$vboptions[bburl]/member.php?$session[sessionurl]u=$news[postuserid]" 2="$news[postusername]">$vbphrase[by_x]</phrase> $dateposted</span>
</td>
</tr>
</table>
Ian Gordon
06-05-2004, 01:45 PM
Your halfway there, except, I want it to appear under the block titled "News" like in my example. I do want to thank you for this code, though, helps me in my efforts :D
Brian
06-05-2004, 08:43 PM
How's this? :)
<table align="center" border="0" class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" width="100%">
<if condition="$counter == 1">
<tr>
<td class="tcat">News</td>
</tr>
</if>
<tr>
<td align="$stylevar[left]" class="alt1">
<if condition="$news['subscribed']">
<span style="float:$stylevar[right]"><img alt="" class="inlineimg" src="$stylevar[imgdir_misc]/subscribed.gif" title="$vbphrase[you_are_subscribed_to_this_thread]" /> </span>
</if>
<if condition="$show['threadicon']">
<img alt="" border="0" src="$news[threadiconpath]" title="$news[threadicontitle]" />
</if>
<strong><a href="$vboptions[bburl]/showthread.php?t=$news[threadid]">$news[title]</a></strong>
</td>
</tr>
<tr>
<td align="$stylevar[left]" class="alt1" border="0" valign="top">
<if condition="$vba_options['portal_news_showavatar'] AND $newsavatarurl">
<table align="$stylevar[left]" cellspacing="4"><tr><td><img alt="" border="0" src="$newsavatarurl" title="$news[postusername]'s $vbphrase[a_avatar]" /></td></tr></table>
</if>
$news[message]
<if condition="$show['signature']">
<div>__________________<br />
$news[signature]</div>
</if>
</td>
</tr>
<if condition="$news['attachmentid']">
<tr class="alt1">
<td>
<fieldset class="fieldset">
<legend>Attached Files</legend>
<table>
$attachment
</table>
</fieldset>
</td>
</if>
<td align="right" border="0" class="alt1">
<if condition="$vba_options['portal_news_showrating'] AND $news['votenum'] > 0">
<span style="float:$stylevar[right]"><img alt="" src="$stylevar[imgdir_rating]/rating_$news[rating].gif" title="<phrase 1="$news[votenum]" 2="$news[voteavg]">$vbphrase[thread_rating_x_votes_y_average]</phrase>" /></span>
</if>
<span class="smallfont">- <phrase 1="$vboptions[bburl]/member.php?$session[sessionurl]u=$news[postuserid]" 2="$news[postusername]">$vbphrase[by_x]</phrase> $dateposted</span>
</td>
</tr>
</table>
Ian Gordon
06-06-2004, 12:13 AM
Actually I mean exactly like this, i know you can't do it without including the newsbit into a seperate template but, I am looking to make it just like this:
http://www.ian-gordon.net/example/newsbit.gif
Please look at it very carefully...the news container is not included in each newsbit include...they are separate...
Brian
06-06-2004, 11:01 AM
I'm not sure I see the problem... With what I posted, you should only see the heading 'News' section before the first post. Is there something else I'm missing?
Ian Gordon
06-06-2004, 02:35 PM
ok, I am sorry I wasn't clear. Here is an example of the seperated templates, I am trying to turn into the news module.
This is the news module without any news in it, this would show regardless if the $newsbit didn't have any data in it:
http://www.ian-gordon.net/example/newsbit_a.gif
now this is the newsbit that I want to repeat inside the news module container:
http://www.ian-gordon.net/example/newsbit_b.gif
To make this one work, I think I would have to use DIVs with bottom borders for the divs, 3 I think would be fine.
Clear?
ogetbilo
06-06-2004, 02:58 PM
Brian's code should do the trick. (except it won't show the window if there are no news)
Ian Gordon
06-06-2004, 06:11 PM
I guess, I will just have to try and use CSS to get the desired effect for the bottom borders...
ogetbilo
06-07-2004, 07:35 AM
you can pass a frame="below" attribute to the table for the last news item :)
Ian Gordon
06-07-2004, 02:15 PM
frames are messy, don't want to use them...
apokalupsis
08-10-2004, 02:11 AM
I'm getting there, but I'm still having trouble with this.
Check out: http://www.myfamilycorner.net/?styleid=14
Problems:
not outlined like the rest of the blocks
text is not w/i the boundries of the table (it slightly extends outside the left/right borders)
I'm not sure where to put my end box table (see the bottom of all the other blocks on the page to see the difference)...which uses this code:
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="12" height="19"><img src="$vboptions[bburl]/odnimg/misc/catfoot_l.gif" alt="" /></td>
<td width="100%" background="$vboptions[bburl]/odnimg/misc/catfoot_bg.gif"></td>
<td width="12" height="19"><img src="$vboptions[bburl]/odnimg/misc/catfoot_r.gif" alt="" /></td>
</tr>
</table>
<div style="padding: 5px 5px 5px 5px;"></div>
Here is the current code in the adv_portal_newsbits template:
<table align="center" border="0" cellpadding="0" cellspacing="0" width="100%">
<if condition="$counter == 1">
<tr>
<td height="22" valign="top" width="22" $scrolltothis><img src="$vboptions[bburl]/odnimg/misc/postbit/top_l.gif" alt="" width="22" height="22" /></td>
<td align="$stylevar[left]" class="tcat" background="$vboptions[bburl]/odnimg/misc/postbit/top_bg.gif">
<strong><center>ODN News</center></strong>
</td>
<td width="22" valign="top"><img src="$vboptions[bburl]/odnimg/misc/postbit/top_r.gif" alt="" width="22" height="22" /></td>
</tr></table></if>
<table align="center" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td align="$stylevar[left]" class="alt2">
<if condition="$news['subscribed']">
<span style="float:$stylevar[right]"><img alt="" class="inlineimg" src="$stylevar[imgdir_misc]/subscribed.gif" title="$vbphrase[you_are_subscribed_to_this_thread]" /> </span>
</if>
<if condition="$show['threadicon']">
<img alt="" border="0" src="$news[threadiconpath]" title="$news[threadicontitle]" />
</if>
<strong><a href="$vboptions[bburl]/showthread.php?t=$news[threadid]">$news[title]</a></strong>
</td>
</tr>
<tr>
<td align="$stylevar[left]" class="alt2" border="0" valign="top">
<if condition="$vba_options['portal_news_showavatar'] AND $newsavatarurl">
<table align="$stylevar[left]" cellspacing="4"><tr><td><img alt="" border="0" src="$newsavatarurl" title="$news[postusername]'s $vbphrase[a_avatar]" /></td></tr></table>
</if>
$news[message]
<if condition="$show['signature']">
<div>__________________<br />
$news[signature]</div>
</if>
</td>
</tr>
<if condition="$news['attachmentid']">
<tr class="alt1">
<td>
<fieldset class="fieldset">
<legend>Attached Files</legend>
<table>
$attachment
</table>
</fieldset>
</td>
</if>
<td align="right" border="0" class="alt1">
<if condition="$vba_options['portal_news_showrating'] AND $news['votenum'] > 0">
<span style="float:$stylevar[right]"><img alt="" src="$stylevar[imgdir_rating]/rating_$news[rating].gif" title="<phrase 1="$news[votenum]" 2="$news[voteavg]">$vbphrase[thread_rating_x_votes_y_average]</phrase>" /></span>
</if>
<span class="smallfont">- <phrase 1="$vboptions[bburl]/member.php?$session[sessionurl]u=$news[postuserid]" 2="$news[postusername]">$vbphrase[by_x]</phrase> $dateposted</span>
</td>
</tr>
</table>
apokalupsis
08-22-2004, 04:19 AM
anyone? anyone?
vBulletin® v3.8.4, Copyright ©2000-2012, Jelsoft Enterprises Ltd.