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)
-   -   [v1.2] Edit / Report Button Hack (https://vborg.vbsupport.ru/showthread.php?t=45344)

Dean C 11-24-2002 04:12 PM

Ok im updating the file now :)

- miSt

Dean C 11-24-2002 04:20 PM

Update:

V1.2 now released :)

https://vborg.vbsupport.ru/showthrea...187#post318187

- miSt

N9ne 11-24-2002 04:25 PM

hehe, glad I could help :D now if you are not a moderator of the forum the post is in, you will not see the edit button ;)

Kars10 11-24-2002 04:31 PM

Ive updatet to 1.2. and it works like a charm on 2.2.8!!
Thank you Mist... :)

N9ne 11-24-2002 05:13 PM

I'm gonna install this hack later, I think I can't use the ismoderator function with the conditionals...although I'm not sure, I don't have enough time to "try" it, so I'll just install this hack :)

Dean C 11-24-2002 05:19 PM

Awesome :)

Thanks for installing btw N9ne :)

- miSt

N9ne 11-24-2002 06:56 PM

You need to fix one more thing, if you are not the post creator, but can edit the post, you can see the edit link, but not the report link ;)

Dean C 11-25-2002 05:54 PM

Yes but if your a staff member then why would you need to report the post seems as the report emails goto the staff members :)

- miSt

N9ne 11-25-2002 06:06 PM

I remembered that after I posted ;)

but it's still cool to report someone's post even if you're admin lol...anyway...good work on the hack, I've got it installed.

Dean C 11-26-2002 05:58 PM

Awesome get all your friends and future grandchildren to install too :)

- miSt

Boofo 12-09-2002 08:32 AM

Great hack, Mist. :) Just a question or two, though.

What if you don't allow your Mods to edit posts in certain forums? And what if I want to report a post to my moderators if I come across one that I think they should know about? The only thing is that you don't want to have the report button show up on your own post, Admin or not. But I think you need it there, otherwise.

Dean C 12-09-2002 04:04 PM

I thought this is why most sites have a forum for their staff.

To be honest i can't see a way around this...

Feel free to post any ideas :D

- miSt

Boofo 12-09-2002 09:52 PM

It's simple, just do 2 pieces of code instead of combining them into one. Sometimes a Mod or Admin can run across a message that they want the other Mods to know about and it would be easier to report it in the post than to go to a separate area and report it, you know what I mean? :)

Edit: That's ok, Mist, I went ahead and installed Firefly's code for this. It handles it like I explained. Good hack, though. Congrats! ;)

Dean C 12-10-2002 03:42 PM

Are you sure firefly's code shows this for admins?

I dont think it does..

- miSt

Boofo 12-10-2002 03:59 PM

Quote:

Originally posted by Mist
Are you sure firefly's code shows this for admins?

I dont think it does..

- miSt

Yes, ma'am, it does. That's what I was using before I tried your hack. It shows the edit button AND the report button for Admins and Moderators, like it really should be. :) Just the regular users will only see one or the other.

N9ne 12-10-2002 05:06 PM

Quote:

Originally posted by Boofo


Yes, ma'am, it does. That's what I was using before I tried your hack. It shows the edit button AND the report button for Admins and Moderators, like it really should be. :) Just the regular users will only see one or the other.

LOL!

" ma'am "

Classic, Mist won't be happy :D

Dean C 12-10-2002 05:30 PM

Ahhhh i see... so it shows both...

I'll intigrate this into the hack then... brb

- miSt

Bison 12-11-2002 12:41 PM

Nice hack!

Dean C 12-11-2002 06:17 PM

Thanks ^ :D

- miSt

Boofo 12-11-2002 06:23 PM

Quote:

Originally posted by Mist
Ahhhh i see... so it shows both...

I'll integrate this into the hack then... brb

- miSt

Let me know when you do this and I will take another look at it. :)

Dean C 12-11-2002 06:30 PM

I'm just waiting on a question

It should be done by the weekend :)
- miSt

Boofo 01-28-2003 08:59 PM

Ok, I finally found a way to have the edit button only show up for the user who wrote the post and the moderator of that forum. If you are not a moderator of the forum, you will not see the edit button unless it is your post. First of all, you need to install Logician's Dynamic Template hack. Once that is installed, go to your "postbit" template and enter the code like this and viola!

Code:

[[((ismoderator($thread['forumid'])) or $post[userid]==$bbuserinfo[userid])]]
                                                $post[editpost]
[[/((ismoderator($thread['forumid'])) or $post[userid]==$bbuserinfo[userid])]]

[high]NOTE:[/high] Admins and Supermoderators will see the edit button at all times, since they are usually allowed to edit all posts.

Dean C 01-29-2003 03:42 PM

Hehe i gave up on this project - i know so much more. I'll try and get this done without using dynamic templates :)

- miSt

Boofo 01-29-2003 03:48 PM

I gave you the answer. Shouldn't be too hard.

Dean C 01-29-2003 03:49 PM

The point of this was for the report button as well - that's the problem. I wanted to get it all in one code statement but i have an idea how to do it when i get some time.

- miSt

Dan_UPC 02-18-2003 12:34 PM

Mist,

Great hack but there are a couple of problems in the current version:

1) you are running ismoderator() for each post on the page. This is serious because if you have 40 posts on the page, it would add 40 queries to the page and that's just plain murder for the server.

2) if you have a max edit time, the button should change from edit to report once the user is no longer able to edit the post.

I've attached your hack in this post with the above problems fixed.

Dean C 02-18-2003 12:39 PM

Thanks buddy for that fix. I've updated the first post and added credits in the textfile to you too.

Regards

- miSt

Natch 02-18-2003 01:03 PM

Can you advise on which changes need to be made if just upgrading from 1.2 to 1.3 ?

Dean C 02-18-2003 01:06 PM

If you have the instructions from v2 then simply undo the changes to the php files and then re-apply the new changes in v3.

If you haven't then i'll write a textfile on how to upgrade

- miSt

Natch 02-18-2003 01:11 PM

LOL - I just looked at the instructions and I understand how this things works ...

I'll nut it out - thanks to you both :) :)

[high]* Natch is a bit lazy eh ?[/high]

Dean C 02-18-2003 01:18 PM

No it's understandable ;) hehe

- miSt

Kohhal 07-15-2003 08:10 AM

Another great hack Mist, makes you wonder why these things were never default....
Maybe you can help me out here again?


All times are GMT. The time now is 04:09 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.01342 seconds
  • Memory Usage 1,772KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (32)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