"Wikitravel has a speed and convenience the books' publishers can only envy." Time Europe

User:Tatata/memo

From Wikitravel Shared
Jump to: navigation, search

Templates[edit]

Imagecredit[edit]

<!--
Please fill in the following information in english: 
 * Image description 
 * Where the image/photo was taken
 * Who took/created the image
 * When the image was taken/created
Template:Imagecredit or Template:Location contains [[Category:xxx]], so please use it instead of category.
Thanks.
-->
{{Imagecredit
|credit=''Who?''
|captureDate=''When?''
|location=''Where (pls. don't use category.)?''
|source=''own work?'' or ''the link to source?''
|caption=''Image caption?''
|description=Image description?
}}

Ohter image related templates[edit]

Links[edit]

Categories[edit]

MediaWiki[edit]

Configuration settings[edit]

Manual:Configuration settings (alphabetical)

MediaWiki namespace pages[edit]

Special:Upload[edit]

A part of HTML source code.


<td align='right'><label for='wpLicense'>Licensing:</label></td>
			<td align='left'>
				<select name='wpLicense' id='wpLicense' tabindex='4'
					onchange='licenseSelectorCheck()'>
					<option value=''>None selected</option>

					<option value="" disabled="disabled" style="color: GrayText">Creative Commons license:</option>
	<option value="cc-by-sa-all" title="{{cc-by-sa-all}}">  Any Attribution-ShareAlike (1.0 or above, default for Wikitravel)</option>
	<option value="cc-by-sa-1.0" title="{{cc-by-sa-1.0}}">  Attribution-ShareAlike 1.0</option>
	<option value="cc-by-sa-2.0" title="{{cc-by-sa-2.0}}">  Attribution-ShareAlike 2.0</option>
	<option value="cc-by-sa-2.5" title="{{cc-by-sa-2.5}}">  Attribution-ShareAlike 2.5</option>
	<option value="cc-by-sa-3.0" title="{{cc-by-sa-3.0}}">  Attribution-ShareAlike 3.0</option>

	<option value="cc-by-1.0" title="{{cc-by-1.0}}">  Attribution 1.0</option>
	<option value="cc-by-2.0" title="{{cc-by-2.0}}">  Attribution 2.0</option>
	<option value="cc-by-2.5" title="{{cc-by-2.5}}">  Attribution 2.5</option>
	<option value="cc-by-3.0" title="{{cc-by-3.0}}">  Attribution 3.0	</option>
<option value="" disabled="disabled" style="color: GrayText">Public domain or no rights reserved:</option>
	<option value="PD-self" title="{{PD-self}}">  I am the creator of this image and hereby release it into the public domain</option>

	<option value="PD-author" title="{{PD-author}}">  This file was originally released into the public domain by its creator</option>
	<option value="PD-fed" title="{{PD-fed}}">  Created by a US federal government employee during official duties</option>
<option value="" disabled="disabled" style="color: GrayText">Multiple licenses:</option>
	<option value="dual-gfdl-cc-by-sa-1.0" title="{{dual-gfdl-cc-by-sa-1.0}}">  GFDL and Attribution-ShareAlike 1.0</option>
	<option value="dual-gfdl-cc-by-sa-any" title="{{dual-gfdl-cc-by-sa-any}}">  GFDL and any Attribution-ShareAlike</option>

				</select>

			</td>
			</tr>
			<tr>
					<td></td>
					<td id="mw-license-preview"></td>
				</tr>
				<tr>
		<td></td>

ListingEditor[edit]

A part of HTML source code on zh:.[4]


<li>
  <span class='vcard' >
    <span class="fn org">香港君悅酒店</span> (
    <span class="nickname">Grand Hyatt Hong Kong</span>), 
    <span class="adr">
      <span class="street-address">香港島灣仔區港灣道1號</span>
    </span>, 
    <a class="url external autonumber" href="http://hongkong.grand.hyatt.cn/">[1]</a>. 
    <span class="description">香港君悅酒店位於灣仔區,是香港的黃金地段,鄰近港鐵灣仔站,四周林位著商業大廈和購物中心。房間中有七成可享受維多利亞港景色,不過於於是座落於香港島,回望九龍的維多利亞港就較望向香港島失色。</span> 
  </span>
</li>

<li>
  <span class='vcard' id = 'Grand-Hyatt_Hong-Kong'>
    <span class="fn org">Grand-Hyatt Hong-Kong</span> (
    <span class="nickname">
      <span class="non-latin">香港君悅酒店</span>
    </span>), 
    <span class="adr">
      <span class="street-address">香港島灣仔區港灣道1號</span>
    </span>, 
    <a class="url external autonumber" href="http://hongkong.grand.hyatt.cn/">[2]</a>. 
    <span class="description">香港君悅酒店位於灣仔區,是香港的黃金地段,鄰近港鐵灣仔站,四周林位著商業大廈和購物中心。房間中有七成可享受維多利亞港景色,不過於於是座落於香港島,回望九龍的維多利亞港就較望向香港島失色。</span>  
    <a class="listing-edit" href="#Grand-Hyatt_Hong-Kong" onclick="editListing('Grand-Hyatt_Hong-Kong', 'sleep', 'User:Tatata/test');return false;" title="按一下以編輯 Grand-Hyatt Hong-Kong">編輯</a>
  </span>
</li>

<li>
  <span class='vcard' id = 'Grand_Hyatt_Hong_Kong'>
    <span class="fn org">Grand Hyatt Hong Kong</span> (
    <span class="nickname">Grand Hyatt Hong Kong</span>), 
    <span class="adr">
      <span class="street-address">香港島灣仔區港灣道1號</span>
    </span>, 
    <a class="url external autonumber" href="http://hongkong.grand.hyatt.cn/">[3]</a>. 
    <span class="description">香港君悅酒店位於灣仔區,是香港的黃金地段,鄰近港鐵灣仔站,四周林位著商業大廈和購物中心。房間中有七成可享受維多利亞港景色,不過於於是座落於香港島,回望九龍的維多利亞港就較望向香港島失色。</span>  
    <a class="listing-edit" href="#Grand_Hyatt_Hong_Kong" onclick="editListing('Grand_Hyatt_Hong_Kong', 'sleep', 'User:Tatata/test');return false;" title="按一下以編輯 Grand Hyatt Hong Kong">編輯</a>
  </span>
</li>

to use on zh[edit]

anchorencode (MediaWiki 1.15.0)


	static function anchorencode( $parser, $text ) {
		$a = urlencode( $text );
		$a = strtr( $a, array( '%' => '.', '+' => '_' ) );
		# leave colons alone, however
		$a = str_replace( '.3A', ':', $a );
		return $a;
	}


test case[edit]

no non-latin characters in alt attribute[edit]
input data
name="aaaaa", alt="value_of_alt", description="value_of_description".
args
"see", "User:Tatata/test", "<form><name><![CDATA[aaaaa]]></name>\n<alt><![CDATA[value_of_alt]]></alt>\n<address></address>\n<directions></directions>\n<phone></phone>\n<url></url>\n<hours></hours>\n<price></price>\n<lat></lat>\n<long></long>\n<description><![CDATA[value_of_description]]></description>\n</form>" 0=see 1=User:Tatata/test
post_data
data from client to server, args are encoded ( encodeURIComponent(args[i]); )
"rs=wfListingGetTagContent&rsargs[]=see&rsargs[]=User%3ATatata%2Ftest&rsargs[]=%3Cform%3E%3Cname%3E%3C!%5BCDATA%5Baaaaa%5D%5D%3E%3C%2Fname%3E%0A%3Calt%3E%3C!%5BCDATA%5Bvalue_of_alt%5D%5D%3E%3C%2Falt%3E%0A%3Caddress%3E%3C%2Faddress%3E%0A%3Cdirections%3E%3C%2Fdirections%3E%0A%3Cphone%3E%3C%2Fphone%3E%0A%3Curl%3E%3C%2Furl%3E%0A%3Chours%3E%3C%2Fhours%3E%0A%3Cprice%3E%3C%2Fprice%3E%0A%3Clat%3E%3C%2Flat%3E%0A%3Clong%3E%3C%2Flong%3E%0A%3Cdescription%3E%3C!%5BCDATA%5Bvalue_of_description%5D%5D%3E%3C%2Fdescription%3E%0A%3C%2Fform%3E"
ResponseText
data from server to client.
"{'status':'0', 'message':'', 'result':'value_of_description'}"
non-latin characters in alt attribute[edit]
input data
name="bbbbb", alt="value_of_alt_is_亜", description="value_of_description"
亜 = %E4%BA%9C
args
"see", "User:Tatata/test", "<form><name><![CDATA[bbbbb]]></name>\n<alt><![CDATA[value_of_alt_is_<span class="non-latin">亜</span>]]></alt>\n<address>& lt;/address>\n<directions></directions>\n<phone></phone>\n<url></url>\n<hours></hours>\n<price></price>\n<lat></lat>\n<long></long>\n<description><![CDATA[value_of_description]]></description>\n</form>" 0=see 1=User:Tatata/test
post_data
data from client to server, args are encoded ( encodeURIComponent(args[i]); )
"rs=wfListingGetTagContent&rsargs[]=see&rsargs[]=User%3ATatata%2Ftest&rsargs[]=%3Cform%3E%3Cname%3E%3C!%5BCDATA%5Bbbbbb%5D%5D%3E%3C%2Fname%3E%0A%3Calt%3E%3C!%5BCDATA%5Bvalue_of_alt_is_%3Cspan%20class%3D%22non-latin%22%3E%E4%BA%9C%3C%2Fspan%3E%5D%5D%3E%3C%2Falt%3E%0A%3Caddress%3E%3C%2Faddress%3E%0A%3Cdirections%3E%3C%2Fdirections%3E%0A%3Cphone%3E%3C%2Fphone%3E%0A%3Curl%3E%3C%2Furl%3E%0A%3Chours%3E%3C%2Fhours%3E%0A%3Cprice%3E%3C%2Fprice%3E%0A%3Clat%3E%3C%2Flat%3E%0A%3Clong%3E%3C%2Flong%3E%0A%3Cdescription%3E%3C!%5BCDATA%5Bvalue_of_description%5D%5D%3E%3C%2Fdescription%3E%0A%3C%2Fform%3E"
ResponseText
data from server to client.
"{'status':'1', 'message':'項目已改變了別人。請重新刷新頁面,並重新修改。', 'result':''}"

editListing[edit]


function editListing(id, tagname, article) {
  if (listingForm != null && listingForm.isValid()) {
    return;
  }
  
  var listing = spanToListing(id);
  var current = $(id);

  var clientData = {"action":"add", "article":article, "tagname":tagname, "original": current};

  var fields = getFields(tagname);
  listingForm = new cListingEditForm(listing.name, tagname, listing, fields, article);
  listingForm.positionAtElement(current);
  listingForm.setSaveHandler(saveListing);
  listingForm.setMessageHandler(new cEditMessageHandler(current));
  listingForm.setClientData(clientData);

  var oldValues = formToXml(listingForm.getForm(), tagname, true);
  var params = [tagname, article, oldValues];
  
  var cb = makeAjaxResultsCallback(handleLookupContentResults, "Lookup", listingForm);
  doAjaxCall("wfListingGetTagContent", params, cb);
}

Other[edit]

  • /1 - Maps based on Shigenobu AOKI's data.
  • /2 - Special:Mapstraction

Variants

Actions

In other languages