View Single Post
  #5  
Old 02-19-2006, 07:19 PM
Talisman's Avatar
Talisman Talisman is offline
 
Join Date: Aug 2002
Location: USA/West Coast
Posts: 371
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Sorry, Stunner Inc... what I posted wasn't correct. It looked like a simple question, so I took a shot at a quick answer. I should know better than trying to post suggestions here without actually trying it out myself, first. I get lost all the time trying to make little changes... lol.

Since no one else with real knowledge has jumped in yet with a proper answer, I have located the right spot for your button. But this still leaves a few other problems to work out.

The bit of code you posted would only show your "New Thread" button all by itself. You also need the "a href" link wrapped around the button code to activate a post-new-message process when they click on it. This is what I used to make sure I had found the right position for placement. And it goes in the forumhome_forumbit_level2_post template.

Code:
<!-- Testing Added Button -->
<td class="alt2" nowrap="nowrap"><a href="newthread.php?$session[sessionurl]do=newthread&amp;f=$foruminfo[forumid]" rel="nofollow"><img src="$stylevar[imgdir_button]/newthread.gif" alt="$vbphrase[post_new_thread]" border="0" /></a></td>
<!-- Testing Added Button -->
Here's the full template with this test button code inserted, so you can see where I positioned it...

Code:
<tr align="center">
	<td class="alt2"><img src="$stylevar[imgdir_statusicon]/forum_$forum[statusicon].gif" alt="" border="0" /></td>
	<td class="alt1Active" align="$stylevar[left]" id="f$forum[forumid]">
		<div>
			<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>
		</div>
		<if condition="$show['forumdescription']"><div class="smallfont">$forum[description]</div></if>
		<if condition="$show['forumsubscription']"><div class="smallfont"><strong><a href="subscription.php?$session[sessionurl]do=removesubscription&amp;f=$forum[forumid]" rel="nofollow">$vbphrase[unsubscribe_from_this_forum]</a></strong></div></if>
		<if condition="$show['subforums']"><div class="smallfont" style="margin-top:$stylevar[cellpadding]px"><strong>$vbphrase[subforums]</strong>: $forum[subforums]</div></if>
	</td>


	
	<!-- Testing Added Button -->
		<td class="alt2" nowrap="nowrap"><a href="newthread.php?$session[sessionurl]do=newthread&amp;f=$foruminfo[forumid]" rel="nofollow"><img src="$stylevar[imgdir_button]/newthread.gif" alt="$vbphrase[post_new_thread]" border="0" /></a></td>
	<!-- Testing Added Button -->


	
	<td class="alt1" nowrap="nowrap">$forum[lastpostinfo]</td>
	<td class="alt2">$forum[threadcount]</td>
	<td class="alt1">$forum[replycount]</td>
	<if condition="$vboptions['showmoderatorcolumn']">
	<td class="alt2"><div class="smallfont">$forum[moderators]&nbsp;</div></td>
	</if>
</tr>
$childforumbits
Now, if you add a new column here between ones already in place... you need to change the alt1 and alt2 color coding for subsequent columns for the colors to alternate correctly across each row.

There are also two other problems to resolve:

1. You need to go a little higher up in the forum display templates to find where the heading fields are formatted. The "colspan" has to be increased by one because this adds a new column beneath it. I didn't go looking for that but I think that's set inside an "if / else" conditional. The colspan number varies, depending on whether you have forum moderator designations turned on or off. I've circled the right side edge of the table heading area on my graphic to show you how it looks when the colspan number is short.

2. And so far... this only sets up a new button in this table for new threads. But when you click on that with the code I'm using to test this, you'll get an error message because all the buttons plugged in on all the forums on the page direct you to the same place.... and vB has no idea WHICH FORUM in which you want that new thread to post. You'll have to figure out how to tell vB which new "new thread" button corresponds to which forum to post in.

At least.. this is a partial answer to get you started.
Attached Images
File Type: gif test-button.gif (56.6 KB, 0 views)
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01283 seconds
  • Memory Usage 1,812KB
  • Queries Executed 12 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_attachment
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.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_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • 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_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • showpost_complete