FANDOM


This Forum has been archived

Visit the new Forums
Forums: Index Community Central Forum Add link to Revision History from a Diff
FANDOM's forums are a place for the community to help other members.
To contact staff directly or to report bugs, please use Special:Contact.

50px-Replacement filing cabinet.svg

Note: This topic has been unedited for 3378 days. It is considered archived - the discussion is over. Do not add to unless it really needs a response.


In the Oasis skin, when one is scrolling through diffs, as far as I can tell, there is nothing one can click on to then jump directly to the revision history. In my own case, I’ve added History link to the floating toolbar at the bottom of the page. But, I want to provide a way for Oasis users who have not added such a button to their floating toolbars to get to the history quickly. Ideally, I think that it should be on a dropdown list on the edit button that appears when looking at a diff (here’s an example diff). I’m pretty sure that this can be done with some clever javascript coding. Any ideas? Thanks! — SpikeToronto 07:45, June 4, 2011 (UTC)

P.S. This is not an issue with those of us who use the Monobook skin since the history tab remains visible at the top of the page when viewing a diff. Thanks! — SpikeToronto 07:45, June 4, 2011 (UTC)

Yeah, this bugs me also. When I get some time, I'll work up a JS thing to add back a history link on the diffs page assuming you can't just add something to a MediaWiki: page. -- Fandyllic (talk · contr) 6 Jun 2011 1:40 PM Pacific
In the meantime, the only bandaid solution is to add a History link to the floating toolbar at the bottom of the page, as I mentioned above. I look forward to what you can come up with! I bet it might be something as simple as adding a few lines to MediaWiki:Wikia.css to establish and locate the button. Or, would it require JavaScript? See how little I know about this stuff! SmileySpikeToronto 20:57, June 6, 2011 (UTC)
It may not require JS, but it would almost definitely not be added with CSS. -- Fandyllic (talk · contr) 6 Jun 2011 3:00 PM Pacific
See! That’s why I rely on the CSS/JS expertise of others. — SpikeToronto Jun 6, 2011, 6:46PM EDT

(Reset indent)  Any luck with this? :) Thanks! — SpikeToronto 05:43, June 23, 2011 (UTC)

UPDATE: I just discovered something odd about this. Some wikis actually do have a Back to page link for returning to the article when viewing diffs. See the following:

Contrast those with this

This is very comparable to the Back to page issue discussed at Forum:Add "Back to page" to Revision History. Any ideas, thoughts? Thanks! — SpikeToronto 18:02, June 23, 2011 (UTC)

The back to page IS there, but it's named Difference between revisions in your wiki rather than Back to page. It seems that someone was playing with some MediaWiki: interface messages there --Ciencia Al Poder (talk) -WikiDex 18:20, June 23, 2011 (UTC)
The back to page link is replaced by the new editor. Notice the correlation between wikis that use the new editor, and wikis that are missing the back to page... They're the same wikis!
I just disabled the editor at my wiki, and (suprise, suprise) the back to page link returns!   ǝsʞpɐןǝ  (message wall)  18:43, 23/06/2011

(Reset indent) @Ciencia al poder: I do not think that the missing Back to page link and the Difference between revisions link are connected. The latter is generated by MediaWiki:Difference. It is a typical system message like the others found at Special:AllMessages. One can either use the default — which is Difference between revisions without a link — or alter it; we added an explanatory link. The Differences between revisions was already there, appearing at the top of any diffs. We just hypertexted it.
Deleting MediaWiki:Difference only removes the explanatory link and returns the wiki to the default message: Difference between revisions without a link. I just finished testing this. The deletion did not cause a a Back to page link to appear. (Here is the deletion log to confirm the test attempt.)
@Eladkse: I cannot understand how the new editor can be at the root of this since this thread was begun by me on 4 June, and our wiki did not activate the new editor until 22 June.

The only thing I think might be a worthwhile test would be to test both of your theories at the same time. That is, delete MediaWiki:Difference while at the same time de-activating the new editor. I do not want to de-activate the new editor right now, in the middle of the day, because it might interfere with any editing others may be doing. I’ll do it much later and then report back to this forum with the result. Thanks! — SpikeToronto 20:17, June 23, 2011 (UTC)



Try this:

function HistoryOnDiffs() {
	if(urlQuery('diff')) {
		var header = document.getElementById('WikiaPageHeader').getElementsByTagName('p')[0]
		var btp = header.getElementsByTagName('a')[0];
		header.innerHTML = btp.outerHTML + ' | <a href="/index.php?title=' + wgPageName + '&action=history">History</a>';
	}
}

addOnloadHook(HistoryOnDiffs);

/* URL parser */
function urlQuery(quer) {
	for(i in location.href.split('?')) {
		for(j in location.href.split('?')[i].split('&')) {
			if(location.href.split('?')[i].split('&')[j].split('=')[0] == quer) {
				return location.href.split('?')[i].split('&')[j].split('=')[1];
			}
		}
	}
	return undefined;
}

 Monchoman45  Talk  Contribs  Skystone  21:16,6/23/2011 



Thanks Monchoman! I can’t wait to try it. I’ll report back with success, I’m sure. As for the test I referred to above, I don’t need to do it. I just realized that on 6 June, Fandyllic reported the same issue on his wiki, which has neither the new editor nor anything but the default MediaWiki:Difference. Thanks again! — SpikeToronto 23:42, June 23, 2011 (UTC)

UPDATE: Hey Monchoman! The script errored out on this line:
if(urlQuery(diff))
The error message was: 'diff' is undefined
Any ideas? Thanks! SmileySpikeToronto 09:05, June 24, 2011 (UTC)
Whoops, my bad. Use 'diff' instead of diff.  Monchoman45  Talk  Contribs  Skystone  23:55,6/24/2011 
Community content is available under CC-BY-SA unless otherwise noted.