vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   1 Year Hack (https://vborg.vbsupport.ru/showthread.php?t=73418)

Watson 12-28-2004 05:15 PM

1 Year Hack
 
Is there any way to display some sort of award or something in the postbit for when a user has been regged with the boards for 1 Year?

ericgtr 12-28-2004 05:20 PM

Why not add a promotion and set the days registered for 365 days in which the user gets added to a new group, say "one year". Then add a conditional to your postbit that says if they are part of that group, they get a special image under their avatar. Let me know if you need specifics and I will write it up for you.

Watson 12-29-2004 05:39 PM

Yeah mate that would be superb if you could write summit like that for me. Mabye even release it on vbtemplates, cause seen it on a few old phpbb forums

ericgtr 12-29-2004 06:50 PM

Okay, first create a user group called "one year" (no quotes)

Now, in your Admin CP > Usergroups > Promotions click Add Promotion.

Usergroup: Registered Users

Reputation Comparison Type: Greater or Equal to Less Than

Reputation Level: 0

Days Registered: 365

Posts: 0

Promotion Strategy: Join Date

Promotion Type: Additional Usergroups

Move User to Usergroup: one year

(Note: I have never used the above setup so I can't promise it's correct but it looks right, maybe somone who's worked with it can confirm for us)

----------------------------------------------------------

Now let's add a conditional for the new "one year" group so it will show up under their avatar, take not of this groups ID in the Usergroup Manager.

In you postbit (or postbit legacy) find:
Code:

                        <if condition="$show['avatar']">
                                <div class="smallfont">
                                        &nbsp;<br /><a href="member.php?$session[sessionurl]u=$post[userid]"><img src="$avatarurl" alt="<phrase 1="$post[username]">$vbphrase[xs_avatar]</phrase>" border="0" /></a>
                                </div>
                        </if>

Add under: (be sure to change the number 6 in this example, to your "one year" group ID number)
Code:

<if condition="is_member_of($post, 6)">
insert your special image or text in here
</if>



All times are GMT. The time now is 08:17 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.01428 seconds
  • Memory Usage 1,715KB
  • 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
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (4)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