Welcome Guest [Log In] [Register]
We hope you enjoy your visit.

You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free.


Join our community!


If you're already a member please log in to your account to access all of our features:

Username:   Password:
Multiquote (on) Multiquote (off)
Add Reply
Forum Age
Topic Started: Nov 3 2017, 07:54 PM (713 Views)
YaGottaBelieve90
Member
[ *  * ]
I am looking for a Forum Age Code where it will tell the current age of the forum located in the info center is this possible ?
Offline Profile Quote Post Goto Top
 
l1r72
Member Avatar
Member
[ *  *  * ]
What do you mean by current age of the forum? Like when was a particular section of the board created or when was the board itself registered?
Offline Profile Quote Post Goto Top
 
YaGottaBelieve90
Member
[ *  * ]
l1r72
Nov 3 2017, 08:23 PM
What do you mean by current age of the forum? Like when was a particular section of the board created or when was the board itself registered?
Board itself registered
Offline Profile Quote Post Goto Top
 
l1r72
Member Avatar
Member
[ *  *  * ]
YaGottaBelieve90
Nov 3 2017, 09:28 PM
l1r72
Nov 3 2017, 08:23 PM
What do you mean by current age of the forum? Like when was a particular section of the board created or when was the board itself registered?
Board itself registered
The easiest way to know this is when member #1 was registered :) You don't really need to do any code, just copy and paste, but if you want to put it in a particular place you might need some code. Where do you want to put it?
Offline Profile Quote Post Goto Top
 
YaGottaBelieve90
Member
[ *  * ]
l1r72
Nov 3 2017, 09:43 PM
YaGottaBelieve90
Nov 3 2017, 09:28 PM
l1r72
Nov 3 2017, 08:23 PM
What do you mean by current age of the forum? Like when was a particular section of the board created or when was the board itself registered?
Board itself registered
The easiest way to know this is when member #1 was registered :) You don't really need to do any code, just copy and paste, but if you want to put it in a particular place you might need some code. Where do you want to put it?
in the info center below the board statistics
Offline Profile Quote Post Goto Top
 
Cory
Member Avatar
Member
[ *  *  *  *  *  *  *  *  * ]
Admin CP Posted Image Themes Posted Image Board Template Posted Image Below the Board
Code:
 
<script type="text/javascript">
//<![CDATA[
$('#stats td.c_mark:last + td').append('<br />INSERT_CONTENT_HERE');
//]]>
</script>
Change the capitlized text as necessary.
Offline Profile Quote Post Goto Top
 
YaGottaBelieve90
Member
[ *  * ]
Cory
Nov 6 2017, 08:56 PM
Admin CP Posted Image Themes Posted Image Board Template Posted Image Below the Board
Code:
 
<script type="text/javascript">
//<![CDATA[
$('#stats td.c_mark:last + td').append('<br />INSERT_CONTENT_HERE');
//]]>
</script>
Change the capitlized text as necessary.
IT didn't work I am looking for a forum age code that goes in the info center that tells the current age of the entire board.
Offline Profile Quote Post Goto Top
 
Helena
Member Avatar
M is for Mod

The code works. This is where it appears.

Posted Image

You will need to list your information by replacing the text: INSERT_CONTENT_HERE
Be careful not to remove any punctuation surrounding that text.

With the age of your forum. You can obtain that information from your own join date if you are the creator of the forum.
Attached to this post:
Attachments: stats.png (7.4 KB)
Offline Profile Quote Post Goto Top
 
YaGottaBelieve90
Member
[ *  * ]
Helena
Nov 8 2017, 12:25 PM
The code works. This is where it appears.

Posted Image

You will need to list your information by replacing the text: INSERT_CONTENT_HERE
Be careful not to remove any punctuation surrounding that text.

With the age of your forum. You can obtain that information from your own join date if you are the creator of the forum.
I don't think you get what I am looking for I want it to say


in info center in its own category

Forum Age x Years X Months X Days

Offline Profile Quote Post Goto Top
 
l1r72
Member Avatar
Member
[ *  *  * ]
In order for us to understand could you take a screenshot of your forum or post a link to it, and show us exactly where you want it to show.
Offline Profile Quote Post Goto Top
 
Cory
Member Avatar
Member
[ *  *  *  *  *  *  *  *  * ]
Admin CP Posted Image Themes Posted Image Board Template Posted Image Below the Board
Code:
 
<script type="text/javascript">
//<![CDATA[
$('#stats tr:has(td.c_foot)').before('<tr><th colspan="2">Forum Age</th></tr><tr><td class="c_mark"><img src="MARKER_IMAGE_URL" alt="Age" /></td><td>X Years X Months X Days</td></tr>');
//]]>
</script>
Change the capitlized text as necessary.
Offline Profile Quote Post Goto Top
 
Revillution.net
Member
[ *  *  * ]
I think what he wants is an automated updated script so that the age changes with each day/month/year that passes.

Offline Profile Quote Post Goto Top
 
YaGottaBelieve90
Member
[ *  * ]
Revillution.net
Nov 21 2017, 02:22 PM
I think what he wants is an automated updated script so that the age changes with each day/month/year that passes.

Correct
Offline Profile Quote Post Goto Top
 
Cory
Member Avatar
Member
[ *  *  *  *  *  *  *  *  * ]
Admin CP Posted Image Themes Posted Image Board Template Posted Image Below the Board
Code:
 
<script type="text/javascript">
//<![CDATA[
$(function() {
var pID = 'ROOT_ADMIN_PROFILE_ID';
var iMarker = 'MARKER_IMAGE_URL';
var gd = new Date();
var gMonth = gd.getMonth() + 1;
var gDate = gd.getDate();
var gYear = gd.getFullYear();
var textMonth = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
var numberMonth = ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12'];

$('#stats tr:has(td.c_foot)').before('<tr><th colspan="2">Forum Age</th></tr><tr><td class="c_mark"><img src="' + iMarker + '" alt="Age" /></td><td><span id="years" style="font-weight: 700"></span> Years <span id="months" style="font-weight: 700"></span> Months <span id="days" style="font-weight: 700"></span> Days</td></tr>');

$.get(main_url + 'profile/' + pID + '/?force_ads', function(data) {
var join = $('dl.user_info dt:contains(Joined)', data).next('dd').text();
var month;
month = join.split(' ')[0];
var date = join.split(' ')[1].split(',')[0];
var year = join.split(', ')[1];
var TMI = textMonth.indexOf(month);
month = numberMonth[TMI];
var nYear = gYear - year;
var nMonth = gMonth - month;
var nDate = gDate - date;
$('#years').text(nYear);
$('#months').text(nMonth);
$('#days').text(nDate);
});
});
//]]>
</script>
Change the capitlized text as necessary.
Offline Profile Quote Post Goto Top
 
Revillution.net
Member
[ *  *  * ]
Great code Cory. However, for the forum marker bit, can you perhaps code it in a way that it pulls say the stats icon from each theme? so it looks more unified in each theme?
Offline Profile Quote Post Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
Go to Next Page
« Previous Topic · ZetaBoards Support · Next Topic »
Add Reply