SimpleDesk

SimpleDesk! => SimpleDesk Support => Topic started by: profdrdenis on April 12, 2010, 11:05:23 AM

Title: Button in an other Theme
Post by: profdrdenis on April 12, 2010, 11:05:23 AM
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
Title: Re: Button in an other Theme
Post by: Gruffen on April 12, 2010, 11:11:39 AM
Please can you attach your theme's index.template.php for us to look at?
Title: Re: Button in an other Theme
Post by: profdrdenis on April 12, 2010, 11:26:14 AM
welcome

I attach and thanks
Title: Re: Button in an other Theme
Post by: Gruffen on April 12, 2010, 11:28:36 AM
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?
Title: Re: Button in an other Theme
Post by: profdrdenis on April 12, 2010, 11:34:24 AM
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?
Title: Re: Button in an other Theme
Post by: Gruffen on April 12, 2010, 11:36:13 AM
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?
Title: Re: Button in an other Theme
Post by: profdrdenis on April 12, 2010, 11:40:33 AM
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)
Title: Re: Button in an other Theme
Post by: Gruffen on April 12, 2010, 11:43:03 AM
Can you attach your Subs.php file please?
Title: Re: Button in an other Theme
Post by: profdrdenis on April 12, 2010, 11:45:26 AM
I do it
Title: Re: Button in an other Theme
Post by: Gruffen on April 12, 2010, 11:54:47 AM
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)
Title: Re: Button in an other Theme
Post by: profdrdenis on April 13, 2010, 05:37:13 AM
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?
Title: Re: Button in an other Theme
Post by: Gruffen on April 13, 2010, 06:28:53 AM
Can I see your Subs.php file please?
Title: Re: Button in an other Theme
Post by: profdrdenis on April 13, 2010, 06:56:48 AM
yes I attach
Title: Re: Button in an other Theme
Post by: Gruffen on April 13, 2010, 06:59:11 AM
Did you actually turn the helpdesk on this time?
Title: Re: Button in an other Theme
Post by: profdrdenis on April 13, 2010, 07:08:06 AM
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..
Title: Re: Button in an other Theme
Post by: Gruffen on April 13, 2010, 07:22:31 AM
What can I say? If you take a theme based on Curve, rip out a lot of the code, things don't work properly. Interestingly, most other big mods won't work well either...
Title: Re: Button in an other Theme
Post by: profdrdenis on April 13, 2010, 07:26:32 AM
I understand but Curve is not the heaven  8) for me its Simple Desk working. I only want instruction what can I do that I have Icons.. thats all
Title: Re: Button in an other Theme
Post by: Gruffen on April 13, 2010, 07:30:42 AM
No, but you can thoroughly customise Curve without breaking the style and breaking any mod that uses the same basic structure. I tried it out in over 50 different themes and it works just fine.


I don't understand your question... what icons? Where?
Title: Re: Button in an other Theme
Post by: profdrdenis on April 13, 2010, 07:36:59 AM
See my first post. I want Icon/Buttons on top of the helpdesk and I want instruction what is todo to bring shd_move_topic_to_ticket so that I can see a Icon/Button. Or on which place I put for example: <img src="', $settings['images_url'], '/german/XXX.gif" alt="" border="0" />

I hope my english is not to bad
Title: Re: Button in an other Theme
Post by: Gruffen on April 13, 2010, 07:43:48 AM
I don't understand where you want this button. Screenshot please.
Title: Re: Button in an other Theme
Post by: profdrdenis on April 13, 2010, 07:50:56 AM
no problem.

first I show you in the core theme what I mean. In my is this Button not there and I want to know what is to do.

second in the helpdesk you see only words, I want Buttons too
Title: Re: Button in an other Theme
Post by: Gruffen on April 13, 2010, 07:53:38 AM
You need to modify your theme to match. We use the EXACT same coding that Curve does, so you need to add that code back in to your theme.

Let me guess, you don't have those buttons in your thread display...
Title: Re: Button in an other Theme
Post by: profdrdenis on April 13, 2010, 07:57:39 AM
yes exact this is what I mean.

any way out...?
Title: Re: Button in an other Theme
Post by: Gruffen on April 13, 2010, 07:58:07 AM
Rewriting your theme?
Title: Re: Button in an other Theme
Post by: profdrdenis on April 13, 2010, 08:02:47 AM
yeah this is not my theme and I dont know what is todo...  :'( But I dont understand everything. This string:

// SimpleDesk: Add topic -> ticket button
$normal_buttons = array_merge($normal_buttons,array('topictoticket' => array('test' => 'can_move_to_helpdesk', 'text' => 'shd_move_topic_to_ticket', 'lang' => true, 'url' => $scripturl . '?action=helpdesk;sa=topictoticket;topic='.$context['current_topic'].';' . $context['session_var'] . '=' . $context['session_id'])));


bring the button in the topic. I cant change to a simple way with a Icon?
Title: Re: Button in an other Theme
Post by: Gruffen on April 13, 2010, 08:07:27 AM
It doesn't help that you've asked two totally unrelated questions in the same post.

Firstly, that's what the "Install on Other Themes" option is supposed to do. The fact that your theme doesn't do anything like it's supposed to is not something we can easily fix.

I can look at your Display.template.php and figure out where the code is supposed to go to put that button in.

But I CANNOT fix the issue you seem to have with respect to buttons not having borders, that's because your theme is basically broken and doesn't adhere to how Curve based themes are built and you should ask whoever built it.
Title: Re: Button in an other Theme
Post by: profdrdenis on April 13, 2010, 08:14:37 AM
I think my english is to bad to explain.

The code show in the core theme the button.  I want to know what can I do to change the code that I have a button in my theme. This is my topic all the time.
Title: Re: Button in an other Theme
Post by: Gruffen on April 13, 2010, 08:15:26 AM
Then your theme has it modified to do it in a special way that is different to how Curve and other mods do it.

A link to your site might help, though I doubt it. Also anything I give you to fix this will have to be redone every time you upgrade SimpleDesk.
Title: Re: Button in an other Theme
Post by: profdrdenis on April 13, 2010, 08:17:53 AM
Quote from: Arantor on April 13, 2010, 08:15:26 AM
Also anything I give you to fix this will have to be redone every time you upgrade SimpleDesk.

this I know...
Title: Re: Button in an other Theme
Post by: profdrdenis on April 13, 2010, 08:56:47 AM
my idea is like this:

<a href="' . $scripturl . '?action=helpdesk;sa=topictoticket;topic='.$context['current_topic'].';' . $context['session_var'] . '=' . $context['session_id'] . '">' . ($settings['use_image_buttons'] ? '<img src="' . $settings['lang_images_url'] . '/support.png" title="Verschiebe zum HelpDesk" alt="' . $txt['can_move_to_helpdesk'] . '" border="0" />' : $txt['can_move_to_helpdesk']) . '</a>';