SMF Development > Applied or Declined Requests
Please define $actionArray earlier on in index.php
Bloc:
I did not have that problem with TinyPortal either. As feline suggest you simply rewrite the criteria for which the topic, board and "no action" are defined. Also, adding for example a "action=forum" to $actionArray - which goes to Boardindex - solves that problem.
SMF is always going to be a bit clunky with portals and new "homepages", because it assumes(and rightfully so) that "home" IS the boardindex, not anything else.
Wrapaction works fine for custom actions. Not sure how a home/frontpage is going to work there though lol, not if you want to use the root url, and not an action url.
live627:
WrapAction is primarily for custom themes to define their own actions. Mods should use the hook.
emanuele:
I know WrapAction is for themes, but (apart that I don't think it's so used and let a theme handle actions...dunno, doesn't sound "so" correct), you can always hook integrate_actions and then use something like that:
--- Code: ---global $settings, $sourcedir;
if (empty($settings['catch_action']))
$settings['catch_action']['action'] = 'myDefaultAction';
--- End code ---
A bit on the hackish side, but it should work.
The other option (probably more elegant) would be to always hook integrate_actions, then:
--- Code: ---function my_hooked_action($actionArray)
{
global $modSettings;
if (!empty($modSettings['integrate_actions']))
$currentActions = array_merge($actionArray, explode(',', $modSettings['integrate_actions']));
else
$currentActions = $actionArray;
if (!isset($_REQUEST['action']) || !isset($currentActions[$_REQUEST['action']]))
return myCustomNonAction();
}
--- End code ---
Bloc:
I've used Wrapaction in themes for years lol..but it does require a few bits inside the theme to actually work correctly: defining the wrapaction's theme layers + adding a extra layer that looks only inside a special folder inside the theme, rather than anywhere else.
Navigation
[0] Message Index
[*] Previous page
Go to full version