Trying to get phpBB to create a link on their new forum link type of forum. Unfortunately you can't pass variables from PHP to the link. To get around that I created a forum that's a link with https://changeme
as the link. In the the overall_footer
I placed some Javascript:
New = "<a href=\"http://domain.com/players.php?pid={S_PLAYER_ID}\" class=\"forumtitle\">Roster</a>"
a = document.getElementsByTagName("dt");
for (i=0; i < a.length; i++) {
if((a[i].innerHTML.match("<a href=\"http://changeme\" class=\"forumtitle\">Roster</a>"))) {
a[i].innerHTML=a[i].innerHTML.replace("<a href=\"http://changeme\" class=\"forumtitle\">Roster</a>",New);
}
It works in Safari/FF but of course, IE doesn't. What is a good workaround or a different way to program this where it will also work correctly in IE?
-
0I don't really know what the problem is. I barely know JS but I also don't care about the IE, nobody smart uses it nowadays 🙂 Some things just don't work on there. — Zielak69
-
0What makes you say that? See this: https://en.wikipedia.org/wiki/Usage_share_of_web_browsers — casablanca
-
0Besides the answer provided here, I was also looking around at other posts about replace not working in IE, so instead decided to find a different script that appears to be working! A quick touch-up will fix it all, thanks Ozzu! — dyfrin