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: 365
  • 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]

Thanks for having an interest with our portal. If you have any requests for features, have a look at the Feature Requests board.

Author Topic: Block positions?  (Read 7460 times)

0 Members and 1 Guest are viewing this topic.

Offline kai920

  • Semi Newbie
  • *
  • Posts: 39
  • SMF Version: 2 RC2
  • SP Version: 2.3.1
Block positions?
« on: August 18, 2009, 08:35:21 AM »
Is it possible to add in new block positions? ie. in addition to top, bottom, left, and right?

Offline [SiNaN]

  • Mr. SimplePortal
  • Developer
  • *
  • Posts: 6782
  • SMF Version: 2.0.15
  • SP Version: 2.3.7
Re: Block positions?
« Reply #1 on: August 18, 2009, 08:38:09 AM »
Of course. But you'll need to make a lot of modifications.
And slowly, you come to realize... It's all as it should be...

Offline kai920

  • Semi Newbie
  • *
  • Posts: 39
  • SMF Version: 2 RC2
  • SP Version: 2.3.1
Re: Block positions?
« Reply #2 on: August 18, 2009, 08:45:41 AM »
"A lot" means database modifications? What else is required?  (I'm only familiar with Joomla's method of loading "module positions")

If I don't "add" block positions to SP, which file(s) should I look at in order to "hardcode" PHP/HTML so that it can show up:

a) in portal frontpage
b) in forum's index
c) both (a) and (b)?

Would the files be in the default template?

Thanks!

Offline [SiNaN]

  • Mr. SimplePortal
  • Developer
  • *
  • Posts: 6782
  • SMF Version: 2.0.15
  • SP Version: 2.3.7
Re: Block positions?
« Reply #3 on: August 18, 2009, 08:49:42 AM »
"A lot" means database modifications? What else is required?  (I'm only familiar with Joomla's method of loading "module positions")

Not database changes. Many modification in source files. If you can achieve that successfully, you could become an SP Developer. ;)

If I don't "add" block positions to SP, which file(s) should I look at in order to "hardcode" PHP/HTML so that it can show up:

a) in portal frontpage
b) in forum's index
c) both (a) and (b)?

a) Portal.template.php
b) BoardIndex.template.php
c) index.template.php

Would the files be in the default template?

Yes.
And slowly, you come to realize... It's all as it should be...

Offline kai920

  • Semi Newbie
  • *
  • Posts: 39
  • SMF Version: 2 RC2
  • SP Version: 2.3.1
Re: Block positions?
« Reply #4 on: August 18, 2009, 11:34:41 AM »
Not database changes. Many modification in source files. If you can achieve that successfully, you could become an SP Developer. ;)

While I might be able to hack the source files to add in more module positions... I don't think it would be wise for me to do so as each new release of SP will nullify the changes. Well, unless, I was a SP developer ;)

I'll wait for next versions of SMF and SP and see what I should do.

I'm probably just wanting to put more code on the portal homepage.
« Last Edit: August 18, 2009, 11:37:57 AM by kai920 »

Offline Eliana Tamerin

  • Comrade
  • *
  • Posts: 2889
  • Gender: Female
  • SMF Version: 2 RC2
  • SP Version: 2.3.2
Re: Block positions?
« Reply #5 on: August 18, 2009, 11:44:42 AM »
Where, though, would you want the new block positions? Perhaps its something you can achieve already or through some minor coding.
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 kai920

  • Semi Newbie
  • *
  • Posts: 39
  • SMF Version: 2 RC2
  • SP Version: 2.3.1
Re: Block positions?
« Reply #6 on: August 18, 2009, 11:35:38 PM »
Not sure yet. Maybe 2 positions side-by-side (ie 2 columns) above the "top" position;

or a position that spans the width of the forum above L, top, and R.

Offline kai920

  • Semi Newbie
  • *
  • Posts: 39
  • SMF Version: 2 RC2
  • SP Version: 2.3.1
Re: Block positions?
« Reply #7 on: August 21, 2009, 01:29:00 AM »
Just had another idea... put L and R next to each other, and the mainbody (forum) off to one side.

Sort of like this.

Offline Nathaniel

  • Comrade
  • *
  • Posts: 5203
  • Gender: Male
    • Verbtest.com
  • SMF Version: 2 RC4
  • SP Version: 2.3.3
Re: Block positions?
« Reply #8 on: August 21, 2009, 01:43:04 AM »
Just had another idea... put L and R next to each other, and the mainbody (forum) off to one side.

Sort of like this.

That would be incredibly easy to do, because it doesn't involve adding new sides. (I can show you how if you want.)
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 kai920

  • Semi Newbie
  • *
  • Posts: 39
  • SMF Version: 2 RC2
  • SP Version: 2.3.1
Re: Block positions?
« Reply #9 on: August 21, 2009, 03:23:23 AM »
Just had another idea... put L and R next to each other, and the mainbody (forum) off to one side.

Sort of like this.

That would be incredibly easy to do, because it doesn't involve adding new sides. (I can show you how if you want.)

I wouldn't mind seeing the solution just for reference... probably not going to make any mods to my forum until RC2 comes out though ;)

Would it just be 2 straight columns side by side, or could we include some modules that span both columns? (refer to the joystiq link I posted)

Offline Eliana Tamerin

  • Comrade
  • *
  • Posts: 2889
  • Gender: Female
  • SMF Version: 2 RC2
  • SP Version: 2.3.2
Re: Block positions?
« Reply #10 on: August 21, 2009, 11:56:23 AM »
The joystiq page is more of a module that has two columns in itself, as the rest of the blocks span the width of those two top ones. So really, it's only using the right side blocks, in SP terms.

You could do something similar using php/html to make a table to divide it into two columns, and then insert your block code.
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 kai920

  • Semi Newbie
  • *
  • Posts: 39
  • SMF Version: 2 RC2
  • SP Version: 2.3.1
Re: Block positions?
« Reply #11 on: September 05, 2009, 01:40:43 AM »
Nathaniel, how would I go about moving the left column to the right so that 2 columns are side by side?

Offline Nathaniel

  • Comrade
  • *
  • Posts: 5203
  • Gender: Male
    • Verbtest.com
  • SMF Version: 2 RC4
  • SP Version: 2.3.3
Re: Block positions?
« Reply #12 on: September 05, 2009, 03:39:29 AM »
These edits are for SP 2.3 and SMF 2 RC1.2.

File: '/Themes/default/Portal.template.php':
Code: ("Cut this code") [Select]
if (!empty($modSettings['showright']) && !empty($context['SPortal']['blocks'][4]))
{
echo '
<td id="sp_right"', !empty($modSettings['rightwidth']) ? ' width="' . $modSettings['rightwidth'] . '"' : '', $context['SPortal']['sides'][4]['collapsed'] && empty($modSettings['sp_disable_side_collapse']) ? ' style="display: none;"' : '', '>';

foreach ($context['SPortal']['blocks'][4] as $block)
template_block($block);

echo '
</td>';
}

Code: ("Paste the last code block, just before the code below") [Select]
echo '
<td id="sp_center">';

That will show both the left + right columns on the left side of your forum.
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 kai920

  • Semi Newbie
  • *
  • Posts: 39
  • SMF Version: 2 RC2
  • SP Version: 2.3.1
Re: Block positions?
« Reply #13 on: September 06, 2009, 11:16:24 AM »
Cool, thanks. I'll probably want to move both columns to the right side but with your tips that should be easily doable.

I was also thinking I could have just one wider right column and have dual blocks like Eliana described...  I wonder if it'd be easy to create a "split block" that lets you choose from available block types, instead of manually copy/pasting PHP code.

Offline N-Joy

  • Semi Newbie
  • *
  • Posts: 19
Re: Block positions?
« Reply #14 on: September 29, 2009, 09:06:29 AM »
Cool, thanks. I'll probably want to move both columns to the right side but with your tips that should be easily doable.

I was also thinking I could have just one wider right column and have dual blocks like Eliana described...  I wonder if it'd be easy to create a "split block" that lets you choose from available block types, instead of manually copy/pasting PHP code.
How?

Offline Nathaniel

  • Comrade
  • *
  • Posts: 5203
  • Gender: Male
    • Verbtest.com
  • SMF Version: 2 RC4
  • SP Version: 2.3.3
Re: Block positions?
« Reply #15 on: September 29, 2009, 09:20:04 AM »
Read my last post in this topic...

Moving them to the other side is similar.
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 N-Joy

  • Semi Newbie
  • *
  • Posts: 19
Re: Block positions?
« Reply #16 on: September 29, 2009, 09:26:54 AM »
Read my last post in this topic...

Moving them to the other side is similar.
But whenever I try to move the "leftwidth" code above the "sp_center" code, I still have a column on the right side, and one on the left side.. :s

Offline Nathaniel

  • Comrade
  • *
  • Posts: 5203
  • Gender: Male
    • Verbtest.com
  • SMF Version: 2 RC4
  • SP Version: 2.3.3
Re: Block positions?
« Reply #17 on: September 29, 2009, 08:02:31 PM »
I said 'similar', not identical. ;)

Cut this code:
Code: [Select]
if (!empty($modSettings['showleft']) && !empty($context['SPortal']['blocks'][1]))
{
echo '
<td id="sp_left"', !empty($modSettings['leftwidth']) ? ' width="' . $modSettings['leftwidth'] . '"' : '', $context['SPortal']['sides'][1]['collapsed'] && empty($modSettings['sp_disable_side_collapse']) ? ' style="display: none;"' : '', '>';

foreach ($context['SPortal']['blocks'][1] as $block)
template_block($block);

echo '
</td>';
}

Put it above this code:
Code: [Select]
if (!empty($modSettings['showright']) && !empty($context['SPortal']['blocks'][4]))
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.