Current time: 01-09-2009, 02:32 AM Hello There, Guest! (LoginRegister)


Post Reply 
Plugin handles and locations
08-25-2006, 09:28 PM
Post: #21
RE: Plugin handles and locations
I tried that. What I am trying to do is rewrite the adsafp (Ads after first post) mod so that it doesn't require any core file changes. It shouldn't be too hard but so far I am having a bit of an issue with getting the function to display. I have thought of replacing the $seperator completely instead of adding the $adsafp in the seperator template.

I have to run out now but I will come back in a couple hours and tackle this. Any help would be appreciated. This should be an easy mod for someone that understands how the plugins work.

MYPS is now available for FREE!
Download over 30 exclusive plugins at Mybb Central.
[Image: mybbsig.php]
[Some plugins at Mybb Central are for paid subscribers only.]
Visit this user's website Find all posts by this user
Quote this message in a reply
02-08-2007, 10:03 AM
Post: #22
RE: Plugin handles and locations
CraKteR Wrote:Look here: http://mcdcpp.net/hooks.php
Thnx for this great job CraKteR.
Is this list of hooks updated to 1.2.2?

الدعم العربى
تطوير منتديات MyBB - كتب ودروس وملحقات الـ Php - دروس وكتب الـ XHTML - تطوير المواقع والمنتديات - ارسال الموقع الى محركات البحث - اشهار المواقع - برامج كمبيوتر - العاب كمبيوتر - برامج الجوالات وتعريبها
Cheap Web Hosting
Visit this user's website Find all posts by this user
Quote this message in a reply
02-20-2007, 10:37 PM
Post: #23
RE: Plugin handles and locations
I updated the file in the first post for MyBB 1.2.x. Thanks to Poncho from the german community who made the list.

Greets,
Michael
-------------
German MyBB-Site
MyBBoard.de
Get the german languagepack here
Visit this user's website Find all posts by this user
Quote this message in a reply
03-28-2007, 04:07 AM
Post: #24
RE: Plugin handles and locations
pepotiger Wrote:
CraKteR Wrote:Look here: http://mcdcpp.net/hooks.php
Thnx for this great job CraKteR.
Is this list of hooks updated to 1.2.2?

that site look down??

FFH - Free Forum Hosting (Coming Soon!)
Find all posts by this user
Quote this message in a reply
07-13-2008, 12:03 PM (This post was last modified: 07-13-2008 12:18 PM by krakjoe.)
Post: #25
RE: Plugin handles and locations
Displays best in notepad, I would update the wiki but the formatting goes strange and I'm bored now ... v1.2.13 found 642 calls to run_hooks[_by_ref]

Heres the code that made it ...

PHP Code:
<?php
$config
['path'] = 'C:\\xampp\\htdocs\\MyBB';
$config['seperator'] = '\\';
$config['version'] = '1.2.13';
$config['output'] = 'mybb_hooks_1_2_13.txt';
$config['files'] = array( );
$config['hooks'] = array( );
$config['filec'] = 0;
$config['dirc'] = 0;

function 
scan_mybb_for_files$path )
{
    global 
$config ;
    
    
$files = array( );
    
    if( ( 
$handle opendir$path ) ) )
    {
        while( ( 
$entry readdir$handle ) ) )
        {
            if( ( 
$entry != "." and $entry != ".." ) and ( $full sprintf"%s%s%s"$path$config['seperator'], $entry ) ) )
            {
                if( 
is_dir$full ) )
                {
                    
$config['dirc']++;
                    
                    
$files array_merge$filesscan_mybb_for_files$full ) );
                }
                else 
                {
                    
$files[] = $full;
                    
printf"\rWork\t%d files in %d sub-directories", ++$config['filec'], $config['dirc'] );
                }
            }
        }
    }
    
    return 
$files ;
}

if( ( 
$output fopen$config['output'], 'w+' ) ) )
{
    
printf"Done\tOpened %s for writing\r\n"$config['output'] );
    
    if( ( 
$config['files'] = scan_mybb_for_files$config['path'] ) ) )
    {
        
printf"\rDone\t%d files in %d sub-directories\r\n"$config['filec'], $config['dirc'] );
        
        foreach( 
$config['files'] as $file )
        {
            
$line 0;
            
            if( ( 
$contents file$file ) ) )
            {
                for( 
$line 0$line count$contents ); $line++ )
                {
                    if( 
preg_match'~((\$.*?) = )?\$plugins->run_hooks\("(.*?)"(, (.*))?\)~is'$contents[$line], $hook ) )
                    {
                        if( 
$long strlen$hook[3] ) ) $long strlen$hook[3] );
                        if( 
$longr strlentrim$hook[2] ) ) ) $longr strlentrim$hook[2] ) );
                        
                        
$config['hooks'][substr$filestrlen$config['path'] ) + )][] = array
                        (
                            
'line' => $line 1,
                            
'hook' => trim$hook[3] ),
                            
'args' => trim$hook[5] ),
                            
'return' => trim$hook[2] )
                        );
                        
                        
$config['hookc']++;
                    }
                    else if( 
preg_match'~((\$.*?) = )?\$plugins->run_hooks_by_ref\("(.*?)"(, (.*))?\)~is'$contents[$line], $hook ) )
                    {
                        if( 
$long strlen$hook[3] ) ) $long strlen$hook[3] );
                        if( 
$longr strlentrim$hook[2] ) ) ) $longr strlentrim$hook[2] ) );
                        
                        
$config['hooks'][substr$filestrlen$config['path'] ) + )][] = array
                        (
                            
'line' => $line 1,
                            
'hook' => trim$hook[3] ),
                            
'args' => trim$hook[5] ),
                            
'return' => trim$hook[2] )
                        );
                        
                        
$config['hookc']++;
                    }
                }
            }
        }
        
fprintf$output"Line\tHook%s\tReturn%s\tArguments\r\n"str_repeat" "$long strlen"Hook" ) ), str_repeat" "$longr strlen"Return" ) ) );
        
        foreach( 
$config['hooks'] as $file => $hooks )
        {
            
$config['fileuc']++;
            
            if( 
count$hooks ) ) fprintf$output"%s\r\n"$file );
            
            foreach( 
$hooks as $hook fprintf
            

                
$output
                
"%04d\t%s%s\t%s%s\t%s\r\n"
                
$hook['line'], $hook['hook'], str_repeat" "$long strlen$hook['hook'] ) ), $hook['return'] ? $hook['return'] : 'none'str_repeat" "$longr strlen$hook['return'] ) ), $hook['args'] ? $hook['args'] : 'none' 
            
);
        }
        
        
printf"Done\t%d hooks in %d files in %d sub-directories"$config['hookc'], $config['fileuc'], $config['dirc'] );
    }
}
?>

Have fun ...


Attached File(s)
.txt  mybb_hooks_1_2_13.txt (Size: 47 KB / Downloads: 51)
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump: