In a similar vein to my query about semi-automatic linking I was wondering if any one knows of anything that might do the following.
As an editor I create a some wiki text that includes a link such as [[the link page|This is the pretty text]].
What I'm wonder if it would be possible to to is for the editor to just type [[This is the pretty text]] and save the page.
The page would display the link in red as an unknown link, and what would seem to be good would to offer the editor when they click on the link a choice of 1. Linking to a current page 2. Creating a new page
If the editor chooses 1 they would then be taken to a search page where they could then search for and find the page they want to link to, which would then re-write the link for them as [[the link page|This is the pretty text]]
I can't find anything out there but was just wondered ...
Thanks
John
----------------------------------------- Cyngor Sir Powys County Council www.powys.gov.uk
Mae'r e bost hwn ac unrhyw atodiad iddo yn gyfrinachol ac fe'i bwriedir ar gyfer y sawl a enwir arno yn unig. Gall gynnwys gwybodaeth freintiedig. Os yw wedi eich cyrraedd trwy gamgymeriad ni ellwch ei gopio, ei ddosbarthu na'i ddangos i unrhyw un arall a dylech gysylltu gyda Cyngor Sir Powys ar unwaith.
Mae unrhyw gynnwys nad yw'n ymwneud gyda busnes swyddogol Cyngor Sir Powys yn bersonol i'r awdur ac nid yw'n awdurdodedig gan y Cyngor.
This e mail and any attachments are confidential and intended for the named recipient only. The content may contain privileged information. If it has reached you by mistake, you should not copy, distribute or show the content to anyone but should contact Powys County Council at once.
Any content that is not pertinent to Powys County Council business is personal to the author, and is not necessarily the view of the Council.
This one sounds (to me) to be a little tougher than the first semi-auto links.
The problem is that when a user "clicks a link", he's clicking the actual rendered link, which may not be obvious to detect in the wikitext.
For example, the link could be in a Template instead of the actual page. Or worse, it could be a generated link using magic words. For example: [[{{PAGENAME}}/Subpage|subpage pretty text]].
Another problem is links which contain their own markup. For example, the following is legal wiki syntax: [[Main Page| some pretty '''bold''' text]]. This makes parsing the wikitext for the instance of the clicked link harder. Especially when you consider that alternate syntaxes can produce the same rendered html. This is the same as above: [[Main Page| some pretty <b>bold</b> text]].
Such an extension would need to be able to make these (and many other) distinctions.
I think your idea is interesting - but it's one of those problems that's a lot more intricate and difficult to implement than to state.
-- Jim R. Wilson (jimbojw)
On 3/7/07, John Moorhouse john.moorhouse@powys.gov.uk wrote:
In a similar vein to my query about semi-automatic linking I was wondering if any one knows of anything that might do the following.
As an editor I create a some wiki text that includes a link such as [[the link page|This is the pretty text]].
What I'm wonder if it would be possible to to is for the editor to just type [[This is the pretty text]] and save the page.
The page would display the link in red as an unknown link, and what would seem to be good would to offer the editor when they click on the link a choice of
- Linking to a current page
- Creating a new page
If the editor chooses 1 they would then be taken to a search page where they could then search for and find the page they want to link to, which would then re-write the link for them as [[the link page|This is the pretty text]]
I can't find anything out there but was just wondered ...
Thanks
John
Cyngor Sir Powys County Council www.powys.gov.uk
Mae'r e bost hwn ac unrhyw atodiad iddo yn gyfrinachol ac fe'i bwriedir ar gyfer y sawl a enwir arno yn unig. Gall gynnwys gwybodaeth freintiedig. Os yw wedi eich cyrraedd trwy gamgymeriad ni ellwch ei gopio, ei ddosbarthu na'i ddangos i unrhyw un arall a dylech gysylltu gyda Cyngor Sir Powys ar unwaith.
Mae unrhyw gynnwys nad yw'n ymwneud gyda busnes swyddogol Cyngor Sir Powys yn bersonol i'r awdur ac nid yw'n awdurdodedig gan y Cyngor.
This e mail and any attachments are confidential and intended for the named recipient only. The content may contain privileged information. If it has reached you by mistake, you should not copy, distribute or show the content to anyone but should contact Powys County Council at once.
Any content that is not pertinent to Powys County Council business is personal to the author, and is not necessarily the view of the Council.
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org http://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Probably showing my 'lack of knowledge ', but there must already be a function that is called when a user clicks on a link and the wiki tries to match the link to a current page and fails, as it then autoloads the editor so the user can create a page, it would be in this step that you could offer a choice.
Interestingly my idea of starting with the [[pretty text]] and having a way of choosing the page after the user has saved the page would fail if the pretty text contains any wiki markup [[some pretty '''bold''' text ]] doesn't get rendered as a link, so this would only work if your editors came back to add effects afterwards.
I have noticed that in some situations if you click on a link in the took box or side navigation in a new wiki that has not yet been created you get offered
'There is currently no text in this page, you can search for this page title http://jma-databases.co.uk/index.php/Special:Search/JMA_:Site_support in other pages or edit this page http://jma-databases.co.uk/index.php?title=JMA_:Site_support&action=edit.' I was wondering if what ever is being used to trigger this response could be adapted.
Ta
John
Jim Wilson wrote:
This one sounds (to me) to be a little tougher than the first semi-auto links.
The problem is that when a user "clicks a link", he's clicking the actual rendered link, which may not be obvious to detect in the wikitext.
For example, the link could be in a Template instead of the actual page. Or worse, it could be a generated link using magic words. For example: [[{{PAGENAME}}/Subpage|subpage pretty text]].
Another problem is links which contain their own markup. For example, the following is legal wiki syntax: [[Main Page| some pretty '''bold''' text]]. This makes parsing the wikitext for the instance of the clicked link harder. Especially when you consider that alternate syntaxes can produce the same rendered html. This is the same as above: [[Main Page| some pretty <b>bold</b> text]].
Such an extension would need to be able to make these (and many other) distinctions.
I think your idea is interesting - but it's one of those problems that's a lot more intricate and difficult to implement than to state.
-- Jim R. Wilson (jimbojw)
On 3/7/07, John Moorhouse john.moorhouse@powys.gov.uk wrote:
In a similar vein to my query about semi-automatic linking I was wondering if any one knows of anything that might do the following.
As an editor I create a some wiki text that includes a link such as [[the link page|This is the pretty text]].
What I'm wonder if it would be possible to to is for the editor to just type [[This is the pretty text]] and save the page.
The page would display the link in red as an unknown link, and what would seem to be good would to offer the editor when they click on the link a choice of
- Linking to a current page
- Creating a new page
If the editor chooses 1 they would then be taken to a search page where they could then search for and find the page they want to link to, which would then re-write the link for them as [[the link page|This is the pretty text]]
I can't find anything out there but was just wondered ...
Thanks
John
Cyngor Sir Powys County Council www.powys.gov.uk
Mae'r e bost hwn ac unrhyw atodiad iddo yn gyfrinachol ac fe'i bwriedir ar gyfer y sawl a enwir arno yn unig. Gall gynnwys gwybodaeth freintiedig. Os yw wedi eich cyrraedd trwy gamgymeriad ni ellwch ei gopio, ei ddosbarthu na'i ddangos i unrhyw un arall a dylech gysylltu gyda Cyngor Sir Powys ar unwaith.
Mae unrhyw gynnwys nad yw'n ymwneud gyda busnes swyddogol Cyngor Sir Powys yn bersonol i'r awdur ac nid yw'n awdurdodedig gan y Cyngor.
This e mail and any attachments are confidential and intended for the named recipient only. The content may contain privileged information. If it has reached you by mistake, you should not copy, distribute or show the content to anyone but should contact Powys County Council at once.
Any content that is not pertinent to Powys County Council business is personal to the author, and is not necessarily the view of the Council.
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org http://lists.wikimedia.org/mailman/listinfo/mediawiki-l
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org http://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Probably showing my 'lack of knowledge ', but there must already be a function that is called when a user clicks on a link and the wiki tries to match the link to a current page and fails, as it then autoloads the editor so the user can create a page, it would be in this step that you could offer a choice.
Well, sortof. When you click a red link, it takes you to the edit page of the chosen article. At this point, the decision to show you the edit form (as opposed to the "this page is empty" message) has already been made. If you do a view-source of the link URL, you'll see that "action=edit" is already in there.
You _can_ hook into MediaWiki at the "show edit page" event and do some cool things with it, but there's no good way to know the article from which the user came - which would be a prerequisite for modifying said article's links. Technically you could use the browser's provided "referrer", but this is unreliable (proxies) and easily spoofed or disabled.
All of that aside - it's still a hard problem because of the nondeterministic nature of wiki rendering and the complications that arise from template transclusion. Even if you know the referrer (as in an Edit Preview), the process of determining where in the wikitext a particular link was generated is daunting.
I'm not trying to say that you're idea is a bad one - or flawed in some way. It sounds like useful functionality to have (in some form), it's just that MediaWiki, in its current form, is not amiable to the development of such an extension.
-- Jim
On 3/7/07, John Moorhouse john.moorhouse@3jays.me.uk wrote:
Probably showing my 'lack of knowledge ', but there must already be a function that is called when a user clicks on a link and the wiki tries to match the link to a current page and fails, as it then autoloads the editor so the user can create a page, it would be in this step that you could offer a choice.
Interestingly my idea of starting with the [[pretty text]] and having a way of choosing the page after the user has saved the page would fail if the pretty text contains any wiki markup [[some pretty '''bold''' text ]] doesn't get rendered as a link, so this would only work if your editors came back to add effects afterwards.
I have noticed that in some situations if you click on a link in the took box or side navigation in a new wiki that has not yet been created you get offered
'There is currently no text in this page, you can search for this page title http://jma-databases.co.uk/index.php/Special:Search/JMA_:Site_support in other pages or edit this page <http://jma-databases.co.uk/index.php?title=JMA_:Site_support&action=edit
.'
I was wondering if what ever is being used to trigger this response could be adapted.
Ta
John
Jim Wilson wrote:
This one sounds (to me) to be a little tougher than the first semi-auto links.
The problem is that when a user "clicks a link", he's clicking the
actual
rendered link, which may not be obvious to detect in the wikitext.
For example, the link could be in a Template instead of the actual
page. Or
worse, it could be a generated link using magic words. For example: [[{{PAGENAME}}/Subpage|subpage pretty text]].
Another problem is links which contain their own markup. For example,
the
following is legal wiki syntax: [[Main Page| some pretty '''bold'''
text]].
This makes parsing the wikitext for the instance of the clicked link harder. Especially when you consider that alternate syntaxes can
produce
the same rendered html. This is the same as above: [[Main Page| some
pretty
<b>bold</b> text]].
Such an extension would need to be able to make these (and many other) distinctions.
I think your idea is interesting - but it's one of those problems that's
a
lot more intricate and difficult to implement than to state.
-- Jim R. Wilson (jimbojw)
On 3/7/07, John Moorhouse john.moorhouse@powys.gov.uk wrote:
In a similar vein to my query about semi-automatic linking I was wondering if any one knows of anything that might do the following.
As an editor I create a some wiki text that includes a link such as [[the link page|This is the pretty text]].
What I'm wonder if it would be possible to to is for the editor to just type [[This is the pretty text]] and save the page.
The page would display the link in red as an unknown link, and what would seem to be good would to offer the editor when they click on the link a choice of
- Linking to a current page
- Creating a new page
If the editor chooses 1 they would then be taken to a search page where they could then search for and find the page they want to link to,
which
would then re-write the link for them as [[the link page|This is the pretty text]]
I can't find anything out there but was just wondered ...
Thanks
John
Cyngor Sir Powys County Council www.powys.gov.uk
Mae'r e bost hwn ac unrhyw atodiad iddo yn gyfrinachol ac fe'i bwriedir ar gyfer y sawl a enwir arno yn unig. Gall gynnwys gwybodaeth freintiedig. Os yw wedi eich cyrraedd trwy gamgymeriad ni ellwch ei gopio, ei ddosbarthu na'i ddangos i unrhyw un arall a dylech gysylltu gyda Cyngor Sir Powys ar unwaith.
Mae unrhyw gynnwys nad yw'n ymwneud gyda busnes swyddogol Cyngor Sir Powys yn bersonol i'r awdur ac nid yw'n awdurdodedig gan y Cyngor.
This e mail and any attachments are confidential and intended for the named recipient only. The content may contain privileged information. If it has reached you by mistake, you should not copy, distribute or show the content to anyone but should contact Powys County Council at once.
Any content that is not pertinent to Powys County Council business is personal to the author, and is not necessarily the view of the Council.
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org http://lists.wikimedia.org/mailman/listinfo/mediawiki-l
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org http://lists.wikimedia.org/mailman/listinfo/mediawiki-l
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org http://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Jim Wilson wrote:
Probably showing my 'lack of knowledge ', but there must already be a function that is called when a user clicks on a link and the wiki tries to match the link to a current page and fails, as it then autoloads the editor so the user can create a page, it would be in this step that you could offer a choice.
Well, sortof. When you click a red link, it takes you to the edit page of the chosen article. At this point, the decision to show you the edit form (as opposed to the "this page is empty" message) has already been made. If you do a view-source of the link URL, you'll see that "action=edit" is already in there.
You _can_ hook into MediaWiki at the "show edit page" event and do some cool things with it, but there's no good way to know the article from which the user came - which would be a prerequisite for modifying said article's links. Technically you could use the browser's provided "referrer", but this is unreliable (proxies) and easily spoofed or disabled.
Ah - I see that would be a problem, knowing where you came from, as they are in effect separate actions - may be in wiki 3.7.3 !!!
I'm not trying to say that you're idea is a bad one - or flawed in some way. It sounds like useful functionality to have (in some form), it's just that MediaWiki, in its current form, is not amiable to the development of such an extension
An alternative might be some form of page search button actually on the edit page, like the current button that allows you to put the [[ ]] round selected text, that would put in front:- [[Selected Page| and after:- ]] round the selected text where 'selected page' would be the name of the page selected in the search window.
Ta
John
Jim Wilson wrote:
You _can_ hook into MediaWiki at the "show edit page" event and do some cool things with it, but there's no good way to know the article from which the user came - which would be a prerequisite for modifying said article's links. Technically you could use the browser's provided "referrer", but this is unreliable (proxies) and easily spoofed or disabled.
All of that aside - it's still a hard problem because of the nondeterministic nature of wiki rendering and the complications that arise from template transclusion. Even if you know the referrer (as in an Edit Preview), the process of determining where in the wikitext a particular link was generated is daunting.
Maybe creating a redirect on this page is a valid solution ?
Maybe creating a redirect on this page is a valid solution ?
A solution to which part?
IMHO, the most elegant solution to his suggestion is to do these kinds of things from the edit preview of the linking page _before submission_ rather than trying to deduce second-hand from where an edit request came.
But then you still have the problem of the non-reversibility of Wikitext/HTML conversion.
Maybe an additional button that's just like the "[[ ]]" one, but prompts the user for a page to link to might work. Maybe with an ajaxy auto-complete search box so you can start typing the article you want to link to and it'll finish it for you (trying to think of the case where there are a huge number of potential "link to" articles without resorting to a secondary search page).
Who knows - I'm so accustomed to modifying wikitext by hand that I am probably not the best person to suggest functional enhancements to the gui tools. Guess you could chalk it up to "command line syndrome" :)
I mean, wikitext is so easy to use, No Wonder it's Number 1 (tm)!
On 3/7/07, Platonides Platonides@gmail.com wrote:
Jim Wilson wrote:
You _can_ hook into MediaWiki at the "show edit page" event and do some
cool
things with it, but there's no good way to know the article from which
the
user came - which would be a prerequisite for modifying said article's links. Technically you could use the browser's provided "referrer", but this is unreliable (proxies) and easily spoofed or disabled.
All of that aside - it's still a hard problem because of the nondeterministic nature of wiki rendering and the complications that
arise
from template transclusion. Even if you know the referrer (as in an
Edit
Preview), the process of determining where in the wikitext a particular
link
was generated is daunting.
Maybe creating a redirect on this page is a valid solution ?
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org http://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Jim Wilson wrote:
Maybe an additional button that's just like the "[[ ]]" one, but prompts the user for a page to link to might work. Maybe with an ajaxy auto-complete search box so you can start typing the article you want to link to and it'll finish it for you (trying to think of the case where there are a huge number of potential "link to" articles without resorting to a secondary search page).
I'm with you here Jim I think this is most elegant solution, to main idea behind this my query which is to provide a way that editors can select the page title they are linking to rather than having to remember it and type it in (there is an extension that does this for categories when it lists all the categories at the bottom of the page and you can just select one or more from there.)
Who knows - I'm so accustomed to modifying wikitext by hand that I am probably not the best person to suggest functional enhancements to the gui tools. Guess you could chalk it up to "command line syndrome" :)
I mean, wikitext is so easy to use, No Wonder it's Number 1 (tm)!
Agree with you that MW is the best of breed, but as some one who is dyslexic I am frequently making spelling mistakes in my links and being able pick them from a list would be great.
Ta
John
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org http://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Jim Wilson wrote:
Maybe creating a redirect on this page is a valid solution ?
A solution to which part?
A solution for John Moorhouse, which has the problem. I'm not sure of having understood the problem.
John Moorhouse wrote:
I'm with you here Jim I think this is most elegant solution, to main idea behind this my query which is to provide a way that editors can select the page title they are linking to rather than having to remember it and type it in (there is an extension that does this for categories when it lists all the categories at the bottom of the page and you can just select one or more from there.)
mmm... Writing [[ or {{ and having a dropbox with titles appear could be nice. But you pages will grow, and which do you choose to show?
On 3/7/07, Rob Church robchur@gmail.com wrote:
If it can be assumed that by clicking on the link generated by [[this is some pretty link text]] in page A, we also want to change links in any other page pointing to that one, then you *can* quite easily find out where it's being linked from, using the link tables...with the caveat that there will also be link table entries on pages where links have come from a template.
That's a good point - and a strong assumption. John, would you want to change the text of _all the links_ that link to a given page, or just one a time? I may have misunderstood the problem statement.
On 3/7/07, Platonides Platonides@gmail.com wrote:
Maybe creating a redirect on this page is a valid solution ?
A solution to which part?
A solution for John Moorhouse, which has the problem. I'm not sure of having understood the problem.
Sorry about that. I'll clarify. There are two major problem segments (that I know of) in implementing a solution to John's request: 1) Determining which page is to receive the edits (assuming you hook the AlternateEdit event or similar) 2) Determining where in the wikitext to make the change.
I didn't understand which one of these the Redirection was meant to address. If we go with the assumption that the user wants to update all links everywhere, then a redirection would work for problem #1 - if not, then I'm not so sure.
But you pages will grow, and which do you choose to show?
Ah, but that's where the Ajaxy autocomplete textbox comes in :) Just start typing and it suggests what you might want by wildcard querying the title table.
-- Jim
On 3/7/07, Platonides Platonides@gmail.com wrote:
Jim Wilson wrote:
Maybe creating a redirect on this page is a valid solution ?
A solution to which part?
A solution for John Moorhouse, which has the problem. I'm not sure of having understood the problem.
John Moorhouse wrote:
I'm with you here Jim I think this is most elegant solution, to main idea behind this my query which is to provide a way that editors can select the page title they are linking to rather than having to remember it and type it in (there is an extension that does this for categories when it lists all the categories at the bottom of the page and you can just select one or more from there.)
mmm... Writing [[ or {{ and having a dropbox with titles appear could be nice. But you pages will grow, and which do you choose to show?
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org http://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Jim Wilson wrote:
On 3/7/07, Rob Church robchur@gmail.com wrote:
If it can be assumed that by clicking on the link generated by [[this is some pretty link text]] in page A, we also want to change links in any other page pointing to that one, then you *can* quite easily find out where it's being linked from, using the link tables...with the caveat that there will also be link table entries on pages where links have come from a template.
That's a good point - and a strong assumption. John, would you want to change the text of _all the links_ that link to a given page, or just one a time? I may have misunderstood the problem statement.
I had envisaged one at a time, I create a page with
*[[Pretty link for page 1]] *[[Pretty link for page 2]] *[[Pretty link for page 3]]
and save this page, I would expect to get a bulleted list of three links, all of which would be red.
With the new extension in place when I click on the first link, I could then select 'choose page' rather than 'create page', search for the page, select it and the page title is written back into the source page wiki text so it now become:-
*[[page 1 as selected|Pretty link for page 1]] *[[Pretty link for page 2]] *[[Pretty link for page 3]]
and the first link is now blue, I can then select the second link.... third link .....
etc.
Ta
John
On 08/03/07, John Moorhouse john.moorhouse@3jays.me.uk wrote:
With the new extension in place when I click on the first link, I could then select 'choose page' rather than 'create page', search for the page, select it and the page title is written back into the source page wiki text so it now become:-
Yeah, so it sounds like using the link tables wouldn't do the trick - we'd want to track the referring page.
Rob Church
On 07/03/07, Jim Wilson wilson.jim.r@gmail.com wrote:
You _can_ hook into MediaWiki at the "show edit page" event and do some cool things with it, but there's no good way to know the article from which the user came - which would be a prerequisite for modifying said article's links. Technically you could use the browser's provided "referrer", but this is unreliable (proxies) and easily spoofed or disabled.
All of that aside - it's still a hard problem because of the nondeterministic nature of wiki rendering and the complications that arise from template transclusion. Even if you know the referrer (as in an Edit Preview), the process of determining where in the wikitext a particular link was generated is daunting.
If it can be assumed that by clicking on the link generated by [[this is some pretty link text]] in page A, we also want to change links in any other page pointing to that one, then you *can* quite easily find out where it's being linked from, using the link tables...with the caveat that there will also be link table entries on pages where links have come from a template. I assume any decent implementation would ignore pages which don't seem to have the link in and wouldn't commit the edit unless an actual change was made further down the line.
Rob Church
mediawiki-l@lists.wikimedia.org