Author Topic: user can't edit/delete their comment  (Read 6279 times)

0 Members and 1 Guest are viewing this topic.

Offline bird5466

  • Pre-Newbie
  • Posts: 3
    • View Profile
user can't edit/delete their comment
« on: May 05, 2003, 04:36:10 PM »
hi~
user post their comment , can't edit or delete their comment
but admin login , admin_links can show
Will registered users can edit image or comment on each id

details.php
Code: [Select]

// Admin Links
$admin_links = "";
if ($user_info['user_level'] == ADMIN) {
  $admin_links .= "<a href=\"".$site_sess->url(ROOT_PATH."admin/index.php?goto=".urlencode("images.php?action=editimage&amp;image_id=".$image_id))."\" target=\"_blank\">".$lang['edit']."</a>&nbsp;";
  $admin_links .= "<a href=\"".$site_sess->url(ROOT_PATH."admin/index.php?goto=".urlencode("images.php?action=removeimage&amp;image_id=".$image_id))."\" target=\"_blank\">".$lang['delete']."</a>";
}
elseif ($is_image_owner || $user_info['user_cat'] == $cat_id) {
  $admin_links .= ($config['user_edit_image'] != 1 && $user_info['user_cat'] != $cat_id) ? "" : "<a href=\"".$site_sess->url(ROOT_PATH."member.php?action=editimage&amp;".URL_IMAGE_ID."=".$image_id)."\">".$lang['edit']."</a>&nbsp;";
  $admin_links .= ($config['user_delete_image'] != 1 && $user_info['user_cat'] != $cat_id) ? "" : "<a href=\"".$site_sess->url(ROOT_PATH."member.php?action=removeimage&amp;".URL_IMAGE_ID."=".$image_id)."\">".$lang['delete']."</a>";
}
$site_template->register_vars("admin_links", $admin_links);

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
user can't edit/delete their comment
« Reply #1 on: May 05, 2003, 04:56:02 PM »
is this a question? or....
if its "or..." then it wont work.
2 Reasons:

1. what u showed here is piece of code from MOD "MembersPersonalCategory" and it wont work without that MOD
2. even if u fix the details.php, it will show u link to edit the comments, but when u click on it, u'll see "no permission" page, because to make it fully working u'll need edit member.php in about 6 places. (u can check that MOD for first 5-6 steps, I added commented lines there, that will allow comment owner edit their comments.
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline bird5466

  • Pre-Newbie
  • Posts: 3
    • View Profile
user can't edit/delete their comment
« Reply #2 on: May 05, 2003, 06:26:30 PM »
sorry ~~ my english is very poor
that is my question
i didn't use MOD "MembersPersonalCategory"
if i use "admin" id login , i can edit/delete comment
but only admin can do this, users can't.
i hope each user can edit/delete their comment

my homepage: http://mis85.no-ip.com

Offline bird5466

  • Pre-Newbie
  • Posts: 3
    • View Profile
user can't edit/delete their comment
« Reply #3 on: May 05, 2003, 07:06:00 PM »
if i chooce "Allow users to edit comments of their own images" in the control panel,user(own image) all comments (include other user's comments in his own image),
but i want user(own image)can only edit his comment.

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
user can't edit/delete their comment
« Reply #4 on: May 05, 2003, 07:09:45 PM »
I already answered in my previous post.
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)