Loading...
 

TrackersCreateOnlyHack

DB table insert:

  • users_permissions


changed files:

  • tiki-view_tracker.php
  • templates/tiki-view_tracker.tpl


new file:

  • templates/noerror.tpl
  • templates/styles/[yourthemes]/noerror.tpl


1) insert new row in users_permissions:

permName: tiki_p_view_tracker_items
permDesc: Can view tracker items
level: basic
type: trackers

note: tiki_p_view_trackers now applies only to listing display on tiki-list_trackers.php

2) modify tiki-view_tracker.php:

  • eliminate tiki_p_view_trackers die block:

if ($tiki_p_view_trackers != 'y') {
$smarty->assign('msg', tra("You dont have permission to use this feature"));
$smarty->display("error.tpl");
die;
}

  • after new item entry, jump to confirmation screen if permissions are create-only

$smarty->assign('itemId', '');

if($tiki_p_view_tracker_items != 'y') {
$smarty->assign('msg',tra("Your entry has been stored."));
$smarty->display("styles/$style_base/noerror.tpl");
die;
}

  • suppress display of current items if we don't have permission

$smarty->assign_by_ref('ins_fields', $ins_fields%22data%22);

if($tiki_p_view_tracker_items == 'y')
{

if (!isset($_REQUEST%22sort_mode%22)) {
.
.
.

}

ask_ticket('view-trackers');

3) modify templates/tiki-view_tracker.tpl:

  • suppress display of current items GUI if permission is not set

{if $tiki_p_view_tracker_items eq 'y'}

<h3>{tr}Tracker Items{/tr}</h3>

.
.
.

{/if}

End of file

4) create templates/noerror.tpl, same as error.tpl except:

<div class="cbox-title">


{tr}Error{/tr}


{tr}Life is good!{/tr}

</div>


5) for each active theme, copy noerror.tpl to templates/styles/[theme]


6) assign group or object permissions to specify listing of trackers and creation, viewing of items.



I will attach final modified source files and Unix diff files.


Page last modified on Saturday 14 January 2006 17:00:17 GMT-0000

Upcoming Events

1)  18 Apr 2024 14:00 GMT-0000
Tiki Roundtable Meeting
2)  16 May 2024 14:00 GMT-0000
Tiki Roundtable Meeting
3)  20 Jun 2024 14:00 GMT-0000
Tiki Roundtable Meeting
4)  18 Jul 2024 14:00 GMT-0000
Tiki Roundtable Meeting
5)  15 Aug 2024 14:00 GMT-0000
Tiki Roundtable Meeting
6)  19 Sep 2024 14:00 GMT-0000
Tiki Roundtable Meeting
7) 
Tiki birthday
8)  17 Oct 2024 14:00 GMT-0000
Tiki Roundtable Meeting
9)  21 Nov 2024 14:00 GMT-0000
Tiki Roundtable Meeting
10)  19 Dec 2024 14:00 GMT-0000
Tiki Roundtable Meeting