collapse

* User Info

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

* Who's Online

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

* Shoutbox

Refresh History
  • Shoutbox is not for support!
  • rentner: sorry be wrong
    August 19, 2015, 07:56:53 am
  • rentner: beta 2.1
    August 19, 2015, 07:56:32 am
  • ♦ Ninja ZX-10RR ♦: Lol thanks for considering me that much
    August 15, 2015, 01:22:47 pm
  • David: Eliana!! WADDUP, GURL!!!  SiNaN... glad y'all are still around!
    August 15, 2015, 11:27:21 am
  • ♦ Ninja ZX-10RR ♦: Welcome back :)
    August 15, 2015, 11:24:52 am
  • David: I missed y'all!!
    August 15, 2015, 11:23:22 am
  • Eliana Tamerin: People with colored usernames are staff, please abide by their requests.
    August 13, 2015, 04:43:00 pm
  • ♦ Ninja ZX-10RR ♦: Once again, this topic is *NOT* for support, anyway. Thank you for your understanding.
    August 13, 2015, 03:37:51 pm
  • ♦ Ninja ZX-10RR ♦: Please refrain from using such language in the shoutbox. Also, try to read the documentation, it should tell you that and more. [link]
    August 13, 2015, 03:36:48 pm
  • psewolf: Where are the settings on the admin panel?
    August 13, 2015, 02:00:32 pm
  • psewolf: I'm not making a whole damn topic to ask where the settings are on the admin panel.
    August 13, 2015, 02:00:15 pm
  • ♦ Ninja ZX-10RR ♦: Please don't spam the shoutbox, post a topic instead. Thank you.
    August 13, 2015, 01:30:02 am
  • psewolf: Just installed SP, can't find the settings on smf anywhere
    August 12, 2015, 11:58:54 pm
  • ♦ Ninja ZX-10RR ♦: Hi dunpa, please post a topic if you need help. Thank you!
    August 08, 2015, 10:42:29 pm
  • * dunpa oops
    August 08, 2015, 10:06:04 pm
  • dunpa: /help
    August 08, 2015, 10:04:56 pm
  • ♦ Ninja ZX-10RR ♦: Por favor esta shoutbox no es para support ;)
    July 30, 2015, 01:02:07 am
  • Elliott: Sigo teniendo el mismo problema ayuda el ShoutBox de Simple Portal no se actualiza, escribo un mensaje y tengo que actualizar todo la pagina para que se actualice y vea el mensaje que escribi!
    July 29, 2015, 11:48:43 pm
  • sonkalem: Merhaba
    July 14, 2015, 02:27:54 pm
  • [SiNaN]: Hey! Glad to see that people find our little and simple mod useful. :)
    July 10, 2015, 08:38:39 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: [Feature Request] Enable blocks in certain themes.  (Read 3282 times)

0 Members and 1 Guest are viewing this topic.

Offline velorooms

  • Jr. Member
  • **
  • Posts: 83
    • Velorooms
  • SMF Version: 2.0.2
  • SP Version: 2.3.5
[Feature Request] Enable blocks in certain themes.
« on: January 09, 2013, 04: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: 83
    • 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, 04: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: 83
    • 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, 01: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: 83
    • 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, 09: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: 88
  • 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, 05: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: 83
    • 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, 10: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