imfdb.org

imfdb.org (http://forum.imfdb.org/index.php)
-   imfdb (http://forum.imfdb.org/forumdisplay.php?f=5)
-   -   Use of Redirects. (http://forum.imfdb.org/showthread.php?t=2004)

zackmann08 06-17-2012 09:05 PM

Use of Redirects.
 
I have a question for the admins. Can we PLEASE amend the site rules to make is that you are required to use redirects whenever possible? I recently did some reorganizing of the M1911 page and I had to go to EVERY page that linked to a gun that I moved...

For example, take the Para-Ordnance P10. If i was to say on a movie page that Harrison Ford playing the roll of John Smith used a Para-Ordnance P10, the code SHOULD look like :

John Smith ([[Harrison Ford]]) is seen with a [[Para-Ordnance P10]].

With the Para-Ordnance P10 redirecting to the P10 on the M1911 page.

Instead, people are putting: [[M1911_pistol_series#Para-Ordnance_P-10|Para-Ordnance P10]]. This means that if/when the P10 is moved, ALL the pages that linked to it must be changed instead of changing the redirect.

Whats more, if the heading is changed on the page so that instead of saying:

==Para-Ordnance P10==
it reads
==Para-Ordnance P-10==

All the links wont work.

I know that this is a hard thing to police but can we PLEASE put it in the rules?

Ben41 06-19-2012 07:04 AM

I think it should be recommended that redirects be used, but I always have trouble writing that code to correctly direct the link. Do we have a guide that shows the way to write this code?

zackmann08 06-19-2012 04:12 PM

you mean the code for redirects? Here's a step by step guide using the M1911A1 as an example. (For the record, http://www.imfdb.org/wiki/M1911A1 already has a redirect setup.)
  1. Naviagte to the page you need to setup a redirect on. You can do this by simply typing [[M1911A1]] on the page you are working on. If the redirect isn't set up, the link will be red. Click the link and it will take you to the page.
  2. Figure out what page you need to redirect TO. In this case we want to redirect "M1911A1" to the "M1911 pistol series" page (note the capitalization). Additionally, we want to go to the subheading "M1911A1"
  3. The syntax for a redirect is #redirect [[PAGENAME#SUBHEADING]]. So in this case, we would type [b]#redirect [[M1911 pistol series#M1911A1]]. This should be the ONLY text on the page that we are redirecting.
  4. Finally, after you save the page, test the link to make sure it works

Additional examples:
To redirect [[Beretta 92FS]], the code is #REDIRECT [[Beretta 92 pistol series#Beretta 92F/FS]]
To redirect [[Benelli M4]], the code is #REDIRECT [[Benelli_M_Series_Super_90_Shotguns#Benelli_M4]]

Here is the MediaWiki page about how to do redirects:
http://www.mediawiki.org/wiki/Help:Redirects

One thing that sometimes happens is that you get double redirects. For example m1911a1-->M1911A1-->M1911 pistol series#M1911A1. MediaWiki doesn't allow double redirects and will stop the link after the first jump to prevent infinite looping. Don't worry about this though. Every day or two I check the double-redirect page and fix any broken redirects.

Hope that helps! If you have any more questions, feel free to ask um here or post directly on my talk page. :-)

-Z

commando552 06-19-2012 10:51 PM

Assuming the subsection you want to link to has a table of contents, you can get the correct link by clicking on the section in the table of contents and then copying the last part of the address.


All times are GMT. The time now is 12:28 AM.

Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.