View Single Post
  #1311  
Old 08-20-2009, 05:53 PM
AWJunkies AWJunkies is offline
 
Join Date: Jan 2005
Location: San Diego
Posts: 947
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

AWESOME MOD great work.

FOUR requests which I added to software but I know it would help others.

#1 Add a hook after the insert into database:
PHP Code:
    if ($form['action'] && in_array(5$form['action']) AND $complete)
    {
        
$sdata serialize($qo);
        
$db->query_write("INSERT INTO " TABLE_PREFIX "formresults
        (fid, userid, username, time, title, output, sdata)
        VALUES ('"
.$form[fid]."', '".$vbulletin->userinfo['userid']."', '".addslashes($vbulletin->userinfo['username'])."', ".TIMENOW.", '".addslashes($threadtitle)."', '".addslashes($formoutput)."', '".addslashes($sdata)."')
        "
);

    (
$hook $form[afterinsert]) ? eval($hook) : false;

        if (
$form[submitmessage])
        {
            
$errormessage $form[submitmessage];
        }
        else
        {
            
$errormessage "Form was submitted successfully.";
        }
    } 
#2 When posting new thread or post option is selected by default it should send forumid value in the forum html. This is because a lot of mods use forumid value in hooks BEFORE your mod initiates. global_start, global_complete, parse_templates etc and so on.

PHP Code:
$template_hook[form_hidden_fields].='<input type="hidden" name="forumid" value="'.$form[forumid].'" />'
ALTHOUGH you can just put this in the FORM START hook you have but many people might not know this and wondering why some mods are not working on the thread/post the forms are being posted too.

#3 Create a new table to handle who has voted on a form so a LOT more things can be done and compliant with database standards. This can open a lot more possibilities for people.

#4 Add appstatus system it is real easy I added an appstatus column in user table which:
0=no app
1=submitted
2=denied
3=reapply (didnt fill out completely or missed something or need more info from user)
You can have messages or whatever you want per status level. I have a message announcement telling them status on forum index. But that is for my case you can make this fully customizable can PM user status or whatever. Again up to the imagination. This option can also just be included in the form table that i mentioned in 3 which is BEST way to do it. In my case I have a single app and can apply once for this certain reg application system thing. But to make it fully workable to mod you should put this into the table I mentioned above real easy to implement this all.


But man this mod has made life a lot easier. I have even made a social group application system with it along with staff application system along with free account application system when sites are closed to registration.

Again great mod working perfect
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01310 seconds
  • Memory Usage 1,790KB
  • 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
  • (2)bbcode_php
  • (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