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)

Paul M 04-01-2006 12:00 PM

I like this hack, but it broke my 'reported post creates new thread' for staff members - and the same for GARS, so I've applied a small fix to my copy of the hack.

In the AEO 'init_startup' hook ;

Find ;

PHP Code:

    global $vbulletin

Add below it ;

PHP Code:

    // Bypass Options // 
    // By Paul M - Because some mods choke on AEO // 
    
$bypass_aeo false
    if (
THIS_SCRIPT == 'report'$bypass_aeo true
    if (
is_object($vbulletin->gars)) $bypass_aeo true

    if (
$bypass_aeo) { 
        
$vbulletin->userinfo['editlevel'] = EDITLEVEL_AUTHOR
        return 
EDITLEVEL_AUTHOR
    } 
    
// End of bypass options // 

I've also added a 'cache_templates' hook ;

PHP Code:

$globaltemplates[] = 'adv_editform'

:)

akanevsky 04-07-2006 10:44 PM

Quote:

Originally Posted by hotwheels
I had to uninstall this hack for now...........Not sure what happened, but when i would start a new thread, just named it test and wrote tester in the message section, it used 50 queries to show the thread..........normally on my site it is only 12 queries.

It is a kewl hack though.............thanks for sharing it with us.

I don't know what happened either, but I can guarantee that this hack is not the cause of 50 queries.

Paul M 04-07-2006 11:30 PM

For some reason, since installing this, the owner of some threads seems to get changed, it's only threads that a mod/admin has posted in, and they become the owner (also, only the thread record is changed, not the first post). There is no pattern I can see (yet), and it's only about 1 a day so it's not a major problem. I'm curious more than worried atm, not really had any time to investigate what might cause this yet. :confused:

akanevsky 04-07-2006 11:34 PM

Ok, please keep me updated.

Paul M 04-08-2006 12:00 AM

Okay - if an administrator edits a post (full edit, not ajax) then when the edit is saved, the thread record gets altered - changing the thread starter to the member whose post got edited.

e.g. ;

Member A creates a new thread - in the forum thread listing they are shown as the thread creator and last poster.

Member B now posts in that thread - Member A is still the creator, Member B is the last Poster.

An administrator now edits Member B's post (full edit, not ajax) and saves it.

Now, Member B is shown as the thread creator, and the last poster.

If you view the thread, the first post is still Member A

akanevsky 04-08-2006 12:06 AM

Okay, thanks. I'll look into it.

Deska 04-08-2006 02:01 PM

Cool hack, but I got:
Quote:

Uncached templates: adv_editform (1)
I saw Paul post above but how to add it?
Thank's...

akanevsky 04-08-2006 02:24 PM

Plugin System->Add Plugin

Deska 04-08-2006 02:33 PM

Other feature request:
- Enable/Disable on selected forum

Brown23 04-08-2006 11:01 PM

Fantastic hack. Will install.

bashy 04-09-2006 05:14 PM

Hi

I did try this but as it conflicted with the GARS system i had to uninstall...
Bloody shame mind as its a great hack :)

akanevsky 04-09-2006 05:16 PM

This hack does not conflict with anything. Other hacks conflict with it. :)

Also, about the 40 queries or whatever: I just realized what was causing it.
These are the editlevels that are calculated for each post (which is done for the purpose of hiding the edit button on uneditable posts). Right now, the way to avoid too many queries is to have less posts per page. Later, I'll fix the problem by removing the calculation (which will cause a print_no_permission() to appear) upon an attempt to edit an uneditable post, but that's better than queries.

Paul M 04-09-2006 05:27 PM

Quote:

Originally Posted by Psionic Vision
This hack does not conflict with anything. Other hacks conflict with it. :)

Well that's one view - but it will conflict with/break anything that uses the standard vb build new post function, so you may be somewhat alone in that slightly tinted view of things :p However, I posted a fix for GARS (which can be used for other hacks as well) on the previous page (post #201) - people really should read before posting :)

akanevsky 04-09-2006 05:29 PM

No, it's not a view.. it's a fact.
If I make a hack in a way that ensures that it would not conflict with other hacks, other hacks can still be done in a way that will conflict with any other hack. Here is a simple example:

My hack works, but someone else wrote a hack that contains an "exit;" statement at "global_start". My hack would not work with such hack, obviously. But is it my fault?

Paul M 04-09-2006 05:41 PM

Quote:

Originally Posted by Psionic Vision
No, it's not a view.. it's a fact.

Whatever. I'm sure people will make up their own minds what conflicts with what. Feel free to ask for my fix to be removed if it bothers you. :)

akanevsky 04-09-2006 05:45 PM

Of course they will :) But that does not change anything.

akanevsky 04-09-2006 05:57 PM

<font size="3">NEW RELEASE: 2.0.1</font>

To upgrade, simply overwrite the product XML.

eNforce 04-09-2006 06:02 PM

was this problem fixed in the new release?

akanevsky 04-09-2006 06:59 PM

Yes.

Gizmo5h1t3 04-09-2006 06:59 PM

Quote:

Originally Posted by eNforce
was this problem fixed in the new release?

dunno if wotever that was, was fixed, but after overwriting the xml, my boardis now completely borked...and i cant get into my admin cp either to change it...

ffs

akanevsky 04-09-2006 07:03 PM

Do you get any error messages?

EDIT: Use this http://www.vbulletin.com/forum/showthread.php?t=148082 to disable hooks, then re-download and overwrite again.

Paul M 04-09-2006 07:06 PM

Quote:

Originally Posted by Psionic Vision
Yes.

Sure ? It still does the same here, and the only changes I can see are one hook dropped, and the template caching.

akanevsky 04-09-2006 07:06 PM

Are you sure you have downloaded a fresh version? Because it has another minor change in the editpost_update_thread hook.

Paul M 04-09-2006 07:18 PM

I downloaded it when you first posted the update, I take it from that reply that you've updated again since then - I'll get another copy. :)

akanevsky 04-09-2006 07:27 PM

Yes, please do.

Paul M 04-09-2006 07:31 PM

Done, tested, (and yes - fixed). :D

Gizmo5h1t3 04-09-2006 07:43 PM

seems something else must be conflicting with it on my board......version 2.0.0 works fine, but the 2.0.1 version totally borks things up.
btw...the added code into global.php to disable hooks works fine......thxs for the tip

akanevsky 04-09-2006 07:45 PM

Can you be more specific about how "2.0.1 borks things up"?

Gizmo5h1t3 04-09-2006 07:48 PM

sorry m8...lol

it gave a parse error at the top of my index page....something to do with global.php, as ive now fixed it, i cant tell you what the exact error weas....

also, it totally locked me out of the admin cp...giving me the error about cookies, and the header???

sorry i cant be more specific, but as i said, i got it fixed now......uninstalled it, and re installed 2.0.0

akanevsky 04-09-2006 07:54 PM

Are you sure that you have downloaded a fresh copy of 2.0.1 after this post?
https://vborg.vbsupport.ru/showpost....&postcount=223

Because I've updated the package once more after I announced about the update.

MJM 04-10-2006 06:00 AM

Quote:

Originally Posted by the Sandman
Any chance you could add an option for Administrators to remove the "Last edited by" notation from a post if it happens to have one?

This would be very cool!
I like to remove users - edited by- if irrelevant.
It'd be a great time saver, compared to ...
AdminCP > Maintenance > Execute SQL Query > Paste ...
DELETE FROM editlog WHERE postid = 3389 > Continue ...

Mark :)

akanevsky 04-10-2006 10:56 AM

Ok. :)

Deska 04-12-2006 01:09 AM

How to enable it on GARS?
I already put $adv_editform code in GARS template but not shown, btw I use Paul code hack also.

Thank's...

akanevsky 04-12-2006 11:28 AM

I don't know what GARS is, so I cannot help you on the matter.

Deska 04-12-2006 09:59 PM

Quote:

Originally Posted by Psionic Vision
I don't know what GARS is, so I cannot help you on the matter.

GARS: Geek Article and Review System
Released here: https://vborg.vbsupport.ru/showthread.php?t=108514

Thank's for any help :)

akanevsky 04-12-2006 10:09 PM

Ok, now, I am not providing integration with any 3rd party addons.

By the way, if you have the last version of adv.editing options installed, you don't need paul's global[] hook anymore.

Deska 04-12-2006 10:50 PM

It's work after I remove Paul code :)
Thank's Psionic Vision

Paul M 04-12-2006 11:12 PM

Quote:

Originally Posted by Psionic Vision
By the way, if you have the last version of adv.editing options installed, you don't need paul's global[] hook anymore.

I assume this is referring to the template cache, as GARS and Reported Post creates New Thread will not work without the 'bypass' for them.

Deska 04-13-2006 02:36 AM

Hi Paul,

I'm not try newthread yet, but edit thread in GARS is work.

Paul M 04-13-2006 03:37 AM

I'm referring to creating new threads. :)


All times are GMT. The time now is 02:01 PM.

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.01698 seconds
  • Memory Usage 1,823KB
  • 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
  • (3)bbcode_php_printable
  • (9)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)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