vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   Advanced Editing Options For Mods & Admins (https://vborg.vbsupport.ru/showthread.php?t=61412)

djohn 03-07-2004 01:47 PM

The problem is that i have other hacks installed that modified editpost.php :(
have the same problem as KirbyDE, the post info gets screwed up if i stop editinf a post, yet still i cannot apply the update

Boofo 03-07-2004 07:37 PM

Just change what is between these two lines in the editpost and that will include the fix. ;)

PHP Code:

// ################### Set up values for Xenon's advanced edit modification ##### 

and

PHP Code:

// ################### Set up values for Xenon's advanced edit modification ##### 

Don't forget to dd the second piece of code for the editpost. Stefan has fixed the code and separated it into 2 pieces of code. The second one is new.

Boofo 03-07-2004 08:04 PM

It works great, Stefan, except for one small thing. If I put a phoney name in (or misspell a user's name), it will show guest like it is supposed to, but it will also show that phony or mispelled name above the word Guest. That shouldn't be in there, right? ;)

Xenon 03-07-2004 09:47 PM

Yes, it should work that way.
Guest is the usertitle, so if your username doesn't exists, it will set the post's userid to 0 and the Guest's username to the one you entered

Boofo 03-07-2004 09:53 PM

Ah, ok, Then all is well once again in the Stefan code. ;)

I am curious, though, why did you split the code this time instead of doing it all together? ;)

Xenon 03-07-2004 10:00 PM

because of the preview.
If you click on submit changes but have an error in your new post (like too many images or such) you will get to the previewpage as well. but you cannot know this before the actual updatesection has been running.

so it's not possible anymore to keep it in one block, if you want the preview to work

djohn 03-10-2004 06:46 PM

Updated just the lines in editpost.php
I make a topic, then view it, press edit, change something, and then press preview. Then I press save, and there we go, everything gets screwed up again... :(
Have i missed something out in updating?

Boofo 03-10-2004 07:43 PM

Quote:

Originally Posted by Xenon
because of the preview.
If you click on submit changes but have an error in your new post (like too many images or such) you will get to the previewpage as well. but you cannot know this before the actual updatesection has been running.

so it's not possible anymore to keep it in one block, if you want the preview to work

Ah, yes, but the code I sent you was in the same block and it worked fine. ;)

Xenon 03-10-2004 08:25 PM

@djohn: the editpost.php changes should be enough.
it is working fine for me.

@Bob: you haven't tested the code good enough :)
if you have an maximum images limit you will see what i meant :)

TheComputerGuy 03-21-2004 11:50 AM

Works like a dream in Gold!

b00tsauce 03-23-2004 08:45 PM

This is one AWESOME hack. I sooooo need this for archiving my old news and stuff.

Boofo 03-23-2004 09:34 PM

Quote:

Originally Posted by Xenon
@Bob: you haven't tested the code good enough :)
if you have an maximum images limit you will see what i meant :)

Do you guys have that aet here? If you do, what is it set at? What would be a good round number to set it at? Just curious. ;)

And you are probably right on the code. We didn't test it for image limits, at least the messages we tested it on didn't give us the too many images error. But the rest of it worked fine. ;)

Xenon 03-25-2004 09:55 PM

yeah the rest was fine, but if i fix something, it should be fixed as well as possible ;)

as for image limit: hmm, it's 100 i think.
no real limit, it was just set up to prevent an old vb2 bug :)

Boofo 03-25-2004 10:01 PM

Thank you, sir. ;)

I never know what to set those kinds of things at. I had it set at 10. ;)

neocorteqz 03-25-2004 10:39 PM

I don't see this in editpost.php
Code:

// ############################### start permissions checking ###############################
if ($_REQUEST['do'] == 'editpost')
{

I do however see this

Code:

// ############################### start edit post ###############################
if ($_REQUEST['do'] == 'editpost')
{

I'm using vB3.0.0 (Gold)

Xenon 03-25-2004 10:46 PM

seems the comments were wrong in the old vb3 versions.

just refere to the request line, it's unique so, you can make the modifications on the place you found :)

the Sandman 04-20-2004 04:22 PM

I installed the hack per the instructions and everything went fine. I did need to add my table prefix. When I try to use the advanced editing options, however, I get:
Code:

mysql error: Unknown table 'user' in field list
What did I do wrong? :(

Xenon 04-20-2004 04:25 PM

oops, sorry that was my fault.

find that code:

PHP Code:

            $checkuser $DB_site->query_first("
                SELECT user.userid
                FROM " 
TABLE_PREFIX "user
                WHERE username = '
$newpost[username]'
            "
); 

and remove the user. in front of userid then it should work :)

Boofo 04-20-2004 04:28 PM

Quote:

Originally Posted by Xenon
oops, sorry that was my fault.

find that code:

PHP Code:

            $checkuser $DB_site->query_first("
                SELECT user.userid
                FROM " 
TABLE_PREFIX "user
                WHERE username = '
$newpost[username]'
            "
); 

and remove the user. in front of userid then it should work :)

Is that because he is using a table prefix? Cause it has always worked fine for me and I don't use a prefix. Or do we need to change it, too?

Xenon 04-20-2004 04:31 PM

it's just because of his table_prefix

the Sandman 04-20-2004 04:40 PM

Thanks much for the super quick response - that seems to have fixed it! Sweet hack! :D

the Sandman 04-20-2004 04:42 PM

Sorry - one more question. How would you restrict the Advanced Editing Options to Admins only?

Xenon 04-20-2004 09:38 PM

very easy as well :)

you just have to replace these appearances:
PHP Code:

$bbuserinfo['editlevel'] > $editlevel['author'

with
PHP Code:

$bbuserinfo['editlevel'] == $editlevel['admin'

not tested, but should do the trick :)

the Sandman 04-20-2004 11:37 PM

Thanks Xenon - now it's perfect! :D

Xenon 04-21-2004 09:08 AM

:)

you're welcome

Natch 04-23-2004 03:53 PM

We've had some issues with this hack:

It seems for my SuperMods that when they are editing a post, prior to having used the ModCP (having logged in the second time) they cause the post edited to lose all timestamp and Poster info - timestamp is reset to the unix Epoch, and the poster is reset to Guest - this causes the thread to seem like it's been started by a Guest, with a post that's replying to posts below it ...

Any thoughts why this might happen ?

Natch 04-24-2004 12:17 AM

Quote:

Originally Posted by One of my SuperMods
Just noticed what happens when i edit my own post and not being logged in as a moderator.
If i edit the post before the timelimit of aprox 1 min, the timestamp is ok.
But if i wait longer or edit the post "second time around" the timestamp resets and shows 0-0-1970.
Forgetting to change it will cause the error of moving the post to first place.

I hope this helps ...

Xenon 04-24-2004 10:08 AM

hmm, very wierd...

i cannot reproduce it, and did not get such reports before.

I'll check it out a bit more, maybe i can reproduce it somehow...

Natch 04-24-2004 10:39 AM

Is it possible that it's linked to either or both of the "Doublepost check" hack and/or the "Editing Heirarchy" hack - or a combination of them ?

Xenon 04-24-2004 10:42 AM

Hmm, maybe, i already got reports the the Message editing hierachy hack doesn't work together with this hack.

I will have to check this out, it's a bit wierd, as i don't see why they shouldn'T work together, but maybe i have overseen something..

Xenon 04-24-2004 11:31 AM

Ok, i did a lot of test with these two hacks now, and everything was working perfectly.
I also did a look on the code itself, and it is imposible to change the dateline without admin permission, so this might be a different bug.

I suggest you upgrade to vb3.0.1 and install the latest version of this hack.

I've added a little bit of code to this hack, nothing important, just to update the threadinfos when the admin changed a post's dateline

the Sandman 04-24-2004 12:04 PM

I reinstalled this hack to get the update, and then reinstalled the Message Editing Hierarchy hack. Everything works fine until I try to edit Moderator posts with my SuperModerator testuser - No Permission. :ermm:

Xenon 04-24-2004 12:16 PM

I really have no idea, why you get a no permission error.
i did exactly the same steps and everything is working absolutely fine.

you can send me your editpost.php file to xenon@vbulletin.org
i will take a look at it.

the Sandman 04-24-2004 12:17 PM

Also, when you install both hacks, you end up with added code from both in the same place in editpost.php... after
Code:

// get permissions info
%4$s permsgetter_ = 'edit post';
$forumperms = fetch_permissions($threadinfo['forumid']);

$foruminfo = fetch_foruminfo($threadinfo['forumid'], false);

// check if there is a forum password and if so, ensure the user has it set
verify_forum_password($foruminfo['forumid'], $foruminfo['password']);

and before
Code:

// ############################### start permissions checking ###############################
if ( %4$s REQUEST['do'] == 'deletepost')
{

Does it matter which hack code goes first in this spot?

Xenon 04-24-2004 12:20 PM

erm, regarding that post, it seems your editor is corrupting files
%4$s REQUEST['do']
should be $_REQUEST

the Sandman 04-24-2004 01:25 PM

Yeah, I see that. It happened when I made the post though - the files are not corrupt.

I *think* I may have figured this out. My Moderator group has the permission "Can Moderate All Forums (is Super Moderator)" set to yes - so in effect they are equal to SuperModerators (id:5) and so by design can't be edited by them.

Sorry to take up your time with this oversight. :o Thanks for all of your help!

Xenon 04-24-2004 03:30 PM

:)

no prob :)
you're welcome

SaN-DeeP 04-24-2004 10:11 PM

[high]* SaN-DeeP installed
[/high]

thnx for nice hack XENON :)

Sandy...

Majik? 05-02-2004 09:50 PM

Quote:

Originally Posted by Natch
We've had some issues with this hack:

It seems for my SuperMods that when they are editing a post, prior to having used the ModCP (having logged in the second time) they cause the post edited to lose all timestamp and Poster info - timestamp is reset to the unix Epoch, and the poster is reset to Guest - this causes the thread to seem like it's been started by a Guest, with a post that's replying to posts below it ...

Any thoughts why this might happen ?

I noticed this as well, but never really noticed how it hadn't started happening unti lafter installing this hack. We would end up with posts that appeared to be started by guests (even though guests can't read a thread, let alone post one). That and it would have the poster's one minute, but then after editing it.. Have it being as mad eby a guest.

Xenon 05-03-2004 04:59 PM

hmm, very wierd.

i cannot reproduce that.

Maybe a bug somewhere else, which is affecting my hack as well. (aka permission changes where there shouldn'T be any)


All times are GMT. The time now is 09:57 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.01390 seconds
  • Memory Usage 1,829KB
  • 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
  • (5)bbcode_code_printable
  • (6)bbcode_php_printable
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)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