Various modifications for phpBB3Member time counter

Snippets for phpBB3
Previous topicNext topic
User avatar

Topic Author
dmzx
Founder
Founder
Magic user status: Offline
Posts: 5974
Joined: Jan 13th, '14, 20:45
    Windows 8 Firefox

Member time counter

Post by dmzx »

Lets add a counter to members to show how long they have been a member also the board start date with a counter.

Open memberlist.php
Find This may be a partial find and not the whole line

Code: Select all

$user_id = (int) $member['user_id'];
Add after Add these lines on a new blank line after the preceding line(s) to find

Code: Select all

$member_for = date('d M Y, H:i:s', $member['user_regdate']);
Find This may be a partial find and not the whole line

Code: Select all

'POSTS_PCT'			=> sprintf($user->lang['POST_PCT'], $percentage),
Add after Add these lines on a new blank line after the preceding line(s) to find

Code: Select all

'MEMBER_FOR'     => $member_for,
Open styles/prosilver/template/overall_header.html
Find This may be a partial find and not the whole line

Code: Select all

</head>
Add before Add these lines on a new blank line before the preceding line(s) to find

Code: Select all

<script type="text/javascript" src="{T_TEMPLATE_PATH}/jquery.jcountdown.min.js"></script>
<script type="text/javascript">
// <![CDATA[
$(document).ready(function(){
   $("#online").countdown({
      date: "{START_DATE}",
      leadingZero: false,
      offset: -1,
      yearsAndMonths: true,
      htmlTemplate: "<span class='cd-online'> Thats</span> <strong>%y</strong> <span class=\"cd-online\">Years</span> <strong>%m</strong> <span class=\"cd-online\">Months</span>  <strong>%d</strong> <span class=\"cd-online\">{L_DAYS}</span> <strong>%h</strong> <span class=\"cd-online\">{L_HOURS}</span> <strong>%i</strong> <span class=\"cd-online\">{L_MINUTES}</span> and <strong>%s</strong> <span class=\"cd-online\">{L_SECONDS} a go.</span>",
      direction: "up"
   });
	
$("#member").countdown({
      date: '{MEMBER_FOR}',
      leadingZero: false,
      yearsAndMonths: true,
      htmlTemplate: "<span class='cd-online'></span> <strong>%y</strong> <span class=\"cd-online\">Years</span> <strong>%m</strong> <span class=\"cd-online\">Months</span>  <strong>%d</strong> <span class=\"cd-online\">{L_DAYS}</span> <strong>%h</strong> <span class=\"cd-online\">{L_HOURS}</span> <strong>%i</strong> <span class=\"cd-online\">{L_MINUTES} and</span> <strong>%s</strong> <span class=\"cd-online\">{L_SECONDS}</span>",
      direction: "up"
   });     
    });

// ]]>
</script>
Open styles/prosilver/template/memberlist_view.html
Find This may be a partial find and not the whole line

Code: Select all

<!-- IF LOCATION --><dt>{L_LOCATION}:</dt> <dd>{LOCATION}</dd><!-- ENDIF -->
Add before Add these lines on a new blank line before the preceding line(s) to find

Code: Select all

<!-- IF MEMBER_FOR --><dt>{L_MEMBER_FOR}:</dt> <dd><div class="member"><span id="member"/></div></dd><!-- ENDIF -->
Open styles/prosilver/template/index_body.html
Add this where you want it

Code: Select all

{L_START_DATE} <strong>{START_DATE}</strong>&bull; <span id="online"></span><br />
Open language/xx/common.php
add this line 'MEMBER_FOR' => 'Member For', and 'START_DATE' => 'Board <strong>started</strong> on ',


place the js in template folder
jquery.jcountdown.min.js(3).zip
You do not have the required permissions to view the files attached to this post.
binance.com ;) try it!
Previous topicNext topic