osTube 页面修改

osTube 作为一个优秀的影音播放平台,其功能非常丰富,甚至超出我们所需,有时需要作一些定制工作以满足需求。
一、 主菜单修改,
1、去掉 “社区”及“博客” 菜单。修改 /includes/header.php

$main = new Main();

$site_structure = array(
// ’index’ => array(‘index.php’, array())
);
if ($main->getConfig(“videos_enabled”) == true) {
$site_structure["videos"] = array(“media.php?type=video”, array());
}
if ($main->getConfig(“audios_enabled”) == true) {
$site_structure["audios"] = array(“media.php?type=audio”, array());
}
if ($main->getConfig(“photos_enabled”) == true) {
$site_structure["photos"] = array(“media.php?type=photo”, array());
}
if ($main->getConfig(“documents_enabled”) == true) {
$site_structure["documents"] = array(“media.php?type=document”, array());
}

//注释下面两行即可。
/*
$site_structure["community"] = array(“community.php”, array());
$site_structure["blog"] = array(“blog.php”, array());
*/

2、增加自己的菜单项
ostube/templates/default/mainmenu.tpl

<li><a href=”http://www.billdeng.com”>清风博客</a></li>
{foreach item=m from=$menu}
{if $m.SELECTED}
<li><a href=”{$m.LINK}”>{$m.TITLE}</a></li>
{else}
<li><a href=”{$m.LINK}”>{$m.TITLE}</a></li>
{/if}
{/foreach}
</ul>

二、二级菜单修改
隐藏“朋友”、“社区”及“历史记录”菜单。
修改 ostube/includes/class.userinformation.php 文件, 在大约第510行,有一个 $showmenuitem 参数, 默认为 1, 即显示菜单, 把它改为0即为不显示。
也可以注释掉相应的菜单显示代码。

/*

$array[4]["LINK"] = “users_friends.php?uid=” . $uid;
$array[4]["TITLE"] = $language["userlinks_friends"] . ” (“. $dbconn -> num($dbconn -> getTable(“buddies”) . ”
WHERE buddy_users_id=’”. $dbconn -> escape($uid) .”‘”) .”)”;

$array[5]["LINK"] = “users_groups.php?uid=” . $uid;
$array[5]["TITLE"] = $language["userlinks_groups"] . ” (“. $dbconn -> num($dbconn -> getTable(“groups2users”) . ”
WHERE groups2users_approved=’true’
AND groups2users_users_id=’”. $dbconn -> escape($uid) .”‘”) .”)”;

*/

三、修改页尾
修改 ostube/templates/default/index.tpl 文件, 如果要插入中文连接,要注意编辑器的编码。

<div id=”footer”>
<p>
<a href=”http://www.billdeng.com”>清风博客</a><span>&middot;</span>
<!–
<a href=”static_disclaimer.php”>{#title_imprint#}</a> <span>&middot;</span> <a href=”static_terms.php”>{#title_terms#}</a> <span>&middot;</span> <a href=”static_privacy.php”>{#title_privacy#}</a> <span>&middot;</span>
–>
<a href=”http://www.vimp.com” title=”ViMP – Video Media Player – Free Flash Video Player”>ViMP</a> <span>&middot;</span> <a href=”http://www.ostube.de” target=”_blank” id=”ostubelink” style=”width:4em;”>{if $OSTUBE_FOOTERTEXT}{$OSTUBE_FOOTERTEXT}{else}osTube{/if}</a>
<script type=”text/javascript”>
<!–
if ($(‘ostubelink’)) $(‘ostubelink’).innerHTML = ‘osTube’;
–>
</script>
</p>
</div>

关于 清风

关注IT资讯,虚拟化技术,企业VPN, VoIP, CRM应用等。
本文章发表于 (This entry was posted in) linux 技术, 网络管理. 收藏 (Bookmark the) 永久链接(permalink).

本文有一条评论

  1. I can’t beilvee I’ve been going for years without knowing that.

发表评论 Leave a Reply

邮箱不会出现在评论中(Your email address will not be published.) *号为必填项 Required fields are marked *

*

你可以使用一些简单的 HTML 命令。You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

请回答(What is) 10 + 8 ?
Please leave these two fields as-is:
IMPORTANT! To be able to proceed, you need to solve the following simple math (so we know that you are a human) :-)