collapse

* User Info

 
 
Welcome, Guest. Please login or register.
Did you miss your activation email?

* Who's Online

  • Dot Guests: 51
  • Dot Hidden: 0
  • Dot Users: 1
  • Dot Users Online:

* Shoutbox

Refresh History
  • Shoutbox is not for support!
  • Nakroma: am I dumb or is there actually no tutorial? [link]
    Today at 08:29:41 AM
  • AngelinaBelle: Welcome Gusto Prod.  Please visit [link] for info on creating an SMF forum
    Yesterday at 12:04:00 PM
  • GUSTO PROD: hi all give me creat new forum free
    April 16, 2014, 12:21:54 PM
  • AngelinaBelle: Hello w1ck3d! Welcome to Simple Portal. Unfortunately, there are not Russian speakers here very often.  Aplogies
    April 14, 2014, 07:49:26 AM
  • w1ck3d: тест
    April 14, 2014, 02:50:12 AM
  • Underdog: How to use Simple Portal for SMF: [link]
    April 02, 2014, 07:52:45 PM
  • Underdog: Thariq, please post questions in the forum. thank you.
    April 02, 2014, 07:51:40 PM
  • Thariq: how to create portal/site
    April 02, 2014, 06:30:42 AM
  • Ali çelen: forum nasıl oluştırıcam
    March 30, 2014, 10:59:08 PM
  • Ali çelen: sa
    March 30, 2014, 10:58:54 PM
  • AngelinaBelle: processor -- I think your customization will probably be just fine.
    February 14, 2014, 07:18:41 PM
  • AngelinaBelle: noumankhan: Welcome to SimplePortal.  Please read the documentation above. If you have questions about how to make a forum, please seek help at [link]
    February 14, 2014, 07:16:45 PM
  • noumankhan: how can i make forum plz tell me
    February 13, 2014, 09:41:03 AM
  • noumankhan: hello
    February 13, 2014, 09:40:47 AM
  • BurkeKnight: Shoutbox is not for support. That also means, not for asking volunteers to hurry to your support topic. All topics will get seen. :)
    February 12, 2014, 03:39:28 PM
  • processor: Can anyone check this out: [link] thanks guys
    February 12, 2014, 05:54:58 AM
  • matixto: Hi all, can a developer see this thread? [link] Thanks!
    February 06, 2014, 02:44:36 PM
  • imamzw: Halo
    February 05, 2014, 08:17:24 PM
  • dj_king: hello
    February 04, 2014, 10:32:47 AM
  • BurkeKnight: Thank you, old friend :)
    January 29, 2014, 07:01:43 AM

* Team Blog

* Recent Posts

Re: Help with site by USFA
[Today at 08:57:16 AM]


Re: Hi, I am created pages but. by USFA
[Today at 08:53:32 AM]


Re: Shoutbox refresh and page reload discrepancy by w1ck3d
[Today at 03:14:17 AM]


Re: Shoutbox refresh and page reload discrepancy by w1ck3d
[Today at 03:13:00 AM]


Re: Help with site by michelineney
[Today at 01:27:41 AM]

Installation errors? Mod incompatibilities? Upgrade problems? Make your way over to the Install and Upgrade Support board for all your solutions!

Author Topic: [Feature Request] Enable blocks in certain themes.  (Read 2839 times)

0 Members and 1 Guest are viewing this topic.

Offline velorooms

  • Jr. Member
  • **
  • Posts: 71
    • Velorooms
  • SMF Version: 2.0.2
  • SP Version: 2.3.5
[Feature Request] Enable blocks in certain themes.
« on: January 09, 2013, 03:15:14 PM »
Now this one might involve a fair amount of coding so I dont know if its possible or realistically feasible.

An option added to display options to set the theme in which the block appears, so all themes, or just certain themes. As more and more people start using tablets, or mobiles, more smf forums have alternate themes for these devices, and a way of only including certain blocks in certain themes would be superb (so strip out unneeded blocks in mobile themes but keep some), or even for making less bulky themes for those that dont want them.

Admin and Owner of Velorooms.com - Using SMF 2.0.3 and Simpleportal 2.3.5

Offline velorooms

  • Jr. Member
  • **
  • Posts: 71
    • Velorooms
  • SMF Version: 2.0.2
  • SP Version: 2.3.5
Re: [Feature Request] Enable blocks in certain themes.
« Reply #1 on: January 09, 2013, 03:50:11 PM »
Hmm, digging around, this from November 2011

Hello...

It would be great if we had Theme based blocks. So that means that you can choose on what theme you want to show the block.

You'll be able to do this with 2.3.4 version, which will be out very very soon, using Complex Display Options.

I'm also planning to add a proper interface to select particular themes and languages to display the blocks on too. But that will be for the next major version.

but checking the documentation its not listed in any of the advanced display options

http://simpleportal.net/index.php?action=docs;area=custom_blocks_display

The release of 2.3.4 was late november that year and Sinan listed in the features:
Quote
Complex display options using PHP expressions for block display.

got as far as learning that you can put in custom options

$php followed by an expression..

Oh lordy..

hmmmm..,.
Admin and Owner of Velorooms.com - Using SMF 2.0.3 and Simpleportal 2.3.5

Offline velorooms

  • Jr. Member
  • **
  • Posts: 71
    • Velorooms
  • SMF Version: 2.0.2
  • SP Version: 2.3.5
Re: [Feature Request] Enable blocks in certain themes.
« Reply #2 on: January 15, 2013, 12:17:19 PM »
Nobody :( Wheres Sinan..  >:-D
Admin and Owner of Velorooms.com - Using SMF 2.0.3 and Simpleportal 2.3.5

Offline velorooms

  • Jr. Member
  • **
  • Posts: 71
    • Velorooms
  • SMF Version: 2.0.2
  • SP Version: 2.3.5
Re: [Feature Request] Enable blocks in certain themes.
« Reply #3 on: January 16, 2013, 08:35:20 AM »
Ok. ive managed to get somewhere with this one, but not in the way I would like but (ie. defining in the block admin where to show the block) but by editing the php similar to what is used to hide the two side panels in a certain theme

Code: [Select]
$block_in_theme = array(38);
if (in_array($settings['theme_id'], $block_in_theme))
$blocks = array_merge(getBlockInfo(false, 227, false, false), $blocks = getBlockInfo(false, 237, false, false), $blocks = getBlockInfo(false, 168, false, false));
else

then by hiding these three blocks, it forcibly includes them in theme number 38.
Only problem is, i can only so far get them to appear in header or footer, rather than top or bottom as I would like.
Admin and Owner of Velorooms.com - Using SMF 2.0.3 and Simpleportal 2.3.5

Offline FireDitto

  • Jr. Member
  • **
  • Posts: 84
  • Gender: Female
    • Second Pass Weyr
  • SMF Version: 2.0.7
  • SP Version: 2.3.5
Re: [Feature Request] Enable blocks in certain themes.
« Reply #4 on: January 21, 2013, 04:20:18 AM »
xD this request was exactly why I logged into SP today :D

I'd love to be able to select via what themes I'd like a block to show up on.

Offline velorooms

  • Jr. Member
  • **
  • Posts: 71
    • Velorooms
  • SMF Version: 2.0.2
  • SP Version: 2.3.5
Re: [Feature Request] Enable blocks in certain themes.
« Reply #5 on: January 27, 2013, 09:09:27 AM »
well apparently its possible, but it appears to be a secret :D
Admin and Owner of Velorooms.com - Using SMF 2.0.3 and Simpleportal 2.3.5