diff options
Diffstat (limited to 'includes')
| -rwxr-xr-x | includes/comments.php | 8 | ||||
| -rwxr-xr-x | includes/functions.php | 22 |
2 files changed, 30 insertions, 0 deletions
| diff --git a/includes/comments.php b/includes/comments.php index 3a64321..e050073 100755 --- a/includes/comments.php +++ b/includes/comments.php | |||
| @@ -73,6 +73,14 @@ while ($getcomments3[$i] = mysql_fetch_array($getcomments2)) | |||
| 73 | 'DATE' => date("F dS Y \a\\t g:i:s a",strtotime($getcomments3[$i]['posttime'])), | 73 | 'DATE' => date("F dS Y \a\\t g:i:s a",strtotime($getcomments3[$i]['posttime'])), |
| 74 | 'ID' => $getcomments3[$i]['id'], | 74 | 'ID' => $getcomments3[$i]['id'], |
| 75 | 'TEXT' => parseText($getcomments3[$i]['comment']))); | 75 | 'TEXT' => parseText($getcomments3[$i]['comment']))); |
| 76 | |||
| 77 | if (isLoggedIn()) | ||
| 78 | { | ||
| 79 | if ((isAdmin()) || (($getcomments3[$i]['is_anon'] == 0) && (getSessionUserID() === $getcomments3[$i]['user_id']))) | ||
| 80 | { | ||
| 81 | $template->adds_ref_sub($curID, 'EDITOR', array('BEFORE' => $getcomments3[$i]['comment'])); | ||
| 82 | } | ||
| 83 | } | ||
| 76 | } | 84 | } |
| 77 | $i++; | 85 | $i++; |
| 78 | } | 86 | } |
| diff --git a/includes/functions.php b/includes/functions.php index 16de184..9eb1634 100755 --- a/includes/functions.php +++ b/includes/functions.php | |||
| @@ -282,4 +282,26 @@ function displayRelated($title, $avoid = 0) | |||
| 282 | } | 282 | } |
| 283 | } | 283 | } |
| 284 | 284 | ||
| 285 | function getCommentUrl($getcomment3) | ||
| 286 | { | ||
| 287 | $page_id = $getcomment3['page_id']; | ||
| 288 | $comType = substr($page_id,0,strpos($page_id,'-')); | ||
| 289 | $comID = substr($page_id,strpos($page_id,'-')+1); | ||
| 290 | |||
| 291 | if ($comType == 'updates') | ||
| 292 | { | ||
| 293 | $getupdate = "SELECT * FROM updates WHERE id = " . $comID; | ||
| 294 | $getupdate2 = mysql_query($getupdate); | ||
| 295 | $getupdate3 = mysql_fetch_array($getupdate2); | ||
| 296 | |||
| 297 | return '/blog/' . $getupdate3['slug'] . '/'; | ||
| 298 | } else if ($comType == 'polloftheweek') | ||
| 299 | { | ||
| 300 | return '/poll/' . $comID . '.php'; | ||
| 301 | } else if ($comType == 'quote') | ||
| 302 | { | ||
| 303 | return '/quotes/' . $comID . '.php'; | ||
| 304 | } | ||
| 305 | } | ||
| 306 | |||
| 285 | ?> | 307 | ?> |
