MediaWiki扩展:QQ在线信息
天下维客,你可以修改的网络知识库
自己写了个简单的QQ在线状态扩展:
作者:Surpam
使用方式:
<qqex type="1" site="天眼通治疗近视" alt="http://www.dofew.com/wiki/">7004840</qqex><br> <qqex type="2" site="天眼通治疗近视" alt="http://www.dofew.com/wiki/">7004840</qqex><br> <qqex type="3" site="天眼通治疗近视" alt="http://www.dofew.com/wiki/">7004840</qqex><br> <qqex type="4" site="天眼通治疗近视" alt="http://www.dofew.com/wiki/" hint="back">7004840</qqex><br> <qqex type="5" site="天眼通治疗近视" alt="http://www.dofew.com/wiki/" hint="front">7004840</qqex><br> <qqex type="6" site="天眼通治疗近视" alt="http://www.dofew.com/wiki/">7004840</qqex><br> <qqex type="7" site="天眼通治疗近视" alt="http://www.dofew.com/wiki/" hint="no">7004840</qqex><br> <qqex type="8" site="天眼通治疗近视" alt="http://www.dofew.com/wiki/">7004840</qqex><br>
示例:http://www.dofew.com/
示例
效果:
<qqex type="1" site="天眼通治疗近视" >7004840</qqex>
<qqex type="2" site="天眼通治疗近视" >7004840</qqex>
<qqex type="3" site="天眼通治疗近视" >7004840</qqex>
<qqex type="4" site="天眼通治疗近视" hint="back">7004840</qqex>
<qqex type="5" site="天眼通治疗近视" hint="front">7004840</qqex>
<qqex type="6" site="天眼通治疗近视" >7004840</qqex>
<qqex type="7" site="天眼通治疗近视" hint="no">7004840</qqex>
<qqex type="8" site="天眼通治疗近视" alt="http://www.dofew.com/wiki/">7004840</qqex>
源代码:QQEx.php
<?php # QQ-Status extension # Copyright 2007 Surpam (Surpam.Deng at gmail.com) # Example: http://www.dofew.com/wiki/index.php/Demo:QQ # License: # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # # # Usage: # Usage: <qqex>your UIN</qqex> # # save it in your extensions-folder # include("extensions/QQEx.php"); $wgExtensionFunctions[] = "wfQQExStatus"; function wfQQExStatus() { global $wgParser; $wgParser->setHook( "qqex", "QQExfunction" ); } function QQExfunction( $input, $argv ) { $extype = $argv['type']; $exsite = $argv['site']; $exalt = $argv['alt']; $exhint = $argv['hint']; if($extype==''){ $extype='1'; } if($exsite==''){ $exsite="天眼通"; } if($exalt==''){ $exalt="天眼通治疗近视http://www.dofew.com/"; } switch ($exhint) { case "front": $output = "<strong>$input</strong><a target=blank href=tencent://message/?uin=$input&Site=$exsite&Menu=yes><img border=\"0\" SRC=http://wpa.qq.com/pa?p=1:$input:$extype alt=\"$exalt\"></a>"; break; case "back": $output = "<a target=blank href=tencent://message/?uin=$input&Site=$exsite&Menu=yes><img border=\"0\" SRC=http://wpa.qq.com/pa?p=1:$input:$extype alt=\"$exalt\"></a><strong>$input</strong>"; break; case "no": $output = "<a target=blank href=tencent://message/?uin=$input&Site=$exsite&Menu=yes><img border=\"0\" SRC=http://wpa.qq.com/pa?p=1:$input:$extype alt=\"$exalt\"></a>"; break; default: $output = "<strong>$input</strong><a target=blank href=tencent://message/?uin=$input&Site=$exsite&Menu=yes><img border=\"0\" SRC=http://wpa.qq.com/pa?p=1:$input:$extype alt=\"$exalt\"></a>"; } return $output; }
| MediaWiki扩展简明教程 | Inputbox帮助文档 | 使用Spam黑名单 | 内容折叠隐藏 | 动态文章列表 | 指定图片链接 |
| 代码高亮处理 | 预置初始编辑文本 | 页面访问限制 | 所见即所得编辑器 | QQ在线信息 | |
| 交流:扩展使用 | 投票与评分 | 内容随机展示 | wikitex | 改进设想 | ...更多 |
| 加入google地图和51地图标注功能 | Ajax五颗星评分插件 |


