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)
-   -   MAF: (Moderator Application Form & Application Rating Module) (https://vborg.vbsupport.ru/showthread.php?t=77340)

Yukino_AE 08-25-2005 10:33 PM

[QUOTE=djsydeburnz]Would there be a way to send a PM to all moderators rather than having it post to a forum?

Quote:

Originally Posted by sabret00the
yes there would but it requires hacking the hack.

would you be able to tell us how to do this?

sabret00the 08-25-2005 10:43 PM

Quote:

Originally Posted by Yukino_AE
no i don't really need that. i'm frequently in the admin cp so i'm always checking.

in that case, comment out the thread creation bit.

Yukino_AE 08-26-2005 02:24 AM

Quote:

Originally Posted by sabret00the
in that case, comment out the thread creation bit.

i'm sorry do what exactly?

djsydeburnz 08-26-2005 03:00 AM

thaks for the response.

is there plans for any of my questions in the future?

PM Mods when new apps are submitted
Automatically change usergroup to Moderator upon completion

sabret00the 08-26-2005 08:19 AM

Quote:

Originally Posted by Yukino_AE
i'm sorry do what exactly?

in maf_cron.php find
PHP Code:

        // Create thread
        
$poststarttime TIMENOW;
        
$maf_forumid intval($vboptions[maf_forumid]);
        
$DB_site->query("
            INSERT INTO " 
TABLE_PREFIX "thread(title, lastpost, forumid, open, replycount, postusername, postuserid, lastposter, dateline, visible, sticky)
            VALUES ('New Mod Applications To Be Rated',    
$poststarttime,    $maf_forumid, 1,    0,    '" $threadstuff[username] . "',    $threadstuff[userid],    '" $threadstuff[username] . "',    $poststarttime,    1,    0)
        "
);
        
$threadid $DB_site->insert_id();
    
        
// Now add Post to thread
        
$DB_site->query("
            INSERT INTO " 
TABLE_PREFIX "post(threadid, parentid, title, username, userid, dateline, pagetext, allowsmilie, showsignature, ipaddress, iconid, visible, attach)
            VALUES (
$threadid,    0,    'New Mod Applications To Be Rated',    '" $threadstuff[username] . "', $threadstuff[userid],    $poststarttime,    'Their are new moderator applications that need rating, please go and rate them, if need be return here to discuss them further.', 1,    1, '', 0, 1, 0)
        "
);
        
$postid $DB_site->insert_id();

        
// Add to last post on forumhome for that forum
        
$DB_site->query("
            UPDATE " 
TABLE_PREFIX "forum
            SET replycount = replycount + 1, lastpost = " 
TIMENOW ", lastposter = '" addslashes($threadstuff['username']) . "', lastthread = 'New Mod Applications To Be Rated', lastthreadid = $threadid, lasticonid = 0
            WHERE forumid = 
$maf_forumid
        "
); 

and replace with
PHP Code:

/*
        // Create thread
        $poststarttime = TIMENOW;
        $maf_forumid = intval($vboptions[maf_forumid]);
        $DB_site->query("
            INSERT INTO " . TABLE_PREFIX . "thread(title, lastpost, forumid, open, replycount, postusername, postuserid, lastposter, dateline, visible, sticky)
            VALUES ('New Mod Applications To Be Rated',    $poststarttime,    $maf_forumid, 1,    0,    '" . $threadstuff[username] . "',    $threadstuff[userid],    '" . $threadstuff[username] . "',    $poststarttime,    1,    0)
        ");
        $threadid = $DB_site->insert_id();
    
        // Now add Post to thread
        $DB_site->query("
            INSERT INTO " . TABLE_PREFIX . "post(threadid, parentid, title, username, userid, dateline, pagetext, allowsmilie, showsignature, ipaddress, iconid, visible, attach)
            VALUES ($threadid,    0,    'New Mod Applications To Be Rated',    '" . $threadstuff[username] . "', $threadstuff[userid],    $poststarttime,    'Their are new moderator applications that need rating, please go and rate them, if need be return here to discuss them further.', 1,    1, '', 0, 1, 0)
        ");
        $postid = $DB_site->insert_id();

        // Add to last post on forumhome for that forum
        $DB_site->query("
            UPDATE " . TABLE_PREFIX . "forum
            SET replycount = replycount + 1, lastpost = " . TIMENOW . ", lastposter = '" . addslashes($threadstuff['username']) . "', lastthread = 'New Mod Applications To Be Rated', lastthreadid = $threadid, lasticonid = 0
            WHERE forumid = $maf_forumid
        ");
*/ 


sabret00the 08-26-2005 08:21 AM

Quote:

Originally Posted by djsydeburnz
thaks for the response.

is there plans for any of my questions in the future?

PM Mods when new apps are submitted
Automatically change usergroup to Moderator upon completion

nope not on either, the pm one is the most likely but at the same time unlikely, however i'll be upgrading this hack i a couple weeks so we'll see how i feel then i suppose.

FatalBreeze 08-26-2005 10:16 AM

ok i installed the hack the problem is that when i ran the cron for the first time it gave me the error:

Code:

Warning: main(): Unable to access ./includes/cron/maf_cron.php.php in /rashy/cronadmin.php on line 56
 
Warning: main(./includes/cron/maf_cron.php.php): failed to open stream: No such file or directory in /rashy/cronadmin.php on line 56

(my admincp dir is called rashy and i set this value in the hack config.)

so i went through the cron and saw this:
PHP Code:

// ## Grabs global.php this grabs vbulletins global.php so we can use the most basic of vBulletins functions ##
chdir('FULL FORUMS PATH HERE'); //change to your vbulletin path
chdir("K:/Network/xampp/htdocs/forums/"); //change to your vbulletin path 

so, what do you mean by full forums path? do you mean
http://www.mysite.com/forums/
or
bin/user/public_html/ ?
i tried the latter by it didn't work...
what to do?

and im sorry for my awful coding skills but why did you wrote two chdir()s
one right after the other?

sabret00the 08-26-2005 02:29 PM

Quote:

Originally Posted by FatalBreeze
bin/user/public_html/

it's the equivalent of that, thought it should be "/home/site/public_html/forums/"

and delete teh line above it, this one "chdir('FULL FORUMS PATH HERE'); //change to your vbulletin path"

Yukino_AE 08-26-2005 08:52 PM

many thanx! ^_^

djsydeburnz 09-02-2005 11:54 AM

hmmm . . .

ran the script by calling it directly cuz ive been getting some emails. got this:

Shortlisting Email Sent To eclypz
Shortlisting Email Sent To Bucho

Fatal error: Call to undefined function: log_cron_action() in /home/httpd/vhosts/syde-sho.com/httpdocs/forums/includes/cron/maf_cron.php on line 163

this is what is on line 163:

log_cron_action($logmessage, $nextitem);


All times are GMT. The time now is 02:59 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.01370 seconds
  • Memory Usage 1,772KB
  • 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
  • (1)bbcode_code_printable
  • (3)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)pagenav_pagelinkrel
  • (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