vBadvanced Forums  
Go Back   vBadvanced Forums > vBadvanced Products > vBadvanced CMPS > Add-On Modules & Modifications > Module & Modification Discussion & Requests

Reply
 
Thread Tools Display Modes
  #1  
Old 08-17-2007, 06:41 PM
Teck Teck is offline
Member
 
Join Date: Jun 2007
Posts: 33
Default Automated Category Icons for the VBA News Module...

Heres what i would like to do:

I would like to hack something into the existing VBA Website News module to automatically show a small category icon based on what forum the news post was made in...

Heres a sample forum layout:

User Discussions:

FPS Discussions (forumid: 4)
MMO Discussions (forumid: 5)
RTS Discussions (forumid: 6)
Those 3 forums the FPS, MMO, and RTS would all show they're posts on the front page using the existing news module...


Well in the existing news modules templates i would like to do something like this:
Code:
<if condition="$forumid == 4">
 <img src="image1.jpg">
</if>
<if condition="$forumid == 5">
 <img src="image2.jpg">
</if>
<if condition="$forumid == 6">
 <img src="image3.jpg">
</if>
I think the "forumid" column from the "forum" table in the Vbulletin DB would be the best way to pull the correct forumid...

Anyways, what would I need to do to complete a hack like this? Am i approaching this the right way do you think? Any tips & advice would be greatly appreciated...
Reply With Quote
  #2  
Old 08-17-2007, 11:53 PM
KW802's Avatar
KW802 KW802 is offline
Administrator
 
Join Date: Mar 2004
Location: A galaxy far, far away...
Posts: 5,030
Default Re: Automated Category Icons for the VBA News Module...

Where would you want the image to display? I actually have a plugin I'm using over at Cool SciFi that does exactly this. Essentially if a forum image exists then it'll be shown else the user's avatar will be shown.
Reply With Quote
  #3  
Old 08-18-2007, 02:57 AM
Teck Teck is offline
Member
 
Join Date: Jun 2007
Posts: 33
Default Re: Automated Category Icons for the VBA News Module...

I'm not really sure where i want to put it yet (Maybe on the left side or in the customized title bar that I've done for it)... I just know that i want to do it...

Could you maybe PM me the plug-in/details as to how i can reproduce what you've done on http://www.coolscifi.com/
Reply With Quote
  #4  
Old 08-18-2007, 12:14 PM
Brian's Avatar
Brian Brian is offline
Administrator
 
Join Date: Jan 2004
Location: Georgia, USA
Posts: 34,240
Default Re: Automated Category Icons for the VBA News Module...

You should be able to use about the same code you've posted, though you would want to use $news['forumid'] instead of $forumid if you're applying this change to the 'adv_portal_newsbits' template.
Reply With Quote
  #5  
Old 08-18-2007, 02:37 PM
Teck Teck is offline
Member
 
Join Date: Jun 2007
Posts: 33
Default Re: Automated Category Icons for the VBA News Module...

perfect! Thanks...

I really should have noticed that on my own but...
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Expanded Entrybit Template Edit Button & Category Icons Shon Bugs From 1.0 RC1 3 08-14-2007 01:12 PM
My Category module listing on categories from that category attroll Feedback & Suggestions 7 08-10-2007 09:10 AM
[Request]News image automatically displayed depending on which category news is in. RobParker Module & Modification Discussion & Requests 4 05-03-2007 12:25 PM
post icons in news thread Delw Troubleshooting & Problems 3 11-15-2006 03:12 PM


All times are GMT -4. The time now is 07:53 PM.

Forums Powered by vBulletin, Copyright ©2000-2009, Jelsoft Enterprises Ltd.
Please note that vBadvanced is in no way affiliated with Jelsoft Enterprises Ltd, nor will Jelsoft be able to provide any support for our products.