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

If you're interested in helping other members with support requests, consider joining the Community Support Helpers group.

Author Topic: Making blocks in simple portal blocks  (Read 15949 times)

0 Members and 1 Guest are viewing this topic.

Offline Mulwa

  • Semi Newbie
  • *
  • Posts: 23
  • SMF Version: 2.0.5
  • SP Version: 2.3.5
Making blocks in simple portal blocks
« on: July 04, 2014, 05:56:39 AM »
please is there anyway i can add blocks in simple portal blocks?
« Last Edit: July 05, 2014, 05:53:10 PM by [SiNaN] »

Offline dhayzon

  • Jr. Member
  • **
  • Posts: 63
  • Gender: Male
  • http://dhayzon.com/
    • wWw.club-dhayzone.net
  • SMF Version: 2.0.2
  • SP Version: 2.3.5

Offline [SiNaN]

  • Mr. SimplePortal
  • Developer
  • *
  • Posts: 6782
  • SMF Version: 2.0.15
  • SP Version: 2.3.7
Re: Please i need a way to make blocks in simple portal block
« Reply #2 on: July 05, 2014, 05:53:57 PM »
Cleaned up the title a little bit again.

Has the topic linked above helped you with your question?
And slowly, you come to realize... It's all as it should be...

Offline Mulwa

  • Semi Newbie
  • *
  • Posts: 23
  • SMF Version: 2.0.5
  • SP Version: 2.3.5
Re: Making blocks in simple portal blocks
« Reply #3 on: July 06, 2014, 12:22:52 PM »
@Sinan, i didn't understand what's in that link post. I want four blocks in a single block (e.g. I would like to put: facebook link in one, twitter in one, subscribe in one, google plus in the other), what is in that link that was given above is just complicated and no newbie can easily do it, pls help me out

Offline andy

  • On Leave
  • *
  • Posts: 861
  • Gender: Male
    • Outdoor Club Japan (OCJ) アウトドア・クラブ・ジャパン
  • SMF Version: 2.0.15
  • SP Version: 2.3.7
  • Elkarte Version: None
Re: Making blocks in simple portal blocks
« Reply #4 on: July 08, 2014, 01:07:07 AM »
Here is a summary/copy


First
Create the blocks you want inside the main block (Facebook, Twitter etc).
You decide the type you need...php or html etc.
Do not set the blocks 'Active'.
Position does not matter as they are in another block.


Second
Get the ID numbers of the blocks you just created.
You can find them by looking at the link in the blocks list - the number will be at the end.

Third
Make the main block (the others will go inside). This is a custom php block and set active in the position you want.

Setting is for only 2 things:

$columns = x;
Decide how many columns across the page (4x1 or 2x2?). You will probably use 1 line of 4 blocks so set it to  $columns = 4

$block_ids = array(a,b,c,d);
a,b,c,d will be your Facebook, Twitter,subscribe and Googleplus block ID's.

Copy this code inside the block (with your own block ID's and column setting)

Code: [Select]
$columns = 2;
$block_ids = array(49, 50, 52, 53);

$block_data = array();
foreach ($block_ids as $block)
{
   $block_data[$block] = current(getBlockInfo(false, $block, false, false));
   $block_data[$block]['style'] = sportal_parse_style('explode', $block_data[$block]['style'], true);
}

echo '
<table style="width: 100%;">
   <tr>';

$counter = 0;
foreach ($block_data as $data)
{
   if ($counter != 0 && $counter % $columns == 0)
   {
      echo '
   </tr>
   <tr>';
   }

   echo '
      <td style="width: ', ceil((100 / $columns)), '%; vertical-align: top;">
         ', template_block($data), '
      </td>';

   $counter++;
}

echo '
   </tr>
</table>';
« Last Edit: July 08, 2014, 01:23:21 AM by andy »
Everyone is a volunteer here so please try and make a small donation to keep the Simple Portal website running


Offline Mulwa

  • Semi Newbie
  • *
  • Posts: 23
  • SMF Version: 2.0.5
  • SP Version: 2.3.5
Re: Making blocks in simple portal blocks
« Reply #5 on: July 08, 2014, 04:28:05 PM »
you rock man! Am gonna try this out on my localhost, though am not sure whether it's gonna work on localhost. It's just clear and simple. Dumb up sir!

Offline Mulwa

  • Semi Newbie
  • *
  • Posts: 23
  • SMF Version: 2.0.5
  • SP Version: 2.3.5
Re: Making blocks in simple portal blocks
« Reply #6 on: July 19, 2014, 10:13:15 PM »
thanks @Andy.
I was unlucky that it couldn't work for Me, though am using localhost as for now before i'll make it live. I used html for those blocks that i'd like to be in the same block and made then inactive. And used the host block as php and it's shows errors in the block. I don't really know if it could work on localhost either.
Thanks for your support.

Offline Mstcool

  • Jr. Member
  • **
  • Posts: 57
Re: Making blocks in simple portal blocks
« Reply #7 on: July 21, 2014, 04:32:17 AM »
What do you mean by localhost?

Offline Mulwa

  • Semi Newbie
  • *
  • Posts: 23
  • SMF Version: 2.0.5
  • SP Version: 2.3.5
Re: Making blocks in simple portal blocks
« Reply #8 on: July 21, 2014, 04:22:47 PM »
localhost is a server that you can use in your system without the use of internet connection. Example, wampserver

Offline swoodie

  • Jr. Member
  • **
  • Posts: 63
  • Gender: Male
Re: Making blocks in simple portal blocks
« Reply #9 on: March 20, 2016, 07:30:26 PM »
Here is a summary/copy


First
Create the blocks you want inside the main block (Facebook, Twitter etc).
You decide the type you need...php or html etc.
Do not set the blocks 'Active'.
Position does not matter as they are in another block.


Second
Get the ID numbers of the blocks you just created.
You can find them by looking at the link in the blocks list - the number will be at the end.

Third
Make the main block (the others will go inside). This is a custom php block and set active in the position you want.

Setting is for only 2 things:

$columns = x;
Decide how many columns across the page (4x1 or 2x2?). You will probably use 1 line of 4 blocks so set it to  $columns = 4

$block_ids = array(a,b,c,d);
a,b,c,d will be your Facebook, Twitter,subscribe and Googleplus block ID's.

Copy this code inside the block (with your own block ID's and column setting)

Code: [Select]
$columns = 2;
$block_ids = array(49, 50, 52, 53);

$block_data = array();
foreach ($block_ids as $block)
{
   $block_data[$block] = current(getBlockInfo(false, $block, false, false));
   $block_data[$block]['style'] = sportal_parse_style('explode', $block_data[$block]['style'], true);
}

echo '
<table style="width: 100%;">
   <tr>';

$counter = 0;
foreach ($block_data as $data)
{
   if ($counter != 0 && $counter % $columns == 0)
   {
      echo '
   </tr>
   <tr>';
   }

   echo '
      <td style="width: ', ceil((100 / $columns)), '%; vertical-align: top;">
         ', template_block($data), '
      </td>';

   $counter++;
}

echo '
   </tr>
</table>';

hi can the above be used like this page http:// daiwafishing .com.au/ where  it has there news  & make the blocks look like that?????

Offline ♦ Ninja ZX-10RR ♦

  • Spammer Hammer
  • Support
  • *
  • Posts: 1193
  • Gender: Male
  • Sniper Legends
    • Virtual Interactive Games Entertainment™
  • SMF Version: 2.0.13
  • SP Version: 2.3.6
  • Elkarte Version: 1.0.6
Re: Making blocks in simple portal blocks
« Reply #10 on: March 20, 2016, 09:51:18 PM »
Yes, try it! ;)
Have you tried SimplePortal Documentation before asking? ;)
F.A.Q.  English Support  |  Blocks Support
Fancy Feature idea ?!  |  Blocks Requests
Themes & Graphics

? My job! ?No PMs for support unless it's a paid request. Thank you! :)#OpIsis

Offline swoodie

  • Jr. Member
  • **
  • Posts: 63
  • Gender: Male
Re: Making blocks in simple portal blocks
« Reply #11 on: March 21, 2016, 01:05:00 AM »
all good working  :)

Offline swoodie

  • Jr. Member
  • **
  • Posts: 63
  • Gender: Male
Re: Making blocks in simple portal blocks
« Reply #12 on: March 21, 2016, 11:51:29 PM »
Hi again how would i go about making the pictures move like  they do on the page when hovering over them would that be java script as well?