如何在侧边栏中添加带有链接的图像-MediaWiki [英] How to add image with link in a sidebar - MediaWiki

查看:354
本文介绍了如何在侧边栏中添加带有链接的图像-MediaWiki的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我可以通过以下方式将链接添加到MediaWiki侧边栏:

I can add links to a MediaWiki sidebar this way:

* some-url|url-text

但是如何在不破坏核心或标准模板的情况下添加图像而不是文本?

But how can i add image instead of text without hacking core or standard templates?

我已阅读以下内容: http://www.mediawiki.org/wiki /Manual_talk:Interface/Sidebar#Images_in_the_navigation_bar

但这只是功能请求.

推荐答案

三种可能的方法:

  1. 编写自定义皮肤,该皮肤可以根据需要以任何方式处理侧边栏.
  2. 使用钩子 SkinBuildSidebar 编写一个小的扩展程序,以处理一些自定义代码用于图像
  3. 使用MediaWiki:Common.js使用javascript修改侧边栏.
  1. Write a custom skin, that handles the sidebar any way you want.
  2. Write a tiny extension using the hook SkinBuildSidebar, to handle some custom code for images
  3. Use MediaWiki:Common.js to modify the sidebar using javascript.

毫无疑问我会去2.

edit:请注意,某些外观可能会忽略SkinBuildSidebar挂钩.只要您没有启用自定义外观,就可以了.

edit: Note that some skins might ignore the SkinBuildSidebar hook. As long as you have no custom skins enabled, you should be fine, though.

这篇关于如何在侧边栏中添加带有链接的图像-MediaWiki的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆