Re: [Wikitech-l] Equivalence for using Template:Cite_Web with templates surrounding Wikicode

2020-01-07 Thread Bartosz Dziewoński

On 2020-01-07 08:57, Egbe Eugene wrote:

Thanks very much Bartosz, it works just fine with Cite. Just a follow up
question. *Is Cite responsible for rendering * *?*


Yes.

--
Bartosz Dziewoński

___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Re: [Wikitech-l] Equivalence for using Template:Cite_Web with templates surrounding Wikicode

2020-01-06 Thread Egbe Eugene
Thanks very much Bartosz, it works just fine with Cite. Just a follow up
question. *Is Cite responsible for rendering * *?*

On Mon, Jan 6, 2020 at 3:03 PM Bartosz Dziewoński 
wrote:

> Sounds like you don’t have Cite installed?
>
> On Monday, January 6, 2020, Egbe Eugene  wrote:
>
> > Thanks very much Bartosz, I tried it on my VE sandbox page on
> en.Wikipedia
> > and it works really cool. However, I get the following error on my local
> MW
> > install
> >
> >  *jQuery.Deferred exception: ve.dm.MWReferenceModel is not a constructor
> > TypeError: ve.dm.MWReferenceModel is not a constructor*
> >
> > I should be lacking a module or something. Please can you help with this?
> >
> > Thanks once more,
> > --
> > Eugene
> >
> > On Sat, Jan 4, 2020 at 10:10 AM Bartosz Dziewoński 
> > wrote:
> >
> > > I am not really sure what you mean…
> > >
> > > Here's a complete example that inserts, basically, "Hello[1] world[2]"
> > > (text with two different references):
> > >
> > > https://phabricator.wikimedia.org/P10038
> > >
> > > Does that help?
> > >
> > > --
> > > Bartosz Dziewoński
> > >
> > > ___
> > > Wikitech-l mailing list
> > > Wikitech-l@lists.wikimedia.org
> > > https://lists.wikimedia.org/mailman/listinfo/wikitech-l
> > ___
> > Wikitech-l mailing list
> > Wikitech-l@lists.wikimedia.org
> > https://lists.wikimedia.org/mailman/listinfo/wikitech-l
>
>
>
> --
> Matma Rex
> ___
> Wikitech-l mailing list
> Wikitech-l@lists.wikimedia.org
> https://lists.wikimedia.org/mailman/listinfo/wikitech-l
___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Re: [Wikitech-l] Equivalence for using Template:Cite_Web with templates surrounding Wikicode

2020-01-06 Thread Bartosz Dziewoński
Sounds like you don’t have Cite installed?

On Monday, January 6, 2020, Egbe Eugene  wrote:

> Thanks very much Bartosz, I tried it on my VE sandbox page on en.Wikipedia
> and it works really cool. However, I get the following error on my local MW
> install
>
>  *jQuery.Deferred exception: ve.dm.MWReferenceModel is not a constructor
> TypeError: ve.dm.MWReferenceModel is not a constructor*
>
> I should be lacking a module or something. Please can you help with this?
>
> Thanks once more,
> --
> Eugene
>
> On Sat, Jan 4, 2020 at 10:10 AM Bartosz Dziewoński 
> wrote:
>
> > I am not really sure what you mean…
> >
> > Here's a complete example that inserts, basically, "Hello[1] world[2]"
> > (text with two different references):
> >
> > https://phabricator.wikimedia.org/P10038
> >
> > Does that help?
> >
> > --
> > Bartosz Dziewoński
> >
> > ___
> > Wikitech-l mailing list
> > Wikitech-l@lists.wikimedia.org
> > https://lists.wikimedia.org/mailman/listinfo/wikitech-l
> ___
> Wikitech-l mailing list
> Wikitech-l@lists.wikimedia.org
> https://lists.wikimedia.org/mailman/listinfo/wikitech-l



-- 
Matma Rex
___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Re: [Wikitech-l] Equivalence for using Template:Cite_Web with templates surrounding Wikicode

2020-01-05 Thread Egbe Eugene
Thanks very much Bartosz, I tried it on my VE sandbox page on en.Wikipedia
and it works really cool. However, I get the following error on my local MW
install

 *jQuery.Deferred exception: ve.dm.MWReferenceModel is not a constructor
TypeError: ve.dm.MWReferenceModel is not a constructor*

I should be lacking a module or something. Please can you help with this?

Thanks once more,
-- 
Eugene

On Sat, Jan 4, 2020 at 10:10 AM Bartosz Dziewoński 
wrote:

> I am not really sure what you mean…
>
> Here's a complete example that inserts, basically, "Hello[1] world[2]"
> (text with two different references):
>
> https://phabricator.wikimedia.org/P10038
>
> Does that help?
>
> --
> Bartosz Dziewoński
>
> ___
> Wikitech-l mailing list
> Wikitech-l@lists.wikimedia.org
> https://lists.wikimedia.org/mailman/listinfo/wikitech-l
___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Re: [Wikitech-l] Equivalence for using Template:Cite_Web with templates surrounding Wikicode

2020-01-04 Thread Bartosz Dziewoński

I am not really sure what you mean…

Here's a complete example that inserts, basically, "Hello[1] world[2]" 
(text with two different references):


https://phabricator.wikimedia.org/P10038

Does that help?

--
Bartosz Dziewoński

___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Re: [Wikitech-l] Equivalence for using Template:Cite_Web with templates surrounding Wikicode

2020-01-03 Thread Egbe Eugene
Thanks very much for the suggestions.

It looks like I did not pose the question very clearly.

We desire that the surface displays something like "Hello[1] world[2]" on
the VE surface and then have the footer note pick up these [1] and [2]
automatically and display them for us at the bottom of the page as in the
case where {{cite|a}} gets picked up in wikicode and rendered.

Is this possible?
___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Re: [Wikitech-l] Equivalence for using Template:Cite_Web with templates surrounding Wikicode

2020-01-02 Thread Egbe Eugene
Thanks for the help Bartosz.  However, I have a large data definition of
both texts and citations so I was wondering if its possible to insert the
texts and citations
all in one go when writing to the VE surface. In such cases, we expect the
VE surface to identify, the citation where
we are including the 'mwTransclusionInline' template in our data. Please is
this possible?

Thanks

On Wed, Jan 1, 2020 at 4:56 AM Bartosz Dziewoński 
wrote:

> {{Cite web}} and similar templates can also be used outside of a 
> tag, e.g. on a page like this:
> https://en.wikipedia.org/wiki/Review_aggregator#Bibliography (not the
> greatest example, but the best I could find quickly).
>
> If you want it inside of a footnote, it's a bit complicated in visual
> mode, since the footnotes can be reused multiple times. The way it works
> is that there is a separate place in the document where the contents of
> every reference are placed (the "internal list"), and the location of
> the  contains only a small node that links to the internal list.
>
> Manually constructing the data so that both these things refer to each
> other would be a pain, but there is a helper class that makes it more
> convenient, ve.dm.MWReferenceModel.
>
> You'd use it like this:
>
> https://phabricator.wikimedia.org/P10018
>
> I adapted that example from the code in
> ve.ui.MWCitationDialog.prototype.getActionProcess, which is how VE
> itself inserts new references.
>
> Hope that helps (and doesn't look too awful).
>
>
> --
> Bartosz Dziewoński
>
> ___
> Wikitech-l mailing list
> Wikitech-l@lists.wikimedia.org
> https://lists.wikimedia.org/mailman/listinfo/wikitech-l
___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Re: [Wikitech-l] Equivalence for using Template:Cite_Web with templates surrounding Wikicode

2019-12-31 Thread Bartosz Dziewoński
{{Cite web}} and similar templates can also be used outside of a  
tag, e.g. on a page like this: 
https://en.wikipedia.org/wiki/Review_aggregator#Bibliography (not the 
greatest example, but the best I could find quickly).


If you want it inside of a footnote, it's a bit complicated in visual 
mode, since the footnotes can be reused multiple times. The way it works 
is that there is a separate place in the document where the contents of 
every reference are placed (the "internal list"), and the location of 
the  contains only a small node that links to the internal list.


Manually constructing the data so that both these things refer to each 
other would be a pain, but there is a helper class that makes it more 
convenient, ve.dm.MWReferenceModel.


You'd use it like this:

https://phabricator.wikimedia.org/P10018

I adapted that example from the code in 
ve.ui.MWCitationDialog.prototype.getActionProcess, which is how VE 
itself inserts new references.


Hope that helps (and doesn't look too awful).


--
Bartosz Dziewoński

___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Re: [Wikitech-l] Equivalence for using Template:Cite_Web with templates surrounding Wikicode

2019-12-31 Thread Eran Rosenthal
Hi Eugene,
Assuming it is local installation or wiki other than English wikipedia
where citations aren't yet configurated you can follow

E.g copy
https://en.wikipedia.org/wiki/MediaWiki:Citoid-template-type-map.json
and
https://en.wikipedia.org/wiki/MediaWiki:Visualeditor-cite-tool-definition.json

If you are doing it in one of Wikimedia projects and not local
installation, it will be great to update :
https://phabricator.wikimedia.org/T127354


On Tue, Dec 31, 2019 at 4:13 PM Jaime Crespo  wrote:

> Hi,
>
> On Tue, Dec 31, 2019 at 12:42 PM Egbe Eugene 
> wrote:
>
> > Hi All,
> >
> > I am implementing template
> https://en.wikipedia.org/wiki/Template:Cite_web
> > in
> > VE and after using the template code[1], I get results shown below
> >
>
> Sorry, I may not be understanding what you are trying to accomplish, I am
> guessing reimplementing Cite_web functionality on your own local mediawiki
> installation?
> I don't know much about visual editor or references-related code, someone
> else may be able to help you here better, but I know that is implemented on
> enwiki:
>
> https://phab.wmfusercontent.org/file/data/wz3njgh6k6iwrugvap6f/PHID-FILE-n6el7aiazixa4mwb2rq2/Screenshot_20191231_150008.png
>
> https://en.wikipedia.org/w/index.php?title=User:JCrespo_(WMF)/sandbox=revision=933365112=926096219=visual
>
> So my only suggestion is to look at how enwiki has it configured and try to
> adapt it to your needs.
>
> Another suggestion is to use Phaste:
> https://phabricator.wikimedia.org/paste/edit/form/14/ for code snippets,
> as
> it will prevent vandals from editing it + allow comments.
>
> Sorry I cannot be of more help,
> --
> Jaime Crespo
> 
> ___
> Wikitech-l mailing list
> Wikitech-l@lists.wikimedia.org
> https://lists.wikimedia.org/mailman/listinfo/wikitech-l
___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Re: [Wikitech-l] Equivalence for using Template:Cite_Web with templates surrounding Wikicode

2019-12-31 Thread Jaime Crespo
Hi,

On Tue, Dec 31, 2019 at 12:42 PM Egbe Eugene  wrote:

> Hi All,
>
> I am implementing template https://en.wikipedia.org/wiki/Template:Cite_web
> in
> VE and after using the template code[1], I get results shown below
>

Sorry, I may not be understanding what you are trying to accomplish, I am
guessing reimplementing Cite_web functionality on your own local mediawiki
installation?
I don't know much about visual editor or references-related code, someone
else may be able to help you here better, but I know that is implemented on
enwiki:
https://phab.wmfusercontent.org/file/data/wz3njgh6k6iwrugvap6f/PHID-FILE-n6el7aiazixa4mwb2rq2/Screenshot_20191231_150008.png
https://en.wikipedia.org/w/index.php?title=User:JCrespo_(WMF)/sandbox=revision=933365112=926096219=visual

So my only suggestion is to look at how enwiki has it configured and try to
adapt it to your needs.

Another suggestion is to use Phaste:
https://phabricator.wikimedia.org/paste/edit/form/14/ for code snippets, as
it will prevent vandals from editing it + allow comments.

Sorry I cannot be of more help,
-- 
Jaime Crespo

___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

[Wikitech-l] Equivalence for using Template:Cite_Web with templates surrounding Wikicode

2019-12-31 Thread Egbe Eugene
Hi All,

I am implementing template https://en.wikipedia.org/wiki/Template:Cite_web in
VE and after using the template code[1], I get results shown below

{{Cite web|url=
https://www.w3schools.com/jsref/jsref_replace.asp|title=W3Schools|last=W3Schools|first=W3Schools
}}

what I desire to get is

{{Cite web|url=
https://www.w3schools.com/jsref/jsref_replace.asp|title=W3Schools|last=W3Schools|first=W3Schools}
}

So I guess I am missing something. Please I need help with this.

Thanks
Eugene
--
[1] https://etherpad.wikimedia.org/p/Template_cite_with_VE
___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l