vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   More Functions in Edit Post if you are an Admin (https://vborg.vbsupport.ru/showthread.php?t=33761)

Xenon 07-26-2002 11:25 PM

you should use the original format i used in the hack ;), at least till i upload a new version ;)
i think i'll update the hack next days, so changes of dateformat would be easier...

but to fix it so it'll work with your format would be very very hard, i'd nearly say impossible, because the php-function mktime() doesn't work with string variables (for months)
i have to look if i'll find a way ;)

Boofo 07-26-2002 11:42 PM

Ok, I went back to using:

PHP Code:

$datzeit=vbdate("m-d-Y H:i",$postinfo[dateline]); 

for now. If you can come up with a fix for it, it would be GREAT! :)

Xenon 07-27-2002 12:28 AM

new version is nearly finished and it'll have one extra function, you'll love it ;)

Boofo 07-27-2002 12:38 AM

I pretty much like most of your hacks, so loving the new function is a given. :) But will it have the date option fixed? And also, since you are working on it, how about putting the uers's name after the ID numberr so we can see who's number matched to what name? :)

Quote:

Originally posted by Xenon
new version is nearly finished and it'll have one extra function, you'll love it ;)

Xenon 07-27-2002 12:51 AM

Boofo: too late, new version is released now ;)
It's not compatible with your dateformat, but it's very easy to change it into american format now ;)

you just have to edit template admineditpost ;)

Putinng the username after the id, is very easy but not so usefull, because if you change the userid, the name wouldn't change in editscreen ;)


New feature: You can make post uneditable for the original normal user :)

Boofo 07-27-2002 01:02 AM

I didn't mean to make it so the username was editable. It would just be nice to have a name to match the id number. :)

I like the new feature! ;) But can it be made so if the Admin makes it not to be edited, that NO ONE can edit it unless it is the Admin, not even Mods? And how do you make the numbers go to the right of the box if there is only one in it. Like a 6 for the month. It goes to the left with no 0. It would look better on the right. :)

Xenon 07-27-2002 10:49 AM

yes i thought though, too but it's the way editpost.php handles admins/mods: it just looks for mods and defines all admins as mods....

perhaps i'll make it only admineditable next time ;)

i know it would look better, but i think thats an html code problem and i don't know html very well ;)

for username: try to put an $postinfo[username] into your Admineditpost template after the enterfield for userid ;)

Chris M 07-27-2002 10:59 AM

Quote:

Originally posted by Xenon
Boofo: too late, new version is released now ;)
It's not compatible with your dateformat, but it's very easy to change it into american format now ;)

you just have to edit template admineditpost ;)

Putinng the username after the id, is very easy but not so usefull, because if you change the userid, the name wouldn't change in editscreen ;)


New feature: You can make post uneditable for the original normal user :)

Way to go Xenon!!!

I see you added the "cant edit if admin selects" function:)

Satan

Xenon 07-27-2002 11:17 AM

hehe satan i do what i can ;)

boofo what about a sort of edit priority?
i.e. Editably by: Admins, Supermods, Mods, originial poster
and all users *ggg*

Chris M 07-27-2002 11:23 AM

I thought that only Admins could edit that at the moment...

I tested a Mod account, and they cannot access that or any of the functions...

Satan

sKunk 07-27-2002 11:40 AM

One question, is the time issue that was debated for 4 pages fully fixed in this new release?

Thanks :)

Xenon 07-27-2002 12:36 PM

@sKunk: yes it is completly fixed in this new release!

@Satan: Yes, just Admins got this higher functions, but if you selected editable == no mods could edit the posts

@All: Version 2.20 released five Minutes ago. It has a sort of Priority edit function in it instead of the normal editabal/not editable by users

hope you'll love it

Chris M 07-27-2002 12:53 PM

Cool!

Installing that now:)

Satan

Chris M 07-27-2002 01:11 PM

Erm...I think you forgot to add the :

error_editpriority

to the templatesused...

Satan

Xenon 07-27-2002 01:15 PM

yes i thought so too, but none of the errortemplates is in templatesused so i didn't put it into ;)

Chris M 07-27-2002 01:21 PM

Oh right...

It works great thanks:)

Really great update:)

Satan

Boofo 07-27-2002 02:32 PM

Excellent work, Xenon! Almost perfect. :) Is there any way to make it so if I wanted the Author to be able to edit it and the admin or supermod, but not the mod, can it be done? :) Also, would it be hard to pull the host name out for the IP address if there is one? :) (Sorry...:))

Chris M 07-27-2002 02:35 PM

Hmmm...

Aha!

Xenon - Maybe you could make it checkboxes instead of Radio buttons...That way you can tick who you want to be able to edit it...

Satan

Boofo 07-27-2002 02:38 PM

That should be able to be done with radio buttons too. :) They actually look better.

Quote:

Originally posted by hellsatan
Hmmm...

Aha!

Xenon - Maybe you could make it checkboxes instead of Radio buttons...That way you can tick who you want to be able to edit it...

Satan


Chris M 07-27-2002 02:44 PM

But isnt the point of Radio buttons to select one or the other?:confused:

Satan

Boofo 07-27-2002 03:04 PM

I've seen them used both ways. They do that alot with on-line quizzes and surveys. :)

Quote:

Originally posted by hellsatan
But isnt the point of Radio buttons to select one or the other?:confused:

Satan


Xenon 07-27-2002 03:19 PM

Boofo: i won't include that, because i think such wishes are personall wishes not used by many others, but i can tell you how to do it k?

template admineditpost
after
Code:

| <input type="radio" name="editable" $editable[0] value="0">Admins
add this:
Code:

| <input type="radio" name="editable" $editable[4] value="4">Author/Supermods/Admins
then in editpost.php
find:
PHP Code:

} else if($postinfo[editable]==and !ismoderator($threadinfo[forumid],"caneditposts")) {
  
$editpriority="Moderator/Supermod/Admin";
  eval(
"standarderror(\"".gettemplate("error_editpriority")."\");");
  exit;


add this clause after the }:
PHP Code:

 else if($postinfo[editable]==and $postinfo[userid]!=$bbuserinfo[userid] and $getperms[cancontrolpanel]!=and  $getperms[ismoderator]!=1) {
  
$editpriority="Author/Supermod/Admin";
  eval(
"standarderror(\"".gettemplate("error_editpriority")."\");");
  exit;


then replace in this line:
PHP Code:

  for($i=0;$i<4;$i++) $editable[$i]=iif($postinfo[editable]==$i,"CHECKED",""); 

the $i<4 with $i<5

that should do the trick



hmm, ip-decoding?
i'll see what i can do, i have no idea how that works, i'll look into it ;)

Xenon 07-27-2002 05:02 PM

have to say i found a very small bug.
It just occurs if you allow guest posting...

to correct it replace this line:
PHP Code:

  if (!isset($userid) or $userid=="" or $userid==0) { 

with this one:
PHP Code:

  if ((!isset($userid) or $userid=="" or $userid==0) and $bbuserinfo[usergroupid]==and $postinfo[userid]!=0) { 


Also i'm thinking of a funny enhancement: Make a Post editable by all Members and make it editable by guests *gg*
Editable by all members could perhaps be usefull for clanboards in a announcement thread or something like that, the other ist just to play jokes on users ;)

are there some feature you want have included in this hack?
because i think this was the final version all other things aren't needet anymore?

Boofo 07-27-2002 05:56 PM

That could be kindof dangerous on a board, even as a joke. :) I like the hack just the way it is now. :)

Quote:

Originally posted by Xenon
Also i'm thinking of a funny enhancement: Make a Post editable by all Members and make it editable by guests *gg*
Editable by all members could perhaps be usefull for clanboards in a announcement thread or something like that, the other ist just to play jokes on users ;)

are there some feature you want have included in this hack?
because i think this was the final version all other things aren't needet anymore? [/B]

Chris M 07-27-2002 06:32 PM

I think that would be funny lol, but dangerous as Boofo said...

I can just think of one more thing :

Edit the user's Signature, and save it as their signature (either for that post, or throughout the site)

Satan

Boofo 07-27-2002 06:32 PM

Thank you, sir. That's why I like installing your hacks, you're one of the few authors who will go that extra mile to make your hacks personalized. :) Great job! ;)

Quote:

Boofo: i won't include that, because i think such wishes are personall wishes not used by many others, but i can tell you how to do it k?

Chris M 07-27-2002 06:53 PM

Yep!

I installed it too!:)

Must have more hacks...Must have more hacks...:D

Satan

Xenon 07-27-2002 10:40 PM

satan you're addictive to hack right? ;)

@boofo: you're welcome

ok then that was the final version i think
@satan: hmm, that wouldn't affect the post-table but the usertable, so i think it shouldn't be in the editpost.php ;)

Boofo 07-27-2002 10:57 PM

Xenon,

You're going to strangle me here in a minute, but it seems that no matter which radio button I pick now, it gets set at the Admin radio button for editing after I re-save the message. :) I followed your instruction on the add-on and double-checked everything. Sorry. :)

Xenon 07-27-2002 11:01 PM

[high]* Xenon strangles boofo ;)
[/high]

you were right, i made a little mistake in the template change i told you.

recheck it now, i've edited it ;)
you must replace one little 0 with a 4 ;)

Boofo 07-27-2002 11:14 PM

This is the change you were talking about? The value variable? That is the only change, right? :ducks: :) Thank you, again, sir. :)

PHP Code:

| <input type="radio" name="editable" $editable[4value="4">Author/Supermods/Admins 


Boofo 07-27-2002 11:24 PM

Oh-oh, I'm in trouble now. It still keeps defaulting to just Admin being able to edit it no matter what I pick. :)

Edit: If I leave it alone and don't change it, it will stay on Author. It will only always default to Admin if I change it from Author. Any ideas how to fix this, sir? :)

Xenon 07-28-2002 08:51 PM

sure you apllied all the changes correct?
i don't see the possibility to get that weird bug..

recheck that you surely have this line:
PHP Code:

for($i=0;$i<[b]5[/b];$i++) $editable[$i]=iif($postinfo[editable]==$i,"CHECKED",""); 

if not please post your admineditpost template, will see if i can find an error

Boofo 07-29-2002 01:37 AM

Here's the line I have for that. there is a small difference, bit it should cause it to act wierd should it?

PHP Code:

for($i=0;$i<5;$i++) $editable[$i]=iif($postinfo[editable]==$i,"CHECKED",""); 

The only difference I see is you have the bold tags around the 5. That wasn't in the code you gave me. :)

Quote:

Originally posted by Xenon
PHP Code:

for($i=0;$i<[b]5<b>sure you apllied all the changes correct?
i don't see the possibility to get that weird bug..

recheck that you surely have this line:</b>;$i++) $editable[$i]=iif($postinfo[editable]==$i,"CHECKED",""); 

if not please post your admineditpost template, will see if i can find an error [/B]

Boofo 07-29-2002 02:26 AM

And here's my admineditpost template, as you requested. :)

PHP Code:

<tr>
    <
td bgcolor="#1C5780" nowrap><normalfont><b>Thread ID:</b></normalfont></td>
    <
td bgcolor="#1C5780"><normalfont><input type="text" class="bginput" name="pthreadid" value="$postinfo[threadid]size="40" maxlength="85"></normalfont></td>
</
tr>
<
tr>
    <
td bgcolor="#13486D" nowrap><normalfont><b>Author ID:</b></normalfont></td>
    <
td bgcolor="#13486D"><normalfont><input type="text" class="bginput" name="userid" value="$postinfo[userid]size="20" maxlength="85">  $postinfo[username] </normalfont></td>
</
tr>
<
tr>
    <
td bgcolor="#13486D" nowrap><normalfont><b>Editable by (and higher):</b></normalfont></td>
    <
td bgcolor="#13486D"><normalfont><input type="radio" name="editable" $editable[1value="1">Author | <input type="radio" name="editable" $editable[2value="2">Moderators |<input type="radio" name="editable" $editable[3value="3">Supermods | <input type="radio" name="editable" $editable[0value="0">Admins | <input type="radio" name="editable" $editable[4value="4">Author/Supermods/Admins</normalfont></td>
</
tr>

<
tr>
    <
td bgcolor="#1C5780" nowrap><normalfont><b>Date/Time:</b></normalfont></td>
    <
td bgcolor="#1C5780"><normalfont>
                <
input type="text" class="bginput" name="datetime[mon]" value="$datetime[mon]size="1" maxlength="2">.<input type="text" class="bginput" name="datetime[mday]" value="$datetime[mday]size="1" maxlength="2">.<input type="text" class="bginput" name="datetime[year]" value="$datetime[year]size="3" maxlength="4"> - <input type="text" class="bginput" name="datetime[hours]" value="$datetime[hours]size="1" maxlength="2">:<input type="text" class="bginput" name="datetime[minutes]" value="$datetime[minutes]size="1" maxlength="2">

</
normalfont></td>
</
tr>
<
tr>
    <
td bgcolor="#13486D" nowrap><normalfont><b>IP Address:</b></normalfont></td>
    <
td bgcolor="#13486D"><normalfont><input type="text" class="bginput" name="ipadd" value="$postinfo[ipaddress]size="40" maxlength="85"></normalfont></td>
</
tr


Xenon 07-29-2002 10:30 AM

damn, boldtags should have been parsed not shown as tags *gg*

hmm, i don't see a bug in this code, it should work perfectly....

Boofo 07-29-2002 10:35 AM

I just took out the code for the extra option you wrote for me and it still defaults to Admin, no matter what I pick. So it wasn't that extra code. Is anyone else experiencing this?

Quote:

Originally posted by Xenon
damn, boldtags should have been parsed not shown as tags *gg*

hmm, i don't see a bug in this code, it should work perfectly....


Xenon 07-29-2002 11:06 AM

sure you have installed everything correct?

i'd say restart with an unhacked editpost.php and install it again
this shouldn't happen and it doesn't happen on my board and my testboard...

Chris M 07-29-2002 11:09 AM

It must be that Boofo didnt do something, or did something wrong...

It works fine at my boards:) - And I followed Xenon's instructions, just as you did/should have done Boofo...

Satan

Boofo 07-29-2002 11:22 AM

hellsatan: For your information, sport, I did it EXACTLY as per the instructions and never had a problem with the hack until this final version. Everything else in it works great. I wasn't something I did or didn't do. Maybe I have another hack messing with it, I don't know.

Xenon: I could do it with a fresh editpost, but then any other hack I have installed concerning the editpost.php would not work and I have installed too many hacks to remmeber which ones deal with that file. Is there any way to go back to the hack before you added that part since it won't work for me? If you want to look at my editpost.php, I would be more than happy to pm it to you. You might see something I don't see. :)

Quote:

Originally posted by hellsatan
It must be that Boofo didnt do something, or did something wrong...

It works fine at my boards:) - And I followed Xenon's instructions, just as you did/should have done Boofo...

Satan



All times are GMT. The time now is 04:17 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.01641 seconds
  • Memory Usage 1,892KB
  • 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
  • (2)bbcode_code_printable
  • (11)bbcode_php_printable
  • (9)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