Dream Portal is a portal system designed to function with Simple Machines Forum (aka SMF).

It allows you to easily manage your site and webpages in an SMF environment. Place Modules on different actions and non-actions of your SMF forum using a simple drag-and-drop approach. Users can also create and save multiple layouts by name and assign pages to any layout(s). Bundled with Dream Pages and Dream Menu helps put the power and ease of customizing your SMF forum right at your fingertips.

Dream Portal allows you the ability to easily customize your SMF forum and site with many different possibilities helping to make customization truly what dreams are made of!

DreamPortal1.0.5.zip
File size: 221KB
Download count: 1662
DreamPortal1.0.5.tar.gz
File size: 176KB
Download count: 159
Download
Hello, Guest
Please login or register.

 
 
 

Did you miss your activation email?

Re: Menübutton lassen sich nicht löschen.
Last Poster: Tony_R in German on May 14, 2012, 10:18:03 AM


hat mir auch geholfen, vielen dank !

Re: Sologhost went mad. Check this fast!
Last Poster: ThoTh in Chit Chat on May 13, 2012, 03:07:02 PM


Congrats :D

Re: Think I have Everything I need
Last Poster: SoLoGHoST in Chit Chat on May 09, 2012, 01:36:37 PM



Your Recent Image Attachments...
Last Poster: SoLoGHoST in Team Blog on May 07, 2012, 04:13:46 AM


Well, just thought I'd let you all know of the ability to see your 15 most recent image attachments

Re: Inspire Romance
Last Poster: SoLoGHoST in Website Showcase on May 03, 2012, 12:34:22 PM


Looks great!! :)

Author Topic: XML Self-close Bug?  (Read 340 times)

0 Members and 1 Guest are viewing this topic.

Xarcell

  • Project Manager
  • Constant Sleeper
  • *
  • Posts: 1081
  • Dreamy
XML Self-close Bug?
« on: November 15, 2011, 08:56:09 PM »
Not sure if this is a bug, but I noticed that in all the module packages, it has:
Code: [Select]
<file path="source/script.php">

To be proper it should be self-closed
Code: [Select]
<file path="source/script.php" />

However, everytime I try to self-close it returns this error when uploading:

Quote
This module is either missing the main function for output or has more than 1 main function defined, in either case, it can not be installed.
« Last Edit: November 16, 2011, 12:30:42 AM by SoLoGHoST »
#1
*
SoLoGHoST
  • Constant Sleeper
  • Posts: 2081
Re: XML Self-close Bug? - November 16, 2011, 12:30:30 AM
That is because there are 2 ways for the <file> tag to be done.  For defining your module functions, you SHOULD NOT self close the tag, because than your main module function and any other functions will NOT be defined.  For files that you want associated with the module that you can use, within the module, than you should self close these tags bro.

This is NOT a BUG!  This is meant to be this way...

Code: [Select]
<file path="path_to_file.php">
    <function><main>my_module_function</main></function>
    <function>another_function</function>
</file>
<file path="anyfile.avi" />
<file path="my_css.css" type="header" theme="default" />

So, as you can see, the <file> tag can be self-closing or NOT.  You Must Have a <main> function defined for your module in order to receive the $params array that will get passed to it, otherwise, if no main function is found, than, YES, an error occurs because you have closed off the <file /> tag and nothing more can be defined within the file tag once it is closed off.  You need a <file><function><main>NameOfMainFunction</main></function></file> defined no matter if your module has parameters or not!  This is MANDATORY!

Honestly, I wish you would not report bugs in a Public Board for a version of Dream Portal that isn't even released yet!  Please use the Team Boards for this.

Thanks :)

#2
*
Xarcell
  • Constant Sleeper
  • Posts: 1081
Re: XML Self-close Bug? - November 16, 2011, 12:44:28 AM
Quote
For defining your module functions, you SHOULD NOT self close the tag, because than your main module function and any other functions will NOT be defined.  For files that you want associated with the module that you can use, within the module, than you should self close these tags bro.

Gotcha, I understand. Been playing XML for some time and didn't know that.

Quote
You need a <file><function><main>NameOfMainFunction</main></function></file> defined no matter if your module has parameters or not!  This is MANDATORY!

Obviously!

Quote
Honestly, I wish you would not report bugs in a Public Board for a version of Dream Portal that isn't even released yet!  Please use the Team Boards for this.

I understand where you ware coming from with this. However, it is explained in the DP code library this way, so if it was a bug, then it would need to be corrected there too and others would need to know. However, since it isn't a bug, no worries. Soooooo..... my bad!

#3
*
SoLoGHoST
  • Constant Sleeper
  • Posts: 2081
Re: XML Self-close Bug? - November 16, 2011, 01:39:37 AM
No one but the team has access to the newest DP 1.1 Revision, therefore, no one needs to know of bugs besides the team, at this time.


 

SHOUTBOX NOT FOR SUPPORT!

 Forum Staff