⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 tags.inc.php

📁 一款开源的sns系统源码 安装简单
💻 PHP
字号:
<?php// -----------------------------------------------------------------------// This file is part of AROUNDMe// // Copyright (C) 2003-2007 Barnraiser// http://www.barnraiser.org/// info@barnraiser.org// // 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 3 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; see the file COPYING.txt.  If not, see// <http://www.gnu.org/licenses/>// -----------------------------------------------------------------------?><div id="tag_box_content" class="tag_box_content" style="display:none;">	<table cellspacing="0" cellpadding="6" border="0" width="100%">		<tr>			<td valign="top" width="50%">				<b><?php echo $lang['txt_tagged_with'];?></b><br />				<span id="tag_box_content_tags">					<?php echo $lang['txt_tag_placeholder'];?>				</span>			</td>			<?php			if(isset($_SESSION['connection_permission']) && checkPermission('core', 'add_tags', $_SESSION['connection_permission'])) {			?>			<td valign="top" width="50%">				<b>Tag it</b><br/>				<input type="text" id="add_tag_input" value="" name="tags" size="20" />&nbsp;				<input type="button" value="add tag" class="input_submit" onclick="javascript:insertTags('<?php echo $plugin_name;?>', <?php echo $tag_item_id;?>, <?php echo $webspace['webpage_id'];?>, document.getElementById('add_tag_input').value);" /><br />				<i style="font-size:80%;"><?php echo $lang['txt_tag_help'];?></i><br />			</td>			<?php }?>		</tr>	</table></div><script type="text/javascript" language="javascript">//<![CDATA[var webspace_id = <?php echo $webspace['webspace_id'];?>;function insertTags(plugin_name, plugin_item_id, webpage_id, insert_tags) {	var str = "insert_tags="+insert_tags+"&webpage_id="+webpage_id+"&plugin_name="+plugin_name+"&plugin_item_id="+plugin_item_id+"&ws="+webspace_id;	makeRequest('components/core/relay/tag.php', str, receiveTags);	location.hash='#tag_box_content';}function getTags(plugin_name, plugin_item_id, webpage_id) {		objShowHide ('tag_box_content');		var str = "webpage_id="+webpage_id+"&plugin_name="+plugin_name+"&plugin_item_id="+plugin_item_id+"&ws="+webspace_id;	makeRequest('components/core/relay/tag.php', str, receiveTags); }function receiveTags() {	if (http_request.readyState == 4) {		if (http_request.status == 200) {			var tagcloud = document.getElementById('tag_box_content_tags');			tagcloud.innerHTML = '';			xmlDoc = http_request.responseXML;			var tags = xmlDoc.getElementsByTagName("tag");			var frag = document.createDocumentFragment();			if (tags.length > 0) {				for (i=0;i<tags.length;i=i+1) {					var tag = tags[i].childNodes[0].nodeValue;					tag_link = document.createElement('a');					tag_link.setAttribute('href','index.php?ws='+webspace_id+'&v=t&t=search&tag='+tag);					tag_link.innerHTML = tag;					frag.appendChild(tag_link);					if (i+1 < tags.length) {						spacerText = document.createTextNode(", ");						frag.appendChild(spacerText);					}					document.getElementById('tag_box_content_tags').appendChild(frag);				}							}			else {				tagcloud.innerHTML = 'This discussion has not been tagged yet.';			}			mytags = xmlDoc.getElementsByTagName("mytag");						var mytagvalue = ""			if (mytags.length > 0) {								for (i=0;i<mytags.length;i=i+1) {					var mytag = mytags[i].childNodes[0].nodeValue;					mytagvalue += mytag;					if (i+1 <mytags.length) {						mytagvalue += ", ";					}				}				document.getElementById('add_tag_input').value = mytagvalue;			}					} else {			alert('There was a problem with the request.');		}	}}//]]></script>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -