Previous Thread
Next Thread
Print Thread
Rate Thread
Joined: Nov 2001
Posts: 170
Member
Member
Offline
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
Quote
code:
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]
Code
$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
Quote
code:
Code
	if ($vars_misc{EditWording} eq 'yes') {  

replace it by
code:
[qb]
Code
        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
Quote
code:
Code
%vars_wordlets_mods = ( 


add
code:
[qb]
Code
    q!show_edit! => q! Do not show edit by!,   
[/qb]
or
Code
    'show_edit' => 'Do not show edit by',   
depending on your var format

Sponsored Links
Joined: Mar 2001
Posts: 7,394
LK Offline
Admin / Code Breaker
Admin / Code Breaker
Offline
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) smile

Joined: Nov 2001
Posts: 1,080
Member
Member
Offline
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
LK Offline
Admin / Code Breaker
Admin / Code Breaker
Offline
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
Offline
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

Sponsored Links
Joined: Mar 2001
Posts: 7,394
LK Offline
Admin / Code Breaker
Admin / Code Breaker
Offline
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
Offline
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
Offline
Joined: Sep 2002
Posts: 16
Thanks a lot for that nice one smile

bobbel

Joined: May 2001
Posts: 28
Junior Member
Junior Member
Offline
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
Offline
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.

Sponsored Links

Link Copied to Clipboard
Donate Today!
Donate via PayPal

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.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
hatter
hatter
USA
Posts: 69
Joined: January 2001
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20240506)