View Full Version : Image Uber Friendly Front Page News Displaying Template
Alex@i-Club
06-08-2004, 04:08 AM
I always wanted to have the news on the front page look better, so I modded the adv_portal_newsbits template to display attachment in a front page specific way. Looks much cleaner, I think. I am attaching the text file. Remember, that you might need to modify one of the table widths to whatever width you want your attachment thumbnails to be displayed. I am using 300 pixles. It displays them nicely on the left side if they are present and displays news in a normal fasion if they are not there.
I am pretty new to all of this so if you see something I did wrong, please let me know. Also, I was wondering if there is any way to make the text wrap under the thumbnail, if the post is long enough. I tried using the $attachment call as an image and have the text be alligned at its top, but something is causing the align="top" to be "pushed" into becoming text. Oh well. Please let me know if there is a way of doing it so.
Hope someone finds this usefull. ;)
Brian
06-08-2004, 11:33 AM
Nice mod. :)
ptourvi1@twcny.
06-08-2004, 11:35 PM
Yes, thank you very much, I was looking for something like this.. :D
Ras Masta
06-09-2004, 06:35 PM
Wow looks awesome dude. Great job.
mholtum
06-09-2004, 07:10 PM
So you just replace the current text in the template with this new code and you are set, correct?
mholtum
06-09-2004, 07:12 PM
where do I find the original?
ptourvi1@twcny.
06-09-2004, 08:55 PM
where do I find the original?
lol I couldn't find it at first either, it's under vbcmps advance templates, or you can search templates for it in the admincp
Alex@i-Club
06-09-2004, 09:00 PM
adv_portal_newsbits template is in your VbAdvanced template sub-folder under styles.
Alex@i-Club
06-09-2004, 09:01 PM
And yes, you just replace the contents of your original one. Save the bits from your original one just in case and remember, that you might need to change something in my version.
mholtum
06-09-2004, 09:07 PM
Ok I found it and it worked, except for the fact that ip placed all the users signatures outside the blocks
Alex@i-Club
06-09-2004, 11:31 PM
Oh, I have sigs disabled, so I didn't check that.
Let me play with it and I will fix it and update the tread.
mholtum
06-10-2004, 01:14 AM
sweet thanks
Kengan
06-12-2004, 10:55 PM
cool mod man !! thanks !
Kengan
06-13-2004, 09:33 AM
Thanks man I have just changed . it looks cool !
bandit
07-02-2004, 11:48 AM
Remember, that you might need to modify one of the table widths to whatever width you want your attachment thumbnails to be displayed. I am using 300 pixles. It displays them nicely on the left side if they are present and displays news in a normal fasion if they are not there.
so, how exactly do i modify the table width like you said?
is it in a template, or just a value in the admincp vba options?
thanks,
-jeff
mholtum
07-03-2004, 03:43 AM
Oh, I have sigs disabled, so I didn't check that.
Let me play with it and I will fix it and update the tread.Fix it yet so I can use this?
Merjawy
07-03-2004, 07:15 PM
Very nice indeed. install it and looks cool
ofcourse I already do not allow sig in news.. but I use avatar and the avatar sitting up there alone doesn't look good :) so I just disabled the use of avatar.
Fix it yet so I can use this?
just disable signature in news from CMPS Default settings.. most are doing that as you really don't want the sig to change the layout.. like me the news forum is not really news forum and anyone can post in it.. so I just disabled the sig all together
also if you wanna make it little nicer..
find valign="top" change it to valign="middle" :)
change this
<if condition="$news['attachmentid']">
<tr class="alt1">
<td valign="top">
$attachment
</td>
to this
<if condition="$news['attachmentid']">
<tr class="alt1">
<td valign="middle">
$attachment
</td>
This will place the attachment in middle rather than the top leaving alot of space under it if the news artical is long :)
mholtum
07-04-2004, 02:45 PM
Remember, that you might need to modify one of the table widths to whatever width you want your attachment thumbnails to be displayed. I am using 300 pixles. Where would I do this?
mholtum
07-04-2004, 07:58 PM
Anyone?
Jason McConnell
07-05-2004, 09:10 PM
This sounds like a very kewl hack... and I'd like to use it but I have a problem with uploading attachments. Off to vBulletin I go :D
Jason McConnell
07-09-2004, 08:29 AM
Got it working :D Thanks!
have a look at my first post : how can i fix this ?
www.battlefiels2.us
banjolawyer
07-17-2004, 05:03 PM
Would anyone take a look at www.78749.org and take a guess at why my news attachment is showing up as a link at the top of the news article?
DarknessDivine
07-17-2004, 07:04 PM
I would believe it's because it's a link to the actual post...click it and you'll go to the forum the news is posted in..
banjolawyer
07-17-2004, 07:24 PM
I would believe it's because it's a link to the actual post...click it and you'll go to the forum the news is posted in..
When I click it, the photo is displayed by itself in its own browser. It should be displaying the photo on the homepage next to the news. I can't think of anything I did wrong.. I just copyied the template over.
banjolawyer
07-17-2004, 10:25 PM
I see that the author of the mod is experiencing the same thing on his site
http://www.i-club.com/
It looks like the original mod may have been prior to vBa 1.0.0, so maybe its just a problem after upgrading to vBa 1.0.0
I sure can't figure it out.
banjolawyer
07-18-2004, 06:04 PM
I'm going to go ahead and revert back to the original template and monitor this thread for a fix.
juanchi
07-19-2004, 12:23 PM
I see that the author of the mod is experiencing the same thing on his site
http://www.i-club.com/
It looks like the original mod may have been prior to vBa 1.0.0, so maybe its just a problem after upgrading to vBa 1.0.0
I sure can't figure it out.
I'm guessing but I thing the problem might be related to permissions, if you register you can see the pictures and not the links, so I think you have to change permisions for unregisters users in regards to thumbnails and that should fix it.
mholtum
07-19-2004, 12:28 PM
You would be right, you have to enable guests to view attachments
Chief Corn
07-19-2004, 12:59 PM
http://www.treethugs.com
well just finished my site over the weekend. i installed this template mod with some color fixes, but when i don't post an attachment the post text shows above the title. i removed the avatar cell, and i noticed there are 2 cells with $news[message] but don't understand why it goes above the title when there's no attachment. i attached my template if anybody can help?
tfw2005
08-24-2004, 06:14 PM
Anyone figure out why this is jacked? I have a safemode restriction right now preventing me from showing inline images, could that be it? Using RC3 and VBA 1.0.0. Test forum setup now, Safemode shouldnt be an issue later.
Would really appreciate the help if anyone can, If I cant get this to work I have to scrap using VBA completely, cant revert to non-image newsposts again.
mholtum
08-25-2004, 03:56 AM
weird no problems here with CMPS 1.0.0 & VB 3.0.3
Armed Weasel
08-28-2004, 11:34 PM
Can anyone give me a hand with my setup. I am having a problem that someone else also had and i can't seem to figure it out either. Can anyone lead me a hand. My test site is http://www.forum.xtreme-systems.net/ Thanks folks
Samir
09-07-2004, 09:00 PM
Also, I was wondering if there is any way to make the text wrap under the thumbnail, if the post is long enough.
I messed around with the resulting html a bit and found out there is an option call "align=left" on the img tag that causes the text to wrap around the graphic. I don't know exactly how to implement it yet. There's also a way to do it through CSS. Check out the attachment. Rename it to a .html. I couldn't upload the file as a txt as it was larger than the limit. :rolleyes:
Mellow
09-07-2004, 10:09 PM
Got It!!!!
in adv_portal_newsbits:
find:
<if condition="$news['attachmentid']">
<tr class="alt1">
<td valign="top">
$attachment
</td>
<td align="justify" width="100%" valign="top">
$news[message]
</td>
</tr>
<else />
$news[message]
</if>
replace with:
<if condition="$news['attachmentid']">
<tr class="alt1">
<td align="justify" width="100%">
<table border="0" align="left"
valign="top">
<tr>
<td>$attachment</td>
</tr>
</table>
$news[message]
</td>
</tr>
<else />
$news[message]
</if>
This is my first contribution so I hope it works for everyone.
Samir
09-08-2004, 02:58 AM
Yes! That looks sweet! Anyone got it up on a demo/live site yet? I just wanna see it in action.
iliton
09-13-2004, 08:47 AM
help me ...
cant find a bug,
on the main page vbaCMPS my attachment looks as link,
but in a forum (SHOWTHREAD) attachment looks as image...
mholtum
09-13-2004, 08:58 AM
help me ...
cant find a bug,
on the main page vbaCMPS my attachment looks as link,
but in a forum (SHOWTHREAD) attachment looks as image... Check to make sure that everyone viewing your site has the rights to view the images. Guests/registered/everyone.
mholtum
09-13-2004, 09:05 AM
clord gave me this code:
<img src="IMAGE.GIF" align="left" border="0" hspace="5" vspace="5">Your post here.
Make sure that HTML is turned on.
iliton
09-13-2004, 11:22 AM
Make sure that HTML is turned on.???
ON? you shure?
i think it must be OFF!
mholtum
09-13-2004, 11:47 AM
If you use the code I gave you, which is html, and you have it turned off it wont work... Check and see, what could it hurt? I ahve been up all night, I could be wrong.. :)
iliton
09-14-2004, 04:26 AM
if i turn HTML is ON, for what then this hack??
or i have not understood something again :)
(sorry for my english, my native language is russian)
Got It!!!!
in adv_portal_newsbits:
find:
<if condition="$news['attachmentid']">
<tr class="alt1">
<td valign="top">
$attachment
</td>
<td align="justify" width="100%" valign="top">
$news[message]
</td>
</tr>
<else />
$news[message]
</if>
replace with:
<if condition="$news['attachmentid']">
<tr class="alt1">
<td align="justify" width="100%">
<table border="0" align="left"
valign="top">
<tr>
<td>$attachment</td>
</tr>
</table>
$news[message]
</td>
</tr>
<else />
$news[message]
</if>
This is my first contribution so I hope it works for everyone.
Man, I love this hack! It really makes it looks more like a cms. And especially with this improved layout from Mellow it's now exactly the way I like it :D
firus
10-08-2004, 12:08 AM
Unregistered users can download attachments on my news forum, but i still get a link (although the latest fix posted made the link show up in the right spot :) )
firus
10-08-2004, 12:48 AM
NVM!! Enabling thumbnails fixed it
Briskoda
10-08-2004, 06:47 AM
Firus,
Anything else you have done?
Thus far I have use the base template with mellow's alteration.
I have thumbs enabled and can see thumbs in the news forumdisplay, but it presents a link as you described in the right place on my news page.
Link:
http://www.briskoda.net/?page=MotorSportnews&styleid=29 About half way down there is a news item with an attachment.
Any ideas?
The code that $attachment is generating is this:
<tr>
<td><img class="inlineimg" src="http://www.briskoda.net/forums/images-plasma/attach/jpg.gif" alt="File Type: jpg" width="16" height="16" border="0" style="vertical-align:baseline" /></td>
<td><a href="http://www.briskoda.net/forums/attachment.php?attachmentid=1949" target="_blank">010904-a-msv%2B.jpg</a> (47.9 KB, 40 views)</td>
</tr>
Scott_H
10-16-2004, 09:44 PM
Hello guys, just looking around to see what's new, found this thread an wanted to add to it. Looks like you guys have a real mess with this one. Well I think I have done what you guys are after. Each news has a image based on what forum it's from, am I right? Or did you want an attachment image to show as the news image. Well I can't help you if you want an attachment image to show up, but I can if you want an image based on the forum it's from. I took a screenshot from my cmps index page I've been working on. Still have stuff to play with, but I believe my news an archives are where I want them. See if it's what you want, you'll find out it's so easy to do it really is funny.
JohnBee
11-07-2004, 12:49 PM
I am interested in this mod!
But the first adv_portal_newsbits edit does not work
instead I get a broken placeholder that points to this path
http://www.***.net/web/forum/images/attach/JPG.gif
notice the lack of image name? it just trunkated it as JPG.gif -lol
Has anyone had this problem? has the code been changed?
CSS59
11-12-2004, 12:13 AM
I cant get mine to work.
I get a thumbnail in the post, but only a link at the top in the corner. Take a look http://cobaltss.net
Any ideas?
vBulletin® v3.7.2, Copyright ©2000-2008, Jelsoft Enterprises Ltd.