News:

Loving SimpleDesk? Help us spread the word!

Main Menu
Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - Flavio93Zena

#1
SimpleDesk Support / Re: Report of specific field
September 02, 2015, 08:16:26 AM
I see, the relevant table is this smf_helpdesk_custom_fields_values, then you will need to edit function shd_main_helpdesk() in SimpleDesk.php and finally the template to show it up. arantor would easily be able to do it, but he mostly disappeared from the net :/ My php knowledge may not be enough to figure out how to do what you ask, I'm just replying to tell you, because I am about to go to lunch so I can't really take a closer look at it and eventually try to code it at the moment.
Maybe enabling the email notifications is a good idea.
#2
SimpleDesk Support / Re: Report of specific field
August 31, 2015, 02:23:34 PM
Pretty sure it's possible, even if the layout can be broken easily. What do you want to add?
#3
SimpleDesk Support / Re: Report of specific field
August 29, 2015, 03:26:27 AM
...reports?
#4
After years, I still get it, not sure if it's just me or not but even with the fix it doesn't work...

Consider this a pull request:
/Simpledesk.php

'actions' => array(
'movedept' => !empty($context['shd_multi_dept']) && (shd_allowed_to('shd_move_dept_any', $context['shd_department']) || ($is_own && shd_allowed_to('shd_move_dept_own', $context['shd_department']))) ? '<a href="' . $scripturl . '?action=helpdesk;sa=movedept;ticket=' . $row['id_ticket'] . ';home;' . $context['session_var'] . '=' . $context['session_id'] . '" title="' . $txt['shd_move_dept'] . '"><img src="' . $settings['default_images_url'] . '/simpledesk/movedept.png" alt="' . $txt['shd_move_dept'] . '" /></a>' : '',
),
'num_replies' => $row['num_replies'],
'replies_href' => $scripturl . '?action=helpdesk;sa=ticket;ticket=' . $row['id_ticket'] . '.msg' . $row['id_last_msg'] . '#msg' . $row['id_last_msg'] . ($_REQUEST['sa'] == 'recyclebin' ? ';recycle' : ''),
'all_replies' => (int) $row['num_replies'] + (int) $row['deleted_replies'],
);

if ($row['status'] == TICKET_STATUS_CLOSED)
{
$new_block['actions'] += array(
'resolve' => shd_allowed_to('shd_unresolve_ticket_any', $context['shd_department']) || ($is_own && shd_allowed_to('shd_unresolve_ticket_own', $context['shd_department'])) ? '<a href="' . $scripturl . '?action=helpdesk;sa=resolveticket;ticket=' . $row['id_ticket'] . ';home;' . $context['shd_dept_link'] . $context['session_var'] . '=' . $context['session_id'] . '" title="' . $txt['shd_ticket_unresolved'] . '"><img src="' . $settings['default_images_url'] . '/simpledesk/unresolved.png" alt="' . $txt['shd_ticket_unresolved'] . '" /></a>' : '',
);
}
elseif ($row['status'] == TICKET_STATUS_DELETED) // and thus, we're in the recycle bin
{
$new_block['actions'] += array(
'restore' => shd_allowed_to('shd_restore_ticket_any', $context['shd_department']) || ($is_own && shd_allowed_to('shd_restore_ticket_own', $context['shd_department'])) ? '<a href="' . $scripturl . '?action=helpdesk;sa=restoreticket;ticket=' . $row['id_ticket'] . ';home;' . $context['shd_dept_link'] . $context['session_var'] . '=' . $context['session_id'] . '" title="' . $txt['shd_ticket_restore'] . '"><img src="' . $settings['default_images_url'] . '/simpledesk/restore.png" alt="' . $txt['shd_ticket_restore'] . '" /></a>' : '',
'permadelete' => shd_allowed_to('shd_delete_recycling', $context['shd_department']) ? '<a href="' . $scripturl . '?action=helpdesk;sa=permadelete;ticket=' . $row['id_ticket'] . $context['session_var'] . '=' . $context['session_id'] . '" title="' . $txt['shd_delete_permanently'] . '" onclick="return confirm(' . JavaScriptEscape($txt['shd_delete_permanently_confirm']) . ');"><img src="' . $settings['default_images_url'] . '/simpledesk/delete.png" alt="' . $txt['shd_delete_permanently'] . '" /></a>' : '',
);
}
else
{
$langstring = '';
if (shd_allowed_to('shd_assign_ticket_any', $context['shd_department']))
$langstring = empty($row['id_member_assigned']) ? $txt['shd_ticket_assign'] : $txt['shd_ticket_reassign'];
elseif (shd_allowed_to('shd_assign_ticket_own', $context['shd_department']) && (empty($row['id_member_assigned']) || $row['id_member_assigned'] == $context['user']['id']))
$langstring = $row['id_member_assigned'] == $context['user']['id'] ? $txt['shd_ticket_unassign'] : $txt['shd_ticket_assign_self'];

if (!empty($langstring))
$new_block['actions']['assign'] = '<a href="' . $scripturl . '?action=helpdesk;sa=assign;ticket=' . $row['id_ticket'] . ';home;' . $context['session_var'] . '=' . $context['session_id'] . '" title="' . $langstring . '"><img src="' . $settings['default_images_url'] . '/simpledesk/assign.png" alt="' . $langstring . '" /></a>';

$new_block['actions'] += array(
'resolve' => shd_allowed_to('shd_resolve_ticket_any', $context['shd_department']) || ($is_own && shd_allowed_to('shd_resolve_ticket_own', $context['shd_department'])) ? '<a href="' . $scripturl . '?action=helpdesk;sa=resolveticket;ticket=' . $row['id_ticket'] . ';home;' . $context['shd_dept_link'] . $context['session_var'] . '=' . $context['session_id'] . '" title="' . $txt['shd_ticket_resolved'] . '"><img src="' . $settings['default_images_url'] . '/simpledesk/resolved.png" alt="' . $txt['shd_ticket_resolved'] . '" /></a>' : '',
'tickettotopic' => empty($modSettings['shd_helpdesk_only']) && shd_allowed_to('shd_ticket_to_topic', $context['shd_department']) && ($row['deleted_replies'] == 0 || shd_allowed_to('shd_access_recyclebin')) ? '<a href="' . $scripturl . '?action=helpdesk;sa=tickettotopic;ticket=' . $row['id_ticket'] . ';' . $context['shd_dept_link'] . $context['session_var'] . '=' . $context['session_id'] . '" title="' . $txt['shd_ticket_move_to_topic'] . '"><img src="' . $settings['default_images_url'] . '/simpledesk/tickettotopic.png" alt="' . $txt['shd_ticket_move_to_topic'] . '" /></a>' : '',
'delete' => shd_allowed_to('shd_delete_ticket_any', $context['shd_department']) || ($is_own && shd_allowed_to('shd_delete_ticket_own')) ? '<a href="' . $scripturl . '?action=helpdesk;sa=deleteticket;ticket=' . $row['id_ticket'] . ';' . $context['shd_dept_link'] . $context['session_var'] . '=' . $context['session_id'] . '" title="' . $txt['shd_ticket_delete'] . '" onclick="return confirm(' . JavaScriptEscape($txt['shd_delete_confirm']) . ');"><img src="' . $settings['default_images_url'] . '/simpledesk/delete.png" alt="' . $txt['shd_ticket_delete'] . '" /></a>' : '',
);
}


Code (replace with) Select

'actions' => array(
'movedept' => !empty($context['shd_multi_dept']) && (shd_allowed_to('shd_move_dept_any', $context['shd_department']) || ($is_own && shd_allowed_to('shd_move_dept_own', $context['shd_department']))) ? '<a href="' . $scripturl . '?action=helpdesk;sa=movedept;ticket=' . $row['id_ticket'] . ';home;' . ';' . $context['session_var'] . '=' . $context['session_id'] . '" title="' . $txt['shd_move_dept'] . '"><img src="' . $settings['default_images_url'] . '/simpledesk/movedept.png" alt="' . $txt['shd_move_dept'] . '" /></a>' : '',
),
'num_replies' => $row['num_replies'],
'replies_href' => $scripturl . '?action=helpdesk;sa=ticket;ticket=' . $row['id_ticket'] . '.msg' . $row['id_last_msg'] . '#msg' . $row['id_last_msg'] . ($_REQUEST['sa'] == 'recyclebin' ? ';recycle' : ''),
'all_replies' => (int) $row['num_replies'] + (int) $row['deleted_replies'],
);

if ($row['status'] == TICKET_STATUS_CLOSED)
{
$new_block['actions'] += array(
'resolve' => shd_allowed_to('shd_unresolve_ticket_any', $context['shd_department']) || ($is_own && shd_allowed_to('shd_unresolve_ticket_own', $context['shd_department'])) ? '<a href="' . $scripturl . '?action=helpdesk;sa=resolveticket;ticket=' . $row['id_ticket'] . ';home;' . $context['shd_dept_link'] . ';' . $context['session_var'] . '=' . $context['session_id'] . '" title="' . $txt['shd_ticket_unresolved'] . '"><img src="' . $settings['default_images_url'] . '/simpledesk/unresolved.png" alt="' . $txt['shd_ticket_unresolved'] . '" /></a>' : '',
);
}
elseif ($row['status'] == TICKET_STATUS_DELETED) // and thus, we're in the recycle bin
{
$new_block['actions'] += array(
'restore' => shd_allowed_to('shd_restore_ticket_any', $context['shd_department']) || ($is_own && shd_allowed_to('shd_restore_ticket_own', $context['shd_department'])) ? '<a href="' . $scripturl . '?action=helpdesk;sa=restoreticket;ticket=' . $row['id_ticket'] . ';home;' . $context['shd_dept_link'] . ';' . $context['session_var'] . '=' . $context['session_id'] . '" title="' . $txt['shd_ticket_restore'] . '"><img src="' . $settings['default_images_url'] . '/simpledesk/restore.png" alt="' . $txt['shd_ticket_restore'] . '" /></a>' : '',
'permadelete' => shd_allowed_to('shd_delete_recycling', $context['shd_department']) ? '<a href="' . $scripturl . '?action=helpdesk;sa=permadelete;ticket=' . $row['id_ticket'] . ';' . $context['session_var'] . '=' . $context['session_id'] . '" title="' . $txt['shd_delete_permanently'] . '" onclick="return confirm(' . JavaScriptEscape($txt['shd_delete_permanently_confirm']) . ');"><img src="' . $settings['default_images_url'] . '/simpledesk/delete.png" alt="' . $txt['shd_delete_permanently'] . '" /></a>' : '',
);
}
else
{
$langstring = '';
if (shd_allowed_to('shd_assign_ticket_any', $context['shd_department']))
$langstring = empty($row['id_member_assigned']) ? $txt['shd_ticket_assign'] : $txt['shd_ticket_reassign'];
elseif (shd_allowed_to('shd_assign_ticket_own', $context['shd_department']) && (empty($row['id_member_assigned']) || $row['id_member_assigned'] == $context['user']['id']))
$langstring = $row['id_member_assigned'] == $context['user']['id'] ? $txt['shd_ticket_unassign'] : $txt['shd_ticket_assign_self'];

if (!empty($langstring))
$new_block['actions']['assign'] = '<a href="' . $scripturl . '?action=helpdesk;sa=assign;ticket=' . $row['id_ticket'] . ';home;' . ';' . $context['session_var'] . '=' . $context['session_id'] . '" title="' . $langstring . '"><img src="' . $settings['default_images_url'] . '/simpledesk/assign.png" alt="' . $langstring . '" /></a>';

$new_block['actions'] += array(
'resolve' => shd_allowed_to('shd_resolve_ticket_any', $context['shd_department']) || ($is_own && shd_allowed_to('shd_resolve_ticket_own', $context['shd_department'])) ? '<a href="' . $scripturl . '?action=helpdesk;sa=resolveticket;ticket=' . $row['id_ticket'] . ';home;' . $context['shd_dept_link'] . ';' . $context['session_var'] . '=' . $context['session_id'] . '" title="' . $txt['shd_ticket_resolved'] . '"><img src="' . $settings['default_images_url'] . '/simpledesk/resolved.png" alt="' . $txt['shd_ticket_resolved'] . '" /></a>' : '',
'tickettotopic' => empty($modSettings['shd_helpdesk_only']) && shd_allowed_to('shd_ticket_to_topic', $context['shd_department']) && ($row['deleted_replies'] == 0 || shd_allowed_to('shd_access_recyclebin')) ? '<a href="' . $scripturl . '?action=helpdesk;sa=tickettotopic;ticket=' . $row['id_ticket'] . ';' . $context['shd_dept_link'] . ';' . $context['session_var'] . '=' . $context['session_id'] . '" title="' . $txt['shd_ticket_move_to_topic'] . '"><img src="' . $settings['default_images_url'] . '/simpledesk/tickettotopic.png" alt="' . $txt['shd_ticket_move_to_topic'] . '" /></a>' : '',
'delete' => shd_allowed_to('shd_delete_ticket_any', $context['shd_department']) || ($is_own && shd_allowed_to('shd_delete_ticket_own')) ? '<a href="' . $scripturl . '?action=helpdesk;sa=deleteticket;ticket=' . $row['id_ticket'] . ';' . $context['shd_dept_link'] . ';' . $context['session_var'] . '=' . $context['session_id'] . '" title="' . $txt['shd_ticket_delete'] . '" onclick="return confirm(' . JavaScriptEscape($txt['shd_delete_confirm']) . ');"><img src="' . $settings['default_images_url'] . '/simpledesk/delete.png" alt="' . $txt['shd_ticket_delete'] . '" /></a>' : '',
);
}


Tested, it fixes all the other actions.
#5
No, I'm sorry but there isn't.
#6
SimpleDesk Support / Re: Editing urgency levels?
March 24, 2015, 01:54:37 PM
After this time I gained much more experience and can somehow understand why it's not possible.
You based the whole mod on those 6 arrays, as such, they are not variables and in order to introduce/remove something with those you would indeed need to rewrite it. :)

I found a workaround though, I just renamed the highest urgency level to "Please select one of the priorities above" :P The only issue with it is that it's still selectable. Can't figure out if some js would be able to avoid it and how to do it anyway. I don't mind if it could be bypassed by removing it with the inspect element view, users doing that would be just stupid. Lol if you got any clues about that let me know.
#7
Thank you for the fix, wow never noticed it myself, yet I had tested it quite a lot... But I never thought about replying multiple times during testing ;D
#8
Quote from: venguard223 on July 03, 2013, 08:50:39 PM
I still can't reproduce it but there is no harm in changing the suggested patch to:

if (isset($user_info['shd_permissions'][$perm]) && is_array($user_info['shd_permissions'][$perm]))
$user_info['shd_permissions'][$perm] = array_merge($user_info['shd_permissions'][$perm], $depts[$role]);
else
$user_info['shd_permissions'][$perm] = $depts[$role];


But it's been over two years since I wrote the code originally, I don't remember how most of it works any more. (Yes, I am SD's original developer.)
YAY :D had the same problem here, put that into the original code and I became really happy when I saw the results :D thanks even if very late, just thanks!
#9
I actually posted the remaining part of the solution I was asking for in the OP so it's not OT at all.
#10
For the sake of discussion and for the kindness shown I will post the remaining part of the solution in the remote chance anyone will be reading this in years to come.

/Sources/AwardHooks.php
Code (find) Select

if ($where === 'after')
$position += 1;


Code (replace with) Select

if ($where === 'after')
$position += 2;


Yeah it's easy, but finding it without any kind of help nor knowing how the mod was coded was not easy at all, and in fact I am extremely happy that I made it on my own. :)
#11
I'd have so many questions that would go way OT so I will just thank you and leave it like that :)
#12
Perhaps uninstalling it and using Sinan's one? It could be a five-mins and effective solution :) (IIRC it was him making another one...)

Besides I'm going to bed, spent like 8 hours on css today, it's way more than enough >_< at least I'm extremely satisfied with the result. I have email notifications turned on so I won't miss a thing :)
#13
Aw *-* that worked indeed! Thanks, it's quite a start :D marking as solved at least for SimpleDesk side!

EDIT: no idea of the reason for it but it says that an error occurred when trying to mark the topic as solved, perhaps you should investigate on this... It *should* have logged something in the error log I think..
In the meantime I will just change the icon to the solved one :P
#14
Thanks for your reply :)
I would like it to be "Modify Profile", "SimpleDesk", "Awards" - sorry for not being cristal clear from the beginning.
If you don't remember I can't understand half of it so... :P
#15
SimpleDesk Discussion / Simpledesk placement in profile?
November 19, 2014, 06:45:12 AM
Hi all, how to place the SimpleDesk stuff (Helpdesk Profile Preferences Show Tickets Permissions Action Log) below the "Modify profile" column instead of above it? I have seen that the function has been heavily modified and I can't figure it out, plus I also use the awards system by Spuds, no clues on how to put that below the SimpleDesk column, too. Practically now they are "Awards", "SimpleDesk" and then "Modify profile", I would like them to be exactly the opposite...
Thanks in advance :)