Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases

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
  #22  
Old 11-07-2002, 04:26 PM
camikazi2k camikazi2k is offline
 
Join Date: Jan 2002
Posts: 49
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

DOnt get it
i did put the
$post[editreport]
in the postbit template
but whats the point if there is already a edit button in the thread?
Reply With Quote
  #23  
Old 11-07-2002, 04:55 PM
assassingod's Avatar
assassingod assassingod is offline
 
Join Date: Jul 2002
Posts: 3,337
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

What it does is show the Edit Button if you posted it, and shows the report button if you dont.
Reply With Quote
  #24  
Old 11-07-2002, 05:34 PM
Dean C's Avatar
Dean C Dean C is offline
 
Join Date: Jan 2002
Location: England
Posts: 9,071
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Update: I'm having huge problems with my testboard so anyone with a testboard that can help me would be highly appreciated

PM me

I'm normally on between 7.30-8.30pm GMT

Regards

- miSt
Reply With Quote
  #25  
Old 11-07-2002, 06:16 PM
kreftt's Avatar
kreftt kreftt is offline
 
Join Date: Dec 2001
Posts: 121
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

nice

it checks for your admin status as well, very nice

2 minutes --> works

thx

kreftt
Reply With Quote
  #26  
Old 11-13-2002, 10:24 AM
Areku Areku is offline
 
Join Date: Feb 2002
Posts: 540
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Regarding admin status, can I add a new groupid so my coadmin (different than admin) can still see the edit button everywhere?

The code for this would be appreciated!
Reply With Quote
  #27  
Old 11-13-2002, 06:12 PM
Dean C's Avatar
Dean C Dean C is offline
 
Join Date: Jan 2002
Location: England
Posts: 9,071
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yes whats yourusergroupid?

- miSt
Reply With Quote
  #28  
Old 11-14-2002, 08:01 AM
Areku Areku is offline
 
Join Date: Feb 2002
Posts: 540
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Say that in addition to Admin (groupid 6) I wanna add Coadmin (groupid 9).
Reply With Quote
  #29  
Old 11-15-2002, 03:27 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 already have the hack installed find this line:

PHP Code:
if (($bbuserinfo[usergroupid] == 5) OR ($bbuserinfo[usergroupid] == 6) OR ($bbuserinfo[usergroupid] == 7) OR ($post[userid] == $bbuserinfo[userid])){ 
And change it to:

PHP Code:
if (($bbuserinfo[usergroupid] == 5) OR ($bbuserinfo[usergroupid] == 6) OR ($bbuserinfo[usergroupid] == 7) OR ($bbuserinfo[usergroupid] == 9) OR ($post[userid] == $bbuserinfo[userid])){ 
- miSt
Reply With Quote
  #30  
Old 11-23-2002, 05:18 PM
lalo landa lalo landa is offline
 
Join Date: Nov 2002
Posts: 50
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i doit a change..
I prefer an image button.

Then i made a report.gif and upload in images foulder (the report button in your forum style)

Remplace in showthread...

PHP Code:

 
////////// Start edit or report buttons hack //////////
  
if (($bbuserinfo[usergroupid] == 5) OR ($bbuserinfo[usergroupid] == 6) OR ($bbuserinfo[usergroupid] == 7) OR ($post[userid] == $bbuserinfo[userid])){
   
$post[editreport] = "<a href=\"editpost.php?s=$session[sessionhash]&action=editpost&postid=$post[postid]\"><img src=\"./images/edit.gif\" border=\"0\" alt=\"Edit/Delete Post\"></a> <a href=\"report.php?s=$session[sessionhash]&postid=$post[postid]\"><img src=\"./images/report.gif\" border=\"0\" alt=\"Report\"></a>";
  }else{
   
$post[editreport] = "<a href=\"report.php?s=$session[sessionhash]&postid=$post[postid]\"><img src=\"./images/report.gif\" border=\"0\" alt=\"Report\"></a>";
  }
/////// End edit or report buttons hack ///////////// 
and i made 1 change more..
I'm an admin and if i want to report some post to the moderators i can't ... then i add the report button to admins, mods, supermods and the user who made the post..

Sorry about my verry poor english..

I hope u understand and enjoy the modificattion

Cool Hack!
Reply With Quote
  #31  
Old 11-23-2002, 08:41 PM
Dean C's Avatar
Dean C Dean C is offline
 
Join Date: Jan 2002
Location: England
Posts: 9,071
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yes i do understand what you mean..

All these things will be in v2 mate

I got exams starting a week on monday so i haven't got time to test the next version out so im trying to get some help off someone

Regards

- miSt
Reply With Quote
Reply

Thread Tools

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 03:37 PM.


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.05611 seconds
  • Memory Usage 2,311KB
  • 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
  • (3)bbcode_php
  • (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
  • (4)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