New Tab?
2 posters
Page 1 of 1
Re: New Tab?
Hello!
It's simple, but first I need to know some details:
1- The version of your forum;
2- If you use third-party skins nonstandard Forumotion;
See an example for punBB version:
Result:
Edit:
But it can also be done by editing templates if you wish!
JS
It's simple, but first I need to know some details:
1- The version of your forum;
2- If you use third-party skins nonstandard Forumotion;
See an example for punBB version:
- Code:
// New tab info on advanced perfil (PUNBB)! - By JScript
jQuery(function () {
if (location.pathname.indexOf('/u') == 0) {
jQuery('#tabs ul').append('<li id="new_tab" ><a href="javascript:void(0);"><span>New tab</span></a></li>');
jQuery('#new_tab').click(function () {
var oldSel = {
tab: jQuery('#tabs .activetab'),
html: document.getElementById('profile-advanced-details').innerHTML
};
oldSel.tab.removeClass('activetab');
jQuery('#new_tab').addClass('activetab');
JS_NewTab();
oldSel.tab.click(function (event) {
event.preventDefault();
jQuery('#new_tab').removeClass('activetab');
oldSel.tab.addClass('activetab');
document.getElementById('profile-advanced-details').innerHTML = oldSel.html;
oldSel.tab.unbind('click');
});
});
}
});
function JS_NewTab() {
document.getElementById('profile-advanced-details').innerHTML =
'<div class="main-head">' +
' <div class="subtitle">New tab info:</span>' +
' </div>' +
'</div>' +
'<div class="main-content clearfix">' +
' <div class="middleline">' +
' <dl id=""><dt>Label 01:</dt>' +
' <dd>' +
' <span>Description 01...</span>' +
' </dd>' +
' </dl>' +
' <div class="separator"> </div>' +
' <dl id=""><dt>Label 02:</dt>' +
' <dd>' +
' <span>Description 02...</span>' +
' <dd>' +
' </dl>' +
' <div class="separator"> </div>' +
' </div>' +
'</div>';
};
Result:
Edit:
But it can also be done by editing templates if you wish!
JS
Last edited by JScript on December 15th 2014, 4:48 pm; edited 1 time in total (Reason for editing : More info...)
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum