vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Well, strange error in a product XML File. (https://vborg.vbsupport.ru/showthread.php?t=100303)

TyleR 11-07-2005 01:23 PM

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>

Marco van Herwaarden 11-08-2005 03:29 PM

You shouldn't be editing XML-Files directly.


All times are GMT. The time now is 07:02 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.00966 seconds
  • Memory Usage 1,743KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (2)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete