Thread: Forum Home Enhancements - Forum Goals with Animated Progress Bar
View Single Post
  #19  
Old 12-28-2010, 09:56 PM
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
Senior Member
 
Join Date: Jun 2008
Location: New York
Posts: 10,610
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Suggestion 1)
Small changes like this can be made via template edits to customize it to your needs. The template to edit is: forumgoals

You can erase all the code in your existing template and replace it with the code below and it will only display threads or posts depending on your goal type:
Code:
<table class="tborder" id="collapseobj_forumhome_goal" style="">
<tr>
		<td class="thead" colspan="2">
			$vboptions[bbtitle] $vbphrase[bop5goals]
		</td>
	</tr>
	<tr>
		<td class="alt2"><img src="$stylevar[imgdir_misc]/$bop5goalimg" alt="$vbphrase[bop5goals]" border="0" /></td>
		<td class="alt1" width="100%">
                    <table align="center" width="100%">
                      <tr>
                       <td width="120"><div align="center" class="smallfont" ><if condition="$bopgoalsport == 1">$vbphrase[threads]: $totalthreads<else />&nbsp;</if></div></td>
                       <td width="120"><div align="center" class="smallfont" ><if condition="$bopgoalsport == 0">$vbphrase[posts]: $totalposts<else />&nbsp;</if></div></td>
                       <td><div align="center" class="smallfont" ><span class="progressBar" id="element1"> $bopgoalper%</span></div></td>
                       <td width="170"><div align="center" class="smallfont" >$vbphrase[bop5goal] $bop5goalposts <if condition="$bopgoalsport == 0">$vbphrase[bop5posts]<else />$vbphrase[bop5threads]</if></div></td>
                       <td width="170"><div align="center" class="smallfont" >
                       <if condition="$goalreached">
                              $vbphrase[bop5goalreached]
                      <else />
                          <if condition="$bopgoalsport == 0">
                              $vbphrase[bop5poststogoal] $poststogo
                          <else />
                              $vbphrase[bop5threadstogoal] $poststogo
                          </if>
                        </if>
                       </td>
                     </tr>
                     <if condition="$vbulletin->options[bopgoalshowdate]">
                         <tr>
                           <td colspan="2"><div align="center" class="smallfont" >$vbphrase[today]: $bop5todayF</div></td>
                           <td><div align="center" class="smallfont" > <if condition="$goalreached">$bop5goalmess<else /><if condition="$bop5daysleft >= 0">$vbphrase[bopdaystogoal] <strong>$bop5daysleftF</strong><else />$vbphrase[bopovertime]</if></if></div></td>
                           <td colspan="2"><div align="center" class="smallfont" >$vbphrase[bopgoaldate] $bop5goaldateF</div></td>
                         </tr>
                    </if>
                    </table>
	
		</td>
	</tr>
</table>

<br />
You are encouraged to experiment to make further edits, if you get something that looks better feel free to even share the code in this thread if you're willing.

If you ever mess things up too much you can always go back by clicking the "revert template" button in style manager or at worst re-install the mod.

2) Yes that sounds like a good idea, I will include it in the next release.

3) I'm pretty sure keeping an average would require editing the database which will add a whole new level of complexity to the mod so I will probably be passing on this option for the time being, but I will keep it in mind should things change.

Just a reminder to anyone this is marked as "re-usable code" if anyone wants to take a shot and add more features they are free to do so and re-release their own version.
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01255 seconds
  • Memory Usage 1,787KB
  • Queries Executed 11 (?)
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
  • (1)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_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_display_complete
  • post_thanks_function_can_thank_this_post_start
  • showpost_complete