live627

  • Should five per cent appear too small / Be thankful I don't take it all / 'Cause I'm the taxman, yeah I'm the taxman
  • Posts: 1,667
$context['current_area']
« on November 6th, 2012, 03:24 AM »
There's an equivalent for both action and sa, so why not area as well?
A confident man keeps quiet.whereas a frightened man keeps talking, hiding his fear.

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: $context['current_area']
« Reply #1, on November 6th, 2012, 03:27 AM »
Because it's not generally needed, and if you do really really need it, $menu_context['current_area'] will generally have it anyway.

Besides, action and sa are actually more widely used than area, though you're expecting complete system-wide consistency from SMF?
When we unite against a common enemy that attacks our ethos, it nurtures group solidarity. Trolls are sensational, yes, but we keep everyone honest. | Game Memorial

live627

  • Should five per cent appear too small / Be thankful I don't take it all / 'Cause I'm the taxman, yeah I'm the taxman
  • Posts: 1,667
Re: $context['current_area']
« Reply #2, on November 6th, 2012, 03:33 AM »
Quote from Arantor on November 6th, 2012, 03:27 AM
you're expecting complete system-wide consistency from SMF?
yes.

II want to use a context variable to determine if I'm in a certain area. In a plugin, so I don't have $menu_context available. I'm also not creating a menu.

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: $context['current_area']
« Reply #3, on November 6th, 2012, 03:41 AM »
Quote
yes.
Excuse me while I wake up the household with laughter.
Quote
II want to use a context variable to determine if I'm in a certain area. In a plugin, so I don't have $menu_context available. I'm also not creating a menu.
Area URLs are only used in places where there is a menu. Which means you will either have $menu_context directly available, or you will be able to find  it inside $context.

Or, you could just use $_REQUEST['area'] like the rest of us would do.

live627

  • Should five per cent appear too small / Be thankful I don't take it all / 'Cause I'm the taxman, yeah I'm the taxman
  • Posts: 1,667
Re: $context['current_area']
« Reply #4, on November 6th, 2012, 03:49 AM »
Quote from Arantor on November 6th, 2012, 03:41 AM
Excuse me while I wake up the household with laughter.
Oh shit, that was sarcasm, wasn't it...?
Quote from Arantor on November 6th, 2012, 03:41 AM
Area URLs are only used in places where there is a menu. Which means you will either have $menu_context directly available, or you will be able to find  it inside $context.

Or, you could just use $_REQUEST['area'] like the rest of us would do.
mmk. I just thought it was an oversight when there was action and sa in loadTheme but not area.

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: $context['current_area']
« Reply #5, on November 6th, 2012, 03:56 AM »
Quote
Oh shit, that was sarcasm, wasn't it...?
Best of British, yes. SMF has a lot of internal inconsistencies. Wedge has, in some ways, more.
Quote
mmk. I just thought it was an oversight when there was action and sa in loadTheme but not area.
Nah, area only appears in the three places where the twisted voodoo demigod GenericMenu appears, admin, moderate and profile.

live627

  • Should five per cent appear too small / Be thankful I don't take it all / 'Cause I'm the taxman, yeah I'm the taxman
  • Posts: 1,667
Re: $context['current_area']
« Reply #6, on November 6th, 2012, 04:09 AM »
I can find obvious sarcasm as in Sarcastaball (South Park, season 16). Subtle traces, not so much. heh.

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: $context['current_area']
« Reply #7, on November 6th, 2012, 04:12 AM »
That's the biggest reason I avoid American comedies - everything tends to be so overstated and blatant, but being British, I like my sarcasm a little less well done, just south of medium and just north of medium rare ;)

garou

  • I really love the new system so far and can not wait to try it out for myself.
  • Posts: 17
Re: $context['current_area']
« Reply #8, on December 20th, 2012, 04:21 AM »
All too often most people dont get sarcasm, especially in text. I often use a *sarcasm* tag because some people take me seriously. I had a girlfriend about 20 years ago dump me over sarcasm I used in an email. It was a joke, seriously. LOL