PDA

View Full Version : Advanced Editing Options For Mods & Admins


Xenon
02-09-2004, 10:00 PM
Ok, another one of my vb2 Hacks has been ported over and Optimized ;)

This hack allows mods and Admins to restrict the edit permissions on a levelbased system.
Admins can disallow everyone to edit that post, while mods just can restrict editing by the author. Supermods can restrict editing by normal moderators as well.

Admins also have additional features:
- Editing the Timestamp of that Post
- Editing the Author
- Editing the IP

Nothing more to explain i think, look at the screenies if you need more infos.

Please don't forget to click install :)

Zachery
02-10-2004, 10:07 PM
Very nice :) i have the perfect Site for this one (new forum with uber spammers of younge ages ;))

TheComputerGuy
02-11-2004, 11:14 AM
Xenon you so rock!

FleaBag
02-11-2004, 01:21 PM
Have always kept an eye out for one of these, should come in handy for allowing users to edit link threads e.t.c. Thanks!

gmarik
02-11-2004, 06:19 PM
Nice and easy.

DuffMan
02-11-2004, 07:49 PM
Looks great! I'll definitely install once gold gomes out.

Schorsch
02-12-2004, 03:28 PM
thanks, but
I'm missing the phrase system :(

Xenon
02-12-2004, 07:15 PM
i've planned to add phrases within the next release :)

Gaffer
02-16-2004, 12:13 PM
i've been trying to get this to work on RC4 for the last 2 hours and i can't get it to work....

Xenon
02-16-2004, 12:20 PM
be sure to follow the instructions correctly.
the Mod was written for RC4, so it surely does work with it

Gaffer
02-17-2004, 11:25 AM
ok i might be missing something really small.... i'll give it another go...

Edit - *slaps Self*.....

it works i put the main part of the code in editpost.php after not before.... Cool works *hits Install*

Xenon
02-17-2004, 06:02 PM
:)

glad you like it :)

Face Off Mobile
02-18-2004, 08:03 PM
trying to install this and every time i try to run the query i get the following

Error

SQL-query :

ALTER TABLE post ADD editlevel TINYINT( 3 ) DEFAULT '0' NOT NULL

MySQL said:


Table 'faceoffm_vbulletdb.post' doesn't exist
Back

Xenon
02-18-2004, 11:32 PM
do you have a tableprefix set up?
if yes, you of course have to add that prefix to that query as well.

if yopu don't have a table prefix, you have a serious problem, as your post table doesn't exist.

all in all, not a problem with the modification itself

Chris M
02-23-2004, 06:04 PM
Xenon: How could I integrate this with the other Editing Hierarchy Hack...

What I mean, is that the hierarchy's from your other take presedence over these ones, unless the post is edited...

So basically, with the other hack, a Super Mod cannot edit an Admins post with the default Hierarchy - You could alter the hierarchy with this hack, which would mean you could set it so that Super Mods upwards can edit it ;)

Could this be done? :)

Satan

Xenon
02-25-2004, 08:15 PM
Well as you know, everything can be done.

but i don't have any time to do something like that now.
I'm sure you'll find out yourself how to get that, it isn't really hard from what i remeber :)

Chris M
02-25-2004, 08:24 PM
Unfortunately I don't have the time to investigate :(

Maybe I will find time sometime in the near future :)

Satan

Boofo
02-25-2004, 09:16 PM
Well, if either one of you 2 extremely busy people find the time to do it, I would appreciate it. I just wish I was a busy as you 2 claim to be. ;)

Chris M
02-26-2004, 10:54 AM
If I find the time, I'll let you know Bob :)

Satan

TeH Z0mB1E
02-26-2004, 12:56 PM
im getting this error whenever i try and edit posts now.

Parse error: parse error in /home/alienfi/public_html/forums/editpost.php on line 134

please help

Boofo
02-26-2004, 02:20 PM
What is the code on that line?

TeH Z0mB1E
02-26-2004, 03:52 PM
$bbuserinfo['editlevel'] = $editlevel['author'];

thats it.

Boofo
02-26-2004, 04:05 PM
This is what it should look like right before and after that line.

else
{
// someone else is trying to edit this post, permission check will be set up later by originalvb
// maybe it's a mod just having delete permissions..
$bbuserinfo['editlevel'] = $editlevel['author'];
}

TeH Z0mB1E
02-26-2004, 05:03 PM
// someone else is trying to edit this post, permission check will be set up later by

originalvb

// maybe it's a mod just having delete permissions..
$bbuserinfo['editlevel'] = $editlevel['author'];
}

// now do permissioncheck
if ($postinfo['editlevel'] > $bbuserinfo['editlevel'])
{
print_no_permission();
}



thats what mine looks like.

Chris M
02-26-2004, 05:18 PM
Change:

// someone else is trying to edit this post, permission check will be set up later by

originalvb

// maybe it's a mod just having delete permissions..
$bbuserinfo['editlevel'] = $editlevel['author'];
}
to:
// someone else is trying to edit this post, permission check will be set up later by
// maybe it's a mod just having delete permissions..
$bbuserinfo['editlevel'] = $editlevel['author'];
}
:)

Satan

Boofo
02-26-2004, 05:20 PM
Thanks, Chris. ;)

TeH Z0mB1E
02-26-2004, 05:27 PM
done this and the error has changed to

Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or `T_NUM_STRING' in /home/alienfi/public_html/forums/editpost.php(161) : eval()'d code on line 48

Boofo
02-26-2004, 05:36 PM
Ok, then take the code that is in there right now, and re-add it from the hack install file. That should fix any mistake you might have made the first time. ;)

TeH Z0mB1E
02-26-2004, 06:03 PM
Ok, then take the code that is in there right now, and re-add it from the hack install file. That should fix any mistake you might have made the first time. ;)
you mean just install it again?

Boofo
02-26-2004, 06:05 PM
Yes. Just copy over the code already there. ;)

TeH Z0mB1E
02-26-2004, 06:18 PM
Yes. Just copy over the code already there. ;)
took a fresh edit.php and editing it from the install file, followed the instructions very carefully and am still getting :

Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or `T_NUM_STRING' in /home/alienfi/public_html/forums/editpost.php(158) : eval()'d code on line 48

line 48 is require_once('./includes/functions_editor.php');

Xenon
02-27-2004, 07:44 PM
regarding your posts before, it seems either your downloaded install file was corrupted during the download, or your upload corrupts the files.

redownload the install file, then use an original editpost.php and apply the hack then.

there is nothing wrong with the hack itself.

@Bob: hmm, no problem, i allow you to do my tests so you can become that busy as well ;)

Boofo
02-27-2004, 11:36 PM
I'll whip those tests out for you. Bring 'em on! ;)

Andreas
03-04-2004, 04:38 AM
@Xenon
I think this hack has a major bug:
The advanced editing options do not show up on preview.
So if you first click preview and then submit the values will be empty ...

Xenon
03-04-2004, 10:56 PM
Damn preview....

yeah you are right.
I've uploaded a bugfixed version. it's jsut a copy paste, as a part of the script has to be on another part in editpost.php

Andreas
03-05-2004, 12:08 AM
OK. It does show up on preview now, but it still doesn't work correctly.

Example:
I click edit, change the username, click preview.
Now it still displays the original username (it should display the new one).
I decide to stop editing, but when I visit the thread again the username has been changed (it should only be changend when submitting).

Furthermore, your template code isn't fully XHTML-compliant: it should be selected="selected" instead of just selected.

Xenon
03-06-2004, 11:56 AM
thx, for finding out :)

i'll do some changes at that WE, but i'm currently very very busy...

Xenon
03-07-2004, 12:48 PM
ok, i've uploaded a new version again.
it should be working now without problems.

djohn
03-07-2004, 01:09 PM
How do i update it from v. 1.00?

regards

Xenon
03-07-2004, 01:12 PM
just restart with a unmodified editpost.php and apply it again.
as the preview functions could be decided in do update, i have had to change the script too much to provide easy upgrade txts.

the template should be overwritten as well

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. ;)

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

and

// ################### 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
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
@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

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


I do however see this


// ############################### 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: 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:

$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
oops, sorry that was my fault.

find that 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:
$bbuserinfo['editlevel'] > $editlevel['author']

with $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
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 // 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 // ############################### 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
* SaN-DeeP installed

thnx for nice hack XENON :)

Sandy...

Majik?
05-02-2004, 09:50 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 ?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)

Ocean
05-04-2004, 09:04 PM
Hi, Xenon!

I am using your Editing Hierarchy Hack (quite happily, I might add) , and as such - I have no need or desire to install the Edit Permissions portion of this particular hack.


However, I do need the other features - specifically, the ability to edit the Author, Timestamp, IP, etc...


What portions would I need to keep/remove from your Instructions in order to do this?
Thanks! :)

Xenon
05-05-2004, 03:19 PM
well, you have to remove the selection menue from the additional template, and then in editpost.php all you have to do is to change $bbuserinfo['editlevel'] > $editlevel['author']
into
$bbuserinfo['editlevel'] == $editlevel['admin']

that should work i think :)

Ocean
05-05-2004, 09:23 PM
Hmm... well, since this will only be used for Admins, I think I can trim out quite a bit more in order to keep things efficient.

For example, I think I can remove the entire Permission Checking routines (in addition to the Database Modification), by simply enclosing the Template additions like so:




<if condition="is_member_of($bbuserinfo,6)">

<!-- code goes here -->

</if>




Yes?

If so, than I should be able to remove a good section of this hack.


I have made an absolutely amateurish attempt at doing so. If you happen to have the time, and are in the mood to do so - I would be grateful if you could look over my revised version, and tell me just how badly I screwed up. <grin>

Xenon
05-06-2004, 12:10 PM
erm, you shouldn't hardcode the usergroupids, that's why i used the editlevel things.

as for the rest, there is no need to struck out much, the better efficiency is not remarkable, especially not for the prize to work on that more time than really needed to achieve the goal ;)

Ocean
05-06-2004, 12:54 PM
erm, you shouldn't hardcode the usergroupids, that's why i used the editlevel things.

as for the rest, there is no need to struck out much, the better efficiency is not remarkable, especially not for the prize to work on that more time than really needed to achieve the goal ;)

Well, I have several Admin-only hacks that are access controlled in the same way, so adding this one really is not a problem. :)

So, keeping that in mind - did I actually alter the original code correctly? Or did you notice something that I missed?


(p.s. thanks for taking any time at all to look at it! ) :)

Xenon
05-06-2004, 04:49 PM
well it seems you trimmed way too much, as there is an ending } but not an opening one....

as said, just do the changes i suggested and you will be fine.

Ocean
05-09-2004, 02:29 PM
well it seems you trimmed way too much, as there is an ending } but not an opening one....

as said, just do the changes i suggested and you will be fine.

Well, I guess I'm just uncomfortable adding what, for me, is an unnecessary subsystem. I took out the extra "}" (oops!), but I still ended up with problems. (If I went in to edit a message, but didn't change anything and didn't hit Submit, all the Advanced Info ended up getting blanked out anyway. No User, no IP, marked as being posted in 1965, etc...).

So, clearly, I must have missed something. I guess I'll just have to spend some more time on it when I get the chance. :)


Great hack, though! I can't wait until I get this ready for use. :) (Yeah, I know - I'm making this hard on myself - I can't help it. :nervous: )

Xenon
05-09-2004, 06:19 PM
*gg*

well i wish you good luck then :)
Your way will be very hard, but then on the other hand you will know each line of the code afterwards, good for upgrades :p

Ocean
05-09-2004, 08:39 PM
*gg*

well i wish you good luck then :)
Your way will be very hard, but then on the other hand you will know each line of the code afterwards, good for upgrades :p

Very true. :)


However, if, 20 or 30 years from now, you should happen to choose to ruin my "fun" by telling me what I missed - I just want you to know that you shouldn't feel too bad about it - I won't hold it against you. :) :) :)

Xenon
05-09-2004, 08:44 PM
yeah, in 20 or 30 years, with vb10 ;)

MJM
05-14-2004, 08:48 AM
Thanks Xenon! (and Sandman for referring me to this Thread at vB.com)
This will be a tremendous help to change usernames of posts that I moved over from our yahoogroups.

Not sure yet whether I will need to update user post counts etc after making the changes...

Is it important to change the username IP too when I make the changes?
It just means an extra chore to find the user IP as I have a lot of posts needing username changes.
I want the author to be able to edit content of posts.

Mark

007
05-15-2004, 12:57 AM
This is useful, but how about adding a feature to edit the thread title? As VB is now, only the post title can be edited after x time. It would be nice to be able to edit the actual thread title without having to open phpMyAdmin..

the Sandman
05-15-2004, 01:31 AM
This is useful, but how about adding a feature to edit the thread title? As VB is now, only the post title can be edited after x time. It would be nice to be able to edit the actual thread title without having to open phpMyAdmin..You can edit the Thread title any time you want - just use Thread Tools > Edit Thread > Perform Action > Edit The Title Field > Save Changes

Xenon
05-15-2004, 03:22 PM
@006: sandman already said, the threadtitle is editable in a normal vb already

@MJM: nope, it's not needed to change the IP.
The username is the important field, as a username change changes the userid of that specific post, and that will lead to that the new user can edit the post instead of the old one :)

Updating postcounts, would be needed, correct, thats something i will change in the next version :)

SemperFidelis
05-18-2004, 01:44 PM
Great job once again Xenon
:)

Quick question tho, as posted here : Quick Edit Hack (https://vborg.vbsupport.ru/showthread.php?t=59629&page=3)

Ok
Im using :
- the updated set of instructions provided by Slave (https://vborg.vbsupport.ru/show...63&postcount=95)
- with the slight revision to that provided by poetic (https://vborg.vbsupport.ru/show...5&postcount=103)
In conjunction with :
Advanced Editing Options For Mods & Admins (https://vborg.vbsupport.ru/showthread.php?t=61412)

And all works fine
Except one thing

Whenever I use the quick edit, it is dropping the details of the original poster
ie
ends up being posted as guest

To get around this, I have to use the preview option, re-enter the original poster, then submit
And as you can gather, thats hardly a quick edit

Has anyone got these 2 fine hacks to play nicely together as I would really like to keep both.

TIA

Any chance you could have a look into it ?

Thanks
:)

Xenon
05-18-2004, 03:40 PM
well, that's a problem of the quick edit hack.

you have to add the additional fields from my hack into the quick edit hack.

or another way would be to post another variable when using quickedit, and then add an if condition, if this var is set, do nothing of the advanced features.

I'm sure you can figure that out :)

SemperFidelis
05-18-2004, 03:48 PM
No not reallly
Any chance of bit more assistance ?

Xenon
05-18-2004, 03:52 PM
nah, not really, as i don't know the code of the quick edit hack, and i do not have the time to install it on a testboard to find it out..

maybe someone who has installed that hack as well can assist?

SemperFidelis
05-18-2004, 11:31 PM
No worries
Thanks anyway
:)

Has anyone manged to get both these hacks working together ?

sketch42
06-08-2004, 09:39 PM
well, that's a problem of the quick edit hack.

you have to add the additional fields from my hack into the quick edit hack.

or another way would be to post another variable when using quickedit, and then add an if condition, if this var is set, do nothing of the advanced features.

I'm sure you can figure that out :)
i dont see where it conflicts
- quick edit uses showthread php and functions showthread
advanced doesnt
-quickedit makes u create a new template called quickedit
and edit posbit/postbit legacy and the advanced hack doesnt
- so wheres the conflict?

plus there are no calls in the install to replace any text in advanced

i gotta step out for a bit but im gonna try and install both on a test board
im using the original quick edit in the first post with the added reason and delete fields
so if you want to try it again thats what im testing it on

this just doesnt make sense... ill update this post later tonight

Xenon
06-08-2004, 10:21 PM
well it conflicts, that the quickedit send to editpost.php as well, but doesn't fill the admin edit fields as well, so all those are considered as empty...

sketch42
06-08-2004, 11:52 PM
well it conflicts, that the quickedit send to editpost.php as well, but doesn't fill the admin edit fields as well, so all those are considered as empty...
but if the quick edit is disabled from being used by admin... since theres no need for it with this hack.... by applying this in the postbit/postbit_legacy
<if condition="THIS_SCRIPT=='showthread' and $bbuserinfo[usergroupid]!=5 and $bbuserinfo[usergroupid]!=6 and $bbuserinfo[usergroupid]!=7">
$quickedit
</if>

than there shouldnt be a problem no?? i mean since this hack is for admins and mods than there shouldnt be any problems with the two together no??(im probably just talkin outta my a$s :lick: )

sketch42
06-09-2004, 04:13 AM
this is for those that have the quick edit hack installed

ok i got it to work .... somewhat... i just need one more step

this is what i did so far....

i have this code in the showthread_quickedit
<span id="quickedit_$post[postid]">
<img src="$stylevar[imgdir_button]/quickedit_icon.gif" alt="Quick Edit" border="0" />
<script type="text/javascript"> vbmenu_register("quickedit_$post[postid]", true); </script>
</span>
<div class="vbmenu_popup" id="quickedit_$post[postid]_menu" style="display:none">
<form enctype="multipart/form-data" name="vbulletinform" style="display:inline;" action="editpost.php" method="post">
<input type="hidden" name="s" value="$session[sessionhash]" />
<input type="hidden" name="do" value="updatepost" />
<input type="hidden" name="p" value="$post[postid]" />
<input type="hidden" name="posthash" value="$posthash" />
<input type="hidden" name="poststarttime" value="$poststarttime" />
<input type="hidden" name="emailupdate" value="9999" />
<input type="hidden" name="disablesmilies" value="0" />
<input type="hidden" name="parseurl" value="1" id="cb_parseurl" />
<table class="tborder" cellpadding="6" cellspacing="1" border="0" width="100%" align="center">
<tr>
<td class="tcat" align="left">
<strong>$vbphrase[edit_post]</strong>
</td>
</tr>
<tbody>
<tr valign="top">
<td class="panelsurround" align="center">
<div class="panel">
<div align="left">
<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>
Advanced Editing Options
</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>This Form allows you to change advanced settings of this post</div>
</div>

<fieldset class="fieldset">
<legend>Advanced options</legend>
<div style="padding:$stylevar[formspacer]px">
<div>
<label for="sb_editable">
<select name="editable" id="sb_editable">
<option value="$editlevel[author]"<if condition="$postinfo['editlevel'] == $editlevel['author']"> selected="selected"</if>>
Author
</option>
<option value="$editlevel[mod]"<if condition="$postinfo['editlevel'] == $editlevel['mod']"> selected="selected"</if>>
Moderator
</option>
<if condition="$bbuserinfo['editlevel'] >= $editlevel['smod']">
<option value="$editlevel[smod]"<if condition="$postinfo['editlevel'] == $editlevel['smod']"> selected="selected"</if>>
Supermoderator
</option>
</if>
<if condition="$bbuserinfo['editlevel'] >= $editlevel['admin']">
<option value="$editlevel[admin]"<if condition="$postinfo['editlevel'] == $editlevel['admin']"> selected="selected"</if>>
Admin
</option>
</if>
</select>
or above can edit this post!
</label>
</div>

<!-- Specific Section for Admin -->
<if condition="$bbuserinfo['editlevel'] == $editlevel['admin']">
<div>
<label for="tb_dateline">
<input type="text" name="newday" value="$posttime[mday]" size="1" maxlength="2" id="tb_dateline_day" />.
<input type="text" name="newmonth" value="$posttime[mon]" size="1" maxlength="2" id="tb_dateline_month" />.
<input type="text" name="newyear" value="$posttime[year]" size="3" maxlength="4" id="tb_dateline_year" /> -
<input type="text" name="newhour" value="$posttime[hours]" size="1" maxlength="2" id="tb_dateline_day" />:
<input type="text" name="newminute" value="$posttime[minutes]" size="1" maxlength="2" id="tb_dateline_day" />
Date posted (d.m.Y - H:i)
</label>
</div>
<div>
<label for="tb_username">
<input type="text" name="newusername" value="$postinfo[username]" id="tb_username" /> Author of this post (if user doesn't exist, it will be set to a guest post)
</label>
</div>
<div>
<label for="tb_ipaddress">
<input type="text" name="newipaddress" value="$postinfo[ipaddress]" id="tb_ipaddress" /> IP Address
</label>
</div>
</if>
</div>
</fieldset>

</div>
</div>

</td>
</tr>
</tbody>
</table>
<br />
<div class="smallfont" style="margin-bottom:$stylevar[formspacer]px">
<div>$vbphrase[title]:</div>
<div><input type="text" class="bginput" name="title" value="$post[title]" size="60" maxlength="85" tabindex="1" /></div>
</div>
<div class="smallfont" style="margin-bottom:$stylevar[formspacer]px">
<div>$vbphrase[message]:</div>
<div><textarea name="message" class="bginput" style="width:433px; height:125px;" wrap="virtual" tabindex="1">$edittext</textarea></div>
</div>
</div>
</div>
<div style="margin-top:6px">
<input type="submit" class="button" name="sbutton" value="Save Changes" accesskey="s" tabindex="1" />
<input type="submit" class="button" name="preview" value="Preview Changes" accesskey="p" tabindex="1" />

<if condition="$bbuserinfo['signature'] != ''"><label for="cb_signature"><input type="checkbox" name="signature" value="1" id="cb_signature" tabindex="1" checked /><span class="smallfont">Signature</span></label></if>
</div>
</td>
</tr>
</tbody>
</table>
</form>
</div>

and i get (see thumbnail for details) the advanced edit screen in the quick edit but the fields in the advanced edit are blank... as well as the dropdown

im not sure what i have left to add... any suggestions?

Xenon
06-09-2004, 11:46 PM
well, to see the correct infos, they have to be prepared/parsed before.

so you better use a different way:

in MY hack find:
if ($_POST['do'] == 'updatepost' AND $bbuserinfo['editlevel'] > $editlevel['author'])

and replace with:
if ($_POST['quickedit'] != 'true' AND $_POST['do'] == 'updatepost' AND $bbuserinfo['editlevel'] > $editlevel['author'])

then in the quickedit formular add:
<input type="hidden" name="quickedit" value="true" />

using that way, there shouldn't be problems anymore.
but it means the special edit options can just be used in real edit, not quick edit :)

MJM
06-27-2004, 05:29 AM
This has been working great! Can't thank you enough.
Couple things....
If the day/month boxes could be a little bigger to show the 2 numbers...
They only show one number each, and when making date changes it's a bit of a pain.

Any way username changes can be made in calendar of event?

Thanks, thanks and thanks again,
Mark

Xenon
06-28-2004, 09:02 PM
hmm, they show two numbers for me.
seems to be browser related, or maybe font relatad.

just change the sizevalue in the template:
<input type="text" name="newday" value="$posttime[mday]" size="1" maxlength="2" id="tb_dateline_day" />.

hmm, would be a different hack for calendar events i fear ;)

MJM
06-30-2004, 03:58 PM
Using IO on a Mac, maybe thats why
...will pass this on to my partner
Thanks
Mark
No problems about the calendar/username change.

We now post calendar events under pseudonym `EventsDesk' and wanted to change our personal username entries, which we can by deleting, then re-entering info under new username, as the date of entry is irrelevant.

The only thing we can't do is change the name to another member username, but we'll just have the member re-enter the info.

ragintajin
07-07-2004, 09:31 AM
Anyone try installing this on 3.0.3 yet?

Xenon
07-07-2004, 02:35 PM
actually not, but it should work with 3.0.3 as well, there weren'T in deep changes in editpost.php

Slynderdale
07-08-2004, 03:46 AM
Nice hack, just wanted to mention that it installed fine on vBulletin 3.0.3.
Had a little problem with another hack but I managed to fix it. I fyou have the quick edit hack installed and tried to quick edit a post, all the options get reset like IP, userid and name, the date and so on.

If anyone else has this problem heres a quick fix, in the template "showthread_quickedit" find:

<form enctype="multipart/form-data" name="vbulletinform" style="display:inline;" action="editpost.php" method="post">


and add under it:

<input type="hidden" name="quickedit" value="true" />


Then find in editpost.php:

if ($_POST['do'] == 'updatepost' AND $bbuserinfo['editlevel'] > $editlevel['author'])


and change it to:

if ($_POST['do'] == 'updatepost' AND $bbuserinfo['editlevel'] > $editlevel['author'] AND !$_POST['quickedit'])


and that should solve that problem.

Also I notice a small problem with this hack, if you change the user of the post, the original poster count doesn't decrese and the new user post count doesn't increase so you would have to update the counters to get them accurate again. Other then that, its a good hack.

Natch
07-08-2004, 11:01 AM
Nice hack, just wanted to mention that it installed fine on vBulletin 3.0.3.
Had a little problem with another hack but I managed to fix it. I fyou have the quick edit hack installed and tried to quick edit a post, all the options get reset like IP, userid and name, the date and so on.

If anyone else has this problem heres a quick fix, in the template "showthread_quickedit" find:

<form enctype="multipart/form-data" name="vbulletinform" style="display:inline;" action="editpost.php" method="post">


and add under it:

<input type="hidden" name="quickedit" value="true" />


Then find in editpost.php:

if ($_POST['do'] == 'updatepost' AND $bbuserinfo['editlevel'] > $editlevel['author'])


and change it to:

if ($_POST['do'] == 'updatepost' AND $bbuserinfo['editlevel'] > $editlevel['author'] AND !$_POST['quickedit'])


and that should solve that problem.

Also I notice a small problem with this hack, if you change the user of the post, the original poster count doesn't decrese and the new user post count doesn't increase so you would have to update the counters to get them accurate again. Other then that, its a good hack.
Might this have some relation to the issue I was mentioning about the info being lost if SuperMods edit a post ?

Xenon
07-08-2004, 12:23 PM
@Sly: hmm, a lint to that (https://vborg.vbsupport.ru/showpost.php?p=521238&postcount=104) post

would have fit also ^^

As for the postcount, yes i know, will have to add that in my next update (when i find the time to add what i want to add ^^)

Slynderdale
07-08-2004, 09:18 PM
@Sly: hmm, a lint to that (https://vborg.vbsupport.ru/showpost.php?p=521238&postcount=104) post

would have fit also ^^

As for the postcount, yes i know, will have to add that in my next update (when i find the time to add what i want to add ^^) Didn't notice that post.

I made some changes to your hack that fixed up a couple things, one is corectly setting the users pos count and the other is updating the forum last poster and first poster info if you change the user.

After you install this hack, find:

// now do changes to thread, if logged in user is an admin and changed the dateline
if ($bbuserinfo['editlevel'] == $editlevel['admin'] AND
$postinfo['dateline'] != $newpost['dateline'])
{
require_once('./includes/functions_databuild.php');
build_thread_counters($postinfo['threadid']);
}


Replace it with:

//------------------------------------------------------------
if($postinfo['userid']!=$newpost['userid'] && $foruminfo['countposts'])
{
if ($postinfo['userid'] > 0)
{
$DB_site->query("
UPDATE " . TABLE_PREFIX . "user
SET posts=posts-1
WHERE userid = $postinfo[userid]
");
}
if ($newpost[userid] > 0)
{
$DB_site->query("
UPDATE " . TABLE_PREFIX . "user
SET posts=posts+1
WHERE userid = $newpost[userid]
");
}
}
//------------------------------------------------------------

// now do changes to thread, if logged in user is an admin and changed the dateline
if ($bbuserinfo['editlevel'] == $editlevel['admin'] AND
$postinfo['dateline'] != $newpost['dateline'] OR
$postinfo['userid']!=$newpost['userid'])
{
require_once('./includes/functions_databuild.php');
build_thread_counters($postinfo['threadid']);
}


Now in includes/function_datastore.php find:

// ###################### Start updatethreadcount #######################
function build_thread_counters($threadid)
{
global $DB_site, $threadcache;


and change it to:

// ###################### Start updatethreadcount #######################
function build_thread_counters($threadid)
{
global $DB_site, $threadcache, $vbphrase;


Now a little ways under that find:

$lastposter = iif(empty($lastposts['username']), $lastposts['postuser'], $lastposts['username']);


under it add:

$lastposter = iif(empty($lastposter),$vbphrase['guest'],$lastposter);


Now a little ways under that find:

$firstposter = iif(empty($firstposts['username']), $firstposts['postuser'], $firstposts['username']);


and under it add:

$firstposter = iif(empty($firstposter),$vbphrase['guest'],$firstposter);


Thats all, now the posts will show Guest instead of nothing when you enter in a blank field. Also it will now update the post count of those who you change the post to and from.

Xenon
07-08-2004, 11:34 PM
Thx for sharing your changes :)

i might add, that your code for the postcounts isn't correct 100%
if you have forums where post's aren't counted, then of course you would not have to change the postcount ;)

but i'm sure a lot can use this, until i can come up with the next version (which hopefully has all of that implemented and the special additions i want to have ;))

Slynderdale
07-10-2004, 04:45 AM
Thx for sharing your changes :)

i might add, that your code for the postcounts isn't correct 100%
if you have forums where post's aren't counted, then of course you would not have to change the postcount ;)

but i'm sure a lot can use this, until i can come up with the next version (which hopefully has all of that implemented and the special additions i want to have ;))
Thanks for bringing that to me attention, fixed it by adding:
&& $foruminfo['countposts']
To the If statement.

The only problem now is updating the user's usertitle if they gain/lose enough posts for a different one.

Xenon
07-10-2004, 09:33 AM
:)

now you see why i didn't add that things to the first version of my hack ;)

Casparian
08-31-2004, 02:53 PM
If you edit the date, does it bump the post up the list/to the top? Or is it just whats displayed when the post is viewed?

Xenon
08-31-2004, 04:42 PM
it does bump the post up/down the list (in linear mode)
in threaded mode it just changes the displayed time

Ocean
09-07-2004, 11:12 AM
Hi, Xenon! I was wondering if you had any ideas as to when you'll be releasing the next version of this hack? :)

Xenon
09-07-2004, 04:36 PM
unfortunatelly not.
I'm currently totally overworked with other things, but i will at some day.

I expect when i'm back at university *gg*

Ocean
09-07-2004, 08:44 PM
unfortunatelly not.
I'm currently totally overworked with other things, but i will at some day.

I expect when i'm back at university *gg*



Ah, well. I look forward to your next version, as I'm sure many others do as well. :)

neocorteqz
09-09-2004, 12:34 AM
Ah, well. I look forward to your next version, as I'm sure many others do as well. :)
Yep, this thing was one of my fav's in vB 2.x

ralphuk100
09-13-2004, 11:52 AM
Xenon: How could I integrate this with the other Editing Hierarchy Hack...

What I mean, is that the hierarchy's from your other take presedence over these ones, unless the post is edited...

So basically, with the other hack, a Super Mod cannot edit an Admins post with the default Hierarchy - You could alter the hierarchy with this hack, which would mean you could set it so that Super Mods upwards can edit it ;)

Could this be done? :)

Satan
Questions: 1) Where on earth is "install"?? and how do you hit it? And secondly, how come even normal users can see this advanced edit option?

ralphuk100
09-13-2004, 11:58 AM
Questions: 1) Where on earth is "install"?? and how do you hit it? And secondly, how come even normal users can see this advanced edit option?
Ok - I think the user being able to edit was a cacheing issue. All seems fine now. But still questioning "install"?

ralphuk100
09-13-2004, 12:39 PM
Ok - I think the user being able to edit was a cacheing issue. All seems fine now. But still questioning "install"?
Ug....I give up - it works fine on most forums but if I take the date before today on one forum it disappears from the thread list, if I then set it back to today or in the future it starts showing on list again. This forum has a custom style. But so does another forum that also uses the hack....anyone got any ideas on this? Thanks.

MJM
09-28-2004, 06:21 AM
Thanks again for this extremly useful mod! working like a charm on 3.03.
We have a separate photo gallery that our members upload to and I need to use this a lot to post links and details on behalf of members who upload pics and don't get around to writing about their pics in the forums.

Also very handy for moving posts from a now defunct yahoogroup, and changing the timestamp and username.
And great for re-ordering posts in linear threads.
I need to try it for re- ordering stickies.

One drawback is that I can only make these changes during an edit, which means that I first need to submit the post in my username, ( with a comment - "posted on behalf of xxxusername") then I edit username, remove the comment, and all is roses.
I could post/prepare the message in a private forum, then move it over, but this way it doesn't seem to activate as a new post unless I reply to the post.
(This has to do with moving posts/threads from forum to forum, nothing to do with this mod)

I can't imagine it would be possible with this mod to change the username before posting, and it's fine because I am able to get the task done.

regards,
Mark

TTG
09-28-2004, 11:42 AM
Very useful hack .. installed on 3.0.3 with no problems https://vborg.vbsupport.ru/external/2005/01/2.gif

Clicked Install

Xenon
09-28-2004, 06:39 PM
I can't imagine it would be possible with this mod to change the username before posting, and it's fine because I am able to get the task done.

Nope, sorry that's not possible, as this would need a change in newreply/newthread.php and then it wouldn't have anything to do with Editing anymore and therefore would be an extra hack ;)

theArchitect
11-10-2004, 10:27 AM
*theArchitect clicks install*.

As always your work is superb.

Xenon
11-11-2004, 04:26 PM
glad you like it :)

Rabbitoh Warren
11-23-2004, 09:16 AM
Great, no... awesome hack! Easy to install too. Thanks Xenon. :)

Dennis Olson
11-30-2004, 03:22 PM
Installed easy - works great. However....

When I change any of the "advanced" fields, I get the "Edited By:" at the bottom of the post, even though admins have the option set to NOT show that.

How can I take care of that issue please?

Thanks!

NSeXcellent
12-01-2004, 06:18 PM
Xenon,

Does this hack make it possible to keep threads within a forum in a certain chronological order, regardless of when the last post in each thread was?

Thanks

rh2004
12-05-2004, 07:11 PM
Hi, nice mod but how can I just show the advanced edit to admin only, not mods

the Sandman
12-05-2004, 07:25 PM
Hi, nice mod but how can I just show the advanced edit to admin only, not modsYou could modify the code to change the permisssions, but have you read what mods, supermods, and admins can actually do?
This hack allows mods and Admins to restrict the edit permissions on a levelbased system.
Admins can disallow everyone to edit that post, while mods just can restrict editing by the author. Supermods can restrict editing by normal moderators as well.

Admins also have additional features:
- Editing the Timestamp of that Post
- Editing the Author
- Editing the IP

rh2004
12-05-2004, 09:17 PM
You could modify the code to change the permisssions, but have you read what mods, supermods, and admins can actually do?

Yes I read it, but I would only like it for admin's to use this... do you know
what permission I change... :squareeyed:


Many thanks

Xenon
12-08-2004, 11:07 AM
i suggest you read through the thread, iirc i already posted the needed changes :)

Does this hack make it possible to keep threads within a forum in a certain chronological order, regardless of when the last post in each thread was?

well, theoretically possible by always editing postdates, but i would suggest to rewrite the sorting in forumdisplay.php instead (which is another hack)

SaN-DeeP
12-09-2004, 10:16 AM
how abt some updates to this hack :)
Xenon needs to stress on this hack to make it lil more better ^_^

I guess, this was the first hack i selected to installed on forums :)

Regards,

Xenon
12-09-2004, 08:51 PM
Well, i want to add some things to it as well, but unfortunatelly i'm very very very busy until at least Jan 2005

:(

MJM
12-14-2004, 12:26 AM
FYI If the post being changed is the latest post, I've noticed that the username doesn't change in `last post on' the forums index page.

I found that if I then click on Edit Thread > click save changes, that this corrects the new username showing in last post.

This hack is absolutely wonderful!
Each time I use it XXX's go to Xenon.

Thanks,
Mark

Xenon
12-18-2004, 12:28 PM
thx for the kind words, ad also the little bug report, i'll try to fix it with the next release :)

UManiac
12-23-2004, 06:07 PM
Does this hack work on 3.0.3?

Can I limit it's access only to admins?

Thanks

EDIT - NEVERMIND - Just foudn the answer to both my questions...

UManiac
12-23-2004, 06:56 PM
UManiac CLicks INSTALL - Thanks for the hack - super easy to install :D

Xenon
12-27-2004, 02:57 PM
glad you like it :)

rh2004
12-31-2004, 11:03 PM
Could this be added at all...

Admin can set who they want to reply in that topic.. for example a user
requests something and then you admin can specify who can reply in that
topic for example the user who started the topic is the only person who can
reply

Xenon
01-01-2005, 02:26 PM
that would be a totally different hack...

theArchitect
01-04-2005, 08:13 AM
Hi Xenon:

Sentaional hack, though it is not playing very well with the QuickEdit hack. I am getting this error message:

Database error in vBulletin 3.0.4:

Invalid SQL:
UPDATE post
SET editlevel = '0',
dateline = '39599',
username = '',
userid = 0,
ipaddress = ''
WHERE postid = 1
LIMIT 1

mysql error: Unknown column 'editlevel' in 'field list'

mysql error number: 1054
I would like to keep this hack but my user really like the QuickEdit one.

Xenon
01-04-2005, 11:56 PM
you missed the first instruction which does the DB changes ;)

theArchitect
01-05-2005, 12:39 AM
you missed the first instruction which does the DB changes ;)I jst tried to run it in case I forgot and ended up with this

An error occurred while attempting to execute your query. The following information was returned.
error number: 1060
error desc: Duplicate column name 'editlevel'

I then tried to use the QuickEdit button again and got this error

Database error in vBulletin 3.0.4:

Invalid SQL:
SELECT MAX(dateline) AS lastpost, COUNT(*) AS total
FROM usernote AS usernote
WHERE userid =

mysql error: You have an error in your SQL syntax near '' at line 5

mysql error number: 1064

Xenon
01-05-2005, 01:42 PM
erm, usernotes have nothing to do with my hack, that seems to be a totally different thing

the userid isn't set up correctly

theArchitect
01-05-2005, 08:26 PM
erm, usernotes have nothing to do with my hack, that seems to be a totally different thing

the userid isn't set up correctly
Hmmm. Good point. I seem to have a roving query error. I have now recieved two different MySQL erros when I try and use the QuickEdit feature.

I think this is going to take a long time to work out what is wrong.

rh2004
01-08-2005, 04:30 PM
Hey ...

I have an idea... it would be good if we could do this for whole threads tool....

Xenon
01-09-2005, 02:05 PM
would be doable, but requires time, as it would be a totally different hack as well :)

smolie
02-04-2005, 12:38 PM
just installed and everything works but when i change the date of the thread to 2003 the thread just disappears completely........

anyone knows what i did wrong???

MJM
02-04-2005, 01:56 PM
Check your admin > Forums Manager > Default View Age (Default date cut-off for thread display)

I've moved posts from another site from 2001 with no probs.

Mark

smolie
02-04-2005, 06:44 PM
Check your admin > Forums Manager > Default View Age (Default date cut-off for thread display)

I've moved posts from another site from 2001 with no probs.

Mark

aha, problem solved! thanks! missed that somewhere!

neocorteqz
02-07-2005, 09:46 AM
slight problem With it taking and moving a edited quoted post above the quoted post (Moves the post from under the quted post, to above the quoted post).

I would go to edit a post that has quoted another member, and it would then move that post above the member it quoted.

But Easily fixed with a time change.
Is there a way to fix this so it doesn't do this in the future?

It happens occasionally.

Xenon
02-07-2005, 03:08 PM
never had that bug.

maybe it's when the quote was within one minute, as the hack doesn't care about secunds in the dateline

carolem
03-02-2005, 02:05 AM
I am running into a problem reinstalling this feature after upgrading to vb3.07

Has something changed? the last step re:
find
$postpreview

does not seem to fit in now.
Help!
Carolem

Xenon
03-02-2005, 04:22 PM
i have not checked out 307 yet sorry

arabsdesign
03-02-2005, 05:33 PM
thanks

MJM
03-06-2005, 11:42 PM
Anyone got this working with 3.07?
We lost it in an upgrade.
Mark

neocorteqz
03-07-2005, 12:36 AM
Anyone got this working with 3.07?
We lost it in an upgrade.
Mark

works fine. :)

VBUsers
03-07-2005, 09:16 PM
how can i do this

This hack allows mods and Admins to restrict the edit permissions on a levelbased system.
Admins can disallow everyone to edit that post, while mods just can restrict editing by the author. Supermods can restrict editing by normal moderators as well.

i have added this hack but now i cant seem to edit with my test mod account or super mod. where do i change the permissions?

Xenon
03-07-2005, 10:44 PM
it's a dropdown on the editscreen, you may have changed the level to admin already

carolem
03-08-2005, 12:38 AM
My problem has been solved - I mis-interpreted the 'edit template edit post' step and all is fine now!

Thank you for such a useful mod,
Carolem

VBUsers
03-08-2005, 03:32 AM
it's a dropdown on the editscreen, you may have changed the level to admin already


yeah but i want the default change? i dont want to go thru everypost. never mind i dont get this hack.

Xenon
03-08-2005, 04:11 PM
@carolem: glad to hear :)

@lowadn..: erm the default setting is that everyone can edit a post, just if you changed the setting already or made a mistake while installing it's different

neocorteqz
03-08-2005, 11:11 PM
how can i do this

This hack allows mods and Admins to restrict the edit permissions on a levelbased system.
Admins can disallow everyone to edit that post, while mods just canrestrict editing by the author. Supermods can restrict editing bynormal moderators as well.


i have added this hack but now i cant seem to edit with my test modaccount or super mod. where do i change the permissions?asXenon said, when you edit a post, a drop down box will appear allowingyou to change it so that only Mods and above will be able to edit, allthe way to admins only. Note that ALL admins will be able to edit thepost. this i believe is based on the (canadminister) permission. So ifthey have access to the admin panel as a super mod, then they will havepermission to edit that post.

VBUsers
03-08-2005, 11:21 PM
ok i got it working but now my staff is saying that they can only edit forums that they are assigned to. can i change it to the first option it had that they can edit all the forums as long as theyre mods.

neocorteqz
03-09-2005, 02:31 AM
ok i got it working but now my staff is sayingthatthey can only edit forums that they are assigned to. can i changeit tothe first option it had that they can edit all the forums as longastheyre mods.If they are Super Mods or Admins then theyshouldhave edit permissions for ALL forums. if they are mods, theireditpermissions will be for only the forums they have Mod powers in.That isin the permissions system of vBulletin, not this hack.

xitrum
03-17-2005, 10:33 PM
Thanks for the nice mod Xenon. I got everything installed correctly I think. The problem is when I tried to edit the author of a post and click submit. The author is never changed. Am I missing something? TIA.

xitrum

frage
04-02-2005, 01:19 AM
frage klicks install

:-)

David_R
05-28-2005, 08:59 AM
this is one of best modification on this site
thanks sir xenon

mgurain
06-02-2005, 12:49 PM
Hello,,

It is really a nice hack .

But it has a minor bug : when I edit the user to different one , the poster changes correctly, but last poster in forumdisplay does not change !

I hope you fix it.

thanks in advance,,

Xenon
06-02-2005, 06:03 PM
Ooops,

ok, uploaded a fixed version, was just a little change in one condition :)

the Sandman
06-02-2005, 06:14 PM
So, what do we have to change for the fix?

Xenon
06-02-2005, 06:19 PM
very easy:

old:
if ($bbuserinfo['editlevel'] == $editlevel['admin'] AND
$postinfo['dateline'] != $newpost['dateline'])


fixed:
if ($bbuserinfo['editlevel'] == $editlevel['admin'] AND
($postinfo['dateline'] != $newpost['dateline'] OR $postinfo['userid'] != $newpost['userid']))

the Sandman
06-02-2005, 06:45 PM
Thanks!

Torqued
06-02-2005, 07:56 PM
Sweet mod! I have some posts I need to edit dates on and was just going to edit them in the DB!

Thanks!!! :)

*clicks install

mgurain
06-02-2005, 11:02 PM
Hi Xenon ,,

I couldn't find the code to change !

any hint ? :squareeyed:

Xenon
06-05-2005, 05:45 PM
take a look 4 posts above, there i posted what you have to change, when you look into my old hack instructions

mgurain
06-06-2005, 03:16 PM
Hello,,

First of all, I have deleted the OLD instructions, so I looked up the code you mentioned in editpost.php but couldn't find it !!

So, what to do ?

note that both "Last poster" and "Thread starter" do not change !

I hope coul solve it,

thanks in advance,,

Xenon
06-06-2005, 04:28 PM
use an original editpost.php and reapply the hack totally then.
you may have another hack installed perhaps..

mgurain
06-06-2005, 08:22 PM
Hello,,

I reapplied teh hack hardly by replacing old code by new code, so it's done now.

thanks.

Xenon
06-06-2005, 08:27 PM
glad to hear :)

weitalia
06-26-2005, 04:34 PM
Fantastic hack!! Works perfectly,I used to reorder some threads that are full of spam inside...congratulations man :D

;)

T2DMan
06-28-2005, 04:36 AM
Is there a version for vb 3.5 - when is an updated version likely?

Xenon
06-28-2005, 05:19 PM
nope there isn't right now.

but i think there will be one.
i have already looked at the code a bit closer, and when i have enough time, i will do it.
but i cannot promise anything during the beta phase.

MJM
06-29-2005, 05:39 PM
No way am I using 3.5 till I can use this great piece of work.

Was thinking of going live on a small site but this settles it, I'll hang with 3.07

Mark

T2DMan
07-05-2005, 04:44 AM
I know the feeling regards time. As good as hacks are, as good as they are to create, supporting them keeps one busy. I'm personally keen to migrate to 3.5 in the next week and do a url rewrite hack before the Google update happens. However, I share the feeling about not wanting to lose this hack.

I look forward to it when you are able.

csidlernet
07-20-2005, 07:46 AM
your too cool

MJM
07-23-2005, 01:45 PM
Hi Xenon, how's it going with the 3.5 version?
I'm assuming the current version won't work with 3.5.

Are there still complex issues revolving around getting it to work with AJAX, hooks, plugins etc, or is it mainly to do with you being a busy admin with little time to spare?

Mark

Xenon
07-24-2005, 05:51 PM
It's the latest ;)

it isn't such a big problem, should be just a plugin/template mod, but so less time :(

MJM
07-25-2005, 01:47 AM
Thank you! will await
... but so less time :(
Make a mod for life's journys to change timestamp to yesterday!
Mark :)

Xenon
07-25-2005, 12:12 PM
ahh, that would be an idea ;)

akanevsky
07-31-2005, 08:12 PM
Will ye port it to 3.5 RC1? Thanks.

Xenon
08-01-2005, 01:18 PM
yep will do, but not until i have upgraded vb.org ;)

akanevsky
08-01-2005, 01:24 PM
When is that?

Xenon
08-01-2005, 01:27 PM
i hope to be able to do so in 3 weeks

i will be on holidays now, and give marco all the time he needs to finish the hack db, then we will upgrade when everything is working :)

ashraf_gawdat
08-29-2005, 10:37 PM
Realy it is a great hack, I was searching for such one from ages, and good I found it before I request one.

But I have very simple questions :

Can I limit the permission of using this hack to only "SUPER ADMINISTRATORS" which are specified in config.php ?

And can I also give this permission to certain users by their user id ?

akanevsky
08-30-2005, 12:22 PM
Yes.

IN editpost.php, REPLACE

// calculate user's editlevel
if (in_array($bbuserinfo['userid'], preg_split('#\s*,\s*#s', $superadministrators, -1, PREG_SPLIT_NO_EMPTY))
OR $bbuserinfo['permissions']['adminpermissions'] & CANCONTROLPANEL)
{
$bbuserinfo['editlevel'] = $editlevel['admin'];
}
else if ($bbuserinfo['permissions']['adminpermissions'] & ISMODERATOR)
{
$bbuserinfo['editlevel'] = $editlevel['smod'];
}
else if (can_moderate($threadinfo['forumid'], 'caneditposts'))
{
$bbuserinfo['editlevel'] = $editlevel['mod'];
}
else if ($bbuserinfo['userid'] == $postinfo['userid'])
{
$bbuserinfo['editlevel'] = $editlevel['author'];
}
else
{
// someone else is trying to edit this post, permission check will be set up later by originalvb
// maybe it's a mod just having delete permissions..
$bbuserinfo['editlevel'] = $editlevel['author'];
}

WITH

// calculate user's editlevel
if (in_array($bbuserinfo['userid'], preg_split('#\s*,\s*#s', $superadministrators, -1, PREG_SPLIT_NO_EMPTY)) OR $bbuserinfo['permissions']['adminpermissions'] & CANCONTROLPANEL)
{
$bbuserinfo['editlevel'] = $editlevel['admin'];
}
else
{
$bbuserinfo['editlevel'] = $editlevel['author'];
}

ashraf_gawdat
08-30-2005, 08:49 PM
Done, but with no effect ! Adminstrators still have the permission to use these advanced options when they edit a post. But I don't want them to have this permission or even see these options. Only Super Adminstrator should have the permission.

Xenon
08-30-2005, 10:49 PM
remove the

OR $bbuserinfo['permissions']['adminpermissions'] & CANCONTROLPANEL as well :)

Space Goat
09-07-2005, 08:31 PM
nevermind, I figured out what was wrong

JsnakeJ
09-10-2005, 09:45 PM
Great hack, thank you.

ben_erhan
09-11-2005, 07:45 AM
Heyy Friends,

I have instaled this hack but I can not see it while the editing post.
There is not any table " Advanced Editing Options".
I am using vb 3.0.8.is it a problem?
I have made every thing correctly 2 times but everythin is same.
I have run sql,edited editpost.php,created new template,edited editpost template,but there is not any conlution.

Xenon
09-12-2005, 04:09 PM
it shouldn't be a problem, there were not much changes in vb308
it should work.

ben_erhan
09-13-2005, 08:13 PM
but it does not work.
I did every detail very cafeful,but there is not ant conclution

MThornback
09-15-2005, 07:37 PM
Xenon, just so your aware....I edited your hack a BIT for my board to remove the IP editing ability...it was no good for the boards I run....hope there is no issue :)

Xenon
09-16-2005, 01:27 PM
of course no problem ;)

MJM
09-29-2005, 09:47 PM
Just checking on any ETA for use with 3.5 ...

Thanks,
~ Mark

Sal Collaziano
10-05-2005, 01:16 PM
Same here. I REALLY want to be able to use this with 3.5. The most important feature of this, to me, is being able to edit the member's name who posted the message...

Xenon
10-05-2005, 05:00 PM
Sorry no ETA yet

i am overloaded with work, don't expect any of my hacks not installed on vb.org to be released until vb.org has not been upgraded to 3.5.

Sal Collaziano
10-10-2005, 08:33 PM
Sorry no ETA yet

i am overloaded with work, don't expect any of my hacks not installed on vb.org to be released until vb.org has not been upgraded to 3.5.

No problem at all.. Just know we're anxious. :)

Lionel
10-19-2005, 04:25 AM
Thanks for the nice mod Xenon. I got everything installed correctly I think. The problem is when I tried to edit the author of a post and click submit. The author is never changed. Am I missing something? TIA.

xitrum

I also have the same problem. I just installed 5 minutes ago on 3.07

Xenon
10-19-2005, 04:04 PM
hmm, if you installed everything correctly, there shouldn't be such a problem, this hack worked perfectly for the 149 users which have it installed

logofreax
11-09-2005, 06:08 PM
Hi, short question?

Does this great hack work on 3.5 or is there work on it?

cu
logofreax

Xenon
11-15-2005, 09:32 PM
There is a version released by Dark Visor, for 3.5 which is based on this one ;)

akanevsky
11-15-2005, 09:58 PM
for 3.5 which is based on this one

Yes, except my nickname was recently changed from Dark Visor to Psionic Vision :) Look in my profile.

David_R
02-11-2006, 03:25 AM
is this hack also available for 3.5 version ?
we have to upgrade our board from 3.0.x version to 3.5 latest and got this hack installed.

thanks.

carolem
02-11-2006, 10:20 AM
is this hack also available for 3.5 version ?
we have to upgrade our board from 3.0.x version to 3.5 latest and got this hack installed.

thanks.

Yes, check out this thread:
https://vborg.vbsupport.ru/showthread.php?t=98737

logofreax
09-26-2008, 07:22 AM
logofreax clicks uninstall cause no solution for 3.7 and installs this one:

Change Threads/Posts Owner/Date 1.7 (https://vborg.vbsupport.ru/showthread.php?t=178208)

It works pretty good.

cu
logofreax

Dagothar
02-25-2009, 01:18 AM
Thanks, logofreax.

Xenon--great idea, and almost tried to install, as I see it's "Supported" and you were online in Feb 2009.

Perhaps mark "Unsupported"?