diff options
author | Steven Danz <steven-danz@kc.rr.com> | 2005-06-27 04:17:48 +0200 |
---|---|---|
committer | Steven Danz <steven-danz@kc.rr.com> | 2005-06-27 04:17:48 +0200 |
commit | b158d625b53833ef391800a991ad93d965d9425e (patch) | |
tree | 56913261bea090738c5b862fc3f2da06a7d6ca68 /inc/template.php | |
parent | 7131b6688badc1c1e9685aba4b222f147bc1df83 (diff) | |
download | rpg-b158d625b53833ef391800a991ad93d965d9425e.tar.gz rpg-b158d625b53833ef391800a991ad93d965d9425e.tar.bz2 |
track_changes.patch
Second go at including changes to allow users to sign up on
mailing lists so they may receive emails each time the page
they are interested in is updated.
darcs-hash:20050627021748-3ed6d-5f6993f51ab649e3928a513b0fbe7c421d880325.gz
Diffstat (limited to 'inc/template.php')
-rw-r--r-- | inc/template.php | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/inc/template.php b/inc/template.php index 4f6511e97..9baf19348 100644 --- a/inc/template.php +++ b/inc/template.php @@ -118,6 +118,12 @@ function tpl_content(){ case 'admin': tpl_admin(); break; + case 'track': + html_track(); + break; + case 'ignore': + html_ignore(); + break; default: msg("Failed to handle command: ".hsc($ACT),-1); } @@ -292,6 +298,7 @@ function tpl_getparent($ID){ * @author Matthias Grimm <matthiasgrimm@users.sourceforge.net> */ function tpl_button($type){ + global $ACT; global $ID; global $NS; global $INFO; @@ -334,6 +341,17 @@ function tpl_button($type){ case 'backtomedia': print html_backtomedia_button(array('ns' => $NS),'b'); break; + case 'track': + if($conf['useacl'] && $ACT == 'show'){ + if($_SERVER['REMOTE_USER']){ + if(tracking($ID,$_SERVER['REMOTE_USER'])){ + print html_btn('ignore',$ID,'',array('do' => 'ignore',)); + } else { + print html_btn('track',$ID,'',array('do' => 'track',)); + } + } + } + break; default: print '[unknown button type]'; } @@ -420,6 +438,17 @@ function tpl_actionlink($type,$pre='',$suf=''){ if($INFO['perm'] == AUTH_ADMIN) tpl_link(wl($ID,'do=admin'),$pre.$lang['btn_admin'].$suf,'class="action"'); break; + case 'track': + if($conf['useacl'] && $ACT == 'show'){ + if($_SERVER['REMOTE_USER']){ + if(tracking($ID,$_SERVER['REMOTE_USER'])){ + tpl_link(wl($ID,'do=ignore'),$pre.$lang['btn_ignore'].$suf,'class="action"'); + } else { + tpl_link(wl($ID,'do=track'),$pre.$lang['btn_track'].$suf,'class="action"'); + } + } + } + break; default: print '[unknown link type]'; } |