vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   How to add image to forum (https://vborg.vbsupport.ru/showthread.php?t=214910)

seaweed 05-30-2009 12:38 PM

How to add image to forum
 
I would like to add a small clickable image in the individual forum/title/header on Main forum page/ index page. Can someone point me to the code where i would insert picture or an alternative method. If this has been posted before I can follow links.
Thanks so much.
Seaweed

Lynne 05-30-2009 04:05 PM

If you are going to put it in your header or navbar and only want it to show on the index page, then wrap a condition around it:
HTML Code:

<if condition="THIS_SCRIPT == 'index'">
your banner
</if>


seaweed 05-30-2009 05:48 PM

1 Attachment(s)
Im sorry, i am not articulating myself very well. This is what i was trying to convey.

Lynne 05-30-2009 06:09 PM

Ah, so you wanted to know what template to add the code to.

To find the template to modify, do this - vboptions > General Settings > Add Template Name in HTML Comments > set to Yes . Then go back to your page and view the source code and you will see the name of the template called around your part of the code. Sometimes the template is the one mentioned at the very top of the page source.

seaweed 06-12-2009 04:57 PM

Ok,
I have created the image, I have uploaded it the server, I have viewed the index page source, located the the Forum/catagory, and the sub - forum in which i want to add the image. However when i try to find the corresponding part by searching the template, i can find the template but the the code on the index page doesnt seem to match the code in the template. I am trying this on a hidden part of the forum, but if you can help me figure it out on the main part im sure i can carry it over and replicate it.
seaweed

Lynne 06-12-2009 06:10 PM

Why don't you post exactly what you have done (code changes - please use the tags) and what the result is (an image or better yet, a link).

seaweed 06-15-2009 01:23 PM

Thank you for your patience in trying to help me, Im deffinatly a newb. Here is a link to a competitor site , if you croll down the main page you will see similar images adds. This what im trying to accomplish. I want to try and add animated gif for the different clubs and organizations for the different regions.

The link to my main page on my forum
Im not sure how to answer you questions. When i view the source of the index i can see wherr in the code i want to insert the code for the omage and a hyperlink, but when i try to go through the template I can not find it.

Lets try to make it work with this forum on the mainpage- Announcements, should be the very first forum.

Seaweed

Lynne 06-15-2009 02:26 PM

Did you find the templates to modify by using the method I posted? That is the first step. Then show us what you have tried to do so far - exactly where you tried to make the changes.

seaweed 06-15-2009 04:16 PM

I view the source of the main page- I "find" the term/forum title-Florida Gulf Coast

I changed from Term"annoucements" to "Florida Gulf Coast" because it seemed to conflict with vb announcement manager
Code:

<!-- END TEMPLATE: forumhome_forumbit_level2_post --><!-- BEGIN TEMPLATE: forumhome_forumbit_level2_post -->
<tr align="center">
        <td class="alt2"><img src="images/statusicon/forum_new.gif" alt="" border="0" id="forum_statusicon_35" /></td>
        <td class="alt1Active" align="left" id="f35">
                <div>
                        <a href="forumdisplay.php?f=35"><strong>Florida Gulf Coast</strong></a>
                        <span class="smallfont">(35 Viewing)</span>
                </div>
                <div class="smallfont">Trip reports from the West Coast of FL.</div>
               
               
        </td>
        <td class="alt2"><!-- BEGIN TEMPLATE: forumhome_lastpostby -->

<div class="smallfont" align="left">
        <div>
                <span style="white-space:nowrap">
                <img class="inlineimg" src="images/icons/icon1.gif" alt="" border="0" />
               
                <a href="showthread.php?goto=newpost&amp;t=13629" style="white-space:nowrap" title="Go to first unread post in thread 'Destin charters?'"><strong>Destin charters?</strong></a></span>
        </div>
        <div style="white-space:nowrap; float:left">
                by <a href="member.php?find=lastposter&amp;f=35" rel="nofollow">RaginCajun</a>
        </div>
        <div align="right" style="white-space:nowrap">
                Today <span class="time">04:05 PM</span>
                <a href="showthread.php?p=127900#post127900"><img class="inlineimg" src="images/buttons/lastpost.gif" alt="Go to last post" border="0" /></a>
        </div>
</div>

<!-- END TEMPLATE: forumhome_lastpostby --></td>
        <td class="alt1">2,021</td>
        <td class="alt2">21,515</td>
       
</tr>

<!-- END TEMPLATE: forumhome_forumbit_level2_post --><!-- BEGIN TEMPLATE: forumhome_forumbit_level2_post -->
<tr align="center">
        <td class="alt2"><img src="images/statusicon/forum_new.g

Next I go back to vb->Styles & Templates-->Search Templates-->Search for Text "Florida Gulf Coast"
Nothing shows up :(

Next I look at source again, This stands out to me "forumhome_forumbit_level2_post"
so go back to the "Search in Templates" and search for "Florida Gulf Coast" and that text isn't found...... so now Im stumped.
But that is the step by step so far
thanks

Lynne 06-15-2009 10:30 PM

It's a template - the exact text doesn't show up in them, just the html. So, using Florida Gulf Coast in your example, look for the html in this line:
HTML Code:

<a href="forumdisplay.php?f=35"><strong>Florida Gulf Coast</strong></a>
            <span class="smallfont">(35 Viewing)</span>

That looks just like these lines in the template:
HTML Code:

<a href="forumdisplay.php?$session[sessionurl]f=$forum[forumid]"><strong>$forum[title]</strong></a>
            <if condition="$show['browsers']"><span class="smallfont">(<phrase 1="$forum[browsers]">$vbphrase[x_viewing]</phrase>)</span></if>


seaweed 06-16-2009 12:53 AM

That was a great push thank you, I was bale to get an image into the rigth forum. Now i need to figure out how to align it correctly. But that is another battle for another day. Here is the code i finally work out. Could not have done with you Lynne, thank you for your patience.

Seaweed


Code:

<div align="center"><if condition="$forumid == 35">

<img src="http://www.spearfishingplanet.com/sfpbannerads/topicads/spucclub.jpg"width="299" height="64""ALIGN=RIGHT" "valign=center"> <else />

</if></div>



All times are GMT. The time now is 04:05 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.01133 seconds
  • Memory Usage 1,749KB
  • 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
  • (2)bbcode_code_printable
  • (3)bbcode_html_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (11)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete