View Single Post
  #912  
Old 08-09-2005, 09:10 PM
James Grant James Grant is offline
 
Join Date: Jul 2005
Posts: 6
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It's ok lol.... I found it myself.

If anyone else wants to know
(and by the way before you look at the code, PLEASE be aware that i can't code to save my life! so i've just looked at it hard and modified it a bit)

Proper developers will freak at this lol:

in members.php:

Change inbetween where it says "//Enable or Disable deletion-ability " and "//Subject" to this:

Code:
//Enable or Disable deletion-ability
                    if(GBUSERID == $bbuserinfo['userid'] or $permissions['adminpermissions'] or ($split['1'] == $bbuserinfo['userid'] && time() < ($split['0']+($vboptions['editthreadtitlelimit']*60)))) {
                        $html .= "
                        <script LANGUAGE=\"JavaScript\">
                        <!--
                        function confirmSubmit()
                        {
                        var agree=confirm(\"".$vbphrase['wg_areyousure']."\");
                        if (agree)
                            return true ;
                        else
                            return false ;
                        }
                        // -->
                        </script>

                        <table border=0 cellspacing=0 cellpadding=2>
                        <tr><td><table border=0 cellspacing=0 cellpadding=0>
                        <form action=\"member.php?u=".GBUSERID."\" method=\"post\">
                        <input type=\"hidden\" name=\"do\" value=\"remove_gbentry\">
                        <input type=\"hidden\" name=\"gbtime\" value=\"".$split['0']."\">
                        <input type=\"hidden\" name=\"gbuserid\" value=\"".$split['1']."\">
                        <tr><td><input onClick=\"return confirmSubmit()\" type=\"image\" src=\"images/buttons/gbremove.gif\" title=\"".$vbphrase['wg_remove']."\"></td></tr>
                        </form>
                        </table></td><td></td></tr>
                        </table>";
                    }
                    
                    if(GBUSERID == $bbuserinfo['b'] or $permissions['adminpermissions'] or ($split['1'] == $bbuserinfo['userid'] && time() < ($split['0']+($vboptions['editthreadtitlelimit']*60)))) {
                        $html .= "
                        <script LANGUAGE=\"JavaScript\">
                        <!--
                        function confirmSubmit()
                        {
                        var agree=confirm(\"".$vbphrase['wg_areyousure']."\");
                        if (agree)
                            return true ;
                        else
                            return false ;
                        }
                        // -->
                        </script>

                        <table border=0 cellspacing=0 cellpadding=2>
                        <tr><td><table border=0 cellspacing=0 cellpadding=0>

                        </table></td><td><table border=0 cellspacing=0 cellpadding=0>
                        <form action=\"member.php?u=".GBUSERID."\" method=\"post\">
                        <input type=\"hidden\" name=\"do\" value=\"edit_gbentry\">
                        <input type=\"hidden\" name=\"gbtime\" value=\"".$split['0']."\">
                        <input type=\"hidden\" name=\"gbuserid\" value=\"".$split['1']."\">
                        <tr><td><input type=\"image\" src=\"images/buttons/gbedit.gif\" title=\"".$vbphrase['wg_edit']."\"></td></tr>
                        </form>
                        </table></td></tr>
                        </table>";
                    }
                    



                    $html .= "</td><td width=100% class=\"smallfont\">";
                    //Subject

By the way i had to use a bit of code that proper coders will freak at lol...

I used GBUSERID == $bbuserinfo['b'] in the 2nd bit to make sure it was skipped (as in i know there isnt a variable called "b", so it will just skip it) to get it working...

If someone can improve on the code it would be cool. It seems to be working at the moment but the code is really dirty, so i spologise! again i cant code at all, and i dont know what half of the code means lol.... so please dont start shouting at me :squareeyed:


Just thought i'd post it to share with anyone else who's doing something like this


J
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01062 seconds
  • Memory Usage 1,799KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.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_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • 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
  • showpost_complete