Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.6 > vBulletin 3.6 Template Modifications
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Forum Images next to the Description for every Forum Details »»
Forum Images next to the Description for every Forum
Version: 1.00, by StarBuG StarBuG is offline
Developer Last Online: Nov 2022 Show Printable Version Email this Page

Version: 3.6.5 Rating:
Released: 03-24-2007 Last Update: 03-24-2007 Installs: 78
Template Edits
 
No support by the author.

What this hack does:
This hack adds an image next to every forum description for every forum you want.

Installation:

in Template forumhome_forumbit_level2_post

find:

Code:
<if condition="$show['forumdescription']"><div class="smallfont">$forum[description]</div></if>

and replace it with:

Code:
<if condition="$show['forumdescription']">
         <div class="smallfont">
       <img src="$stylevar[imgdir_statusicon]/$forumid.png" alt="" class="ForumImages" /> 
          $forum[description]
         </div>
        </if>
Go to your style options and add the following into additional css:

Code:
/* Forum Images next to the Description for every Forum */
.ForumImages {
float: right; 
margin-right: 8px; 
margin-top: 2px; 
}
If you want the image on the left site of the description use:

Code:
/* Forum Images next to the Description for every Forum */
.ForumImages {
float: left; 
margin-right: 8px; 
margin-top: 2px; 
}
Save your style options and you are done.

Now you simply need to create images called:

ForumID.png

for each forum you want to have an image and put it into /images/statusicon/
Example: 22.png

DEMO: http://www.elternfragen.net

Hope you like it

StarBuG

ps: As far as I can remember Andreas gave me the tip how to do it.
So all credit goes to him.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #52  
Old 08-29-2007, 10:54 PM
Mad Woman Mad Woman is offline
 
Join Date: Aug 2007
Posts: 13
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

:erm:

Thanks!



*clicks on install*

This has MADE my forum. :up:
Reply With Quote
  #53  
Old 08-31-2007, 02:35 PM
StarBuG's Avatar
StarBuG StarBuG is offline
 
Join Date: Dec 2001
Location: Germany
Posts: 1,033
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You're welcome

Glad you like it
Reply With Quote
  #54  
Old 09-23-2007, 11:57 PM
gutelaune gutelaune is offline
 
Join Date: Feb 2007
Posts: 17
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I have this so:

clear.gif (= 1 Pixel) => .../images/statusicon
array(X,Y,Z) => X,Y,Z = ForenID

in Template forumhome_forumbit_level2_post
Code:
		<if condition="$show['forumdescription']">
         <div class="smallfont">
       <if condition="in_array($forum['forumid'], array(X,Y,Z))">
	<img src="$stylevar[imgdir_statusicon]/$forumid.gif" alt="" class="ForumImages" /> 
          $forum[description]
<else /><img src="$stylevar[imgdir_statusicon]/clear.gif" alt="" class="ForumImages" />
			</if>
         </div>
        </if>
Reply With Quote
  #55  
Old 10-02-2007, 01:46 AM
carubmun carubmun is offline
 
Join Date: Jan 2007
Posts: 130
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Does this work with subforums as well?
Reply With Quote
  #56  
Old 01-28-2008, 04:41 AM
abroad abroad is offline
 
Join Date: Mar 2007
Posts: 231
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

does this work with 3.7?
Reply With Quote
  #57  
Old 02-08-2008, 10:18 PM
CLF's Avatar
CLF CLF is offline
 
Join Date: Jun 2007
Posts: 112
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Looks very interesting. I wanna try this today. I'll let you know.
Thank you!
Reply With Quote
  #58  
Old 03-07-2008, 02:24 AM
legionofangels's Avatar
legionofangels legionofangels is offline
 
Join Date: Mar 2007
Posts: 485
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Why am I getting this spacing issue with the forum description?

http://img.photobucket.com/albums/v3...66/spacing.jpg

Yes, for that vid section we did alter our forumhome template, but it shouldn't be affecting this add on.

What I don't understand is why I have a 2 to 5 pixel space for the forum description, instead of both the forum title and forum description being pushed over by the image.

I added a png to test this and it put it below the forum title, and to the left of the forum description. It should be to the left of both. Would love to know how this is messing up.

Therein lies my problem, I found out it was your margin that was messing it up, fixed that by switching it to 0, but it's still below the forum title, and I'm sure I and many others have or want it to be of the left of the title, help please.


EDIT Part 2: coder found it, will apply relevant code tomorrow for everyone.
Reply With Quote
  #59  
Old 03-10-2008, 06:14 AM
legionofangels's Avatar
legionofangels legionofangels is offline
 
Join Date: Mar 2007
Posts: 485
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok here is the deal.

Reeve of Shinra who posted probably a year ago when this was originally released was absolutely right about the placement of the code. If we put the code where you suggest, of which you have done on several of your boards patientfragen and the other one, you will have extra dead space in the Description boxes because its lining up with the Description Text and Not the Forum Title. If you have it line up with the Forum Title it will look uniform and fit perfectly without the dead space. Dependant on the image size yes, but more than likely if you have similar length forum descriptions you can find an image size to work properly.

Earlier in this thread someone mentioned how to get it next to the Forum Title I noticed just now, but the screenshot they posted confused me, since it shows them as Category Icons and Not Forum Description Images which is what this is.

But yeah to repeat:

If you put:

Code:
<img src="$stylevar[imgdir_statusicon]/$forumid.png" alt="" class="ForumImages" />
Directly in front of:

Code:
<a href="forumdisplay.php?$session[sessionurl]f=$forum[forumid]"><strong>$forum[title]</strong></a>
So that it looks like this:

Code:
<img src="$stylevar[imgdir_statusicon]/$forumid.png" alt="" class="ForumImages" />
<a href="forumdisplay.php?$session[sessionurl]f=$forum[forumid]"><strong>$forum[title]</strong></a>
The images will line up properly with the forum title, and it probably should be standard for this add on as well. Because Starbug even though you're right that the image will affect the height of the Description Box, if your placing the code to line up with only the description and not the title, it almost certainly will in most cases; regardless of the image size you use. Meaning that if the text for the descriptions which is Small Font in your Styles Manager is only like 13px, any image above 13px height is going to stretch the Description Box further. Even if it's 2 Sentences high that makes it 26 pixels maybe 30 with the padding or small space in between, therefore any image over 30 pixels will push the description box further. You also can't go that small with images or people won't be able to make them out and you'll have very few icon options out there that you can find or make to work with this.

The fact is with most boards, if you want to use this and want it to look good you'll also want to keep your forum descriptions of similar length. As even though you can get this next to the title, if your description is too long the image will be dwarfed by the text. I wouldn't suggest using different image sizes based upon different description length, I would make the descriptions of similar length. I even noticed it on my board now that certain descriptions aren't long enough and there is a small amount of space underneath them. So I'll probably make them a bit longer tomorrow so the space is evened out.

So this is what I did.

For the Image Size I actually found our longest forum description which was typically 2 lines of Description. I screenshotted the forum, then cropped a description section to see the pixel dimension showing. It was something like 70 pixels, I then went 10 less than that, or 60 for my image size. Then applied the relevant code shown in my post here, modifying the add-on's as explained in this post, and applied the additional css, uploaded all the images.

As you can see in the example of checking out our forum on any style, it turned out pretty well. If you want to view it, do it fast though because we're not for sure if we are going to keep them, the discussion has begun on that. They honestly feel a bit gimmicky to me. I'd almost preferred them in the Category Section which I know I can do, indifference to the Forum Description but I don't want to lose our custom icons of new post, no new post, etc.

Check it out:

http://www.legionofangels.net/forum/

Screenshot I guess since I don't know if we'll use them in the future:
Reply With Quote
  #60  
Old 03-10-2008, 07:30 AM
StarBuG's Avatar
StarBuG StarBuG is offline
 
Join Date: Dec 2001
Location: Germany
Posts: 1,033
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi

Your version is a possibility but to not be able to use a description as long as I want would not be an option for me.
The other thing is, that I want to have the images on the right.
If I wanted them on the left, I would have used Simple Category Icons and replaced the standard vBulletin Forum Icons with the new images.

StarBuG
Reply With Quote
  #61  
Old 03-10-2008, 07:38 AM
legionofangels's Avatar
legionofangels legionofangels is offline
 
Join Date: Mar 2007
Posts: 485
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hello you,

I remember you from that other site where you posted your VBseo report and we agreed against the others that it was a good system, You might not remember me.

Yeah that is the case about forum descriptions. I just wanted to point out that on most boards they can be shortened or lengthened to work with the image size. If in your case they can't, it's most ideal if they just could be centered in that area. Which probably wouldn't be that hard.

I also concur, I might switch them to the right again to look at them but in both cases I either have post icons show up on some threads, or on the left I have the post old new statusicons, so it's like it looks good, but its kind of cluttered in either case.

If we keep it but don't do all the styles we have, I'm gonna put it on default in the Category Icon locations or on the Right most likely, we'll see.

PS: Even if some of your descriptions are longer, on your patientfragen site, if you put the code where we put it, 6 of your 11 forums will lose the dead space in the boxes on those boards.
Reply With Quote
Reply


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


All times are GMT. The time now is 08:42 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04896 seconds
  • Memory Usage 2,318KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (8)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete