News:

Loving SimpleDesk? Help us spread the word!

Main Menu

Button in an other Theme

Started by profdrdenis, April 12, 2010, 11:05:23 AM

Previous topic - Next topic

profdrdenis

Hallo,

I install simple desk in 2.0RC3 and I dont have any button. When I want to use button what is todo?

When you tell me on which place in the source code.. no problem, but I dont found.

For better understanding I attach a pic

Thank you

Gruffen

Please can you attach your theme's index.template.php for us to look at?

profdrdenis


Gruffen

Interesting theme, there.

Well, template_menu() is being called, which contains a lookup against $context['menu_buttons'] as it should, which leads me to wonder if Subs.php has been fully modified. Did you install this manually or through the package manager?

profdrdenis

My english is not so perfect to understand your first sentence.

The simple desk, I install it with the Manager. But the helpdesk staff in the index.template.php I put it with my hand I make a mistake?

Gruffen

For 2.0 the menu is normally managed by Subs.php, not index.template.php, but index.template.php has the code to *display* the menu. Your theme is unlike any I've seen before, hence my saying it was interesting.

It looks like it should work but for some reason something is preventing it from working. What other mods do you have?

profdrdenis

many mods:

1.    Auto Purge Old Topics     1.2
2.    PDF Tag    1.1    
3.    Registered Links    2.0.2    
4.    Anti-Spam Links    1.0.1    
5.    SimpleDesk - Integrated Helpdesk for Simple Machines Forum    1.0 Felidae    
6.    Bookmarks    2.3    
7.    Social Bookmarks for SMF 2    1.1    
8.    reCAPTCHA for SMF    0.9.8    
9.    Auto Email Inactive Users    1.7    
10.    Foxy! for Aeva Media    1.26    
11.    Gender on Memberlist    1.3    
12.    Highslide Image Viewer    1.6    
13.    Arcade Skin 2.5 RC1    1.0.0    
14.    Welcome Topic Mod    2.1    
15.    AvatarSelect    1.2.1    
16.    SMF Arcade    2.5 RC1    
17.    View IP Permissions    1.1    
18.    SMF Links    2.1.3    
19.    Set the default session length for login    1.0    
20.    Amazon Search    1.1    
21.    autoTooltips autoLinktips for SMF    0.9    
22.    Reason For Editing Mod    2.3.2    
23.    Aeva Media    1.1b    
24.    RSS Feeder    1.1.4    
25.    Users Online Today    1.5.6    
26.    SMF Chess    2.1    
27.    PM to New Members    1.2    
28.    NiceTooltips    1.6    
29.    Ultimate Profile    0.9.1    
30.    AjaxChat Integration    3.2.1 (modified for SMF 2 RC3)    
31.    RSS Feed Icon    1.1

but the simple desk was the last one  8)

Gruffen

Can you attach your Subs.php file please?

profdrdenis


Gruffen

Right, I can see that your Subs.php file has been modified (and not really in a good way, either)

Meaning that it's put the code in the right place for a default install and it's inserted the helpdesk inside the sub data for the Profil button.

These changes will make it work, but you will not be able to uninstall it properly, nor will it work again next time. I'd suggest putting the Subs.php file back somewhat to how it comes out of the box because it'll break less mods that way.

Code (find) Select
'Profil' => array(
'title' => $txt['profile'],
'href' => $scripturl . '?action=profile',
'show' => $context['allow_edit_profile'],
'sub_buttons' => array(
'summary' => array(
'title' => $txt['summary'],
'href' => $scripturl . '?action=profile',
'show' => true,
),
'account' => array(
'title' => $txt['account'],
'href' => $scripturl . '?action=profile;area=account',
'show' => allowedTo(array('profile_identity_any', 'profile_identity_own', 'manage_membergroups')),
),
'helpdesk' => array(
'title' => $modSettings['helpdesk_active'] && SMF != 'SSI' ? shd_get_active_tickets() : $txt['shd_helpdesk'],
'href' => $scripturl . '?action=helpdesk;sa=main',
'show' => $modSettings['helpdesk_active'] && (allowedTo('access_helpdesk') || allowedTo('admin_helpdesk')),
'sub_buttons' => array(
'newticket' => array(
'title' => $txt['shd_new_ticket'],
'href' => $scripturl . '?action=helpdesk;sa=newticket',
'show' => SMF == 'SSI' ? false : shd_allowed_to('shd_new_ticket'),
),
'closedtickets' => array(
'title' => $txt['shd_tickets_closed'],
'href' => $scripturl . '?action=helpdesk;sa=closedtickets',
'show' => SMF == 'SSI' ? false : (shd_allowed_to('shd_resolve_ticket_own') || shd_allowed_to('shd_resolve_ticket_any')),
),
'recyclebin' => array(
'title' => $txt['shd_recycle_bin'],
'href' => $scripturl . '?action=helpdesk;sa=recyclebin',
'show' => SMF == 'SSI' ? false : shd_allowed_to('shd_access_recyclebin'),
),
),
),
'profile' => array(
'title' => $txt['forumprofile'],
'href' => $scripturl . '?action=profile;area=forumprofile',
'show' => allowedTo(array('profile_extra_any', 'profile_extra_own')),
'is_last' => true,
),
),
),


Code (replace) Select
'Profil' => array(
'title' => $txt['profile'],
'href' => $scripturl . '?action=profile',
'show' => $context['allow_edit_profile'],
'sub_buttons' => array(
'summary' => array(
'title' => $txt['summary'],
'href' => $scripturl . '?action=profile',
'show' => true,
),
'account' => array(
'title' => $txt['account'],
'href' => $scripturl . '?action=profile;area=account',
'show' => allowedTo(array('profile_identity_any', 'profile_identity_own', 'manage_membergroups')),
),
'profile' => array(
'title' => $txt['forumprofile'],
'href' => $scripturl . '?action=profile;area=forumprofile',
'show' => allowedTo(array('profile_extra_any', 'profile_extra_own')),
'is_last' => true,
),
),
),
'helpdesk' => array(
'title' => $modSettings['helpdesk_active'] && SMF != 'SSI' ? shd_get_active_tickets() : $txt['shd_helpdesk'],
'href' => $scripturl . '?action=helpdesk;sa=main',
'show' => $modSettings['helpdesk_active'] && (allowedTo('access_helpdesk') || allowedTo('admin_helpdesk')),
'sub_buttons' => array(
'newticket' => array(
'title' => $txt['shd_new_ticket'],
'href' => $scripturl . '?action=helpdesk;sa=newticket',
'show' => SMF == 'SSI' ? false : shd_allowed_to('shd_new_ticket'),
),
'closedtickets' => array(
'title' => $txt['shd_tickets_closed'],
'href' => $scripturl . '?action=helpdesk;sa=closedtickets',
'show' => SMF == 'SSI' ? false : (shd_allowed_to('shd_resolve_ticket_own') || shd_allowed_to('shd_resolve_ticket_any')),
),
'recyclebin' => array(
'title' => $txt['shd_recycle_bin'],
'href' => $scripturl . '?action=helpdesk;sa=recyclebin',
'show' => SMF == 'SSI' ? false : shd_allowed_to('shd_access_recyclebin'),
),
),
),


Reason it failed? It looks for 'profile' =>, which on an unmodified install puts the code exactly where it's supposed to. Just changing the opening code, where you have 'Profil' does absolutely nothing on a properly constructed theme, and will break it in other ways (like not highlighting tabs properly)

profdrdenis

ok I understand. But I delete everything and install a new forum. First mod simple desk, no other one. With my theme  :'( same as before! and I dont have any Icon in the topic for to jump in the helpdesk.

What can I do to put a Icon/Button there?

Gruffen

Can I see your Subs.php file please?

profdrdenis


Gruffen

Did you actually turn the helpdesk on this time?

profdrdenis

yes. in the core theme is working nice, but in my theme no button in the forum to bring the topic to the helpdesk... ok its normal but I want to know on which place I can look..

and the design in the adminCP is not nice. Look the attach. But with this one I can stay..