Civilization: The Expansion Project
https://dev.civproject.net/forum/

phpbb
https://dev.civproject.net/forum/viewtopic.php?f=13&t=538
Page 1 of 1

Author:  mcbeth [ 2008-12-12 5:35:16 ]
Post subject:  phpbb

I'm not familiar with phpbb, but how hard would it be to upgrade this forum to a slightly newer version? There is one feature that is driving me nuts. I usually deal with forums by ctrl-clicking on topic to open them in new tabs, but this forum (alone among the phpbb I deal with) forces the current window to go to the forum also. I'm assuming that that is due to the
Code:
onclick="window.location.href='viewforum.php?f=7

part of the td, which doesn't appear to be present in other fora.[/code]

Author:  mcbeth [ 2008-12-12 15:16:39 ]
Post subject: 

Why complain when you can fix. Below is a Greasemonkey script that cleans up the problem (I didn't see any side effects, but there may be some due to the class "row1" getting reused alot.

Code:
// CivProject link cleaner
// version 0.1
// 2008-12-12
// Copyright (c) 2008, Jeffrey McBeth
// ==UserScript==
// @name          CivProject Fixer
// @namespace     http://diveintogreasemonkey.org/download/
// @description   removes all the onclick markers from the td elements
// @include       http://www.civproject.net/forum/*
// ==/UserScript==

var allTD;
allTD = document.evaluate(
   "//td[@class='row1']",
   document,
   null,
   XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE,
   null);

for(var i = 0; i < allTD.snapshotLength; i++)
{
   thisTD = allTD.snapshotItem(i);
   thisTD.removeAttribute('onclick');
}

Page 1 of 1 All times are UTC
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/