Hello all,
I've made a little clumsy extension to help aggregating quotes: so that a quote appears in all the pages it links to.
http://meta.wikimedia.org/wiki/User:Fxparlant/Blog
Please do use of the discussion page to comment and help me correct it :-)
To see a first version of its use :
http://www.fxparlant.net/Lacan_S1 Scroll down after the dates list, and you'll see an aggregation of notes, with links for pages and comments (some of these pages are themself aggregations)
François
FxParlant wrote:
Hello all,
François, since you seem to be posting regularly would you mind subscribing to the list as a courtesy? Non-subscriber posting slow down delivery of your posts and make extra work for the list administrators.
If you're reading the list through archives or the news gateway, you can disable direct mail delivery once you've subscribed.
-- brion vibber (brion @ pobox.com)
done
(Well I hope cause I have to figure out to which I'm already subscriber: Mediation-en-l MediaWiki-announce MediaWiki-CVS MediaWiki-l and which is gmane.org.wikimedia.mediawiki ... who believes I could code an extension with that :-))
Brion Vibber wrote:
FxParlant wrote:
Hello all,
François, since you seem to be posting regularly would you mind subscribing to the list as a courtesy? Non-subscriber posting slow down delivery of your posts and make extra work for the list administrators.
If you're reading the list through archives or the news gateway, you can disable direct mail delivery once you've subscribed.
-- brion vibber (brion @ pobox.com)
MediaWiki-l mailing list MediaWiki-l@Wikimedia.org http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
Hello all,
This is my first and I wonder if I am in a right mailing list. What I try to do is: Right after hitting Save Page button, it would trigger a javascript routine (to do some string manipulation) then trigger a php subroutine (to save a string of test into a designated existing page i.e. SpecialTest) before resume back to normal task (saving the curent page.)
Would someone give a hint how to hook it up. Thanks in advance!
ngungo
Hi François,
I don't quite follow what it does. Could you elaborate?
By the way, I saw on your wiki that you have a [comment] link next to each section. That's a nice touch. Would you mind explain how to add that? (I suppose it involves some php hacking.)
thanks, -- John
FxParlant wrote:
Hello all,
I've made a little clumsy extension to help aggregating quotes: so that a quote appears in all the pages it links to.
http://meta.wikimedia.org/wiki/User:Fxparlant/Blog
Please do use of the discussion page to comment and help me correct it :-)
To see a first version of its use :
http://www.fxparlant.net/Lacan_S1 Scroll down after the dates list, and you'll see an aggregation of notes, with links for pages and comments (some of these pages are themself aggregations)
François
I've made a little clumsy extension to help aggregating quotes: so that a quote appears in all the pages it links to. http://meta.wikimedia.org/wiki/User:Fxparlant/Blog
I like this feature, plus the dynamic menu. And as a phenomenologist, I like also the topics of the site. :-)
See, however, this displacement http://www.fxparlant.net/Category:Vocabulary
P.
Plamen Gradinarov wrote:
I've made a little clumsy extension to help aggregating quotes: so that a quote appears in all the pages it links to. http://meta.wikimedia.org/wiki/User:Fxparlant/Blog
I like this feature, plus the dynamic menu. And as a phenomenologist, I like also the topics of the site. :-)
See, however, this displacement http://www.fxparlant.net/Category:Vocabulary
P.
Thanks Plamen, I'm still correcting my pages as I just migrated from dokuwiki to mediawiki... :-) François
John Yu wrote:
Hi François,
I don't quite follow what it does. Could you elaborate?
Sure:-)
I create a page, with just a quote (for example a line from wittgenstein or Lacan). I surround the words, the important concepts with double [[ ]] to make them links to pages. I also make sure that the name of the book are links, and I add a category (Category:Quote)
Then, on the page Wittgenstein, I add this little line <blog>page=Wittgenstein;cat=Quote</blog>
And, surprise, all the quotes with a link to Wittgenstein will appear in the Wittgenstein page: not just a link to the quotes, but the quotes themselves.
So, I add just once a quote, but it will appear in all the linked concept, in the author page, and in the book page (if I want to)
By the way, I saw on your wiki that you have a [comment] link next to each section. That's a nice touch. Would you mind explain how to add that? (I suppose it involves some php hacking.)
Your are right, this link is from php, and it just links to the discussion page of every (quote)page.
But you can hack this without any php, just I do on my Main_Page, in the "image of the day" : I just add a link to the talkpage of the image: [[Image_talk:Signorelli_Judgement.jpg|Commentaires...]]
thanks,
You'are welcome
François
-- John
FxParlant wrote:
Hello all,
I've made a little clumsy extension to help aggregating quotes: so that a quote appears in all the pages it links to.
http://meta.wikimedia.org/wiki/User:Fxparlant/Blog
Please do use of the discussion page to comment and help me correct it :-)
To see a first version of its use :
http://www.fxparlant.net/Lacan_S1 Scroll down after the dates list, and you'll see an aggregation of notes, with links for pages and comments (some of these pages are themself aggregations)
François
Hi François,
I see. That means the extension embeds pages that are in a category and filtered by the reverse-link. This is very similar to {{templates}}, except that the control is inverted -- the page being included has the say if it wants to be included.
That's cool! I can now see how this can be used in blog-oriented pages. Great work, François! -- John
FxParlant wrote:
John Yu wrote:
Hi François,
I don't quite follow what it does. Could you elaborate?
Sure:-)
I create a page, with just a quote (for example a line from wittgenstein or Lacan). I surround the words, the important concepts with double [[ ]] to make them links to pages. I also make sure that the name of the book are links, and I add a category (Category:Quote)
Then, on the page Wittgenstein, I add this little line <blog>page=Wittgenstein;cat=Quote</blog>
And, surprise, all the quotes with a link to Wittgenstein will appear in the Wittgenstein page: not just a link to the quotes, but the quotes themselves.
So, I add just once a quote, but it will appear in all the linked concept, in the author page, and in the book page (if I want to)
By the way, I saw on your wiki that you have a [comment] link next to each section. That's a nice touch. Would you mind explain how to add that? (I suppose it involves some php hacking.)
Your are right, this link is from php, and it just links to the discussion page of every (quote)page.
But you can hack this without any php, just I do on my Main_Page, in the "image of the day" : I just add a link to the talkpage of the image: [[Image_talk:Signorelli_Judgement.jpg|Commentaires...]]
thanks,
You'are welcome
François
-- John
FxParlant wrote:
Hello all,
I've made a little clumsy extension to help aggregating quotes: so that a quote appears in all the pages it links to.
http://meta.wikimedia.org/wiki/User:Fxparlant/Blog
Please do use of the discussion page to comment and help me correct it :-)
To see a first version of its use :
http://www.fxparlant.net/Lacan_S1 Scroll down after the dates list, and you'll see an aggregation of notes, with links for pages and comments (some of these pages are themself aggregations)
François
MediaWiki-l mailing list MediaWiki-l@Wikimedia.org http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
François,
Will your extension work for pages in namespaces other than the main one? I'm interested to try it out, but I keep our blog-oriented entries in custom namespace.
Thanks. -- John
FxParlant wrote:
John Yu wrote:
Hi François,
I don't quite follow what it does. Could you elaborate?
Sure:-)
I create a page, with just a quote (for example a line from wittgenstein or Lacan). I surround the words, the important concepts with double [[ ]] to make them links to pages. I also make sure that the name of the book are links, and I add a category (Category:Quote)
Then, on the page Wittgenstein, I add this little line <blog>page=Wittgenstein;cat=Quote</blog>
And, surprise, all the quotes with a link to Wittgenstein will appear in the Wittgenstein page: not just a link to the quotes, but the quotes themselves.
So, I add just once a quote, but it will appear in all the linked concept, in the author page, and in the book page (if I want to)
By the way, I saw on your wiki that you have a [comment] link next to each section. That's a nice touch. Would you mind explain how to add that? (I suppose it involves some php hacking.)
Your are right, this link is from php, and it just links to the discussion page of every (quote)page.
But you can hack this without any php, just I do on my Main_Page, in the "image of the day" : I just add a link to the talkpage of the image: [[Image_talk:Signorelli_Judgement.jpg|Commentaires...]]
thanks,
You'are welcome
François
-- John
FxParlant wrote:
Hello all,
I've made a little clumsy extension to help aggregating quotes: so that a quote appears in all the pages it links to.
http://meta.wikimedia.org/wiki/User:Fxparlant/Blog
Please do use of the discussion page to comment and help me correct it :-)
To see a first version of its use :
http://www.fxparlant.net/Lacan_S1 Scroll down after the dates list, and you'll see an aggregation of notes, with links for pages and comments (some of these pages are themself aggregations)
François
MediaWiki-l mailing list MediaWiki-l@Wikimedia.org http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
Hi John,
I hadn't tried this yet.. but just for you I tried... ;-)
I remembered why I just droped the idea of using namespaces in mediawiki (although I really used it a lot in Dokuwiki): I think that mediawiki just creates a "what links here" (links) table for the main namespace.
I thought I could simply change the mysql query of my extension, but it seems that it's the same with the "category links" table: only pages in the main namespace are taken into account.
Therefore, I think you could change the sql query, and instead of searching page with backlinks to the page, just query pages from your blog namespace, and sort them by date... that is, create a proper blog extension, instead of my complicated quote version :-)))
I really think it would be simpler of my version, because you wouldn't have to take care of pages having links to themselves through fragment incorporated, all this getting infinite loop.
Do you need a bit of help on this ?
François
John Yu wrote:
François,
Will your extension work for pages in namespaces other than the main one? I'm interested to try it out, but I keep our blog-oriented entries in custom namespace.
Thanks.
John
On Sat, 05 Mar 2005 00:18:40 +0100, FxParlant f-x.p@laposte.net wrote:
I remembered why I just droped the idea of using namespaces in mediawiki (although I really used it a lot in Dokuwiki): I think that mediawiki just creates a "what links here" (links) table for the main namespace.
That's not true. Any page linking to any other page will create an entry in the links table. In fact, the links table doesn't even *record* which namespace the page is in, it just stores a pair of page ids (cur_id). For an example of a whatlinkshere page demonstrating that, see http://en.wikipedia.org/w/index.php?title=Special:Whatlinkshere&target=F...
I thought I could simply change the mysql query of my extension, but it seems that it's the same with the "category links" table: only pages in the main namespace are taken into account.
Again, not true. In fact, some people are really rather annoyed that category pages *don't* make any distinction between namespaces. In this table, the link *target* is stored as a string, and is by definition always in the Category namespace; but the link *source* can be any page in the wiki.
So there's no reason [that I can think of] why your extension won't work across namespaces. And no reason you couldn't add to your SQL query so that the namespace of the pages could be specified, or a default namespace used (by checking the value of cur_namespace).
On 4 Mar 2005, at 17:34, Rowan Collins wrote:
In fact, some people are really rather annoyed that category pages *don't* make any distinction between namespaces.
My pet peeve is having Templates show up there. It just confuses end users.
But on a scale of 1 to 10, where 1 is a paper cut and 10 is global thermonuclear war, it's irritation factor is only about 1.25. :-)
:::: Natural gas is hemispheric. I like to call it hemispheric in nature because it is a product that we can find in our neighborhoods. -- George W. Bush :::: Jan Steinman http://www.Bytesmiths.com/Van
That's a good news for you John :-)
I guess it didn't work on my localhost because I already made so many changes that my homemediawiki needs a good deal restoring ;-)
Nevertheless, I think my extension could be simplified for blogging... Thanks Rowan for your expertise.
François
Rowan Collins wrote:
On Sat, 05 Mar 2005 00:18:40 +0100, FxParlant f-x.p@laposte.net wrote:
I remembered why I just droped the idea of using namespaces in mediawiki (although I really used it a lot in Dokuwiki): I think that mediawiki just creates a "what links here" (links) table for the main namespace.
That's not true. Any page linking to any other page will create an entry in the links table. In fact, the links table doesn't even *record* which namespace the page is in, it just stores a pair of page ids (cur_id). For an example of a whatlinkshere page demonstrating that, see http://en.wikipedia.org/w/index.php?title=Special:Whatlinkshere&target=F...
I thought I could simply change the mysql query of my extension, but it seems that it's the same with the "category links" table: only pages in the main namespace are taken into account.
Again, not true. In fact, some people are really rather annoyed that category pages *don't* make any distinction between namespaces. In this table, the link *target* is stored as a string, and is by definition always in the Category namespace; but the link *source* can be any page in the wiki.
So there's no reason [that I can think of] why your extension won't work across namespaces. And no reason you couldn't add to your SQL query so that the namespace of the pages could be specified, or a default namespace used (by checking the value of cur_namespace).
Hi John
Rowan Collins is absolutely right, the extension failed on my localhost because of corruption of the "recent change" table, but it perfectly worked on my website.
I'll try to build a real blog extension, capable of sorting pages by months, and / or by category, inside a namespace.
Should it be an extension or a special page ?
What can the url be: - Ns:Blog?year=2005&month=02&category=Cinema - Ns:Blog?start=01-02-2005&end=28-02-2005&Category=Books
Anyway, I first need to catch a little bit with mysql timestamp manipulation :-\
François
FxParlant wrote:
Hi John,
I hadn't tried this yet.. but just for you I tried... ;-)
I remembered why I just droped the idea of using namespaces in mediawiki (although I really used it a lot in Dokuwiki): I think that mediawiki just creates a "what links here" (links) table for the main namespace.
I thought I could simply change the mysql query of my extension, but it seems that it's the same with the "category links" table: only pages in the main namespace are taken into account.
Therefore, I think you could change the sql query, and instead of searching page with backlinks to the page, just query pages from your blog namespace, and sort them by date... that is, create a proper blog extension, instead of my complicated quote version :-)))
I really think it would be simpler of my version, because you wouldn't have to take care of pages having links to themselves through fragment incorporated, all this getting infinite loop.
Do you need a bit of help on this ?
François
John Yu wrote:
François,
Will your extension work for pages in namespaces other than the main one? I'm interested to try it out, but I keep our blog-oriented entries in custom namespace.
Thanks.
John
Thanks Rowan and Francois.
Francois, I'll give your current extension a try. I think it helps a lot already.
But, ideally, it will be nice to have a blog extension that does this: I create entries like "Blog:2005/03/04/Francois created world's first blog extension for mediawiki". Then on the frontpage, I can put <blog>ns=Blog;entriesPerPage=10</blog> and it will show the latest 10 entries, with a "view next 10" link to show the 2nd page, etc. -- John
FxParlant wrote:
Hi John
Rowan Collins is absolutely right, the extension failed on my localhost because of corruption of the "recent change" table, but it perfectly worked on my website.
I'll try to build a real blog extension, capable of sorting pages by months, and / or by category, inside a namespace.
Should it be an extension or a special page ?
What can the url be:
- Ns:Blog?year=2005&month=02&category=Cinema
- Ns:Blog?start=01-02-2005&end=28-02-2005&Category=Books
Anyway, I first need to catch a little bit with mysql timestamp manipulation :-\
François
FxParlant wrote:
Hi John,
I hadn't tried this yet.. but just for you I tried... ;-)
I remembered why I just droped the idea of using namespaces in mediawiki (although I really used it a lot in Dokuwiki): I think that mediawiki just creates a "what links here" (links) table for the main namespace.
I thought I could simply change the mysql query of my extension, but it seems that it's the same with the "category links" table: only pages in the main namespace are taken into account.
Therefore, I think you could change the sql query, and instead of searching page with backlinks to the page, just query pages from your blog namespace, and sort them by date... that is, create a proper blog extension, instead of my complicated quote version :-)))
I really think it would be simpler of my version, because you wouldn't have to take care of pages having links to themselves through fragment incorporated, all this getting infinite loop.
Do you need a bit of help on this ?
François
John Yu wrote:
François,
Will your extension work for pages in namespaces other than the main one? I'm interested to try it out, but I keep our blog-oriented entries in custom namespace.
Thanks.
John
MediaWiki-l mailing list MediaWiki-l@Wikimedia.org http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
Sorry for not answering so quickly,
YOUR ENTRIES
My extension should work for you independently of the namespace (as Rowan stated) You just have to make in your entry: - a [[Category:Blog]] link and - a link to the frontpage of your blog (let's call it John_Blog)
And then, with <blog>cat=Blog<blog> or <blog>page=John_Blog;cat=Blog<blog> in your John_Blog page, you should see all the entries. That's the good news.
LIMITS:
Now, if you want to have entries only ten by ten, it's fairly easy (well, I suppose :-)): just add the sql instruction for limits (don't forget to make a sort by ID before):let's call them $from and $to (beware, in the Special:Allpages, $from refers to the name of the page, I will use the number)
global $wgUseCategoryMagic, $wgUser,$wgParser,$parserOptions,$wgTitle, $wgOut,$wgLinkCache,$from,$to;
$ns = $wgRequest->getVal( 'ns' ); if(!isset($ns)) $ns = 0; $from = $wgRequest->getVal( 'from' ); if(!isset($from)) $ns = 0; $to = $wgRequest->getVal( 'to' ); if(!isset($to)) $to = 10;
And the sql should look like:
$sql = "SELECT cur_id,cur_namespace,cur_title,cur_text, cur_is_redirect FROM links,cur,categorylinks WHERE l_to={$lid} AND l_from=cur_id AND cl_from=cur_id AND cl_to='$cat' ORDER BY `cur_id` DESC LIMIT $from , $to";
LINKS: ask ROWAN :-)
My problem is in the creation of the links: for all the entries (from 1to 10, 10to 20). How can I catch the number of entries, without making twice the query (one for counting, one for displaying)? Sorry, I'm in HR, php is just a hobby ;-)
Hope it helps. François
John Yu wrote:
Thanks Rowan and Francois.
Francois, I'll give your current extension a try. I think it helps a lot already.
But, ideally, it will be nice to have a blog extension that does this: I create entries like "Blog:2005/03/04/Francois created world's first blog extension for mediawiki". Then on the frontpage, I can put <blog>ns=Blog;entriesPerPage=10</blog> and it will show the latest 10 entries, with a "view next 10" link to show the 2nd page, etc. -- John
FxParlant wrote:
Hi John
Rowan Collins is absolutely right, the extension failed on my localhost because of corruption of the "recent change" table, but it perfectly worked on my website.
I'll try to build a real blog extension, capable of sorting pages by months, and / or by category, inside a namespace.
Should it be an extension or a special page ?
What can the url be:
- Ns:Blog?year=2005&month=02&category=Cinema
- Ns:Blog?start=01-02-2005&end=28-02-2005&Category=Books
Anyway, I first need to catch a little bit with mysql timestamp manipulation :-\
François
FxParlant wrote:
Hi John,
I hadn't tried this yet.. but just for you I tried... ;-)
I remembered why I just droped the idea of using namespaces in mediawiki (although I really used it a lot in Dokuwiki): I think that mediawiki just creates a "what links here" (links) table for the main namespace.
I thought I could simply change the mysql query of my extension, but it seems that it's the same with the "category links" table: only pages in the main namespace are taken into account.
Therefore, I think you could change the sql query, and instead of searching page with backlinks to the page, just query pages from your blog namespace, and sort them by date... that is, create a proper blog extension, instead of my complicated quote version :-)))
I really think it would be simpler of my version, because you wouldn't have to take care of pages having links to themselves through fragment incorporated, all this getting infinite loop.
Do you need a bit of help on this ?
François
John Yu wrote:
François,
Will your extension work for pages in namespaces other than the main one? I'm interested to try it out, but I keep our blog-oriented entries in custom namespace.
Thanks.
John
MediaWiki-l mailing list MediaWiki-l@Wikimedia.org http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
mediawiki-l@lists.wikimedia.org