Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
  #1  
Old 02-16-2006, 08:04 PM
Stunner Inc. Stunner Inc. is offline
 
Join Date: May 2005
Posts: 52
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default New Thread Question

I was wondering if a New Thread Button/Link could go on the Forum Home....I've added a pic to help show where I'd LIKE it to go.



Thanks In Advance
Reply With Quote
  #2  
Old 02-18-2006, 10:47 PM
Stunner Inc. Stunner Inc. is offline
 
Join Date: May 2005
Posts: 52
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Bumped
Reply With Quote
  #3  
Old 02-18-2006, 10:56 PM
Talisman's Avatar
Talisman Talisman is offline
 
Join Date: Aug 2002
Location: USA/West Coast
Posts: 371
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Stunner Inc.
I was wondering if a New Thread Button/Link could go on the Forum Home....I've added a pic to help show where I'd LIKE it to go.
That would go in the main forum table of your Forumdisplay template (above the $forumbits variable and subforum code).
Reply With Quote
  #4  
Old 02-19-2006, 11:01 AM
Stunner Inc. Stunner Inc. is offline
 
Join Date: May 2005
Posts: 52
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well I tried just like you said and it didn't do anything. Possibly I got the wrong code. Which is no doubt the case so to embarass myself more here is the code I used....

[<img src="$stylevar[imgdir_button]/newthread.gif" alt="$vbphrase[post_new_thread]" border="0" />]
Reply With Quote
  #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
  #6  
Old 02-20-2006, 10:51 AM
Stunner Inc. Stunner Inc. is offline
 
Join Date: May 2005
Posts: 52
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks for all the time and all you put into this Talisman. It gives me something to do with trial & error,lol.

Story of my life.
Reply With Quote
Reply

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


All times are GMT. The time now is 11:49 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.07141 seconds
  • Memory Usage 2,231KB
  • Queries Executed 12 (?)
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
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (2)bbcode_code
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (6)post_thanks_box
  • (6)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (6)post_thanks_postbit_info
  • (6)postbit
  • (1)postbit_attachment
  • (6)postbit_onlinestatus
  • (6)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
  • postbit_attachment
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete