WikiBookmarks/Usage — различия между версиями
(WikiBookmarks: load help page) |
(WikiBookmarks: load help page) |
||
Строка 14: | Строка 14: | ||
panel or add it into your browser's bookmarks. | panel or add it into your browser's bookmarks. | ||
− | <!-- The following is Wikitext/HTML+JavaScript code for creating bookmarklet. It is localized using | + | <!-- The following is Wikitext/HTML+JavaScript code for creating bookmarklet. It is localized using <msgid> templates and substituted into Wikitext help files. --> |
− | <html><div style="display:inline-block"><label for="wb_page"><b></html> | + | <html><div style="display:inline-block"><label for="wb_page"><b></html>Article title:<html></b></label><br/> |
− | <input type="text" id="wb_page" size="20" value="</html>{{ns:User}}:{{USERNAME}}/ | + | <input type="text" id="wb_page" size="20" value="</html>{{ns:User}}:{{USERNAME}}/Bookmarks<html>" /></div> |
− | <div style="display:inline-block"><label for="wb_text"><b></html> | + | <div style="display:inline-block"><label for="wb_text"><b></html>Button text:<html></b></label><br/> |
− | <input type="text" id="wb_text" size="20" value="</html> | + | <input type="text" id="wb_text" size="20" value="</html>WikiBookmark it<html>" /></div> |
− | <input type="button" value="</html> | + | <input type="button" value="</html>Make bookmarklet for me<html>" onclick="wb_make_link()" /> |
<div id="wb_link_div" style="font-weight: bold"></div> | <div id="wb_link_div" style="font-weight: bold"></div> | ||
<script language="JavaScript"> | <script language="JavaScript"> | ||
Строка 28: | Строка 28: | ||
if (pg == "") | if (pg == "") | ||
{ | { | ||
− | alert("</html> | + | alert("</html>Please, enter non-empty bookmarks article title!<html>"); |
return; | return; | ||
} | } | ||
var d = document.getElementById("wb_link_div"); | var d = document.getElementById("wb_link_div"); | ||
d.innerHTML = ""; | d.innerHTML = ""; | ||
− | d.appendChild(document.createTextNode("</html> | + | d.appendChild(document.createTextNode("</html>Drag-and-drop the following link onto your browser's panel:<html>")); |
d.appendChild(document.createElement('br')); | d.appendChild(document.createElement('br')); | ||
d.appendChild(document.createTextNode("[[ ")); | d.appendChild(document.createTextNode("[[ ")); | ||
Строка 64: | Строка 64: | ||
When you click the newly added button when viewing some interesting Web page, | When you click the newly added button when viewing some interesting Web page, | ||
'''WikiBookmarks''' will remember current page's URL, title and selected text (if any), | '''WikiBookmarks''' will remember current page's URL, title and selected text (if any), | ||
− | on MediaWiki article you selected for bookmarks ([[{{ns:User}}:{{USERNAME}}/ | + | on MediaWiki article you selected for bookmarks ([[{{ns:User}}:{{USERNAME}}/Bookmarks]] by default). |
The new bookmarks are added into beginning of an article, under certain count of headings. | The new bookmarks are added into beginning of an article, under certain count of headings. |
Версия 16:52, 22 января 2010
WikiBookmarks is a MediaWiki extension which lets you to manage shared bookmark lists inside a Wiki article. The extension is written by Vitaliy Filippov and is distributed under the terms of GNU GPL license version 3 or later. Also, here is a link to extension homepage.
You always can find a fresh version of the WikiBookmarks documentation on the Special:Bookmarks page. Actually, you've already found it :-).
WikiBookmarks are used in the form of a tiny bookmarklet (what is a bookmarklet?). To install such a bookmarklet in your browser, you need to enter the title of Wiki Article which you want to maintain as your bookmark list, click Make bookmarklet and drag-and-drop displayed link onto your browser's panel or add it into your browser's bookmarks.
When you click the newly added button when viewing some interesting Web page, WikiBookmarks will remember current page's URL, title and selected text (if any), on MediaWiki article you selected for bookmarks (Участник:3.15.14.245/Bookmarks by default).
The new bookmarks are added into beginning of an article, under certain count of headings.
By default the first-level headings are named == Year == and the second-level headings
are named === Month Year === ("%Y" "%B %Y"
). This meant to be used for
bookmark classification by date. If you want to change heading count and/or heading date format,
you must add a line similar to the following one into the beginning of your bookmarks article:
<!--BookmarkHeadings:"%Y" "%Y-%m" "%Y-%m-%d"-->
WikiBookmarks extracts all present quoted strings from such a comment and use them as the date dependent headings. The format of formatting strings is the same as in PHP function strftime() (as you know, actually it's libc's, but it doesn't matter).
You also have the option of changing format of the date-time string appended to list item before each bookmark. To do this, you must add a line similar to the following one into the beginning of your bookmarks article:
<!--BookmarkDate:"%d %H:%M:%S"-->
If such a comment is present, WikiBookmarks will take the quoted string from it and use it as date and time format.