View Single Post
  #1  
Old 11-07-2005, 01:23 PM
TyleR's Avatar
TyleR TyleR is offline
 
Join Date: Nov 2004
Location: North Carolina
Posts: 349
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Well, strange error in a product XML File.

Ok, so I was in the process of porting IRC Manager for mIRC to vB 3.5.x, everything is fine, until I try uploading the product XML..

Quote:
XML Error: unknown Line 0
here's the XML file:

Code:
<?xml version="1.0" encoding="ISO-8859-1"?>

<product productid="tylerw998" title="mIRC Manager" description="Shows Current Topic And People Online In mIRC" version="2.0" active="1">
	<codes>
		<code version="2.0">
			<installcode><![CDATA[$Queries = array();
$Queries[] = "CREATE TABLE `irc_channel` (
  `channel_id` int(10) NOT NULL auto_increment,
  `handle` varchar(25) NOT NULL default '',
  `server` varchar(25) NOT NULL default '',
  `icon` varchar(100) NOT NULL default '',
  `online` int(10) unsigned NOT NULL default '0',
  `online_max` int(10) unsigned NOT NULL default '0',
  `dateline_max` int(10) unsigned NOT NULL default '0',
  `activity` smallint(5) unsigned NOT NULL default '0',
  `operators` varchar(255) NOT NULL default '',
  `halfops` varchar(255) NOT NULL default '',
  `voiced` varchar(255) NOT NULL default '',
  `users` varchar(255) NOT NULL default '',
  `topic` varchar(100) NOT NULL default '',
  `nick_style` varchar(200) NOT NULL default '',
  `act0` varchar(50) NOT NULL default '',
  `act1` varchar(50) NOT NULL default '',
  `act2` varchar(50) NOT NULL default '',
  `act3` varchar(50) NOT NULL default '',
  `act4` varchar(50) NOT NULL default '',
  `act5` varchar(50) NOT NULL default '',
  PRIMARY KEY  (`channel_id`)
) TYPE=MyISAM;";

foreach ($Queries as $Q)
{
	$vbulletin->db->query($Q);
}]]></installcode>
			<uninstallcode><![CDATA[$Queries = array();
$Queries[] = "drop table `irc_channel`;";
foreach ($Queries as $Q)
{
	$vbulletin->db->query($Q);
}]]></uninstallcode>
		</code>
	</codes>
	<templates>
		<template name="irc_loggedin" templatetype="template" date="1123917050" username="TyleR" version="3.5.1"><![CDATA[<tbody>
	<tr>
		<td class="thead" colspan="2">
			<a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('forumhome_$channel[channel_id]')"><img id="collapseimg_forumhome_$channel[channel_id]" src="$stylevar[imgdir_button]/collapse_thead$vbcollapse[collapseimg_forumhome_activeusers].gif" alt="" border="0" /></a>
<a style="float:$stylevar[right]"><img src="$stylevar[imgdir_misc]/act$channel[alevel].gif" alt="$channel[aname]" />&nbsp;&nbsp;&nbsp;</a>
			$channel[handle] @ $channel[server]: $channel[online] online
		</td>
	</tr>
</tbody>
<tbody id="collapseobj_forumhome_$channel[channel_id]" style="$vbcollapse[collapseobj_forumhome_activeusers]">
	<tr>
		<td class="alt2"><img src="$channel[icon]" alt="$vbphrase[view_whos_online]" border="0" /></td>
		<td class="alt1" width="100%">
			<div class="smallfont">
				<div style="white-space: nowrap">Most users in the chat was $channel[online_max] on $channel[date_max] at $channel[time_max].<br />
Topic:&nbsp; <i>$channel[topic]</i></div>
				<div style="padding-top: 7px">$channel[nick_list]</div>
			</div>
		</td>
	</tr>
</tbody>]]></template>
	</templates>
	<plugins>
		<plugin active="1">
			<title>mIRC Manager Online</title>
			<hookname>forumhome_complete</hookname>
			<phpcode><![CDATA[$channels = $db->query("
			SELECT * 
			FROM `irc_channel`
		");
		
while ($channel = $db->fetch_array($channels))
{
	$nick_style = explode('||', $channel['nick_style']);
				
	$ops     = explode(' ', $channel['operators']);
	$halfops = explode(' ', $channel['halfops']);
	$voiced  = explode(' ', $channel['voiced']);
	$users   = explode(' ', $channel['users']);
				
	if (!empty($ops[0]))
	{
		foreach ($ops AS $op)
		{
			$channel['nick_list'] .= str_replace('{nick}', $op, $nick_style[0] . ', ');
		}
	}

	if (!empty($halfops[0]))
	{				
		foreach ($halfops AS $halfop)
		{
			$channel['nick_list'] .= str_replace('{nick}', $halfop, $nick_style[1]) . ', ';
		}
	}

	if (!empty($voiced[0]))
	{				
		foreach ($voiced AS $voice)
		{
			$channel['nick_list'] .= str_replace('{nick}', $voice, $nick_style[2]) . ', ';
		}
	}

	if (!empty($users[0]))
	{				
		foreach ($users AS $user)
		{
			$channel['nick_list'] .= str_replace('{nick}', $user, $nick_style[3]) . ', ';
		}
	}
				
	$channel['nick_list'] = substr($channel['nick_list'], 0, -2);
				
	if ($channel['activity'] > 100)
	{
		$channel['alevel'] = 5;
	}
	else if($channel['activity'] == 0)
	{
		$channel['alevel'] = 0;
	}
	else
	{
		$channel['activity'] *= .05;
	
		$channel['alevel'] = round($channel['activity']);
	
		if ($channel['alevel'] < 1)
		{
			$channel['alevel'] = 1;
		}
	}
				
	$channel['aname'] = $channel["act$channel[alevel]"];
	
	$channel['online_max'] = number_format($channel['online_max']);
	$channel['online'] = number_format($channel['online']);
	
	$channel['date_max'] = vbdate($vboptions['dateformat'], $channel['dateline_max']);
	$channel['time_max'] = vbdate($vboptions['timeformat'], $channel['dateline_max']);
	
	eval('$irc_channels .= "' . fetch_template('irc_loggedin') . '";');
		
	unset($channel['nick_list']);
}
	</plugin>
	</plugins>
	</product>
Any help on what this error might be from would be much appreciated

- Tyler

never mind, i forgot the trailing

Code:
]]></phpcode>
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01043 seconds
  • Memory Usage 1,792KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code
  • (1)bbcode_quote
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • showpost_complete