Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Template Modifications

Reply
 
Thread Tools
Anniversary Awards Details »»
Anniversary Awards
Version: 1.00, by MrNase MrNase is offline
Developer Last Online: Sep 2010 Show Printable Version Email this Page

Version: Unknown Rating:
Released: 10-15-2004 Last Update: Never Installs: 19
 
No support by the author.

This mod is based on something Smoker did for his community at www.smokers-board.de

To see what it does you should read this thread at vbulletin.org

This hack will add +1 star for every year a user is registered. If you have users which are registered for 1 year they will have 1 star next to their username.. Users who are registered for 4 years will have 4 stars and so on.

Here are the instructions and Iam sorry I can't post them as a *.txt but I need this thread to explain how everything works.

Edit your template ?postbit? and find:

class="smallfont">$post[rank]</div></if>


Now add under that:
<if condition="$jointime > 1825"><img src="$stylevar[imgdir_misc]/star.gif" /></if>
<if condition="$jointime > 1460"><img src="$stylevar[imgdir_misc]/star.gif" /></if>
<if condition="$jointime > 1095"><img src="$stylevar[imgdir_misc]/star.gif" /></if>
<if condition="$jointime > 730"><img src="$stylevar[imgdir_misc]/star.gif" /></if>
<if condition="$jointime > 365"><img src="$stylevar[imgdir_misc]/star.gif" /></if>

Save it.
Now you just have to upload the attached image to images/misc and you should be fine.

Explanation:
$jointime holds the days a user is registered. A simple example for a user who registered for more than a year (in this case 377 days):
<if condition="377 > 365"><img src="$stylevar[imgdir_misc]/star.gif"></if>

This condition is true (377 is larger than 365) and he gets one star
Same if he is registered for more than 3 years (let's say 1099 days):
<if condition="1099 > 1095"><img src="$stylevar[imgdir_misc]/star.gif"></if>
<if condition="1099 > 730"><img src="$stylevar[imgdir_misc]/star.gif"></if>
<if condition="1099 > 365"><img src="$stylevar[imgdir_misc]/star.gif"></if>

In that case all three conditions are true and he gets 3 stars Simple isn't it?

You may even use different images like a blue star for the third year, a red one for the second year and so on.


Have fun and don't forget -> Smoker did most of the work

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #22  
Old 12-05-2006, 03:28 PM
vol_freak vol_freak is offline
 
Join Date: Apr 2005
Posts: 37
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by acidburn0520 View Post
Just make a new plugin for 'postbit_display_start' with the following:
Code:
$jointime = (TIMENOW - $this->post['joindate']) / 86400;
This seems to work but everyone seems to be getting 5 stars in the messaging system. When I am reading a PM from someone, everyone has 5 stars under their name regardless of join date. Any suggestions? Thank in advance.
Reply With Quote
  #23  
Old 12-05-2006, 09:17 PM
Kirk Y's Avatar
Kirk Y Kirk Y is offline
 
Join Date: Apr 2005
Location: Tallahassee, Florida
Posts: 2,604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It's because the Plugin Code I supplied above is being used under 'postbit_display_start', which means the code is only being executed in the postbits.

You could try creating another hook with the same code using a location such as 'global_start' or 'private_showpm_start'.
Reply With Quote
  #24  
Old 01-26-2007, 04:05 PM
MysticMoon's Avatar
MysticMoon MysticMoon is offline
 
Join Date: Aug 2004
Location: Michigan, USA
Posts: 35
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by acidburn0520 View Post
It's because the Plugin Code I supplied above is being used under 'postbit_display_start', which means the code is only being executed in the postbits.

You could try creating another hook with the same code using a location such as 'global_start' or 'private_showpm_start'.
1st thanks for the post bit info, that worked like a charm

But neither of the above worked for fixing the PM's showing all stars available
Reply With Quote
  #25  
Old 01-26-2007, 05:14 PM
Kirk Y's Avatar
Kirk Y Kirk Y is offline
 
Join Date: Apr 2005
Location: Tallahassee, Florida
Posts: 2,604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If you want something simple, you could just wrap the IF Condition Blocks with one larger condition like:

Code:
<if condition="THIS_SCRIPT == 'showthread'">
Code here.
</if>
If you still want the awards to show in Private Messages; it's possible that the problem is in the "jointime" variable -- $this->post['joindate'] -- $this->post should be corrected for use with Private Messages.
Reply With Quote
  #26  
Old 01-29-2007, 01:26 AM
MysticMoon's Avatar
MysticMoon MysticMoon is offline
 
Join Date: Aug 2004
Location: Michigan, USA
Posts: 35
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by acidburn0520 View Post
If you want something simple, you could just wrap the IF Condition Blocks with one larger condition like:

Code:
<if condition="THIS_SCRIPT == 'showthread'">
Code here.
</if>
Ok above worked to atleast remove the stars from PM's, would rather none show then all lol ~ so thank you

Quote:
Originally Posted by acidburn0520 View Post
If you still want the awards to show in Private Messages; it's possible that the problem is in the "jointime" variable -- $this->post['joindate'] -- $this->post should be corrected for use with Private Messages.
Not sure if above will work or not, as I may just not know what to change it to
I tried $this->pm & $this->private as a plugin under "private_showpm_start" & no change - still showed all stars available in PM's.
Reply With Quote
  #27  
Old 01-29-2007, 01:50 AM
Kirk Y's Avatar
Kirk Y Kirk Y is offline
 
Join Date: Apr 2005
Location: Tallahassee, Florida
Posts: 2,604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yeah, that's why I figured I'd mention it to you - if you wanted to give it a try; as I don't know the right var. to use.
Reply With Quote
  #28  
Old 01-29-2007, 07:46 PM
MysticMoon's Avatar
MysticMoon MysticMoon is offline
 
Join Date: Aug 2004
Location: Michigan, USA
Posts: 35
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Maybe someone else will post the answer then

Again, thank you so much with your help on this
Reply With Quote
  #29  
Old 11-04-2008, 04:08 PM
SVTCobraLTD SVTCobraLTD is offline
 
Join Date: Jul 2007
Location: PA
Posts: 841
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Kirk Y View Post
Just make a new plugin for 'postbit_display_start' with the following:
Code:
$jointime = (TIMENOW - $this->post['joindate']) / 86400;
With this plugin add, it works on 3.6.11. Thanks
Reply With Quote
Reply

Thread Tools

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 02:14 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.07499 seconds
  • Memory Usage 2,290KB
  • Queries Executed 23 (?)
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
  • (4)bbcode_code
  • (5)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (9)post_thanks_box
  • (9)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (9)post_thanks_postbit_info
  • (8)postbit
  • (9)postbit_onlinestatus
  • (9)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
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete