/    Sign up×
Community /Pin to ProfileBookmark

Need help with an Invisionfree skin

I have an invisionfree forum and got permission from someone to edit a script so I can center the text on the advanced category bars. I don’t know much about html or java so I came here to get help. ?

Here’s the script ([URL=http://67.18.37.15/1183/88/upload/p6219332.ibf]url[/URL])

[CODE]Div = document.getElementsByTagName(‘div’)

function CheckDiv(rDiv){
if(rDiv.getElementsByTagName(‘div’)[0].className == “maintitle”){
tDiv = rDiv.getElementsByTagName(‘div’)[0]
if(tDiv.getElementsByTagName(‘a’)[0]){
if(tDiv.getElementsByTagName(‘a’)[0].href.match(/index.php?c=(d+)/)){
ConstructGrads(rDiv,tDiv)
}
}
}
}

function ConstructGrads(rDiv,tDiv){

TableTCons = “<table width=’100%’ cellpadding=’0′ cellspacing=’0′ border=’0′>”
TableTCons += “<tr>”
TableTCons += “<td width=’1%’><img src='”+TopLeft+”‘ alt=” /></td>”
TableTCons += “<td width=’100%’ style=’background:url(“+TopMiddle+”)’>”+tDiv.innerHTML+”</td>”
TableTCons += “<td width=’1%’ align=’right’><img src='”+TopRight+”‘ alt=” /></td>”
TableTCons += “</tr>”
TableTCons += “</table><div class=’tableborder’>”

TableBCons = “</div><table width=’100%’ cellpadding=’0′ cellspacing=’0′ border=’0′>”
TableBCons += “<tr>”
TableBCons += “<td width=’1%’><img src='”+BottomLeft+”‘ alt=” /></td>”
TableBCons += “<td width=’100%’ style=’background:url(“+BottomMiddle+”)’></td>”
TableBCons += “<td width=’1%’ align=’right’><img src='”+BottomRight+”‘ alt=” /></td>”
TableBCons += “</tr>”
TableBCons += “</table>”

tDiv.innerHTML = TableTCons
tDiv.className = “”
tDiv.align = “”

CurrentHTML = rDiv.innerHTML.replace(/</div>/gi,””)
CurrentHTML = “</div>” + CurrentHTML + TableBCons
rDiv.innerHTML = CurrentHTML
rDiv.className = “”
}

for(d=0;d<Div.length;d++){
if(Div[d].className == “tableborder” && Div[d].getElementsByTagName(‘div’)[0]){
CheckDiv(Div[d])
}
}[/CODE]

Here’s the [URL=http://s11.invisionfree.com/hybrix/index.php]Board with code in use[/URL]?

Problem: The text on the maintitle isn’t centered. What would I add and where in order to make it centered?

Also, I have another problem; it would be great if you could answer this one as well. The advanced category grads only appear on the index page. How would I make it so that it appears on every page?

Thanks for any help. ?

to post a comment
JavaScript

0Be the first to comment 😎

×

Success!

Help @kman spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.2,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,
)...