Skip to main content
Topic: mobile menu icons? (Read 4443 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Re: mobile menu icons?

Reply #15

I was thinking the same, though I always feel uneasy suggesting use hooks to non-coders...
And that's also for that reason that I have introduced some trick in 1.1 that should make much easier to use hooks for non-coders (I hope).
Bugs creator.
Features destroyer.
Template killer.

Re: mobile menu icons?

Reply #16

I hope too!  :D  At the moment I wrote down all changes to a text file so I can make them after an update again. An easy way to use hooks and/or a really easy to understand manual would be great!

Re: mobile menu icons?

Reply #17

Easy, easy, easy, may be too much, but at least easier.
Your change should look something like this:
Code: [Select]
<?php

class Custom_Integrate
{
public static function register()
{
// $hook, $function, $file
return array(
array(
'integrate_menu_buttons',
'Custom_Integrate::menu_buttons',
),
);
}

public static function menu_buttons(&$buttons)
{
global $modSettings, $scripturl;

$buttons = elk_array_insert($buttons, 'pm', array(
// Eigener Button zu den Entwürfen.
'drafts1' => array(
'title' => 'Entwürfe',
'href' => $scripturl . '?action=profile;area=showdrafts',
'show' => !empty($modSettings['drafts_enabled']) && !empty($modSettings['drafts_post_enabled']),
)
),
'after',
false
);
}
}

And you would be able to enable/disable the "integration" directly from the admin panel.
Bugs creator.
Features destroyer.
Template killer.