init 4chan
This commit is contained in:
commit
c850337f1e
390 changed files with 195936 additions and 0 deletions
42
plugins/enhance_q.php
Normal file
42
plugins/enhance_q.php
Normal file
|
@ -0,0 +1,42 @@
|
|||
<?php
|
||||
/**
|
||||
* Enhance meta - Yotsuba plugin
|
||||
* Enhances meta with various fabulous bits and bobs.
|
||||
*/
|
||||
|
||||
function meta_is_thread_flagged( $resline )
|
||||
{
|
||||
global $log;
|
||||
|
||||
$rep = 0;
|
||||
$posts = array('admin' => '', 'developer' => '', 'mod' => '', 'manager' => '');
|
||||
|
||||
while( list( $resrow ) = each( $resline ) ) {
|
||||
|
||||
if( !$log[ $resrow ][ 'no' ] ) {
|
||||
break;
|
||||
}
|
||||
|
||||
if( $log[ $resrow ][ 'capcode' ] === 'none' ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$capcode = ( $log[ $resrow ][ 'capcode' ] == 'admin_highlight' ) ? 'admin' : $log[$resrow]['capcode'];
|
||||
$no = $log[$resrow]['no'];
|
||||
|
||||
$posts[$capcode] .= "$no,";
|
||||
|
||||
}
|
||||
|
||||
unset( $posts['none'] );
|
||||
|
||||
foreach( $posts as $key => $value ) {
|
||||
if( $posts[$key] != '' ) {
|
||||
$posts[$key] = substr($posts[$key], 0, -1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return array( $posts['admin'], $posts['developer'], $posts['mod'], $posts['manager'] );
|
||||
}
|
||||
?>
|
Loading…
Add table
Add a link
Reference in a new issue