collapse

* Simple Portal Archived Forum

This is an Archive Forum.

The content in this forum may be out-of-date or have been superseded by newer information, and links in forum pages to other sites may not work.
This forum contains archives for future reference.

Visit our thread at Simple Machines Forum for current support.

SMF 2.1 users: EhPortal is a ported version of Simple Portal specifically designed for the SMF 2.1 branch.
Please visit web-develop.ca to download EhPortal and for its support.

* User Info

 
 
Welcome, Guest. Please login or register.

* Who's Online

  • Dot Guests: 537
  • Dot Hidden: 0
  • Dot Users: 0

There aren't any users online.

* Shoutbox

Refresh History
  • Shoutbox is not for support!
  • {OCS}MasterSeal: Yup, Still adore SP
    April 21, 2019, 07:08:06 PM
  • {OCS}MasterSeal: STILL love SP :)
    November 24, 2018, 05:05:50 AM
  • ♦ Ninja ZX-10RR ♦: <3 aegersz
    September 13, 2018, 03:36:09 PM
  • aegersz: I STILL <3 LOVE SimplePortal
    September 13, 2018, 07:11:39 AM
  • aegersz: o LOVE you guys - Simple Portal rocks !
    May 09, 2018, 05:18:59 AM
  • Chen Zhen: our apologies for the site being down.. please read server issues topic
    March 22, 2018, 05:32:38 AM
  • {OCS}MasterSeal: LOL PLEASE forget I just posted that. I found the answer in my own dang post back in 2015. lol sorry!
    July 04, 2017, 10:47:55 PM
  • {OCS}MasterSeal: I know this SB isnt' for support, but I just have a general question. Who would I contact to find out where SP stores its block info? Is it DB driven or files? I searched the site but came up with nothing. probably my fault any insight is appreciated.
    July 04, 2017, 10:43:36 PM
  • ♦ Ninja ZX-10RR ♦: Excuse me but what does Simpleportal have to deal with that?
    February 05, 2017, 08:21:14 PM
  • WhiteEagle: of course IMHO that site appears to be dead :(
    February 04, 2017, 01:08:05 PM
  • WhiteEagle: If I can get that, then I'll use it for that site...
    February 04, 2017, 01:07:35 PM
  • WhiteEagle: decided to not use SMF for any projects, unless I can get a copy of the premium version of the fanfiction archive plugin
    February 04, 2017, 01:06:54 PM
  • expertdecisions: cloudflare
    January 28, 2017, 08:01:47 AM
  • aegersz: SM release 2.0.13 !
    January 12, 2017, 06:00:13 AM
  • raffo: Tks Emanuele, even if I didn't understand the fix :D
    November 07, 2016, 02:01:20 AM
  • emanuele: [link]
    November 01, 2016, 12:43:50 PM
  • emanuele: raffo: the English support board is a good place. ;)
    November 01, 2016, 12:43:38 PM
  • raffo: Where can I find the fix for the shoutbox?
    November 01, 2016, 05:06:09 AM
  • {OCS}MasterSeal: To the SP team, I make a point to come here and thank you as much as possible for your work.  so again, THANK YOU!
    October 28, 2016, 10:38:05 AM
  • emanuele: That's indeed funny, the limit is present only in the patch and not the full install.
    October 22, 2016, 06:14:58 PM

* Recent Posts

Adding Forums Button to Nav bar by jirapon
[August 01, 2019, 09:07:12 AM]


Re: Board Icons by ♦ Ninja ZX-10RR ♦
[July 30, 2019, 04:03:41 PM]


MOVED: Czech translation???? by ♦ Ninja ZX-10RR ♦
[July 30, 2019, 03:04:51 PM]


Board Icons by jirapon
[July 30, 2019, 07:28:44 AM]


Re: Thankyou Simpleportal, by ♦ Ninja ZX-10RR ♦
[July 29, 2019, 09:41:29 AM]

Blocks speak! Do you have an interest in getting more blocks - or even making your own? The Blocks Board is for you!

Author Topic: Putting blocks on index page only?  (Read 5505 times)

0 Members and 1 Guest are viewing this topic.

Offline Krall

  • Semi Newbie
  • *
  • Posts: 9
  • SMF Version: 1.1.8
  • SP Version: 2.2.1
Putting blocks on index page only?
« on: May 10, 2009, 08:53:51 PM »
Hello,

First, I just installed SP and it's already changed the look, feel and function of our website. Thanks for the great software! :)

Now, I tried searching around for this answer but can't seem to come up with anything. I also might be blind, but I couldn't locate a manual...

Anyway, we don't want to have a front page right now, so I set 'Portal Mode' to integration so you go right to the forums and see see the blocks we have setup. They look great on the index page, but they are a bit cumbersome to have on every page including when you're trying to type in a reply.

Is there anyway to set the blocks to only show on the index and not everywhere else in the forum?

Thanks for the help :)

Oh we're using SMF 1.1.8 and SP 2.2.1

Offline Nathaniel

  • Comrade
  • *
  • Posts: 5203
  • Gender: Male
    • Verbtest.com
  • SMF Version: 2 RC4
  • SP Version: 2.3.3
Re: Putting blocks on index page only?
« Reply #1 on: May 11, 2009, 01:52:14 AM »
When you edit a specific block, check the 'Advanced Options' checkbox under the 'Display Options' section. You will then need to check the 'Forum' action.

You will have to repeat for each block.
SMF Friend (Former Support Specialist) | SimplePortal DeveloperMy SMF Mods | SimplePortal"Quis custodiet ipsos custodes?" - Who will Guard the Guards?Please don't send me ANY support related PMs. I will just delete them.

Offline Krall

  • Semi Newbie
  • *
  • Posts: 9
  • SMF Version: 1.1.8
  • SP Version: 2.2.1
Re: Putting blocks on index page only?
« Reply #2 on: May 11, 2009, 11:29:16 AM »
Thanks Nathaniel,

I actually did that already and it didn't have the desired effects. Let's see if I can explain by example:

http://www.the-teh.com/forum/index.php?board=1.0 - It shows up in the forum like that which is fine.

But when you enter a thread or hit reply like this:

http://www.the-teh.com/forum/index.php?topic=130.0 -thread

http://www.the-teh.com/forum/index.php?action=post;topic=130.0;num_replies=12 -reply

All of the blocks still show up. I was hoping you wouldn't have too see all the blocks on the top and right side when you entered a thread and hit reply.

I guess what I'm looking for under advanced options/boards is a way to check 'index'. But I'm not sure that is possible.


Offline Nathaniel

  • Comrade
  • *
  • Posts: 5203
  • Gender: Male
    • Verbtest.com
  • SMF Version: 2 RC4
  • SP Version: 2.3.3
Re: Putting blocks on index page only?
« Reply #3 on: May 11, 2009, 05:33:22 PM »
Do you have any other checkboxes ticked under "Advanced options"?

Having only the ''Forum' checkbox as the only option, should make it show just on your Boardindex page. :/
SMF Friend (Former Support Specialist) | SimplePortal DeveloperMy SMF Mods | SimplePortal"Quis custodiet ipsos custodes?" - Who will Guard the Guards?Please don't send me ANY support related PMs. I will just delete them.

Offline Eliana Tamerin

  • Comrade
  • *
  • Posts: 2889
  • Gender: Female
  • SMF Version: 2 RC2
  • SP Version: 2.3.2
Re: Putting blocks on index page only?
« Reply #4 on: May 11, 2009, 06:46:13 PM »
I'm pretty sure it doesn't. Forum covers the general non-Portal, standard actions (i.e. straight smf forum, no new feature mods).

See the following code, that's why:
Code: (Subs-SPortal(1-1/2).php) [Select]
// If we are on portal, show portal blocks; if we are on forum, show forum blocks.
elseif (($portal && (in_array('portal', $display) || in_array('sportal', $display))) || (!$portal && in_array('sforum', $display)))
return true;

In order to restrict it to the index only, why don't you try clicking Advanced Options, then typing in 'boardindex' in the text area. See if that'll work, since boardindex is a defined action in SMF.
« Last Edit: May 11, 2009, 06:49:18 PM by Eliana Tamerin »
Ms. Eliana TamerinIt should be painfully obvious by now that I don't respond to support PMs. Don't send me PMs for support. They will be ignored and deleted, post on the Support Boards to get support.

Offline Krall

  • Semi Newbie
  • *
  • Posts: 9
  • SMF Version: 1.1.8
  • SP Version: 2.2.1
Re: Putting blocks on index page only?
« Reply #5 on: May 12, 2009, 12:49:55 PM »
Do you have any other checkboxes ticked under "Advanced options"?

Having only the ''Forum' checkbox as the only option, should make it show just on your Boardindex page. :/

Nope, nothing else checked.

For instance we have a 'recent post' block. I just checked that box for our 'A Gathering of Gamers!' forum. Now the only time you'll see the 'recent post' block is when you enter that forum; it won't show in any other.

I just ran through all the settings and with is set as 'forum' just checked it shows everywhere still.

I can pretty much do the inverse of what I want to accomplish and that's have the blocks show up everywhere EXCEPT the index :D

I'll just bite the bullet and figure out how to code in a 'forum' button for the various custom themes we have and then setup simple portal so we have an actual portal with blocks and a forum without them.
« Last Edit: May 12, 2009, 12:59:44 PM by Krall »

Offline Krall

  • Semi Newbie
  • *
  • Posts: 9
  • SMF Version: 1.1.8
  • SP Version: 2.2.1
Re: Putting blocks on index page only?
« Reply #6 on: May 12, 2009, 12:57:34 PM »
I'm pretty sure it doesn't. Forum covers the general non-Portal, standard actions (i.e. straight smf forum, no new feature mods).

See the following code, that's why:
Code: (Subs-SPortal(1-1/2).php) [Select]
// If we are on portal, show portal blocks; if we are on forum, show forum blocks.
elseif (($portal && (in_array('portal', $display) || in_array('sportal', $display))) || (!$portal && in_array('sforum', $display)))
return true;

In order to restrict it to the index only, why don't you try clicking Advanced Options, then typing in 'boardindex' in the text area. See if that'll work, since boardindex is a defined action in SMF.

One question first :)

When I check the advanced options box that overrides whatever you have selected on the drop down box 'Show Block On'?

Ok I tried your suggestion on the search block and it essentially removes that block from all pages (index, boards, posts) so that's a no go.


Offline ???1031

  • ... feel not as a dev at the moment ...
  • Comrade
  • *
  • Posts: 789
  • Gender: Male
  • Overworked <<
  • SMF Version: None
  • SP Version: None
Re: Putting blocks on index page only?
« Reply #7 on: May 12, 2009, 04:12:32 PM »
There are nice collapse button if you click on the advance option, you can select every position where the block should appear. So that it will appear again on Forum, Portal or any other action ;).
Again... I'm having time problems...Normal Monday to Friday I'm at office from 6:00-16:00 (On my local time ;P).

Offline Eliana Tamerin

  • Comrade
  • *
  • Posts: 2889
  • Gender: Female
  • SMF Version: 2 RC2
  • SP Version: 2.3.2
Re: Putting blocks on index page only?
« Reply #8 on: May 12, 2009, 04:27:17 PM »
Except that the Forum action includes all subsequent "forum" actions. Boardindex, Messageindex, Display, Post, Search, and so forth. He wants to display the blocks only on boardindex.
Ms. Eliana TamerinIt should be painfully obvious by now that I don't respond to support PMs. Don't send me PMs for support. They will be ignored and deleted, post on the Support Boards to get support.

Offline ccbtimewiz

  • Hero Member
  • *****
  • Posts: 2185
  • Gender: Male
  • $("div.content:dd").hide();
  • SMF Version: None
  • SP Version: None
  • Elkarte Version: None
  • EhPortal Version: None
Re: Putting blocks on index page only?
« Reply #9 on: May 13, 2009, 06:24:11 PM »
You're trying to get the boardindex to load with the blocks only? So you don't want blocks on any other page?

Perhaps this might do it for you...

Open index.php (the one located in the same folder as your Settings.php file.

Find:
Code: [Select]
// Action and board are both empty... SPortal!
if (empty($board) && empty($topic) && $modSettings['sp_portal_mode'] == 1)
{
require_once($sourcedir . '/SPortal1-1.php');
return 'SPortal';
}

Replace with:
Code: [Select]
// Action and board are both empty... SPortal!
if (empty($board) && empty($topic) && ($modSettings['sp_portal_mode'] == 1) && (@$_GET['action'] == ''))
{
require_once($sourcedir . '/SPortal1-1.php');
return 'SPortal';
}

That, in theory, should prevent the portal from showing on any page besides the main index.

Offline [SiNaN]

  • Mr. SimplePortal
  • Developer
  • *
  • Posts: 6782
  • SMF Version: 2.0.15
  • SP Version: 2.3.7
Re: Putting blocks on index page only?
« Reply #10 on: May 16, 2009, 03:56:11 AM »
^That wouldn't work. We already have Integration mode for this purpose.

----

Under normal conditions, simple display option "Forum" will show a block in every areas of forum. However, the advanced display option "Forum" will display block only on board index. This is a bug with Integration mode only.

Sources/Subs-SPortal1-1.php

Code: (Find) [Select]
// If current action or board is in display info; or we should display block in all actions or all boards then you can display block.
elseif ((!empty($action) && (in_array('allaction', $display) || in_array($action, $display))) || ((empty($action) || $action == 'forum' || in_array($action, $display)) && !empty($board) && (in_array('allboard', $display) || in_array($board, $display))))
return true;

Code: (Replace) [Select]
elseif (!empty($board) && (in_array('allboard', $display) || in_array($board, $display)))
return true;
elseif (!empty($action) && (in_array('allaction', $display) || in_array($action, $display)))
return true;
elseif (empty($action) && empty($board) && $modSettings['sp_portal_mode'] == 2 && in_array('forum', $display))
return true;

Your display options for the block should be set as in the attached screen shot.

----

Also, just to show the power of custom display options, such an option would make it show the block on board index only, in Integration mode.

Code: [Select]
all,-~action,-~board,-~topic
And slowly, you come to realize... It's all as it should be...