SMF Community Helpers > Mod Development

[MOD] Dream Portal 1.1

(1/4) > >>

SoLoGHoST:
EDIT:  Attachment REMOVED, This mod has been approved by the Customization Team, you can download it here.I am posting this modification up on behalf of the Dream Portal Team, since that account is unable to do so itself.  If there are any questions on this mod I am capable of answering them as well.  Feel free to tear this package apart and give it a nice and full review.  I have released it publicly on the DP.net site where you can get Module Packages, Template Packs, and/or Language Packs for it, if you need them for testing purposes.


Current Version: 1.1
Campatiability: SMF 2.0+
Official Site: http://dream-portal.net
For Support & Extensions: http://dream-portal.net/board_68.0/
FYI: Some pictures that represent Dream Portal may require certain extensions (templates, and/or modules) in order for you to display your pages in the exact same manner.

What Is Dream Portal?
Dream Portal is a modification for Simple Machines Forum that turns your forum into a full-fledged portal. It comes, fully equipped, with a Homepage, Dream Menu (Menu Manager), Dream Layouts (Layouts Manager), Dream Pages (Page Manager), and an Extensions Manager. The blocks of content are called "Modules" which can be installed/uninstalled at your convenience.  Dream Portal is easy enough for newbies, and advanced enough for experts.

The Core Features Of Dream Portal
At first glance the standard features of Dream Portal may seem the same as other portals, but they are designed differently and managed very differently. The core features include:

* General: Information section lets you know if you are using the current version of Dream Portal, displays the credits ofcourse, as well as the DP 1.1 License, and DP.net site news.  Configuration section provides the option to remove the Dream Portal copyright from the footer of your SMF Forum for whatever your reasons might be.  In addition, you can disable the Menu Manager (Dream Menu) and Page Manager (Dream Pages) that not only removes the items from user's view, but hides the administration sections as well. This works great in case you ever want to use another Menu Manager or Pages SMF mod instead of Dream Menu and/or Dream Pages.


* Homepage: as it seems to be the standard nowadays.  Dream Portal offers a "Homepage" that can be disabled at any time, and is managed with the layout manager.


* Dream Layouts: Utilizing a Drag & Drop feature, you can organize your "Modules" which are blocks of content within sections of the "Layout".  Layouts are not restricted to just certain sections such as a "Top", "Bottom, "Left", and "Right". You can add as many sections as you want to your layout. Each layout can also be specified where it can be shown anywhere on the site, even areas added by other SMF mods.  To fully understand how you can get any URL on your site attached to a layout, and/or to learn how you can create Board Specific Layouts (that show within an entire board, and all of it's topics), please visit the following link where this is discussed:  Getting Your Layout To Only Show Where You Want It


* Dream Menu: Dream Portal comes with it's own Menu Manager, which allows you to add & remove menu items from your SMF menu. You can even add up to 2 sub-level menu items.  Dream Menu integrates with Dream Pages so that you can even create menu buttons for your Dream Pages.  You have the ability to place Dream Menu in maintenance mode as well in order to build a menu behind the scenes and than just disable maintenance mode when you are ready for the Menu to be live on your site.


* Dream Pages: Dream Portal also comes with a built-in page manager that can handle BBC, HTML, and PHP output. It features a full permission set such as who can view the page.  It also features a "status" that can be activated and/or deactivated without removing the page.  Ability to place Dream Pages in Maintenance Mode that will allow you to work on the pages behind the scenes and just disable Maintenance Mode when you are ready for the pages to be live on your site.


* Extend Dream Portal: The Extension Manager is where all extensions to Dream Portal are installed, uninstalled, and/or deleted. These extensions include:


* Modules: These are blocks of content that are added to a layout. The reason why we call them "Modules" instead of "Blocks" is because they are installed or uninstalled and have settings via module admin that requires no coding skills to operate.  Furthermore, they can take on any shape and blocks refer to a square-looking appearance.  In addition, any module can be "cloned" which means a copy is automatically generated, and the settings can be modified to operate separately from which it was cloned. So for example, if you install the "shoutbox" module, you can clone it, and have as many "shoutbox" modules as you want, with each one having it's own settings.  This applies to all modules.  Many modules offer unique features that support cloning.  For example, a module could be a button, that, when cloned gives you a total Navigation Menu for important areas of your site.  Dream Portal 1.1 now supports Empty Modules, which means that when these modules are enabled, they can break out of the Layout sections and be placed anywhere on your Layouts, anywhere at all!  A good example of an empty module is the Content Flyout Module.


* Templates: Currently, templates are for modules only.  Adding templates allow you to change the way the module container appears on your forum within your layouts.  Each module has it's own template by default.  Dream Portal comes with only 1 template installed, "Default", but you can add as many as you like that change the way your modules appear within layouts.


* Languages: Dream Portal translations are packaged up and added through the "Add Languages" sub-section of the Extend Dream Portal DP Admin section.  Uploading a language pack will automatically add in all of the language files needed for Dream Portal to be used in your language.  Module Languages are added within Module Packages separately ofcourse, however, the main Dream Portal language strings will change to reflect the language you are using within SMF if you have that language uploaded via the "Add Languages" section, otherwise, the default, english language will be used.


* And More: Modules can be collapsed or expanded like other portals, or you can animate the module during collapsing and expanding. Modules can have empty containers, and be displayed "literally" anywhere on the page.  Not to mention that Dream Portal 1.1 has 40+ installable modules, such as: Weather, Blog, Image Galleries, News Sliders, Ad-Manager, Sexy Bookmarks, jQuery animated Calendar Module, Content Flyout, Page Peel, and many many more...
IMPORTANT:  If you have Dream Portal 1.0.x installed, you must fully uninstall it before you upload and install Dream Portal 1.1.  This is because of the vast differences in the database structure between the 2 DP Releases.

Thanks Very Much to the SMF Customization Team for making it possible for the Community to take part in the SMF Approval Process!  :)

EDIT:  Attachment REMOVED, This mod has been approved by the Customization Team, you can download it here.

live627:
Hmm, so why is only one module included? I don't get it. At all.

SoLoGHoST:
Mainly because people want to install the modules that they are going to use on their site.  If all modules are included and not able to be uninstalled, than we run into a few problems with user-friendliness, and customization control.  Honestly, it's their site, they should be able to choose what they want on it and what they don't want.  The only real module that they need to get started on it, is the Custom Module (for the do-it-yourself kinda user).  But also, because, it just makes sense.  Modules have expanded so much in Dream Portal 1.1, in the sense that they could be compared to full blown SMF Mods even.  You can make a Module in Dream Portal that can edit the database, and have it's own Source and Template files.  So, in this sense, it just makes more sense to kinda do what SMF does with their Mods.... Have a Package Manager to install only the one's you want.

Hope this answers your question.

emanuele:
I don't remember exactly the details, so I may be wrong, but I feel it's also good practice. I noticed you are directly accessing a file for you ajax calls and including SSI.php. I would suggest you to create a specific action. The main reason is that AFAIR (it was a while ago so I don't remember exactly the details) when I started working on the quiz mod, it was doing the same thing, but I had few problems of conflicts with other mods (again I don't remember the details and this is just a personal suggestion, you may or may not follow it).

One concern is something that probably DP shares with other portals too (don't know because I never really used any) but since is a security issue (even though probably known and somehow wanted) I'll send you a PM.

If in a php page there is an error, from the code seems there should be a fatal_lang_error, but I get an
--- Code: ---Undefined variable: code in path/to/Sources/Subs-DreamModules.php on line 74
--- End code ---

Another small detail: in dp_core.php,
--- Code: ---loadLanguage('ManageDP+DreamPortal');
--- End code ---
could be inside the function. :P

* emanuele is the master of useless suggestions :P
Would you mind using a bit more strong way to inject your copyrights? (i.e. a longer string to match)
I know it's unusual, but with your current method any time there is a
--- Code: ---[url=something]Simple Machines[/url]
--- End code ---
in any position in the page your copyright is injected there. :P

ETA: another error in page creation:

--- Code: ---Notice: Undefined variable: id in path/to/dp_ajax.php on line 59
--- End code ---
while cycling with the tab through the elements of the page.

ETA2: also in the Layout settings page is XHTML invalid, I think because of the fieldset associated to "Modules Expanded Header Height" improperly closed (since the things that should be hidden in the fieldset are actually visible).

SoLoGHoST:
Hello, thanks for your quick review of this emanuele.  Ok, now onto your feedback...

dp_ajax.php if fine as it is, but yeah, I suppose it would be best to have it as an action and use the action instead.  In any case, the file is acceptable.  Will change it in the future to point to an action.  Something for DP 1.2.  Will add to the Roadmap for sure.

About your security concern, have PM'd you on this, waiting for feedback from you.  There are a few ways to deal with this, 2 of the ways you pointed out.  But wondering on what you think of my way of doing this, cause it's actually almost the same as your first suggestion anyways.  But, like you stated, all Portals that offer this functionality currently have the same Security Risk in it that is not being handled properly.

If a Dream Page is coded in PHP with PHP Syntax errors, the error is pushed onto the SMF Error Log as $code being undefined and the Page outputs nothing.  This was actually something that was meant.  I don't see a problem with this, however, I suppose we could do a check for the $code variable not being set, and if that is the case, point to a fatal_lang_error


--- Code: ---if (!isset($code))
    fatal_lang_error('dp_phpsyntaxerror', false);
--- End code ---

Honestly, I don't see how a PHP Syntax error could escape the following code in Subs-DreamModules.php:


--- Code: ---if (!@eval('return true;' . $content))
$func_callback_php_error;
--- End code ---

Could you give me an example of PHP code that doesn't get caught by this if statement?

In any case, I suppose this could be changed, if that is what you are referring to.  I can make this change, not a big deal.

As far as the LoadLanguage('ManageDP+DreamPortal'); code being outside of the function.  Again, this is on purpose....


--- Code: ---add_integration_function('integrate_admin_include', '$sourcedir/dp_core.php');
--- End code ---

This means that dp_core.php ensures that the language files are loaded when inside of the SMF Admin!  This is because you can DISABLE Dream Portal within the Core Features, but you still need the language files loaded because of the Description of Dream Portal being listed within the Core Features area.  So it is outside of the function, otherwise, we would have some undefined variables in our error log when disabling Dream Portal.

As far as the copyright is concerned, OUCH, I see what you mean.  OMG, how was this overlooked?  Will get on this right away...  Thanks!


--- Quote ---ETA: another error in page creation:

--- Code: ---Notice: Undefined variable: id in path/to/dp_ajax.php on line 59
--- End code ---
while cycling with the tab through the elements of the page.
--- End quote ---

I've cycled with the tab key and I can not recreate this undefined id error that you speak of.  Can you provide more information on this bug?


--- Quote ---ETA2: also in the Layout settings page is XHTML invalid, I think because of the fieldset associated to "Modules Expanded Header Height" improperly closed (since the things that should be hidden in the  fieldset are actually visible).
--- End quote ---

I don't see this problem on my end.  I checked it, and it's XHTML Compliant at 100%!  Please recheck this.
So, going through everything you mentioned, I see 2 things that should be changed.

1. Copyright needs to be strict!  (Priority)
2. If $code is undefined, use fatal_lang_error() function.  Honestly, there is already a function callback in place for this, will just fix it up a bit as it seems to not be working, suppose I'll just use call_user_func_array() instead on this bit.

Does that sound about right to you?  And ofcourse, the PM you sent me could be another change.  Can you please respond to the PM that I sent you back?

Navigation

[0] Message Index

[#] Next page

Go to full version