vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   Adv. Editing Options for Mods and Admins (https://vborg.vbsupport.ru/showthread.php?t=98737)

akanevsky 10-18-2005 10:00 PM

Adv. Editing Options for Mods and Admins
 
I no longer support my hacks. Please feel free to update them and release new versions elsewhere as long as I get the credit for the original modification.

/*================================================= =====================*\
|| Adv. Editing Options for Mods and Admins
||
|| Author : Anton Kanevsky
|| Co-Author(s) : Xenon
|| Works on : vBulletin 3.5.x - 3.8.x
|| Released : Jun 01, 2009
||
|| Time required to install: ~30 seconds
|| Difficulty: easy
\*================================================ ======================*/

DESCRIPTION

This hack gives your board staff a few advanced post editing options that are available in New Thread, New Post and Edit Post interfaces. Since this is a port of Xenon's Adv. Editing Options for Mods and Admins Hack, credits for the original idea (but not for the port cause it has a lot new features that were not present in the original :)) belong to him.

Note that this hack may interfere with other hacks that make use of posting functions. If such problems appear, place the following code in the very beginning of the problematic script:

------------------------------------------------
define('BYPASS_AEO', true);
------------------------------------------------

This should eliminate whatever problem appears. If it does not, please feel free to mention it.

STATISTICS

File Uploads: 1
Products to Install: 1


FEATURES

Basics:
  • Post Editing Hierarchy (available to mods, s-mods, admins and s-admins):
    Superadministrators: Can restrict editing to moderators (and above), supermoderators (and above), admins (and above), or superadmins only.
    Administrators: Can restrict editing to moderators (and above), supermoderators (and above) or admins (and above).
    Supermoderators: Can restrict editing to moderators (and above) or supermoderators (and above).
    Moderators: Can restrict editing to moderators (and above).

  • Post Author (available to administrators only):
    Administrator can specify a custom author of any post. Guests (non-existing users) can also be specified.

  • Post Date/Time (available to administrators only):
    Administrator can specify a custom date and time for any post.

  • Post IP (available to administrators only):
    Administrator can specify a custom ip address for any post.

Advanced:
  • A system-wide switch that defines the minimal editlevel required to use the hack.
    It can be found in vBulletin Options -> Advanced Editing Options for Mods and Admins.
  • A per-user editlevel override, available via admincp user options.
  • Color-coded listing of users to whom a custom editlevel has been applied.

Note:
To make the subject of the override clear for you, here is an example. If you turn you take a regular registered user and set the override to "Administrator" in that user's profile, then that user will be able to use hack options that would otherwise be available only to administrators.

VERSION HISTORY

2.1.0
[+] The hack is now compatible with vBulletin 3.5.x - 3.8.x.
[+] Eliminated all template edits. The difference in template edits between different vBulletin versions is handled automatically.
[+] Added support for attachments for posts with custom user setting. These attachments are now saved, and their ownership is set to whatever custom user is specified.
[+] When a post is submitted with a custom user setting, that user's activity dates are updated if they are older than the post's date. The dates of the user's activities are never set to the future. If a new post is made with a date in the future, the user's activity dates are set to present time.
[+] When a post is submitted with a custom dateline, last post information in forum and thread is now rebuilt properly.
[+] If a post is submitted with a custom dateline, the thread's firstpostid and creation date are now set to match whatever posts is now the first one in the thread.
[+] In the event that you have installed "vS-Hide Hack Resurrection," and you are changing the ownership of a post that has been thanked, the ownership of thanks is updated automatically, and so are the users' thanked counts.
[+] Removed a lot of redundant code, so the hack should now work faster than it did before.

2.0.2
[+] The hack is now officially compatible with vBulletin 3.6.
[+] Added a workaround for hacks that use new post functions. See description for details.
[+] Unlike before, adv_editform form elements now use vbulletin styles.

2.0.1
[F] Removed extra queries from showthread and showpost.
[F] "adv_editform" is now cached.

2.0.0
[+] A "superadministrator" editlevel.
[+] A system-wide switch that defines the minimal usergroup required to use the hack.
[+] A user-level override of system permissions that defines the editlevel associated with any particular user.
[+] A listing of users for whom an override was defined (with color key). Located under "Users" in the control panel navigation menu.

1.0.2
[+] When you make a post, you have a new checkbox available. That checkbox is off by default, and it allows you to choose whether to use the custom dateline in your post.

1.0.1
[F] Lastposters were not updated on newthread and newreply when replied by admin.

1.0.0
First Release

The installation manual is contained within the attached file.

IF YOU LIKE MY HACK, PLEASE CLICK INSTALL

peterska2 10-18-2005 11:43 PM

Cheers for this. Downloaded to install in the morning :)

albarq 10-19-2005 12:34 AM

installed :)

but doesnt worked :(

i cannot see the option to specify a custom date .

akanevsky 10-19-2005 12:37 AM

Quote:

i cannot see the option to specify a custom date
Make sure you log in from an admin account.

albarq 10-19-2005 12:41 AM

:) i sm sure

i just see this option

https://vborg.vbsupport.ru/attachmen...chmentid=16657

akanevsky 10-19-2005 12:56 AM

If you log in from an admin account that has a CANCONTROLPANEL access, everything should work fine. Or at least it does so on my board.

If you want me to see why it's not working on your board, make me a temporary admin account out there... :)

Brent H 10-19-2005 02:26 AM

Same problem here

theArchitect 10-19-2005 06:49 AM

Sensational. I am now only waiting on a couple more ports and all of my old hacks are back online.

*theArchitect skips for joy, then catching sight of himself in a mirror and realizing how girly he looks stops suddenly and looks around to see if anyone noticed*.

Edit: And I love the tick-box system on the read me file. Very funky.

SnowBot 10-19-2005 08:27 AM

Got a DB error when importing the .xml file

Code:

Database error in vBulletin 3.5.0:
Invalid SQL:
ALTER TABLE post ADD editlevel TINYINT(3) DEFAULT '0' NOT NULL;
MySQL Error  : Duplicate column name 'editlevel'
Error Number : 1060
Date                : Wednesday, October 19th 2005 @ 05:25:53 AM
Script          : http://www.synergyforums.com/forum/admincp/plugin.php
Referrer        : http://www.synergyforums.com/forum/a...?do=productadd
IP Address  :
Username        : Snowy
Classname        : vb_database


Neutral Singh 10-19-2005 08:54 AM

Quote:

Post Author (available to admins only):
An administrator can specify a custom post author (it can even be a non-existent user, or in other words - a guest).
After installing the product, i do see a box called "Advanced Editing Options" with a drop down menu with items Author, Mod, S-Mod, Admin.

While replying in a thread so that it posted under a different user, i selected an option: Author and saved the the reply but it returns an error:

1. You did not specify a username for your post.

But, there is no field where i can enter an username. What am in missing here?

Thanks.

Neutral Singh 10-19-2005 09:45 AM

This is to confirm that i do not see any space where i can enter a different user.

Snake 10-19-2005 10:21 AM

I have installed the hack but I get the same problems those people are having.

Sal Collaziano 10-19-2005 04:46 PM

I get the same DATABASE error as SnowBot..

How do we get around that issue?

akanevsky 10-19-2005 05:44 PM

About DB Error: I have just released and uploaded a new package that works around the "had-Xenon's-hack-installed" problem.

About the other problem: I cannot recreate it on my board, therefore I will need an admin access to someone else's board to see the problem... :) Anybody?

one9er 10-19-2005 05:55 PM

You have the download shut off. :ermm:

akanevsky 10-19-2005 05:57 PM

Yes, I've just re-uploaded the file. Try again. :)

Rabbitoh Warren 10-19-2005 06:08 PM

Quote:

Originally Posted by Dark Visor
About the other problem: I cannot recreate it on my board, therefore I will need an admin access to someone else's board to see the problem... :) Anybody?

I'm having the same problem. I can give you temp access to my forum. PM me and I'll send you the details.

akanevsky 10-19-2005 06:10 PM

Ty. PMing...

SnowBot 10-19-2005 06:18 PM

OK new file worked as in no error but still no box to enter username.

akanevsky 10-19-2005 06:37 PM

Ok, I found the fix, thanks to Rabbit_Warren for giving me access to his board.

Problem source: Old version of the adv_editform template... (I'm still getting used to the product system).
Solution: Either download a new version of the XML, or replace the contents of adv_editform with the following:

HTML Code:

<if condition="$bbuserinfo['editlevel'] > EDITLEVEL_AUTHOR">
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
        <td class="tcat">
                <a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('editpost_advanced')"><img id="collapseimg_editpost_advanced" src="$stylevar[imgdir_button]/collapse_tcat$vbcollapse[collapseimg_editpost_advanced].gif" alt="" border="0" /></a>
                $vbphrase[advedit_boxtitle]
        </td>
</tr>
<tbody id="collapseobj_editpost_advanced" style="$vbcollapse[collapseobj_editpost_advanced]">
        <tr>
                <td class="panelsurround" align="center">
               
                <div class="panel">
                        <div style="width:$stylevar[formwidth]" align="$stylevar[left]">
                       
                                <div class="fieldset">
                                        <div>$vbphrase[advedit_boxdescription]</div>
                                </div>
                               
                                <fieldset class="fieldset">
                                        <legend>$vbphrase[advedit_fieldset_title]</legend>
                                        <div style="padding:$stylevar[formspacer]px">
                                       
                                                <div>
                                                        <label for="sb_editlevel">
                                                                <select name="editlevel" id="sb_editlevel">
                                                                        <option value="0" <if condition="$adv_data['editlevel'] == EDITLEVEL_AUTHOR">selected="selected"</if>>
                                                                                $vbphrase[advedit_editlevel_author]
                                                                        </option>
                                                                        <option value="1" <if condition="$adv_data['editlevel'] == EDITLEVEL_MOD">selected="selected"</if>>
                                                                                $vbphrase[advedit_editlevel_mod]
                                                                        </option>
                                                                        <if condition="$bbuserinfo['editlevel'] >= EDITLEVEL_SMOD">
                                                                        <option value="2" <if condition="$adv_data['editlevel'] == EDITLEVEL_SMOD">selected="selected"</if>>
                                                                                $vbphrase[advedit_editlevel_smod]
                                                                        </option>
                                                                        </if>
                                                                        <if condition="$bbuserinfo['editlevel'] == EDITLEVEL_ADMIN">
                                                                        <option value="3" <if condition="$adv_data['editlevel'] == EDITLEVEL_ADMIN">selected="selected"</if>>
                                                                                $vbphrase[advedit_editlevel_admin]
                                                                        </option>
                                                                        </if>
                                                                </select>
                                                                $vbphrase[advedit_editlevel_andabove]
                                                        </label>
                                                </div>
                                               
                                                <if condition="$bbuserinfo['editlevel'] == EDITLEVEL_ADMIN">
                                                <div>
                                                        <label for="tb_dateline">
                                                                <input type="text" name="newday" value="$adv_data[mday]" size="1" maxlength="2" id="tb_dateline_day" />.
                                                                <input type="text" name="newmonth" value="$adv_data[mon]" size="1" maxlength="2" id="tb_dateline_month" />.
                                                                <input type="text" name="newyear" value="$adv_data[year]" size="3" maxlength="4" id="tb_dateline_year" />  -
                                                                <input type="text" name="newhour" value="$adv_data[hours]" size="1" maxlength="2" id="tb_dateline_day" />:
                                                                <input type="text" name="newminute" value="$adv_data[minutes]" size="1" maxlength="2"  id="tb_dateline_day" />
                                                                $vbphrase[advedit_dateposted]
                                                        </label>
                                                </div>
                                                <div>
                                                        <label for="tb_username">
                                                                <input type="text" name="newusername" value="$adv_data[username]" id="tb_username" /> $vbphrase[advedit_postauthor]
                                                        </label>
                                                </div>
                                                <div>
                                                        <label for="tb_ipaddress">
                                                                <input type="text" name="newipaddress" value="$adv_data[ipaddress]" id="tb_ipaddress" /> $vbphrase[advedit_ipaddress]
                                                        </label>
                                                </div>
                                                </if>
                                               
                                        </div>
                                </fieldset>
                               
                        </div>
                </div>
               
                </td>
        </tr>
</tbody>
</table>
<br />
</if>


SnowBot 10-19-2005 06:48 PM

That solved it :) Great work and thanks for the fast fix.

akanevsky 10-19-2005 07:30 PM

I'm glad the problem's fixed :) Hope there are no more. :)

albarq 10-19-2005 07:33 PM

Great work :D

Snake 10-19-2005 07:37 PM

Yes, well done. Thanks for your quick support!

Gizmo5h1t3 10-19-2005 08:14 PM

/me clicks install..thats a quality hack m8

Valter 10-19-2005 08:58 PM

Nice work, thanks! Installed.

Brent H 10-19-2005 09:50 PM

How do I make this only visible to Super Admin?

Xenon 10-19-2005 10:23 PM

looks good so far :)

Snake 10-19-2005 10:33 PM

Quote:

Originally Posted by TheHeggy
How do I make this only visible to Super Admin?

It displays for the administrator (and super administrators) only. :)

Brent H 10-19-2005 10:35 PM

Ah, my mistake. :) Thank you!

Snake 10-19-2005 10:39 PM

No problem! :)

theArchitect 10-20-2005 12:53 AM

Hmm. I am having problems.

I installed it ok, but if I try a normal reply to a post (ie not quick reply) then when I click post reply I get

"you did not specify a username for your post".

This error occurs every reply I make, not just on posts I am editing with this feature.

akanevsky 10-20-2005 12:57 AM

Quote:

Hmm. I am having problems.

I installed it ok, but if I try a normal reply to a post (ie not quick reply) then when I click post reply I get

"you did not specify a username for your post".

This error occurs every reply I make, not just on posts I am editing with this feature.
What type of account are you sending the post from? Reg.User/Mod/Smod/Admin? The fix is easy, but I need to know how exactly you get the error.

theArchitect 10-20-2005 01:07 AM

Quote:

Originally Posted by Dark Visor
What type of account are you sending the post from? Reg.User/Mod/Smod/Admin? The fix is easy, but I need to know how exactly you get the error.

SuperAdmin.

It was another SAdmin that reported it and when I check I found the same problem.

I then tested it with a registered user account but had no problems.

Neutral Singh 10-20-2005 05:08 AM

Works very nicely, now - Dark Visor, this is a very powerful & useful utility, thanks a ton for releasing. Regards

akanevsky 10-20-2005 05:50 PM

Quote:

SuperAdmin.

It was another SAdmin that reported it and when I check I found the same problem.

I then tested it with a registered user account but had no problems.
Admin? Weird.
Do you get such error from a mod/smod account?
And when exactly do you get an error - when you use quick reply to submit your post or when you click "go advanced"? Or maybe when you submit the advanced form?

akanevsky 10-20-2005 10:06 PM

Unfortunately, I am not able to recreate your error on my board. Make sure you did all the steps corectly.

theArchitect 10-21-2005 12:09 AM

Quote:

Originally Posted by Dark Visor
Admin? Weird.
Do you get such error from a mod/smod account?
And when exactly do you get an error - when you use quick reply to submit your post or when you click "go advanced"? Or maybe when you submit the advanced form?

I can't explain it either as the mod works fine for Moderators and SuperModerators. It is only Admins and SAdmin that it fails on.

As for the possibility of me installing it correctly, I think I did, but would incorrectly doing any of the template changes cause this?

akanevsky 10-21-2005 12:10 AM

Yes. For example if you add $adv_editform above the <form...> tag, you would get such an error. Make sure you add it under.

theArchitect 10-21-2005 12:18 AM

Quote:

Originally Posted by Dark Visor
Yes. For example if you add $adv_editform above the <form...> tag, you would get such an error. Make sure you add it under.

Thanks. I will look into this when I get home tonight.

Many thanks for your time.


All times are GMT. The time now is 06:35 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.02162 seconds
  • Memory Usage 1,876KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (1)bbcode_html_printable
  • (9)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete