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-02-2002 10:00 PM

[v1.2] Edit / Report Button Hack
 
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

assassingod 11-03-2002 01:44 PM

Ah, great work miSt!:) Except wheres the download file?

Chris M 11-03-2002 01:47 PM

Nice:)

Satan

assassingod 11-03-2002 01:47 PM

Yeah, there is is:) Thanks miST, will use this

Dean C 11-03-2002 01:50 PM

Thanks assasingod :)

I didn't add the attachment in right away because i wanted to include the install link in the file :)

Regards

- miSt

Dean C 11-03-2002 02:58 PM

Note: Minor bug fix.... Re-apply the changes to showthread.php

Regards

- miSt

assassingod 11-03-2002 03:35 PM

Looks good. I had no troubles at all with it:)

Ps. Check your PM inbox miSt;)

DrkFusion 11-03-2002 03:36 PM

Mist you stole my friends avatar!!
Simple, but nice hack:)

Thats one for your profile ;)
Keep it coming
-Arunan

LOD-squa 11-03-2002 03:36 PM

Hey Nice hack Thanks!

DrkFusion 11-03-2002 03:50 PM

I was gonna install this, but just saw i had put the code in the phpinclude template cuz I am lazy, maybe when I have time I will move it to showthread.php :p

Good Job Though
-Arunan

Dean C 11-03-2002 03:51 PM

Thanks for the feedback..

A new version is on the way..

Regards

- miSt

assassingod 11-03-2002 03:56 PM

Quote:

Originally posted by DrkFusion
I was gonna install this, but just saw i had put the code in the phpinclude template cuz I am lazy, maybe when I have time I will move it to showthread.php :p

Good Job Though
-Arunan

Does it work if you place it in the phpinclude template? Because technically this could be a template mod if it does:p

Check you PMs miSt :sleep:

Dean C 11-03-2002 04:02 PM

I did and thats why there will be a new version on the way.

In the new version you'll have to put the code into showthread.php....

- miSt

assassingod 11-03-2002 04:04 PM

Ah, I get it. Cool:D

Got my PM?:ninja:

Dean C 11-03-2002 04:08 PM

Yes I got your PM..

A new version will be released soon!

- miSt

assassingod 11-03-2002 04:25 PM

Cool - Cant wait
(Check you PM box again;))

Unknown553 11-03-2002 04:52 PM

This has already been done before because I've had it installed for quite sometime now. However, it was never formally published.

Here's the thread, from the Requests forum: https://vborg.vbsupport.ru/showthrea...threadid=32414

assassingod 11-03-2002 04:59 PM

Yeah, but look at the date is was posted:
11-15-01 12:24 PM
Nearly a year ago - People arent going to see threads that old. Besides, miSt's hack is differently coded to fireflies:P

Dean C 11-03-2002 07:20 PM

Indeed...

The next release candidate will be coded differently too..

Hopefully i'll sort it out before Monday night :)

- miSt

assassingod 11-03-2002 07:23 PM

:DCant wait - Love this hack!
Great work again miSt
Edit:
I suppose this could be used for other things as well?

camikazi2k 11-07-2002 04:26 PM

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?

assassingod 11-07-2002 04:55 PM

What it does is show the Edit Button if you posted it, and shows the report button if you dont.

Dean C 11-07-2002 05:34 PM

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

kreftt 11-07-2002 06:16 PM

nice

it checks for your admin status as well, very nice

2 minutes --> works

thx

kreftt

Areku 11-13-2002 10:24 AM

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!

Dean C 11-13-2002 06:12 PM

Yes whats yourusergroupid?

- miSt

Areku 11-14-2002 08:01 AM

Say that in addition to Admin (groupid 6) I wanna add Coadmin (groupid 9).

Dean C 11-15-2002 03:27 PM

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

lalo landa 11-23-2002 05:18 PM

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!

Dean C 11-23-2002 08:41 PM

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

Dean C 11-24-2002 12:15 PM

Here's an image for the report in standard vbulletin 2.2.x style :)

Dean C 11-24-2002 12:21 PM

Update: Version 1.1 has been released.

Please read this post for more info

Regards

- miSt

Chris M 11-24-2002 12:22 PM

Cool:)

Satan

Dean C 11-24-2002 12:23 PM

Indeed

Kars10 11-24-2002 12:26 PM

Man this hack is so cool!!!
Thanks 4 sharing with us.

/me klicks install!

Dean C 11-24-2002 12:27 PM

Thanks Minifreunde

Glad you like it

Regards

- miSt

N9ne 11-24-2002 01:46 PM

I've got a question...I saw that you're using an if statement, with the usergroupids for mods, smods and admins I think...that will mean it's going to show the edit button to normal moderators, even if they don't mod that forum right?

(note to people who have conditional templates installed: this can be done through the postbit template)

Good work MiSt, release more hacks :p

Dean C 11-24-2002 02:36 PM

Yes thats correct lol

- miSt

N9ne 11-24-2002 03:12 PM

Then shouldn't you use the ismoderator function instead?

Dean C 11-24-2002 04:03 PM

Hmmm yea i thought about doing this just after i read your post... I'll try n beta test it now...

- miSt


All times are GMT. The time now is 05:50 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.01442 seconds
  • Memory Usage 1,800KB
  • 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
  • (3)bbcode_php_printable
  • (1)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
  • (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