Version 3.0.5
This commit is contained in:
1 parent
19b38c7c74
commit
1d4720f3e2
3755 files changed
+508378
-664541
No files matched your search
@@ -0,0 +1,52 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<hookexport>
|
||||
<hookdata>
|
||||
<config>
|
||||
<hook_name>Последние темы</hook_name>
|
||||
<hook_desc>Выводит блок последних тем на главной странице форума</hook_desc>
|
||||
<hook_author>Invision Power Services, Inc</hook_author>
|
||||
<hook_email/>
|
||||
<hook_website>www.nulled.ws</hook_website>
|
||||
<hook_update_check/>
|
||||
<hook_requirements><![CDATA[a:4:{s:20:"hook_ipb_version_min";i:0;s:20:"hook_ipb_version_max";i:0;s:20:"hook_php_version_min";s:0:"";s:20:"hook_php_version_max";s:0:"";}]]></hook_requirements>
|
||||
<hook_version_human>1.0.0</hook_version_human>
|
||||
<hook_version_long>1000</hook_version_long>
|
||||
<hook_extra_data/>
|
||||
<hook_key>recent_topics</hook_key>
|
||||
</config>
|
||||
</hookdata>
|
||||
<hookfiles>
|
||||
<file>
|
||||
<hook_file_real>boardIndexRecentTopics.php</hook_file_real>
|
||||
<hook_type>templateHooks</hook_type>
|
||||
<hook_classname>boardIndexRecentTopics</hook_classname>
|
||||
<hook_data><![CDATA[a:6:{s:15:"classToOverload";N;s:9:"skinGroup";s:11:"skin_boards";s:12:"skinFunction";s:18:"boardIndexTemplate";s:4:"type";s:7:"foreach";s:2:"id";s:11:"side_blocks";s:8:"position";s:9:"outer.pre";}]]></hook_data>
|
||||
<hooks_source><![CDATA[<?php
|
||||
|
||||
class boardIndexRecentTopics
|
||||
{
|
||||
public $registry;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->registry = ipsRegistry::instance();
|
||||
}
|
||||
|
||||
public function getOutput()
|
||||
{
|
||||
return $this->registry->getClass('class_forums')->hooks_recentTopics();
|
||||
}
|
||||
}]]></hooks_source>
|
||||
</file>
|
||||
</hookfiles>
|
||||
<hookextras_settings/>
|
||||
<hookextras_language/>
|
||||
<hookextras_modules/>
|
||||
<hookextras_help/>
|
||||
<hookextras_templates/>
|
||||
<hookextras_tasks/>
|
||||
<hookextras_database_create/>
|
||||
<hookextras_database_alter/>
|
||||
<hookextras_database_update/>
|
||||
<hookextras_database_insert/>
|
||||
</hookexport>
|
||||
@@ -0,0 +1,142 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<hookexport>
|
||||
<hookdata>
|
||||
<config>
|
||||
<hook_name><![CDATA[Топ авторов]]></hook_name>
|
||||
<hook_desc>Выводит на главной странице форумов список самых активных пользователей за последние 24 часа</hook_desc>
|
||||
<hook_author>Invision Power Services, Inc</hook_author>
|
||||
<hook_email/>
|
||||
<hook_website>www.nulled.ws</hook_website>
|
||||
<hook_update_check/>
|
||||
<hook_requirements><![CDATA[a:4:{s:20:"hook_ipb_version_min";i:3;s:20:"hook_ipb_version_max";i:0;s:20:"hook_php_version_min";s:0:"";s:20:"hook_php_version_max";s:0:"";}]]></hook_requirements>
|
||||
<hook_version_human>1.0.0</hook_version_human>
|
||||
<hook_version_long>1000</hook_version_long>
|
||||
<hook_extra_data><![CDATA[a:1:{s:7:"display";a:1:{s:8:"settings";s:0:"";}}]]></hook_extra_data>
|
||||
<hook_key>todays_top_posters</hook_key>
|
||||
</config>
|
||||
</hookdata>
|
||||
<hookfiles>
|
||||
<file>
|
||||
<hook_file_real>boardIndexTopPosters.php</hook_file_real>
|
||||
<hook_type>templateHooks</hook_type>
|
||||
<hook_classname>boardIndexTopPosters</hook_classname>
|
||||
<hook_data><![CDATA[a:6:{s:15:"classToOverload";s:0:"";s:9:"skinGroup";s:11:"skin_boards";s:12:"skinFunction";s:18:"boardIndexTemplate";s:4:"type";s:7:"foreach";s:2:"id";s:11:"side_blocks";s:8:"position";s:9:"outer.pre";}]]></hook_data>
|
||||
<hooks_source><![CDATA[<?php
|
||||
|
||||
class boardIndexTopPosters
|
||||
{
|
||||
public $registry;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->registry = ipsRegistry::instance();
|
||||
$this->DB = $this->registry->DB();
|
||||
}
|
||||
|
||||
public function getOutput()
|
||||
{
|
||||
/* INIT */
|
||||
$time_high = time();
|
||||
$ids = array();
|
||||
$rows = array();
|
||||
$time_low = $time_high - (60*60*24);
|
||||
$todays_posts = 0;
|
||||
$store = array();
|
||||
|
||||
/* List of forum ids */
|
||||
foreach( ipsRegistry::getClass('class_forums')->forum_by_id as $id => $data )
|
||||
{
|
||||
if ( ! isset( $data['inc_postcount'] ) || ! $data['inc_postcount'] )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
$ids[] = $id;
|
||||
}
|
||||
|
||||
/* Found some forums? */
|
||||
if( count( $ids ) )
|
||||
{
|
||||
/* Total Posts Today */
|
||||
/*$total_today = $this->DB->buildAndFetch( array(
|
||||
'select' => 'count(*) as cnt',
|
||||
'from' => array( 'posts' => 'p' ),
|
||||
'where' => "p.post_date > {$time_low} AND t.forum_id IN(" . implode( ",", $ids ) . ")",
|
||||
'add_join' => array(
|
||||
array(
|
||||
'from' => array( 'topics' => 't' ),
|
||||
'where' => 't.tid=p.topic_id',
|
||||
'type' => 'left'
|
||||
)
|
||||
)
|
||||
) );*/
|
||||
|
||||
/* Query the top posters */
|
||||
$this->DB->build( array(
|
||||
'select' => 'COUNT(*) as tpost',
|
||||
'from' => array( 'posts' => 'p' ),
|
||||
'where' => "p.post_date > {$time_low} AND t.forum_id IN(" . implode( ",", $ids ) . ")",
|
||||
'group' => 'p.author_id',
|
||||
'order' => 'tpost DESC',
|
||||
'limit' => array( 0, 9 ),
|
||||
'add_join' => array(
|
||||
array( 'from' => array( 'topics' => 't' ),
|
||||
'where' => 't.tid=p.topic_id',
|
||||
'type' => 'left'
|
||||
),
|
||||
array( 'select'=> 'm.*',
|
||||
'from' => array( 'members' => 'm' ),
|
||||
'where' => 'm.member_id=p.author_id',
|
||||
'type' => 'left'
|
||||
),
|
||||
array(
|
||||
'select' => 'pp.*',
|
||||
'from' => array( 'profile_portal' => 'pp' ),
|
||||
'where' => 'pp.pp_member_id=m.member_id',
|
||||
'type' => 'left',
|
||||
),
|
||||
)
|
||||
) );
|
||||
$this->DB->execute();
|
||||
|
||||
/* Loop through and save the members */
|
||||
while( $r = $this->DB->fetch() )
|
||||
{
|
||||
$todays_posts += $r['tpost'];
|
||||
|
||||
$store[] = $r;
|
||||
}
|
||||
|
||||
/* Format the results for output */
|
||||
if( $todays_posts )
|
||||
{
|
||||
foreach( $store as $info )
|
||||
{
|
||||
$info['total_today_posts'] = $todays_posts;
|
||||
|
||||
if ($todays_posts > 0 and $info['tpost'] > 0)
|
||||
{
|
||||
//$info['today_pct'] = sprintf( '%.2f', ( $info['tpost'] / $total_today['cnt'] ) * 100 );
|
||||
}
|
||||
|
||||
$rows[] = IPSMember::buildDisplayData( $info );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $this->registry->getClass('output')->getTemplate('boards')->hookTopPosters( $rows );
|
||||
}
|
||||
}]]></hooks_source>
|
||||
</file>
|
||||
</hookfiles>
|
||||
<hookextras_settings/>
|
||||
<hookextras_language/>
|
||||
<hookextras_modules/>
|
||||
<hookextras_help/>
|
||||
<hookextras_templates/>
|
||||
<hookextras_tasks/>
|
||||
<hookextras_database_create/>
|
||||
<hookextras_database_alter/>
|
||||
<hookextras_database_update/>
|
||||
<hookextras_database_insert/>
|
||||
</hookexport>
|
||||
@@ -0,0 +1,53 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<hookexport>
|
||||
<hookdata>
|
||||
<config>
|
||||
<hook_name>Подписки на темы и форумы</hook_name>
|
||||
<hook_desc>Выводит на главной странице форумов блок подписок на форумы и темы</hook_desc>
|
||||
<hook_author>Invision Power Services, Inc</hook_author>
|
||||
<hook_email>dont@mail.me</hook_email>
|
||||
<hook_website>http://</hook_website>
|
||||
<hook_update_check/>
|
||||
<hook_requirements><![CDATA[a:4:{s:20:"hook_ipb_version_min";i:0;s:20:"hook_ipb_version_max";i:0;s:20:"hook_php_version_min";s:0:"";s:20:"hook_php_version_max";s:0:"";}]]></hook_requirements>
|
||||
<hook_version_human>1.0.0</hook_version_human>
|
||||
<hook_version_long>10000</hook_version_long>
|
||||
<hook_extra_data/>
|
||||
<hook_key>watched_content</hook_key>
|
||||
</config>
|
||||
</hookdata>
|
||||
<hookfiles>
|
||||
<file>
|
||||
<hook_file_real>boardIndexWatchedItems.php</hook_file_real>
|
||||
<hook_type>templateHooks</hook_type>
|
||||
<hook_classname>boardIndexWatchedItems</hook_classname>
|
||||
<hook_data><![CDATA[a:6:{s:15:"classToOverload";s:0:"";s:9:"skinGroup";s:11:"skin_boards";s:12:"skinFunction";s:18:"boardIndexTemplate";s:4:"type";s:7:"foreach";s:2:"id";s:11:"side_blocks";s:8:"position";s:9:"outer.pre";}]]></hook_data>
|
||||
<hooks_source><![CDATA[<?php
|
||||
|
||||
class boardIndexWatchedItems
|
||||
{
|
||||
public $registry;
|
||||
public $member;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->registry = ipsRegistry::instance();
|
||||
}
|
||||
|
||||
public function getOutput()
|
||||
{
|
||||
return $this->registry->getClass('class_forums')->hooks_watchedItems();
|
||||
}
|
||||
}]]></hooks_source>
|
||||
</file>
|
||||
</hookfiles>
|
||||
<hookextras_settings/>
|
||||
<hookextras_language/>
|
||||
<hookextras_modules/>
|
||||
<hookextras_help/>
|
||||
<hookextras_templates/>
|
||||
<hookextras_tasks/>
|
||||
<hookextras_database_create/>
|
||||
<hookextras_database_alter/>
|
||||
<hookextras_database_update/>
|
||||
<hookextras_database_insert/>
|
||||
</hookexport>
|
||||
Reference in new issue
Block a user