Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
[v1.2] Edit / Report Button Hack Details »»
[v1.2] Edit / Report Button Hack
Version: 1.00, by Dean C Dean C is offline
Developer Last Online: Nov 2023 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 11-02-2002 Last Update: Never Installs: 65
 
No support by the author.

Edit / Report Button Hack - based on your permissions

What does this hack do?

Basically it allows you to insert a variable into your postbit template and if you posted the thread then it shows up with the edit link/button. If you didn't post it it shows the report link.

This is just like the hack installed here at vbulletin.org


Latest Version: 1.3

Thanks to:

- Hellsatan (for helping with a parse error)
- PPN for beta testing v1.2
- Dan_UPC for fixing two bugs


+++++++++++++++++ Extra Notes +++++++++++++++++
If you would like the report button in the default vbulletin style then here is the link:

https://vborg.vbsupport.ru/attachmen...&postid=325196

________________________________________________

If you install this hack then please click the INSTALL button.

Regards

- miSt

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #62  
Old 12-11-2002, 06:30 PM
Dean C's Avatar
Dean C Dean C is offline
 
Join Date: Jan 2002
Location: England
Posts: 9,071
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm just waiting on a question

It should be done by the weekend
- miSt
Reply With Quote
  #63  
Old 01-28-2003, 08:59 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #64  
Old 01-29-2003, 03:42 PM
Dean C's Avatar
Dean C Dean C is offline
 
Join Date: Jan 2002
Location: England
Posts: 9,071
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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

- miSt
Reply With Quote
  #65  
Old 01-29-2003, 03:48 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I gave you the answer. Shouldn't be too hard.
Reply With Quote
  #66  
Old 01-29-2003, 03:49 PM
Dean C's Avatar
Dean C Dean C is offline
 
Join Date: Jan 2002
Location: England
Posts: 9,071
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #67  
Old 02-18-2003, 12:34 PM
Dan_UPC Dan_UPC is offline
 
Join Date: Dec 2002
Posts: 49
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #68  
Old 02-18-2003, 12:39 PM
Dean C's Avatar
Dean C Dean C is offline
 
Join Date: Jan 2002
Location: England
Posts: 9,071
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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

Regards

- miSt
Reply With Quote
  #69  
Old 02-18-2003, 01:03 PM
Natch's Avatar
Natch Natch is offline
 
Join Date: Nov 2002
Location: Australia
Posts: 851
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Can you advise on which changes need to be made if just upgrading from 1.2 to 1.3 ?
Reply With Quote
  #70  
Old 02-18-2003, 01:06 PM
Dean C's Avatar
Dean C Dean C is offline
 
Join Date: Jan 2002
Location: England
Posts: 9,071
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #71  
Old 02-18-2003, 01:11 PM
Natch's Avatar
Natch Natch is offline
 
Join Date: Nov 2002
Location: Australia
Posts: 851
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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]
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 07:09 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04991 seconds
  • Memory Usage 2,306KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete