View Full Version : Easy way to create nice looking news page.
web-rocket
01-13-2007, 09:31 PM
Ok guys here it the fastest way to to add an attached image to the top left on your vbadvanced site in the news section.... Example: www.talkpaws.com
EDIT THE (adv_portal_newsbits) erase everything and just paste this in...
Works great from 3.5 to 3.6X all
<if condition="!$mod_options['portal_news_legacy']">
<tr>
<td class="thead"><if condition="$mod_options['portal_news_showicon']">$vba_style[portal_blockbullet]</if> <a href="$vboptions[bburl]/showthread.php?t=$news[threadid]">$news[title]</a></td>
</tr>
</if>
<tr>
<td class="<if condition="$mod_options['portal_news_legacy']">thead<else />alt2</if>">
<if condition="$mod_options['portal_news_showrating'] AND $news['votenum']">
<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>
$news[dateposted] - <phrase 1="$vboptions[bburl]/member.php?$session[sessionurl]u=$news[postuserid]" 2="$news[postusername]">$vbphrase[by_x]</phrase>
</td>
</tr>
<tr>
<td align="$stylevar[left]" class="alt1" valign="top">
<if condition="$news['avatarpath']">
<img align="$stylevar[left]" style="padding:6px" alt="" border="0" src="$news[avatarpath]" title="$news[postusername]'s $vbphrase[avatar]" />
</if>
<if condition="$news['attachment']">
<span style="float: left; margin: $stylevar[cellpadding]px $stylevar[cellpadding]px $stylevar[cellpadding]px 0px">
$news[attachment]
</span>
</if>
$news[message]
<if condition="$show['signature']">
<div>__________________<br />
$news[signature]</div>
</if>
</td>
</tr>
<tr class="alt2" valign="middle">
<td valign="middle">
<span style="float:right">
<if condition="$show['editbutton']">
<a href="$vboptions[bburl]/editpost.php?$session[sessionurl]do=editpost&p=$news[postid]"><img alt="$vbphrase[edit_this_post]" border="0" src="$stylevar[imgdir_button]/edit.gif" /></a>
</if>
<if condition="$show['replybutton']">
<a href="$vboptions[bburl]/newreply.php?$session[sessionurl]do=newreply&t=$news[threadid]"><img alt="$vbphrase[reply_to_this_post]" border="0" src="$stylevar[imgdir_button]/reply_small.gif" /></a>
</if>
<if condition="$mod_options['portal_news_showsendfriend']">
<a href="$vboptions[bburl]/sendmessage.php?$session[sessionurl]do=sendtofriend&t=$news[threadid]"><img alt="" border="0" src="$stylevar[imgdir_button]/sendtofriend.gif" title="$vbphrase[send_to_friend]" /></a>
</if>
<if condition="$mod_options['portal_news_showprintable']">
<a href="$vboptions[bburl]/printthread.php?$session[sessionurl]t=$news[threadid]"><img alt="" border="0" src="$stylevar[imgdir_button]/printer.gif" title="$vbphrase[show_printable_version]" /></a>
</if>
</span>
<span class="smallfont">
<if condition="$mod_options['portal_news_allowreplies']">$news[replycount] <if condition="$news['replycount'] == 1">$vbphrase[reply]<else />$vbphrase[replies]</if> | </if> $news[views] $vbphrase[views]</span>
</td>
</tr>
Webrocket,
You are my hero.
This is how I like to do things.
By the way, your site is smooth.
Where did you get your skin from.
Please Halla back
shaffer
02-10-2007, 06:24 PM
Great script. Thanks!
I am having 1 problem though. When i am logged out, the picture does not appear. It shows an image icon, image name and this "(0, 0 views)"
I am using Vb 3.5.
andrewtr89
02-13-2007, 09:33 AM
Hello,
Does this work on 3.6.4? I tried installing it, but the instructions are a bit above my level of knowledge. If anyone can help I'd be greatly appreciative.
Thanks,
Andrew
chkdg8
02-13-2007, 02:45 PM
Try to follow these directions here (http://www.vbadvanced.com/forum/showthread.php?t=19758).
FHmania
02-18-2007, 02:42 PM
Ok guys here it the fastest way to to add an attached image to the top left on your vbadvanced site in the news section.... Example: www.talkpaws.com
EDIT THE (adv_portal_newsbits) erase everything and just paste this in...
Works great from 3.5 to 3.6X all
<if condition="!$mod_options['portal_news_legacy']">
<tr>
<td class="thead"><if condition="$mod_options['portal_news_showicon']">$vba_style[portal_blockbullet]</if> <a href="$vboptions[bburl]/showthread.php?t=$news[threadid]">$news[title]</a></td>
</tr>
</if>
<tr>
<td class="<if condition="$mod_options['portal_news_legacy']">thead<else />alt2</if>">
<if condition="$mod_options['portal_news_showrating'] AND $news['votenum']">
<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>
$news[dateposted] - <phrase 1="$vboptions[bburl]/member.php?$session[sessionurl]u=$news[postuserid]" 2="$news[postusername]">$vbphrase[by_x]</phrase>
</td>
</tr>
<tr>
<td align="$stylevar[left]" class="alt1" valign="top">
<if condition="$news['avatarpath']">
<img align="$stylevar[left]" style="padding:6px" alt="" border="0" src="$news[avatarpath]" title="$news[postusername]'s $vbphrase[avatar]" />
</if>
<if condition="$news['attachment']">
<span style="float: left; margin: $stylevar[cellpadding]px $stylevar[cellpadding]px $stylevar[cellpadding]px 0px">
$news[attachment]
</span>
</if>
$news[message]
<if condition="$show['signature']">
<div>__________________<br />
$news[signature]</div>
</if>
</td>
</tr>
<tr class="alt2" valign="middle">
<td valign="middle">
<span style="float:right">
<if condition="$show['editbutton']">
<a href="$vboptions[bburl]/editpost.php?$session[sessionurl]do=editpost&p=$news[postid]"><img alt="$vbphrase[edit_this_post]" border="0" src="$stylevar[imgdir_button]/edit.gif" /></a>
</if>
<if condition="$show['replybutton']">
<a href="$vboptions[bburl]/newreply.php?$session[sessionurl]do=newreply&t=$news[threadid]"><img alt="$vbphrase[reply_to_this_post]" border="0" src="$stylevar[imgdir_button]/reply_small.gif" /></a>
</if>
<if condition="$mod_options['portal_news_showsendfriend']">
<a href="$vboptions[bburl]/sendmessage.php?$session[sessionurl]do=sendtofriend&t=$news[threadid]"><img alt="" border="0" src="$stylevar[imgdir_button]/sendtofriend.gif" title="$vbphrase[send_to_friend]" /></a>
</if>
<if condition="$mod_options['portal_news_showprintable']">
<a href="$vboptions[bburl]/printthread.php?$session[sessionurl]t=$news[threadid]"><img alt="" border="0" src="$stylevar[imgdir_button]/printer.gif" title="$vbphrase[show_printable_version]" /></a>
</if>
</span>
<span class="smallfont">
<if condition="$mod_options['portal_news_allowreplies']">$news[replycount] <if condition="$news['replycount'] == 1">$vbphrase[reply]<else />$vbphrase[replies]</if> | </if> $news[views] $vbphrase[views]</span>
</td>
</tr>
Ive done this and works well. But however, I still could not figure out how to get the following working :
- how to show the replies/views count?
-how to show the send message and print hread icons?
Appreciate any kind soul could assist. TIA:)
Blackhat
03-03-2007, 10:09 PM
How come I just get the link to the picture and not a thumbnail ?
bacaneria
04-27-2007, 03:43 AM
does this work with 3.6.4???
bacaneria
04-27-2007, 04:07 AM
Ok guys here it the fastest way to to add an attached image to the top left on your vbadvanced site in the news section.... Example: www.talkpaws.com
EDIT THE (adv_portal_newsbits) erase everything and just paste this in...
Works great from 3.5 to 3.6X all
<if condition="!$mod_options['portal_news_legacy']">
<tr>
<td class="thead"><if condition="$mod_options['portal_news_showicon']">$vba_style[portal_blockbullet]</if> <a href="$vboptions[bburl]/showthread.php?t=$news[threadid]">$news[title]</a></td>
</tr>
</if>
<tr>
<td class="<if condition="$mod_options['portal_news_legacy']">thead<else />alt2</if>">
<if condition="$mod_options['portal_news_showrating'] AND $news['votenum']">
<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>
$news[dateposted] - <phrase 1="$vboptions[bburl]/member.php?$session[sessionurl]u=$news[postuserid]" 2="$news[postusername]">$vbphrase[by_x]</phrase>
</td>
</tr>
<tr>
<td align="$stylevar[left]" class="alt1" valign="top">
<if condition="$news['avatarpath']">
<img align="$stylevar[left]" style="padding:6px" alt="" border="0" src="$news[avatarpath]" title="$news[postusername]'s $vbphrase[avatar]" />
</if>
<if condition="$news['attachment']">
<span style="float: left; margin: $stylevar[cellpadding]px $stylevar[cellpadding]px $stylevar[cellpadding]px 0px">
$news[attachment]
</span>
</if>
$news[message]
<if condition="$show['signature']">
<div>__________________<br />
$news[signature]</div>
</if>
</td>
</tr>
<tr class="alt2" valign="middle">
<td valign="middle">
<span style="float:right">
<if condition="$show['editbutton']">
<a href="$vboptions[bburl]/editpost.php?$session[sessionurl]do=editpost&p=$news[postid]"><img alt="$vbphrase[edit_this_post]" border="0" src="$stylevar[imgdir_button]/edit.gif" /></a>
</if>
<if condition="$show['replybutton']">
<a href="$vboptions[bburl]/newreply.php?$session[sessionurl]do=newreply&t=$news[threadid]"><img alt="$vbphrase[reply_to_this_post]" border="0" src="$stylevar[imgdir_button]/reply_small.gif" /></a>
</if>
<if condition="$mod_options['portal_news_showsendfriend']">
<a href="$vboptions[bburl]/sendmessage.php?$session[sessionurl]do=sendtofriend&t=$news[threadid]"><img alt="" border="0" src="$stylevar[imgdir_button]/sendtofriend.gif" title="$vbphrase[send_to_friend]" /></a>
</if>
<if condition="$mod_options['portal_news_showprintable']">
<a href="$vboptions[bburl]/printthread.php?$session[sessionurl]t=$news[threadid]"><img alt="" border="0" src="$stylevar[imgdir_button]/printer.gif" title="$vbphrase[show_printable_version]" /></a>
</if>
</span>
<span class="smallfont">
<if condition="$mod_options['portal_news_allowreplies']">$news[replycount] <if condition="$news['replycount'] == 1">$vbphrase[reply]<else />$vbphrase[replies]</if> | </if> $news[views] $vbphrase[views]</span>
</td>
</tr>
THIS WORKSSS GREAT FOR ME A LOT EASIER TOO. Thanks Bro!!!
beduino
05-04-2007, 09:28 AM
tks a lot!
joao barroca
aka beduino
easiER way:
http://www.vbadvanced.com/forum/showpost.php?p=80459&postcount=2
nostalgia
06-21-2007, 11:08 PM
Great!! Thanks.
arisythila
06-25-2007, 10:18 PM
Very nice.
tresor
08-28-2007, 07:07 PM
Is this working with 3.6.8?
fsbmax
09-05-2007, 12:55 PM
is there a way to set the image size as default, like 0 so it just shows the images original size?
fsbmax
09-05-2007, 01:04 PM
nevermind i got it
dancongnghe
09-22-2007, 09:51 PM
Đẹp đấy anh ạ,
nhưng cái đó sử dụng pages riêng hay hiện thị luôn lên trang chủ
Oday2912
11-25-2007, 05:34 PM
How do you edit adv_portal_newsbits
kokoko
08-20-2008, 03:59 AM
wow it is helpful thread
skuba
10-16-2008, 05:19 PM
Hi,
I don't understand. There is no option to upload attachments with news.
Are we supposed to use forum messages as news?
Thanks
PhilMcKrackon
10-16-2008, 06:16 PM
Take a look at the front page at the site in my sig. Check out the 'Jeep Trailhawk' section, that is actually a forum post, could easily be a news post. It is all done with careful custom bbcodes. The images are directly from my gallery and resized, alt tagged, aligned and if needed borderd.
Here is the first paragraph from the thread with the custom bbcode The vehicle's upper structure is set onto the lower body, encased by a crisp, chamfered 360-degree molding that runs around the greenhouse, accenting the high, arching beltline.
At the base of the windshield is a seven-slot cowl
right0 http://www.jeep-cj.com/gallery/files/1/jeep_trailhawk_2.jpg 200 165 Jeep Tailhawk
screen that reprises the grille.
The body is painted in Argent Pearl high-gloss, with the flares and lower body a slightly darker low-gloss variant.
I use tables, I just created custom bbcodes for the table html. Such as right = <table align="right"
100 = width="100"
1 = border="1"
test.jpg = <img src="test.jpg"
= />
Jeep CJ = alt="Jeep CJ"
= </td></tr></table> and so on.
skuba
10-17-2008, 01:19 PM
That looks good. But I need some friendlier. The people that would help me wound't be able to learn how to use this. I know it's easy for us. But I need to offer something as easy as let's say posting a blog post on myspace. Maybe vbadvanced isn't the tool for that and I need to look for another solution.
Suggestions?
Thanks
PhilMcKrackon
10-17-2008, 01:27 PM
That looks good. But I need some friendlier. The people that would help me wound't be able to learn how to use this. I know it's easy for us. But I need to offer something as easy as let's say posting a blog post on myspace. Maybe vbadvanced isn't the tool for that and I need to look for another solution.
Suggestions?
ThanksI posted the individual bbcodes that I use. I also made up some simple ones that I let others use.
Ex - bbcode = insert table left align, as an option the users can add a image resize if they want. Ex - [lft]test.jpg[lft] would insert the image in a table using left align with no resize. [lft=200]test.jpg would do the same except resize the image to 200x200.
I made [lft], [rght] and [cntr] for my regular bbcodes. You can get very creative with bbcode if you like.
Just a thought...
PhilMcKrackon
10-17-2008, 07:43 PM
I reread my last post and I thought I might try clearing it up a bit.
I create several bbcodes for easy image resizing and creation in tables for my users.
EX - image.jpg The tr200 is short for 'table right 200 width', and the =400 sets the height of the image.
The BBcode actually parses to
<table align="right" border="0"><tr><td><img src="image.jpg" width="200"
height="400" alt="image.jpg"/></td></tr></table>
by using the replacement as follows.
<table align="right" border="0"><tr><td><img src="{param}"
width="200" height="{option}" alt="{param}"/></td></tr></table>
So, my users can easily insert an image left, right or center justified by using any combination of the 't' codes.
They are :
tr50, tr100, tr150, tr200, and tr250 (table align right)
tl50, tl100, tl150, tl200, and tl250 (table align left)
tc50, tc100, tc150, tc200, and tc250 (table align center)
So, to place an image on the left and make it 150x225 they would use:image.jpg
the BBCode automatically formats all the table code using the width and height specified and also even puts in an 'alt' tag for SEO... :)
BuCwiLd
10-22-2008, 01:08 AM
alexandro, i cannot figure it out. would you be able to install it for me for a small fee? thanks just pm or email me. thanks
UltraBull
11-01-2008, 09:00 AM
This not works anymore with vBaCMPS 3.00. I dont get it why Brian not put this as a standard feature in the portal its a huge loss
Warning: array_merge() [function.array-merge]: Argument #1 is not an array in [path]/includes/vba_cmps_include_top.php on line 609
Warning: array_merge() [function.array-merge]: Argument #2 is not an array in [path]/includes/vba_cmps_include_top.php on line 609
msrobin
01-09-2009, 11:21 PM
Can anyone update this? This hack is old! or is there any alternative to this?
Thank you!
DanUK
05-12-2009, 09:43 AM
did anyone get this working on CMPS v3.1.0
It's not working on vbcmps 3.2.0
Warning: array_merge() [function.array-merge]: Argument #1 is not an array in [path]/includes/vba_cmps_include_top.php on line 681
Warning: array_merge() [function.array-merge]: Argument #2 is not an array in [path]/includes/vba_cmps_include_top.php on line 681
vba_cmps_include_top.php
$portal_options = array_merge($cmps_options['adv_portal_main'], $cmps_options['adv_global']);
and show message: Invalid Page Specified
please help
vBulletin® v3.8.4, Copyright ©2000-2012, Jelsoft Enterprises Ltd.