vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=192)
-   -   Forum Images next to the Description for every Forum (https://vborg.vbsupport.ru/showthread.php?t=143098)

StarBuG 03-24-2007 10:00 PM

Forum Images next to the Description for every Forum
 
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.

Reeve of shinra 03-25-2007 10:25 PM

Edit:

Ok Ive had a chance to look it over and I think it has a lot of potential, but my problem with it is that it does not stay in the area as the text, rather it sits below it extending the tables vertically which makes the forum much more bulky.

Heres and example of what I mean:

https://vborg.vbsupport.ru/external/2007/03/5.jpg

Now if there was any way to make this float right without interfering with the tables I think it would be great. I hope you are able to mix it up a bit!

TunerNetwork 03-26-2007 02:38 AM

if we could perfect this, id be very interested

Atakan KOC 03-26-2007 06:23 AM

Thanks....

StarBuG 03-26-2007 03:32 PM

What do you mean by interfering with the table?
It does exactly what it should do.

It places an image next to the forum description.

If it makes your table higher then you need to resize your image.
You could add the code next to the forum title to reduce a little of the hight but that's it ;)

StarBuG

dbirosel 03-26-2007 04:24 PM

Quote:

Originally Posted by Reeve of shinra (Post 1212209)
Edit:

Ok Ive had a chance to look it over and I think it has a lot of potential, but my problem with it is that it does not stay in the area as the text, rather it sits below it extending the tables vertically which makes the forum much more bulky.

Heres and example of what I mean:

https://vborg.vbsupport.ru/external/2007/03/5.jpg

Now if there was any way to make this float right without interfering with the tables I think it would be great. I hope you are able to mix it up a bit!

That would be awesome!!!!

Reeve of shinra 03-26-2007 05:48 PM

Quote:

Originally Posted by StarBuG (Post 1212791)
What do you mean by interfering with the table?
It does exactly what it should do.

It places an image next to the forum description.

If it makes your table higher then you need to resize your image.
You could add the code next to the forum title to reduce a little of the hight but that's it ;)

StarBuG


What I was hoping for was something that would float right of both the description and the forum title - is that at all possible with what you've got? Right now its strictly designed for forum description which is great but for forums with small descriptions it leaves a lot of whitespace.

dbirosel 03-28-2007 06:48 PM

Any support for this?

scdurwood 03-30-2007 03:54 AM

Not sure why you would need to define the CSS....I just added:

Code:

<span><img src="$stylevar[imgdir_statusicon]/$forum[forumid].gif" border="0" align="left"></span>
to the link tag:

Code:

<a href="forumdisplay.php?$session[sessionurl]f=$forum[forumid]"><span width="100"><img src="$stylevar[imgdir_statusicon]/$forum[forumid].gif" border="0" align="right"></span><strong>$forum[title]</strong></a>
You can align them left or right as you so wish.

DEMO: www.palmettostaterivals.com

StarBuG 03-31-2007 06:24 AM

Of course it is possible without css but you have more controll regarding spacing ;)

kaptanblack 04-08-2007 03:13 PM

Thanks.. ;)

vol_freak 04-15-2007 06:51 AM

How do you keep from getting a red x by forums with no image?

StarBuG 04-16-2007 03:46 AM

Create a 1px transparent image for forums with no images ;)

dbirosel 04-20-2007 03:52 AM

Quote:

Originally Posted by scdurwood (Post 1215856)
Not sure why you would need to define the CSS....I just added:

Code:

<span><img src="$stylevar[imgdir_statusicon]/$forum[forumid].gif" border="0" align="left"></span>
to the link tag:

Code:

<a href="forumdisplay.php?$session[sessionurl]f=$forum[forumid]"><span width="100"><img src="$stylevar[imgdir_statusicon]/$forum[forumid].gif" border="0" align="right"></span><strong>$forum[title]</strong></a>
You can align them left or right as you so wish.

DEMO: www.palmettostaterivals.com

How do you exactly apply this code?

Liquid1ce 04-20-2007 07:04 AM

/me click install thnx

sensimilla 04-20-2007 08:32 AM

Thanks nice hack

memoriess 04-28-2007 06:32 PM

Hi, I have installed the modification, but how can i add the image beside the description?
Where and how to do it? Pls advise. thanks

StarBuG 04-28-2007 07:40 PM

Quote:

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
;)

StarBuG

memoriess 04-29-2007 03:51 AM

Thank you, btw is there anyway that i can put the image, beside the title and the description?
how can i do that? thanks

bahisyeri 04-29-2007 07:51 AM

thank for thats hack

Ekka 04-29-2007 10:17 PM

If you look at the video forum and picture forum I have added an icon but doesn't line up well.

http://www.treeworld.info/index.php

How exactly do I line it up like this guys forum?

http://forum.palmettostaterivals.com/index.php

And how do I turn the icon into a link?

Hey, I'm a new user and this isn't that simple ... pretty good I got this far!

Quote:

Originally Posted by scdurwood (Post 1215856)
Not sure why you would need to define the CSS....I just added:

Code:

<span><img src="$stylevar[imgdir_statusicon]/$forum[forumid].gif" border="0" align="left"></span>
to the link tag:

Code:

<a href="forumdisplay.php?$session[sessionurl]f=$forum[forumid]"><span width="100"><img src="$stylevar[imgdir_statusicon]/$forum[forumid].gif" border="0" align="right"></span><strong>$forum[title]</strong></a>
You can align them left or right as you so wish.

DEMO: www.palmettostaterivals.com

Like where do you put these codes?

scdurwood 05-08-2007 02:31 AM

Quote:

Originally Posted by dbirosel (Post 1231694)
How do you exactly apply this code?

Here's my forumbit:

Code:

<tr align="center">
        <td class="alt2"><img src="$stylevar[imgdir_statusicon]/forum_$forum[statusicon].gif" alt="" border="0" id="forum_statusicon_$forum[forumid]" /></td>
        <td class="alt1Active" align="$stylevar[left]" id="f$forum[forumid]" style="cursor:hand;" onmouseover="this.className='alt2Active';" onmouseout="this.className='alt1Active';" onclick="window.location.href='forumdisplay.php?$session[sessionurl]f=$forum[forumid]';">
                <div>
                        <a href="forumdisplay.php?$session[sessionurl]f=$forum[forumid]"><span width="100"><img src="$stylevar[imgdir_statusicon]/forumimgs/$forum[forumid].gif" border="0" align="right"></span><strong>$forum[title]</strong></a>

May be a little different than the norm since I also use a mouseover flip for the cell...the important part is in the <div> tag:

Code:

<a href="forumdisplay.php?$session[sessionurl]f=$forum[forumid]"><span width="100"><img src="$stylevar[imgdir_statusicon]/forumimgs/$forum[forumid].gif" border="0" align="right"></span><strong>$forum[title]</strong></a>
That makes the icon a link to the forum and, depending on your choice of left or right, will align the icon relative to the title and description.

ericgray 05-14-2007 02:30 PM

Quote:

Originally Posted by scdurwood (Post 1243407)
Code:

<a href="forumdisplay.php?$session[sessionurl]f=$forum[forumid]"><span width="100"><img src="$stylevar[imgdir_statusicon]/forumimgs/$forum[forumid].gif" border="0" align="right"></span><strong>$forum[title]</strong></a>
That makes the icon a link to the forum and, depending on your choice of left or right, will align the icon relative to the title and description.

this is all you need --

-- thanks!

nhdriver4 05-16-2007 11:41 AM

Thanks for this. Quick, easy, and works great! Installed!

leoniec 05-18-2007 08:55 AM

I can't seem to get this to work. I've followed the directions exaclty as followed, but the images still don't show up.

Edit: I can get a broken image, but I can't get my uploaded images to appear.

StarBuG 05-18-2007 04:35 PM

Did you format the images as PNG?
If you try to use GIF you need to change PNG to GIF in the code

Adam21 05-19-2007 12:58 AM

Quote:

Originally Posted by StarBuG (Post 1250292)
Did you format the images as PNG?
If you try to use GIF you need to change PNG to GIF in the code

You can change them all to PNG or GIF,but not a mixed of GIFs or PNGs and you also need to specify in the code Starbug provided,which to use.Here's a free image converter site to convert all images as you wish http://www.coolutils.com/Online-Image-Converter.php.

And to place them besides the forum titles,descriptions,place this code
Code:

<img src="images/categoryicons/$forumid.gif" alt="" class="ForumImages" /><br />
before this code
Code:

<a href="forumdisplay.php?$session[sessionurl]f=$forum[forumid]"><strong>$forum[title]</strong></a>
See the screenshot to what i meant.

leoniec 05-19-2007 07:24 PM

nevermind, i just customized the code and made it work.

Nephalim 05-20-2007 11:32 AM

Quote:

Originally Posted by Adam21 (Post 1250552)
You can change them all to PNG or GIF,but not a mixed of GIFs or PNGs and you also need to specify in the code Starbug provided,which to use.Here's a free image converter site to convert all images as you wish http://www.coolutils.com/Online-Image-Converter.php.

And to place them besides the forum titles,descriptions,place this code
Code:

<img src="images/categoryicons/$forumid.gif" alt="" class="ForumImages" /><br />
before this code
Code:

<a href="forumdisplay.php?$session[sessionurl]f=$forum[forumid]"><strong>$forum[title]</strong></a>
See the screenshot to what i meant.

cool, but what size are the images?
thank you

Adam21 05-21-2007 03:52 AM

Quote:

Originally Posted by Nephalim (Post 1251357)
cool, but what size are the images?
thank you

Mine is 72x72.

StarBuG 05-21-2007 02:33 PM

Quote:

Originally Posted by Nephalim (Post 1251357)
cool, but what size are the images?
thank you

You can use any size you want ;)

outphasen 05-22-2007 03:59 AM

Quote:

Originally Posted by Adam21 (Post 1250552)
You can change them all to PNG or GIF,but not a mixed of GIFs or PNGs and you also need to specify in the code Starbug provided,which to use.Here's a free image converter site to convert all images as you wish http://www.coolutils.com/Online-Image-Converter.php.

And to place them besides the forum titles,descriptions,place this code
Code:

<img src="images/categoryicons/$forumid.gif" alt="" class="ForumImages" /><br />
before this code
Code:

<a href="forumdisplay.php?$session[sessionurl]f=$forum[forumid]"><strong>$forum[title]</strong></a>
See the screenshot to what i meant.

Thank you!!

germinus 05-27-2007 07:04 PM

Any way to make this work for thread discription? For example a forum for skins, each thread could have a small thumbnail of the skin

StarBuG 05-29-2007 03:06 PM

Then you would need to define an image for each thread.

This is a simple mod not a full blown hack ;)
But sure that would be possible I think.
The same way it works on index

dannylin3000 05-29-2007 05:00 PM

does anyone know how to do something very smiliar to this?

http://www.dc543.net/forum-3.html

they generated thumbs for the first images posted in each thread. (the images were posted using [ img ] bbcode, not attachment.)

abdulla1 05-29-2007 07:11 PM

Is there a way to add a picture next to each forum title?

here is of what i mean below,

daz1967 07-27-2007 07:54 PM

this is great but it is only working on some of my forum descriptions any ideas?

thanks

StarBuG 07-28-2007 06:14 AM

If you use the right forumID for the graphic name then they should show up.
Check your image names.

daz1967 07-28-2007 09:57 AM

I have and before i uploaded the images only some forums had the red x box where they were waiting for the images

StarBuG 07-28-2007 10:07 PM

Did you create GIF images or PNG images?

Cause in the code they are PNG, if you use GIF change that in my code ;)


All times are GMT. The time now is 05:23 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.02374 seconds
  • Memory Usage 1,836KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (19)bbcode_code_printable
  • (12)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete