vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   Delete a post with only one button (in postbit) (https://vborg.vbsupport.ru/showthread.php?t=60704)

Okiewan 01-26-2004 11:59 AM

Hummm... Okay.

Gary King 01-26-2004 12:41 PM

Quote:

Originally Posted by Okiewan
I allow 2 of my usergroups to delete their posts... they can delete their posts, but I assume the "manage" ability isn't there (that would be the best scenario).

Any way to limit this (icon visible) to Admins/Supermods only?

Add the following above the new code in postbit template:
PHP Code:

<if condition="$bbuserinfo['usergroupid'] == 5 or $bbuserinfo['usergroupid'] == 6"

and then </if> at the end of the newly added code in postbit template.

Done!

Gary King 01-26-2004 12:49 PM

Quote:

Originally Posted by Faranth
another hack that shows how lazy everyone really is

I thought it was fixed already, someone reported it was. Well, hmph I'll do it right now then :)

Gary King 01-26-2004 12:50 PM

Quote:

Originally Posted by gmarik
Make it a .txt file, ok?!

How come..? It should be simple enough to see just like this :)

Gary King 01-26-2004 12:51 PM

Quote:

Originally Posted by Gary W
I thought it was fixed already, someone reported it was. Well, hmph I'll do it right now then :)

Yeah looks fine to me I just tested, with $deletebutton as 1 and 0.

Okiewan 01-26-2004 12:53 PM

Great! Thanks Gary.

M.C. 01-26-2004 12:59 PM

thanks! any chanse for second modification (pop-up nitification window)?

Gary King 01-26-2004 01:10 PM

Quote:

Originally Posted by M.C.
thanks! any chanse for second modification (pop-up nitification window)?

How about adding a checkbox next to the button instead, so it's still all on one page? You have to check the checkbox and click on the button to delete?

M.C. 01-26-2004 01:52 PM

fine it`s better, to protect from misstake, couse i made options to Physically Remove Message delete...

Thanks!

zajako 01-26-2004 07:53 PM

Quote:

Originally Posted by Gary W
This is a really easy hack to install and use, and it allows you to delete any post with only one click, instead of going through the editing process and then selecting delete, and then confirming, etc.

Instructions

Open up the postbit template and find
PHP Code:

            <if condition="$post['editlink']"

Below, add:
PHP Code:

                <form action="editpost.php" method="post">
                    <
input type="hidden" name="s" value="$session[sessionhash]/>
                    <
input type="hidden" name="p" value="$post[postid]/>
                    <
input type="hidden" name="do" value="deletepost" />
                    
                    <
input type="submit" name="deletepost" value="<if condition="$deletebutton">delete<else />remove</if>" id="rb_del_soft" tabindex="1" class="button" />
                    
                </
form

Open includes/functions_showthread.php and find:
PHP Code:

    // hide users in Coventry from non-staff members 

Above, add:
PHP Code:

    $deletebutton 1// set to 1 to only hide the post, or 0 to permanently delete the post 

Done! :D

well done :)


All times are GMT. The time now is 07:56 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.01097 seconds
  • Memory Usage 1,759KB
  • 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
  • (5)bbcode_php_printable
  • (6)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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