Post by Ross on Oct 12, 2005 7:32:07 GMT -8
Main Footer
This adds an area in the 'Modify Category' and 'Create Category' pages where you can give the category a description. This description can be as long as you like and may contain some some UBBC but I would not advise it. This description will then appear below the category name on the main page.
<script type="text/javascript">
<!--
/*
admin editable category descriptions
created by ross
do not repost outside of support.proboards.com
or 101support.proboards43.com
without permission
*/
var td = document.getElementsByTagName('td')
for(i=0; i<td.length; i++) {
if(td.className == 'catbg' && td.colSpan == '5' && td.innerHTML.match(/\[d:(.+?)\/d\]/i)) {
des = RegExp.$1;
td.lastChild.firstChild.innerHTML = td.lastChild.firstChild.innerHTML.split(/\[d:/i)[0];
td.appendChild(document.createElement('br'))
td.appendChild(document.createElement('font'))
td.lastChild.size = '1';
td.lastChild.style.fontWeight = 'normal';
td.lastChild.innerHTML = des;
}
}
if(location.href.match(/ion=category(modify2|create)/)) {
form = document.getElementsByName('name')[0].parentNode.parentNode.parentNode.parentNode.parentNode.parentNode;
newTr = document.createElement('tr');
input = document.createElement('textarea');
input.cols = 35; input.rows = 4;
input.id = 'description';
input.value = (form.name.value.match(/\[d:(.+?)\/d\]/i))? RegExp.$1 : '';
form.name.parentNode.parentNode.parentNode.parentNode.insertBefore(newTr, form.name.parentNode.parentNode.parentNode.nextSibling);
target = form.name.parentNode.parentNode.parentNode.nextSibling;
target.className = 'windowbg';
target.insertCell(0).innerHTML = '<font size=2>Category Description:</font>';
target.cells[0].vAlign = 'top';
target.insertCell(1).appendChild(input)
target.insertCell(2).innerHTML = '<font size=1>The description of this category. You may use some UBBC code but it is not advised.</font>';
target.cells[2].vAlign = 'top';
form.name.value = form.name.value.split(/\[d:/i)[0];
form.onsubmit = function() {
if(document.getElementById('description').value.match(/(.+?)/))
form.name.value += '\[d:'+ document.getElementById('description').value+ '\/d\]';
}
}
//-->
</script>
This adds an area in the 'Modify Category' and 'Create Category' pages where you can give the category a description. This description can be as long as you like and may contain some some UBBC but I would not advise it. This description will then appear below the category name on the main page.
<script type="text/javascript">
<!--
/*
admin editable category descriptions
created by ross
do not repost outside of support.proboards.com
or 101support.proboards43.com
without permission
*/
var td = document.getElementsByTagName('td')
for(i=0; i<td.length; i++) {
if(td.className == 'catbg' && td.colSpan == '5' && td.innerHTML.match(/\[d:(.+?)\/d\]/i)) {
des = RegExp.$1;
td.lastChild.firstChild.innerHTML = td.lastChild.firstChild.innerHTML.split(/\[d:/i)[0];
td.appendChild(document.createElement('br'))
td.appendChild(document.createElement('font'))
td.lastChild.size = '1';
td.lastChild.style.fontWeight = 'normal';
td.lastChild.innerHTML = des;
}
}
if(location.href.match(/ion=category(modify2|create)/)) {
form = document.getElementsByName('name')[0].parentNode.parentNode.parentNode.parentNode.parentNode.parentNode;
newTr = document.createElement('tr');
input = document.createElement('textarea');
input.cols = 35; input.rows = 4;
input.id = 'description';
input.value = (form.name.value.match(/\[d:(.+?)\/d\]/i))? RegExp.$1 : '';
form.name.parentNode.parentNode.parentNode.parentNode.insertBefore(newTr, form.name.parentNode.parentNode.parentNode.nextSibling);
target = form.name.parentNode.parentNode.parentNode.nextSibling;
target.className = 'windowbg';
target.insertCell(0).innerHTML = '<font size=2>Category Description:</font>';
target.cells[0].vAlign = 'top';
target.insertCell(1).appendChild(input)
target.insertCell(2).innerHTML = '<font size=1>The description of this category. You may use some UBBC code but it is not advised.</font>';
target.cells[2].vAlign = 'top';
form.name.value = form.name.value.split(/\[d:/i)[0];
form.onsubmit = function() {
if(document.getElementById('description').value.match(/(.+?)/))
form.name.value += '\[d:'+ document.getElementById('description').value+ '\/d\]';
}
}
//-->
</script>