| ||||||||||||
![]() |
| Notices |
![]() |
| | LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
(#1)
|
(#2)
|
(#3)
|
| Senior Member Posts: 5,394 Join Date: Jun 2005 Location: Cumbria, UK |
09-08-2007, 12:15 PM
Ooo, this is good. Thanks for sharing! Icon Headquarters - Its Elixir - Web2Messenger |
| | |
(#4)
|
(#5)
|
| Senior Member Posts: 5,394 Join Date: Jun 2005 Location: Cumbria, UK |
09-08-2007, 01:01 PM
I would like to see the ability to do this too. Icon Headquarters - Its Elixir - Web2Messenger |
| | |
(#6)
|
(#7)
|
(#8)
|
(#9)
|
(#10)
|
| Member Posts: 134 Join Date: May 2007 Location: Denmark |
20-08-2007, 12:04 PM
Quote:
Where should this be copied to? Can you please specify? (because when I put it in somewhere - I end up with a blank page when clicking on a ticket with that usergroup) | |
| | |
(#11)
|
| New Member Posts: 10 Join Date: Jul 2007 |
20-08-2007, 01:51 PM
Hi guys, sorry if I wasn't clear enough. It's similar to the first post, but we are going to add a couple of extra lines: 1. Open this file /modules/tickets/staff_viewticket.php with notepad. 2. Add this somewhere on the top of the document (line 99 will do, after the $navtitled variable): PHP Code: Note that now we have added 2 new lines, $allowedGroupIds and $userGroupId. 3. Almost there. After line 150, the script prints the list tags <li>, that are part of the tabs. 4. Wrap the echo between an if statement: You have different options: 4.1. Option 1 PHP Code: 4.2. Option 2 PHP Code: 4.3. Option 3 PHP Code: Hope this helps |
| | |
(#12)
|
(#13)
|
| New Member Posts: 10 Join Date: Jul 2007 |
20-08-2007, 02:05 PM
Pay attention to this line: array(group_id, group_id, etc), it holds the group id's, example: PHP Code: Click on a team and check the URL, it should end with something like this: index.php?_m=core&_a=editstaffgroup&staffgroupid=4 So there you have it, "staffgroupid" 4 PHP Code: PHP Code: |
| | |
(#14)
|
| Member Posts: 1,300 Join Date: Apr 2007 Location: Toronto Canada |
22-08-2007, 11:34 PM
Okay I'm confused. There are a few echo <li> statements around line 150. Some are already wrapped around if statements and one of them isn't. Here is a section of code: Code: <li><a class="currenttab" href="#" onClick="this.blur(); return switchGridTab(\'ttgeneral\', \'tickets\');" id="ttgeneral" title="'. $_SWIFT["language"]["tabgeneral"] .'">'. $_SWIFT["language"]["tabgeneral"] .'</a></li>
<li><a href="#" onClick="this.blur(); switchGridTab(\'ttpostreply\', \'tickets\'); document.replyform.replycontents.focus(); EDITORON(); startTicketLock(\''. intval($_ticket["ticketid"]) .'\');" id="ttpostreply" title="'. $_SWIFT["language"]["tabpostreply"] .'">'. $_SWIFT["language"]["tabpostreply"] .'</a></li>';
if ($_SWIFT["staff"]["tforward"] != "0")
{
echo '<li><a href="#" onClick="this.blur();switchGridTab(\'ttforward\', \'tickets\');if (!loadedStates[\'forward\']) {fetchData(\'forward\', \''. $_ticket["ticketid"] .'\', \''. intval($_REQUEST["ticketlabelid"]) .'\');}" id="ttforward" title="'. $_SWIFT["language"]["tabforward"] .'">'. $_SWIFT["language"]["tabforward"] .'</a></li>';
}
echo '<li><a href="#" onClick="this.blur();switchGridTab(\'ttfollowup\', \'tickets\');if (!loadedStates[\'followup\']) {fetchData(\'followup\', \''. $_ticket["ticketid"] .'\', \''. intval($_REQUEST["ticketlabelid"]) .'\');}" id="ttfollowup" title="'. $_SWIFT["language"]["tabfollowup"] .'">'. $_SWIFT["language"]["tabfollowup"] .'</a></li>';
if ($_SWIFT["staff"]["tbilling"] != "0")
{
echo '<li><a href="#" onClick="this.blur(); switchGridTab(\'ttbilling\', \'tickets\');if (!loadedStates[\'billing\']) {fetchData(\'billing\', \''. $_ticket["ticketid"] .'\');}" id="ttbilling" title="'. $_SWIFT["language"]["billing"] .'">'. $_SWIFT["language"]["billing"] .'</a></li>';
}
$_total = $dbCore->queryFetch("SELECT COUNT(*) AS totalitems FROM `". TABLE_PREFIX ."tickets` WHERE `email` = '". $dbCore->escape($_ticket["email"]) ."';");
$_tickethistorycount = intval($_total["totalitems"]);
if ($_tickethistorycount > 0)
{
$_strhistorycount = ' <font color="#CF5D60">('. $_tickethistorycount .')';
} else {
$_strhistorycount = ' (0)';
}
echo '<li><a href="#" onClick="this.blur(); switchGridTab(\'ttaddnotes\', \'tickets\');if (!loadedStates[\'addnotes\']) {fetchData(\'addnotes\', \''. $_ticket["ticketid"] .'\', \''. intval($_REQUEST["ticketlabelid"]) .'\');}" id="ttaddnotes" title="'. $_SWIFT["language"]["tabaddnotes"] .'">'. $_SWIFT["language"]["tabaddnotes"] .'</a></li>
<li><a href="#" onClick="this.blur(); switchGridTab(\'ttrelease\', \'tickets\');if (!loadedStates[\'release\']) {fetchData(\'release\', \''. $_ticket["ticketid"] .'\', \''. intval($_REQUEST["ticketlabelid"]) .'\');}" id="ttrelease" title="'. $_SWIFT["language"]["tabrelease"] .'">'. $_SWIFT["language"]["tabrelease"] .'</a></li>
<li><a href="#" onClick="this.blur(); switchGridTab(\'tthistory\', \'tickets\');if (!loadedStates[\'history\']) {fetchData(\'history\', \''. $_ticket["email"] .'\');}" id="tthistory" title="'. $_SWIFT["language"]["tabhistory"] .'">'. sprintf($_SWIFT["language"]["tabhistorycnt"], $_strhistorycount) .'</a></li>';
if ($module->isRegistered(MODULE_LIVESUPPORT) && !empty($_ticket["email"]))
{
$_total = $dbCore->queryFetch("SELECT COUNT(*) AS totalitems FROM `". TABLE_PREFIX ."chatobjects` WHERE `useremail` = '". $dbCore->escape($_ticket["email"]) ."';");
$_chatcount = intval($_total["totalitems"]);
if ($_chatcount > 0)
{
$_strchatcount = ' <font color="#CF5D60">('. $_chatcount.')';
} else {
$_strchatcount = ' <font color="gray">(0)</font>';
}
echo '<li><a href="#" onClick="this.blur(); switchGridTab(\'ttlschats\', \'tickets\');if (!loadedStates[\'lschats\']) {fetchData(\'lschats\', \''. "&email[]=".urlencode($_ticket["email"]) .'\');}" id="ttlschats" title="'. $_SWIFT["language"]["strchats"] .'">'. sprintf($_SWIFT["language"]["tabchats"], $_strchatcount) .'</a></li>';
}
echo '<li><a href="#" onClick="this.blur(); switchGridTab(\'ttlog\', \'tickets\');if (!loadedStates[\'auditlog\']) {fetchData(\'auditlog\', \''. $_ticket["ticketid"] .'\');}" id="ttlog" title="'. $_SWIFT["language"]["tablog"] .'">'. $_SWIFT["language"]["tablog"] .'</a></li>
<li><a href="#" onClick="this.blur(); switchGridTab(\'ttedit\', \'tickets\');if (!loadedStates[\'edit\']) {fetchData(\'edit\', \''. $_ticket["ticketid"] .'\');}" id="ttedit" title="'. $_SWIFT["language"]["tabedit"] .'">'. $_SWIFT["language"]["tabedit"] .'</a></li>
</ul></div></td></tr>'.SWIFT_CRLF;
|
| | |
(#15)
|
| Member Posts: 134 Join Date: May 2007 Location: Denmark |
23-08-2007, 07:40 AM
I didn't do it my self, but here is some code from mine that works. I removed ALL the tabs from the usergroup 3. My code is taken from line 140 - 214 I can't really help you more, but maybe you can see something you can use from it. PHP Code: |
| | |
![]() |
| Tags |
| hide, tabs, ticket |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Ticket View -> Quick Search: Is there a way to set the default criteria? | richm | How do I? | 0 | 30-04-2007 02:22 PM |
| New Build: 3.10.02 STABLE | Ryan Lederman | News and Announcements | 0 | 05-03-2007 09:53 PM |
| Admin missing ticket view and other tabs | duplex | Presales Questions | 8 | 21-02-2007 08:24 PM |