Upgrades

From YoKim

Jump to: navigation, search


installation diffs for WordPress and MediaWiki that I write down here to jog my memory. needed every time software are upgraded. I also use yokim.net as a testing ground before implementing them at mpkb:MPKB:Server

Contents

[edit] MySQL

  • mpkbnet_yokimeng (no pre)
  • mpkbnet_yokimcas (no pre)
  • mpkbnet_yokimwiki (de_)
  • mpkbnet_yokimwiki (wpko_)

[edit] How to change MediaWiki table names

mysql -u USERNAME -p DBNAME <poem> RENAME TABLE archive TO wk_archive; RENAME TABLE category TO wk_category; RENAME TABLE categorylinks TO wk_categorylinks; RENAME TABLE externallinks TO wk_externallinks; RENAME TABLE filearchive TO wk_filearchive; RENAME TABLE hitcounter TO wk_hitcounter; RENAME TABLE image TO wk_image; RENAME TABLE imagelinks TO wk_imagelinks; RENAME TABLE interwiki TO wk_interwiki; RENAME TABLE ipblocks TO wk_ipblocks; RENAME TABLE job TO wk_job; RENAME TABLE langlinks TO wk_langlinks; RENAME TABLE logging TO wk_logging; RENAME TABLE math TO wk_math; RENAME TABLE objectcache TO wk_objectcache; RENAME TABLE oldimage TO wk_oldimage; RENAME TABLE page TO wk_page; RENAME TABLE pagelinks TO wk_pagelinks; RENAME TABLE page_props TO wk_page_props; RENAME TABLE page_restrictions TO wk_page_restrictions; RENAME TABLE protected_titles TO wk_protected_titles; RENAME TABLE querycache TO wk_querycache; RENAME TABLE querycachetwo TO wk_querycachetwo; RENAME TABLE querycache_info TO wk_querycache_info; RENAME TABLE recentchanges TO wk_recentchanges; RENAME TABLE redirect TO wk_redirect; RENAME TABLE revision TO wk_revision; RENAME TABLE searchindex TO wk_searchindex; RENAME TABLE site_stats TO wk_site_stats; RENAME TABLE templatelinks TO wk_templatelinks; RENAME TABLE text TO wk_text; RENAME TABLE trackbacks TO wk_trackbacks; RENAME TABLE transcache TO wk_transcache; RENAME TABLE updatelog TO wk_updatelog; RENAME TABLE user TO wk_user; RENAME TABLE user_groups TO wk_user_groups; RENAME TABLE user_newtalk TO wk_user_newtalk; RENAME TABLE watchlist TO wk_watchlist; </poem>

[edit] WordPress plugins

[edit] LocalSettings.php

<poem> $wgNoFollowLinks = false; $wgFileExtensions = array( 'png', 'gif', 'jpg', 'jpeg', 'ogg', 'pdf', 'doc', 'xls', 'odt', 'ods', 'odp', 'ppt', 'mdb', 'hwp', 'txt', 'mic', 'zip', 'rar', 'tif' ); $wgCachePages = false; # Allow client-side caching of pages $wgArticlePath = "/wies/$1"; require_once( "extensions/poem.php" ); require_once( "extensions/charinsert.php" ); $wgUseTrackbacks = true; session_name ("yokimcas"); $wgEnableUploads = true; $wgGroupPermissions['user']['delete'] = true; $wgGroupPermissions['user']['move'] = true; $wgGroupPermissions['user']['patrol'] = true; $wgGroupPermissions['user']['protect'] = true; $wgGroupPermissions['user']['rollback'] = true; </poem>

[edit] extensions/poem.php

http://meta.wikimedia.org/wiki/Poem_Extension

[edit] extensions/charinsert.php

http://cvs.sourceforge.net/viewcvs.py/wikipedia/extensions/CharInsert/

and then update MediaWiki:Copyrightwarning (reference Wikipedia:ko:MediaWiki:Copyrightwarning)

[edit] MonoBook.php

[edit] referrer

<div id="p-referrer" class="portlet"> <h5>referencias</h5> <div class="pBody"> <script language="Javascript" src="http://yokim.net/referrers.js"></script> </div> </div>

[edit] home, privatenotes

<?php foreach($this->data['personal_urls'] as $key => $item) { ?><li id="pt-<?php echo htmlspecialchars($key) ?>"><a href="<?php echo htmlspecialchars($item['href']) ?>"<?php if(!empty($item['class'])) { ?> class="<?php echo htmlspecialchars($item['class']) ?>"<?php } ?>><?php echo htmlspecialchars($item['text']) ?></a></li><?php } ?>

add before <?php for each bla bla ?>

<li id="pt-home"><a href="/text/hub/"><img src=/i/nav/firestation_home.gif></a></li> <?php global $wgUser; if ($wgUser->isLoggedIn()) { ?><li id="pt-userpage2"><a href="/wiki/User:Yonghokim"><img src=/i/nav/pen02_green.gif></a></li> <li id="pt-privatenotes"><a href=/memo/PrivateNotes><img src=/i/nav/f5_o.gif></a></li><?php } ?>

[edit] ko, es, de (MonoBook.php)

replace

<?php if($this->data['usercss' ]) { ?><style type="text/css"><?php $this->html('usercss' ) ?></style><?php } ?>

for

<style type="text/css">/*<![CDATA[*/ @import "/w-en/index.php?title=MediaWiki:Monobook.css&action=raw&ctype=text/css&smaxage=18000"; @import "/w-en/index.php?title=-&action=raw&gen=css&maxage=18000"; /*]]>*/</style>

[edit] .htaccess

[edit] /

<poem> RewriteEngine On RedirectMatch permanent ^/$ http://yokim.net/text/hub/

RewriteRule ^wp/index.php(.*)$ /home/mpkbnet/public_html/yokim.net/text/index.php$1 RedirectMatch permanent ^/([0-9]+)(.*)$ http://yokim.net/text/$1/ RedirectMatch permanent ^/wp/archives/([0-9]+)(.*)$ http://yokim.net/text/$1/ RedirectMatch permanent ^/wikka(.*)$ http://yokim.net/memo$1 RedirectMatch permanent ^/w3(.*)$ http://yokim.net/wiki$1 RedirectMatch permanent ^/wp$ http://yokim.net/text/hub/

RedirectMatch permanent ^/wiki/?$ http://yokim.net/wiki/Main_Page RewriteRule ^wiki/(.+)$ /home/mpkbnet/public_html/yokim.net/w-en/index.php?title=$1 [QSA,L] RedirectMatch permanent ^/wiko(.?)$ http://yokim.net/wiko/%EB%8C%80%EB%AC%B8 RewriteRule ^wiko/(.+)$ /home/mpkbnet/public_html/yokim.net/w-ko/index.php?title=$1 [QSA,L] RedirectMatch permanent ^/wies/?$ http://yokim.net/wies/Portada RewriteRule ^wies/(.+)$ /home/mpkbnet/public_html/yokim.net/w-es/index.php?title=$1 [QSA,L] RedirectMatch permanent ^/wide/?$ http://yokim.net/wide/Hauptseite RewriteRule ^wide/(.+)$ /home/mpkbnet/public_html/yokim.net/w-de/index.php?title=$1 [QSA,L] </poem>

[edit] b.yokim.net

<poem> RewriteEngine on RewriteCond %{HTTP_HOST} ^b.yokim.net$ [OR] RewriteCond %{HTTP_HOST} ^www.b.yokim.net$ RewriteRule ^(.*)$ http://yokim.net/text/$1 [R=301,L] </poem>

[edit] w.yokim.net

<poem> RewriteEngine on RewriteCond %{HTTP_HOST} ^w.yokim.net$ [OR] RewriteCond %{HTTP_HOST} ^www.w.yokim.net$ RewriteRule ^(.*)$ http://yokim.net/wiki/$1 [R=301,L] </poem>

[edit] /w-en/skins/common/wikibits.js

remove

<poem> // Un-trap us from framesets if( window.top != window ) window.top.location = window.location; </poem>

http://yokim.net/text/695/</poem>

Personal tools