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: 1272
DreamPortal1.0.5.tar.gz
File size: 176KB
Download count: 141
Download

Re: DP works with SMF 2.0.1?
Last Poster: pixeleyes in English Support | February 21, 2012, 10:28:40 AM

Re: DP works with SMF 2.0.1?
Last Poster: Xarcell in English Support | February 21, 2012, 09:50:52 AM

DP works with SMF 2.0.1?
Last Poster: pixeleyes in English Support | February 21, 2012, 07:27:35 AM

Re: Reset Impression Count
Last Poster: SoLoGHoST in Modules | February 17, 2012, 06:27:57 AM

Re: Reset Impression Count
Last Poster: jhkfdg in Modules | February 17, 2012, 03:00:03 AM

Author Topic: [Mod Package] Disable DP 1.0.5 Home Layout  (Read 2735 times)

0 Members and 1 Guest are viewing this topic.

SoLoGHoST

  • Lead Developer
  • Developer
  • Dreamist
  • *
  • Posts: 1878
  • Wanted... DEAD or ALIVE!
    • View Profile
    • Dream Portal
[Mod Package] Disable DP 1.0.5 Home Layout
« on: July 05, 2011, 03:46:19 AM »
Ok, so for everyone who needs to disable the Home Layout for DP 1.0.5, I have put together a package for you all to download and install that will do this for you via the SMF Package Manager (package attached).

Prerequisites for this package are as follows:

  • Dream Portal 1.0.5 Installed
  • SMF 2.0 GOLD Installed (should also work on all RC versions as well, but haven't tested it).

For anyone interested in the edits that get done, or if the package contains any errors and/or you want to do it manually, here are the edits that this package does:
Open up .Sources/DreamPortal.php

FIND:
Code: [Select]
$curr_action = !empty($da_action) ? $da_action : '[home]';

$context['dp_home'] = $curr_action == '[home]';

REPLACE WITH:
Code: [Select]
if ($da_action == '[home]')
$da_action = 'forum';

$curr_action = !empty($da_action) ? $da_action : 'forum';

$context['dp_home'] = $curr_action == 'forum';

Open up ./index.php

FIND:
Code: [Select]
// Display Portal?
if (!empty($modSettings['dp_portal_mode']) && allowedTo('dream_portal_view'))
return 'dp_main';
// Otherwise, Board Index!
else
{
require_once($sourcedir . '/BoardIndex.php');
return 'BoardIndex';
}

REPLACE WITH:
Code: [Select]
if (empty($board) && empty($topic))
{
require_once($sourcedir . '/BoardIndex.php');
return 'BoardIndex';
}

FIND:
Code: [Select]
'forum' => array('BoardIndex.php', 'BoardIndex'),

DELETE THE ABOVE LINE!

Open up: ./Sources/Subs-DreamPortal.php

FIND:
Code: [Select]
$match = '[home]';

REPLACE WITH:
Code: [Select]
$match = 'forum';

And now to remove the Forum Menu Button...

Open up ./Sources/Subs.php

FIND:
Code: [Select]
'forum' => array(
'title' => (!empty($txt['forum']) ? $txt['forum'] : 'Forum'),
'href' => $scripturl . '?action=forum',
'show' => (!empty($modSettings['dp_portal_mode']) && allowedTo('dream_portal_view') ? true : false),
'sub_buttons' => array(
),
),

DELETE ALL OF THIS!

Save all of your files, backup the originals, and than overwrite all of these files that you edited onto your server (via FTP):

.Sources/Subs.php
.Sources/Subs-DreamPortal.php
.Sources/DreamPortal.php
./index.php

Cheers :)

P.S. - If you find any bugs within the edits that get done, please let me know and I will update the package for everyone else who visits this topic and needs this ability in Dream Portal 1.0.5.

FYI - Uninstalling this mod package, after you have installed it, will re-enable the Home Layout for DP 1.0.5.

Important:  In order for the modules to appear on the Home (Board Index) section, you will need to have the following action defined:  forum

In order to have DP assigned to all Board Index urls, you should have the following actions/non-actions defined for this layout in your DP Manage Modules Admin section:

actions:
forum
collapse

non-actions:
[board]
[topic]
« Last Edit: July 16, 2011, 11:17:48 PM by SoLoGHoST »
#1
***
kcmartz
  • Dreamy
  • Posts: 140
ill try to test this out in the next day or two.
Last Edit: July 08, 2011, 05:06:30 PM by SoLoGHoST
Thanks,
Kcmartz


PLEASE DO NOT PM ME FOR SUPPORT, use the forums for that!

#2
*
SoLoGHoST
  • Dreamist
  • Posts: 1878
Works fine, I already tested this bro, but please feel free to test it again to be sure.

Thank You :)

#3
*****
willemjan
  • Dreamist
  • Posts: 1425
This is great! I guess this will be in DP 1.1 too?

#4
*
SoLoGHoST
  • Dreamist
  • Posts: 1878
This option will be in DP 1.1 yes.  Sad to say that I spent the time creating this package for everyone here who complained that they were not able to do this, and not 1 single person has even downloaded it.  Waste of my time if you ask me!
Last Edit: July 08, 2011, 05:05:13 PM by SoLoGHoST

#5
*
Xarcell
  • Dreamist
  • Posts: 753
This option will be in DP 1.1 yes.  Sad to say that I spent the time creating this package for everyone here who complained that they were not able to do this, and not 1 single person has even downloaded it.  Waste of my time if you ask me!

There is only even maybe a dozen people who even use DP. So yes, it was a waste of time.

#6
*
SoLoGHoST
  • Dreamist
  • Posts: 1878
Ok, Package should be able to be viewable by all now, including guests.

#7
*
live627
  • Light Sleeper
  • Posts: 36
Re: [Mod Package] Disable DP 1.0.5 Home Layout - February 13, 2012, 07:23:26 PM
We should also remove the linktree fix.

[code=Find in ./Sources/DreamPortal.php and remove]

   // Add Forum to the linktree.
   if ((!empty($modSettings['dp_portal_mode']) && allowedTo('dream_portal_view')) && (!empty($board) || !empty($topic) || $da_action == 'forum' || $da_action == 'collapse'))
   {
      // The forum is always the second item in the linktree right?
      if (count($context['linktree']) > 2)
      {
         // This is basically going to push everything one offset forward, duplicating the first item.
         foreach ($context['linktree'] as $offset => $link)
            $context['linktree'][$offset + 1] = array(
               'name' => $link['name'],
               'url' => $link['url'],
            );

         // And thus the forum is the second item in the linktree.
         $context['linktree'][1] = array(
            'name' => $txt['forum'],
            'url' => $scripturl . '?action=forum',
         );
      }
      else
         $context['linktree'][] = array(
            'name' => $txt['forum'],
            'url' => $scripturl . '?action=forum',
         );

      // Fix the linktree if a category was requested.
      foreach ($context['linktree'] as $key => $tree)
         if (strpos($tree['url'], '#c') !== false && strpos($tree['url'], 'action=forum#c') === false)
            $context['linktree'][$key]['url'] = str_replace('#c', '?action=forum#c', $tree['url']);
   }[/code]


 

  • • Users: 1
  • • Guests: 27

 Top 5 Posters

1878 Posts

1425 Posts

753 Posts

503 Posts

365 Posts
Welcome, Guest.
Please login or register.

 
 
 

Did you miss your activation email?

 Shoutbox

SHOUTBOX NOT FOR SUPPORT!

 Calendar

  • Su M Tu W Th F Sa
    1 2 3 4 5 6 7
    8 9 10 11 12 13 14
    15 16 17 18 19 20 21
    22 23 24 25 26 27 28
    29 30 31
  • Su M Tu W Th F Sa
    1 2 3 4
    5 6 7 8 9 10 11
    12 13 14 15 16 17 18
    19 20 21 22 23 24 25
    26 27 28 29
  • Su M Tu W Th F Sa
    1 2 3
    4 5 6 7 8 9 10
    11 12 13 14 15 16 17
    18 19 20 21 22 23 24
    25 26 27 28 29 30 31

No calendar events were found.