|
|
Joined: Nov 2001
Posts: 170
Member
|
Member
Joined: Nov 2001
Posts: 170 |
It give the admin and the mod the ability to not to show edit by when the edit a post I am not sour if any body has post this before sorry if they did This is a small hack all you need is to hack to file In ubb_edit_post.cgi Find code:
$close_option = qq( <input type="checkbox" id="close_topic" name="close_topic" value="yes" /> <b>$vars_wordlets{close_topic}</b>);
replace it by code: [qb]$close_option = qq( <input type="checkbox" id="close_topic" name="close_topic" value="yes" /> <b>$vars_wordlets{close_topic}</b>
<input type="checkbox" id="show_edit" name="show_edit" value="yes" /> <b>$vars_wordlets_mods{show_edit}</b>); [/qb] search for code:
if ($vars_misc{EditWording} eq 'yes') {
replace it by code: [qb] my $is_one = &is_admin_or_mod($in{f}, @user_profile); if ($is_one ne "true"){ $in{show_edit}= 'no';}
if (($vars_misc{EditWording} eq 'yes')&&($in{show_edit}ne 'yes')) { [/qb] in vars_wordlets_mods.cgi after code:
add code: [qb] q!show_edit! => q! Do not show edit by!, [/qb] or 'show_edit' => 'Do not show edit by', depending on your var format
|
|
|
|
Joined: Mar 2001
Posts: 7,394
Admin / Code Breaker
|
Admin / Code Breaker
Joined: Mar 2001
Posts: 7,394 |
Good job! Just a suggestion: maybe in the $in{showedit} ne 'yes' thing add a check to make sure the user is actually a moderator? (a user can edit the edit post file in notepad and add the show_edit checkbox)
|
|
|
|
Joined: Nov 2001
Posts: 1,080
Member
|
Member
Joined: Nov 2001
Posts: 1,080 |
What is the difference between this hack and the "Ultimate Edit" hack by Zorro?
|
|
|
|
Joined: Mar 2001
Posts: 7,394
Admin / Code Breaker
|
Admin / Code Breaker
Joined: Mar 2001
Posts: 7,394 |
Here you choose whether you want to hide edit wording or not, Zorro's hack automatically hid it for mods/admins.
|
|
|
|
Joined: Nov 2001
Posts: 170
Member
|
Member
Joined: Nov 2001
Posts: 170 |
LK I have done what you request I hop it is fine now Thank for your comment and your replay
PrimeTime I did not knew that Zorro's has post a hack. Any way it is different than what Zorro's has post
|
|
|
|
Joined: Mar 2001
Posts: 7,394
Admin / Code Breaker
|
Admin / Code Breaker
Joined: Mar 2001
Posts: 7,394 |
You have @user_profile1 there... I think you should add @user_profile1 = &verify_id_num($username, $password, $user_number); before.
|
|
|
|
Joined: Nov 2001
Posts: 170
Member
|
Member
Joined: Nov 2001
Posts: 170 |
Sorry it should be @user_profile I have change it now thanks LK I don't have to do this I think &verify_id_num($username, $password, $user_number)
since it is user_profile was declared before I have test it and it works The way I test it is by declaring me as a mod in the cp and edit the post. In edit the post I check “do not show edit by” before I press post I went to the cp and and rmove me from the mod list. I went to press the post button and it show in the topic that it was edited by …
|
|
|
|
Joined: Sep 2002
Posts: 16
Junior Member
|
Junior Member
Joined: Sep 2002
Posts: 16 |
Thanks a lot for that nice one bobbel
|
|
|
|
Joined: May 2001
Posts: 28
Junior Member
|
Junior Member
Joined: May 2001
Posts: 28 |
What should I change $is_admin_or_mod with to only allow administrators to use this ?
|
|
|
|
Joined: Mar 2001
Posts: 145
Member
|
Member
Joined: Mar 2001
Posts: 145 |
You don't really need this anymore. The current versions of the code have something built into them which lets you do this by adding a single character.
From ubb_edit_post.cgi:
[code][/code]Just comment out the one line it says to comment out, and admin/mod edits don't get the edited by (unless they're editing their own message, in which case it does show up - but you can turn that off in the control panel, anyway).
Although since this thread is in v6.3 (which is now two versions behind current stuff), I don't think this was in there - I think this was put in 6.4.
|
|
|
Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.
Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
|
|
Posts: 69
Joined: January 2001
|
|
Forums63
Topics37,573
Posts293,925
Members13,849
|
Most Online5,166 Sep 15th, 2019
|
|
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
|
|
|
|
|