My Notes document version control system-MediaWiki-Back to Top/link amplification/upgrade

Source: Internet
Author: User
Tags mediawiki

To practice your own basic JS and CSS skills,

The following are my new MediaWiki functions:

  • Back to Top
  • Link Amplification
  • MediaWiki upgrade
Add back to top

Returning to the top is the basic function of many websites. As long as the webpage is scroll down to a certain degree, the button that returns to the top will appear in a fixed position relative to the browser. The following is the back-to-top function I added in MediaWiki.

PS: the function of returning to the top is also available in the blog Garden, but it is fixed and difficult to operate. You can add your own back to the top button in a similar way as below, just introduce jquery in JS Code. The Code is as follows:

<script id="jquery_182" type="text/javascript" class="library" src="http://files.cnblogs.com/snowsolf/jquery.js"></script><script type="text/javascript"> snowId = document.getElementById("footer" solfId = document.createElement("a""id","gotop"($(window).scrollTop()>200"#gotop").fadeIn(100"#gotop").fadeOut(100"#gotop").click('body,html').animate({scrollTop:0},100"#gotop").mouseover((e) {$().css("background","url(http://images.cnblogs.com/cnblogs_com/snowsolf/497956/o_backtop.gif) no-repeat 0px -100px""#gotop").mouseout((e) {$().css("background","url(http://images.cnblogs.com/cnblogs_com/snowsolf/497956/o_backtop.gif) no-repeat 0px 0px"</script>

The principle is to find an element on the page and insert the "Back to Top" element in the parent element of the element. CSS code is the same. If you want to hide the fixed back-to-page button on the original page, the CSS code is as follows:

{:;}

Generally, a website has a footer element. you can insert the expected element (back to the top) into the footer element and then operate on the element.

JS Code

Insert:

SnowId = document. getElementById ("footer" solfId = document. createElement ("a" "id", "gotop" "title", "Back to Top" ($ (window ). scrollTop ()> 200 "# gotop "). fadeIn (100); "# gotop "). fadeOut (100); $ ("# gotop "). click ($ ('body, html '). animate ({scrollTop: 0}, 100 "# gotop" #.mouseover().css ("background", "url (http: // localhost/images/backtop.gif) no-repeat 0px-100px "" # gotop "pai.mouseout().css (" background "," url (http: // localhost/images/backtop.gif) no-repeat 0px 0px "});
CSS code
{:;:;:;:;:;:;:;}

You can also change your favorite image to the top image.

Link Amplification

Link enlargement means that the font becomes larger when all links on the page are moved over the mouse.

CSS code
{:;}

The code is very simple, but there are also problems, such as the logo image has changed, it looks bad.

Solve logo movement problems:

{:;:;}{:;}
MediaWiki upgrade

MediaWiki can be upgraded in two ways. One is to upgrade the original MediaWiki, and the other is to migrate and upgrade.

Backup

First, back up the existing MediaWiki before upgrading your MediaWiki.

Although the Upgrade Program has been well tested and reliable, problems may still occur. Therefore, before running the Upgrade Program, be sureComplete backup. Including related databases and related files:

  • Wiki-related content in the database. We recommend that you export the SQL statement as XML.
    • MySQL:
      • Export to SQL:Mysqldump -- all-databases> file.txt
      • Export as XML:Mysqldump -- all-databases -- xml> file. xml
    • PostgreSQL:
      • Export to pg_restore:Pg_dump -- create-Fc-I yourwiki> yourwiki. db. dump
  • Images and other filesImagesDirectory)
  • Configuration FileLocalSettings. phpAndAdminSettings. php
  • MediaWiki program files, including all skin and extensions, especially the files you have modified and customized.

Referenced above:

Http://www.mediawiki.org/wiki/Manual:Upgrading/zh-hans

Want to get

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.