Skocz do zawartości

Brak powiadomień - [MD31] IP.Shoutbox Extender


Rekomendowane odpowiedzi

Opublikowano

Oki, w takim wypadku nie wiem czy to dobry temat na pytanie, ale...

Wgrałem ten plik do systemu poprzez import XML, skonfigurowałem:

2lbcs5s.jpg

ale mimo to powiadomienia w shoutboxie się nie pokazują ani przy pisaniu postów ani przy pisaniu tematów, czy o czymś zapomniałem? Wciąż jestem nowicjuszem w ipb, także nie bijcie po głowie :P

  • Manager
Opublikowano

To temat tylko o spolszczeniu. Jak masz problem z modem czy czymś innym to należy napisać nowy temat. Wydzielam Twój post do nowego tematu.

[ + ]

Jaką wersję forum masz?

intermedia - profesjonalne rozwiązania Invision Power Board

---

Chcesz uzyskać szybko i sprawnie pomoc? Uzupełnij wersję i adres w profilu.

Opublikowano

Mam tamten mod zainstalowany, obecnie wyłączony. Problem jest w tym że on informuje wyłącznie o nowych tematach, o postach nie.

Swoją drogą nie rozumiem- jak może zostać oficjalnie wypuszczony mod który nie działa? Przecież to nie jest żadna beta.. Nie da się tego jakoś własnoręcznie poprawić?

  • Manager
Opublikowano

Swoją drogą nie rozumiem- jak może zostać oficjalnie wypuszczony mod który nie działa?

Co w tym dziwnego? Przecież nie wypuszcza tego IPS, a jakiś inny amator, jak my wszyscy..

Nie da się tego jakoś własnoręcznie poprawić?

Pewnie tak - próbuj!

intermedia - profesjonalne rozwiązania Invision Power Board

---

Chcesz uzyskać szybko i sprawnie pomoc? Uzupełnij wersję i adres w profilu.

Opublikowano

Nie wiem czemu, ale byłem pewny, że to wyszło od IPSu..

A sam niestety tego się nie podejmę, moja wiedza na temat kodu kończy się tam, gdzie zaczyna się php 7.gif

Opublikowano

Podbijam, czy komuś się to udało ogarnąć? Nie chcę mi się też wierzył żeby ktoś przetłumaczył mod który nie działa :P

Więc może też spytam tak- czy komuś ten mod działa zarówno w zakresie powiadamiania o nowych tematach jak i nowych postach?

Jeśli komuś się uda to ogarnąć i pomoże mi z tym, to na pewno się odwdzięczę :)

Opublikowano

Sprawdziłem wersję oryginalną- niespolszczoną i pokazuje zarówno nowe tematy jak i posty.

Wniosek- coś jest skopane w spolszczeniu.. Mi potrzebne są jedynie spolszczone dwa zdania które się pojawiają w shoutboxie kiedy pojawia sie nowa odpowiedz lub temat, wiec próbowałem je zmienic w oryginalnym pliku xml, ale niestety po tych zmianach hook wcale nie działa..

Ktoś może podjąć się sprawdzenia o co chodzi?

pozdrawiam

Opublikowano (edytowane)

Spolszczona wersja:

<?xml version="1.0" encoding="utf-8"?>

<hookexport>

<hookdata>

<config>

<hook_name><![CDATA[[MD31] IP.Shoutbox Extender]]></hook_name>

<hook_desc>Extends IP.Shoutbox to be combined with other functions</hook_desc>

<hook_author>Massive Dynamics</hook_author>

<hook_email>[email protected]</hook_email>

<hook_website>http://massive-dynamics.biz</hook_website>

<hook_update_check/>

<hook_requirements><![CDATA[a:4:{s:20:"hook_ipb_version_min";i:31000;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.1</hook_version_human>

<hook_version_long>101</hook_version_long>

<hook_extra_data><![CDATA[a:4:{s:13:"settingGroups";a:1:{s:0:"";s:2:"47";}s:8:"settings";a:0:{}s:7:"display";a:2:{s:8:"settings";s:43:"Setting groups: [MD31] IP.Shoutbox Extender";s:8:"language";s:74:"From core_public_md: ipse_replied, ipse_topic_make_in, ipse_topic_make_pre";}s:8:"language";a:1:{s:14:"core_public_md";a:3:{s:0:"";s:12:"ipse_replied";i:1;s:18:"ipse_topic_make_in";i:2;s:19:"ipse_topic_make_pre";}}}]]></hook_extra_data>

<hook_key>md31_ipse</hook_key>

</config>

</hookdata>

<hookfiles>

<file>

<hook_file_real>IPSE_Topic.php</hook_file_real>

<hook_type>dataHooks</hook_type>

<hook_classname>IPSE_Topic</hook_classname>

<hook_data><![CDATA[a:8:{s:12:"dataLocation";s:12:"postAddTopic";s:14:"libApplication";s:0:"";s:15:"classToOverload";s:0:"";s:9:"skinGroup";N;s:12:"skinFunction";N;s:4:"type";N;s:2:"id";N;s:8:"position";N;}]]></hook_data>

<hooks_source><![CDATA[<?PHP

class IPSE_Topic{

public $library;

public $registry;

public $member;

public $DB;

public $settings;

public function handleData($data) {

$this->registry = ipsRegistry::instance();

ipsRegistry::getClass('class_localization')->loadLanguageFile( array( 'public_md' ), 'core' );

$lang = ipsRegistry::getClass('class_localization')->words;

/* Our library is loaded? */

if( !class_exists('app_class_shoutbox') OR !$this->registry->isClassLoaded('shoutboxLibrary') )

{

require_once( IPSLib::getAppDir('shoutbox').'/app_class_shoutbox.php' );

$app_class_shoutbox = new app_class_shoutbox( ipsRegistry::instance() );

}

$this->member = $this->registry->member()->fetchMemberData();;

/* Let's setup our shortcut =D */

$this->library = $this->registry->getClass('shoutboxLibrary');

/* Startup */

$this->library->_startup();

if ( !$this->member['g_shoutbox_use'] )

{

$return;

}

if ( $this->memberData['restrict_post'] )

{

if ( $this->memberData['restrict_post'] == 1 )

{

$return;

}

$post_arr = IPSMember::processBanEntry( $this->memberData['restrict_post'] );

/* Restriction is already ended? */

if ( time() >= $post_arr['date_end'] )

{

IPSMember::save( $this->memberData['member_id'], array( 'core' => array( 'restrict_post' => 0 ) ) );

}

/* Still restricted, oh well... */

else

{

$return;

}

}

$this->settings = $this->registry->settings();

if ($this->settings['md31_ipsextender_topics_onoff'] == 0) return;

$grps = explode(",", $this->settings['md31_ipsextender_topics_groups']);

$cont = false;

foreach ($grps as $id => $grp) {

if ((int)$grps[$id] == (int)$this->member['member_group_id'])

$cont = true;

}

if (!$cont) return;

$fdata = $this->registry->getClass('class_forums')->forum_by_id[$data['forum_id']];

$fgrps = explode(",", $this->settings['md31_ipsextender_topics_forums']);

$cont2 = false;

foreach ($fgrps as $id => $fgrp) {

if ((int)$fgrps[$id] == (int)$fdata['id'])

$cont2 = true;

}

if (!$cont2) return;

$url = $this->registry->output->buildSEOUrl( 'showforum=' . $fdata['id'], 'public', $fdata['name_seo'], 'showforum' );

$shout = $lang['ipse_topic_make_pre'] . $data['title'] . $lang['ipse_topic_make_in'] . " " . $fdata['name'] . "";

$shout = $this->library->han_editor->processRawPost( $shout );

$shout = $this->library->parser->preDbParse( $shout );

if ( $this->library->parser->error != "" )

{

$return;

}

if ( strlen( trim( IPSText::removeControlCharacters( IPSText::br2nl( $shout ) ) ) ) < 1 )

{

$return;

}

if ( $this->library->shout_max_length && IPSText::mbstrlen( $shout ) > $this->library->shout_max_length )

{

$return;

}

$this->DB = $this->registry->DB();

// Finally save shout

$this->DB->force_data_type = array( 's_mid' => 'int', 's_message' => 'string' );

$this->DB->insert( 'shoutbox_shouts',

array( 's_mid' => $this->member['member_id'],

's_message' => $shout,

's_date' => time(),

's_ip' => $this->member['ip_address']

)

);

/**

* Update our session when submitting shouts!

* By default ajax module doesn't update session

*/

//$this->member->updateMySession( array( 'current_appcomponent' => 'shoutbox', 'current_module' => 'ajax', 'current_section' => 'submit' ) );

/* Recache & return */

$this->library->recacheShouts('add');

//$this->library->return_shouts();

return $data;

}

}

?>]]></hooks_source>

</file>

<file>

<hook_file_real>IPSE_Post.php</hook_file_real>

<hook_type>dataHooks</hook_type>

<hook_classname>IPSE_Post</hook_classname>

<hook_data><![CDATA[a:8:{s:12:"dataLocation";s:12:"postAddReply";s:14:"libApplication";s:0:"";s:15:"classToOverload";s:0:"";s:9:"skinGroup";N;s:12:"skinFunction";N;s:4:"type";N;s:2:"id";N;s:8:"position";N;}]]></hook_data>

<hooks_source><![CDATA[<?PHP

class IPSE_Post{

public $library;

public $registry;

public $member;

public $DB;

public $settings;

public function handleData($data) {

$this->registry = ipsRegistry::instance();

ipsRegistry::getClass('class_localization')->loadLanguageFile( array( 'public_md' ), 'core' );

$lang = ipsRegistry::getClass('class_localization')->words;

/* Our library is loaded? */

if( !class_exists('app_class_shoutbox') OR !$this->registry->isClassLoaded('shoutboxLibrary') )

{

require_once( IPSLib::getAppDir('shoutbox').'/app_class_shoutbox.php' );

$app_class_shoutbox = new app_class_shoutbox( ipsRegistry::instance() );

}

$this->member = $this->registry->member()->fetchMemberData();;

/* Let's setup our shortcut =D */

$this->library = $this->registry->getClass('shoutboxLibrary');

/* Startup */

$this->library->_startup();

if ( !$this->member['g_shoutbox_use'] )

{

$return;

}

if ( $this->memberData['restrict_post'] )

{

if ( $this->memberData['restrict_post'] == 1 )

{

$return;

}

$post_arr = IPSMember::processBanEntry( $this->memberData['restrict_post'] );

/* Restriction is already ended? */

if ( time() >= $post_arr['date_end'] )

{

IPSMember::save( $this->memberData['member_id'], array( 'core' => array( 'restrict_post' => 0 ) ) );

}

/* Still restricted, oh well... */

else

{

$return;

}

}

$this->DB = $this->registry->DB();

$this->settings = $this->registry->settings();

if ($this->settings['md31_ipsextender_posts_onoff'] == 0) return;

$grps = explode(",", $this->settings['md31_ipsextender_posts_groups']);

$cont = false;

foreach ($grps as $id => $grp) {

if ((int)$grps[$id] == (int)$this->member['member_group_id'])

$cont = true;

}

if (!$cont) return;

$result = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'topics', 'where' => 'tid='.$data['topic_id'] ) );

$fgrps = explode(",", $this->settings['md31_ipsextender_posts_forums']);

$cont2 = false;

foreach ($fgrps as $id => $fgrp) {

if ((int)$fgrps[$id] == (int)$result['forum_id'])

$cont2 = true;

}

if (!$cont2) return;

$shout = $lang['ipse_replied'] . " . "]" . $result['title'] . "";

$shout = $this->library->han_editor->processRawPost( $shout );

$shout = $this->library->parser->preDbParse( $shout );

if ( $this->library->parser->error != "" )

{

$return;

}

if ( strlen( trim( IPSText::removeControlCharacters( IPSText::br2nl( $shout ) ) ) ) < 1 )

{

$return;

}

if ( $this->library->shout_max_length && IPSText::mbstrlen( $shout ) > $this->library->shout_max_length )

{

$return;

}

// Finally save shout

$this->DB->force_data_type = array( 's_mid' => 'int', 's_message' => 'string' );

$this->DB->insert( 'shoutbox_shouts',

array( 's_mid' => $this->member['member_id'],

's_message' => $shout,

's_date' => time(),

's_ip' => $this->member['ip_address']

)

);

/**

* Update our session when submitting shouts!

* By default ajax module doesn't update session

*/

//$this->member->updateMySession( array( 'current_appcomponent' => 'shoutbox', 'current_module' => 'ajax', 'current_section' => 'submit' ) );

/* Recache & return */

$this->library->recacheShouts('add');

//$this->library->return_shouts();

return $data;

}

}

?>]]></hooks_source>

</file>

</hookfiles>

<hookextras_settings>

<setting>

<conf_is_title>1</conf_is_title>

<conf_title_title><![CDATA[[MD31] IP.Shoutbox Extender]]></conf_title_title>

<conf_title_desc>Ustawienia dla rozszerzenia IP.Shoutbox Extender</conf_title_desc>

<conf_title_noshow>0</conf_title_noshow>

<conf_title_keyword>ips_shout_extender</conf_title_keyword>

<conf_title_app>shoutbox</conf_title_app>

<conf_title_tab>Hooks</conf_title_tab>

</setting>

<setting>

<conf_id>405</conf_id>

<conf_title>Włączyć notyfikacje o nowych tematach?</conf_title>

<conf_description>Włączyć notyfikacje o nowych tematach w shoutboxie?</conf_description>

<conf_group>47</conf_group>

<conf_type>yes_no</conf_type>

<conf_key>md31_ipsextender_topics_onoff</conf_key>

<conf_value/>

<conf_default>1</conf_default>

<conf_extra/>

<conf_evalphp/>

<conf_protected>1</conf_protected>

<conf_position>1</conf_position>

<conf_start_group>Nowe tematy</conf_start_group>

<conf_end_group>0</conf_end_group>

<conf_add_cache>1</conf_add_cache>

<conf_keywords>MD31 IP.Shoutbox Extender zezwala na notyfikacje o nowych tematach</conf_keywords>

<conf_title_keyword>ips_shout_extender</conf_title_keyword>

<conf_is_title>0</conf_is_title>

</setting>

<setting>

<conf_id>406</conf_id>

<conf_title>Włącz dla forów:</conf_title>

<conf_description>Wybierz fora które mają włączone notyfikacje</conf_description>

<conf_group>47</conf_group>

<conf_type>multi</conf_type>

<conf_key>md31_ipsextender_topics_forums</conf_key>

<conf_value/>

<conf_default/>

<conf_extra>#show_forums#</conf_extra>

<conf_evalphp><![CDATA[if ( $save == 1)

{

if ( is_array($_POST['md31_ipsextender_topics_forums']) )

{

$_POST['md31_ipsextender_topics_forums'] = implode(",",$_POST['md31_ipsextender_topics_forums']);

}

else

{

$_POST['md31_ipsextender_topics_forums'] = "";

}

$key = 'md31_ipsextender_topics_forums';

}

if ( $show == 1 )

{

$key = 'md31_ipsextender_topics_forums[]';

}]]></conf_evalphp>

<conf_protected>1</conf_protected>

<conf_position>2</conf_position>

<conf_start_group/>

<conf_end_group>0</conf_end_group>

<conf_add_cache>1</conf_add_cache>

<conf_keywords/>

<conf_title_keyword>ips_shout_extender</conf_title_keyword>

<conf_is_title>0</conf_is_title>

</setting>

<setting>

<conf_id>407</conf_id>

<conf_title>Włącz dla grup:</conf_title>

<conf_description>Wybierz grupy które widzą notyfikacje</conf_description>

<conf_group>47</conf_group>

<conf_type>multi</conf_type>

<conf_key>md31_ipsextender_topics_groups</conf_key>

<conf_value/>

<conf_default/>

<conf_extra>#show_groups#</conf_extra>

<conf_evalphp><![CDATA[if ( $save == 1)

{

if ( is_array($_POST['md31_ipsextender_topics_groups']) )

{

$_POST['md31_ipsextender_topics_groups'] = ','.implode(",",$_POST['md31_ipsextender_topics_groups']).',';

}

else

{

$_POST['md31_ipsextender_topics_groups'] = "";

}

$key = 'md31_ipsextender_topics_groups';

}

if ( $show == 1 )

{

$key = 'md31_ipsextender_topics_groups[]';

}]]></conf_evalphp>

<conf_protected>1</conf_protected>

<conf_position>3</conf_position>

<conf_start_group/>

<conf_end_group>1</conf_end_group>

<conf_add_cache>1</conf_add_cache>

<conf_keywords/>

<conf_title_keyword>ips_shout_extender</conf_title_keyword>

<conf_is_title>0</conf_is_title>

</setting>

<setting>

<conf_id>408</conf_id>

<conf_title>Włączyć notyfikacje o nowych postach?</conf_title>

<conf_description>Włączyć notyfikacje o nowych postach w shoutboxie?</conf_description>

<conf_group>47</conf_group>

<conf_type>yes_no</conf_type>

<conf_key>md31_ipsextender_posts_onoff</conf_key>

<conf_value/>

<conf_default>1</conf_default>

<conf_extra/>

<conf_evalphp/>

<conf_protected>1</conf_protected>

<conf_position>4</conf_position>

<conf_start_group>Nowe posty</conf_start_group>

<conf_end_group>0</conf_end_group>

<conf_add_cache>1</conf_add_cache>

<conf_keywords/>

<conf_title_keyword>ips_shout_extender</conf_title_keyword>

<conf_is_title>0</conf_is_title>

</setting>

<setting>

<conf_id>409</conf_id>

<conf_title>Włącz dla forów:</conf_title>

<conf_description>Wybierz fora które mają włączone notyfikacje</conf_description>

<conf_group>47</conf_group>

<conf_type>multi</conf_type>

<conf_key>md31_ipsextender_posts_forums</conf_key>

<conf_value/>

<conf_default/>

<conf_extra>#show_forums#</conf_extra>

<conf_evalphp><![CDATA[if ( $save == 1)

{

if ( is_array($_POST['md31_ipsextender_posts_forums']) )

{

$_POST['md31_ipsextender_posts_forums'] = implode(",",$_POST['md31_ipsextender_posts_forums']);

}

else

{

$_POST['md31_ipsextender_posts_forums'] = "";

}

$key = 'md31_ipsextender_posts_forums';

}

if ( $show == 1 )

{

$key = 'md31_ipsextender_posts_forums[]';

}]]></conf_evalphp>

<conf_protected>1</conf_protected>

<conf_position>5</conf_position>

<conf_start_group/>

<conf_end_group>0</conf_end_group>

<conf_add_cache>1</conf_add_cache>

<conf_keywords/>

<conf_title_keyword>ips_shout_extender</conf_title_keyword>

<conf_is_title>0</conf_is_title>

</setting>

<setting>

<conf_id>410</conf_id>

<conf_title>Włącz dla grup:</conf_title>

<conf_description>Wybierz grupy które widzą notyfikacje</conf_description>

<conf_group>47</conf_group>

<conf_type>multi</conf_type>

<conf_key>md31_ipsextender_posts_groups</conf_key>

<conf_value/>

<conf_default/>

<conf_extra>#show_groups#</conf_extra>

<conf_evalphp><![CDATA[if ( $save == 1)

{

if ( is_array($_POST['md31_ipsextender_posts_groups']) )

{

$_POST['md31_ipsextender_posts_groups'] = ','.implode(",",$_POST['md31_ipsextender_posts_groups']).',';

}

else

{

$_POST['md31_ipsextender_posts_groups'] = "";

}

$key = 'md31_ipsextender_posts_groups';

}

if ( $show == 1 )

{

$key = 'md31_ipsextender_posts_groups[]';

}]]></conf_evalphp>

<conf_protected>1</conf_protected>

<conf_position>6</conf_position>

<conf_start_group/>

<conf_end_group>1</conf_end_group>

<conf_add_cache>1</conf_add_cache>

<conf_keywords/>

<conf_title_keyword>ips_shout_extender</conf_title_keyword>

<conf_is_title>0</conf_is_title>

</setting>

</hookextras_settings>

<hookextras_language>

<language>

<word_app>core</word_app>

<word_pack>public_md</word_pack>

<word_key>ipse_topic_make_in</word_key>

<word_default><![CDATA[" in]]></word_default>

<word_custom/>

<word_js>0</word_js>

</language>

<language>

<word_app>core</word_app>

<word_pack>public_md</word_pack>

<word_key>ipse_replied</word_key>

<word_default> odpowiedział w temacie </word_default>

<word_custom/>

<word_js>0</word_js>

</language>

<language>

<word_app>core</word_app>

<word_pack>public_md</word_pack>

<word_key>ipse_topic_make_pre</word_key>

<word_default><![CDATA]></word_default>

<word_custom/>

<word_js>0</word_js>

</language>

</hookextras_language>

<hookextras_modules/>

<hookextras_help/>

<hookextras_templates/>

<hookextras_css/>

<hookextras_tasks/>

<hookextras_database_create/>

<hookextras_database_alter/>

<hookextras_database_update/>

<hookextras_database_insert/>

</hookexport>

Oryginalna wersja:

<?xml version="1.0" encoding="utf-8" ?> - <hookexport>

- <hookdata>

- <config>

- <hook_name>

- <![CDATA[ [MD31] IP.Shoutbox Extender ]]>

</hook_name> <hook_desc>Extends IP.Shoutbox to be combined with other functions</hook_desc> <hook_author>Massive Dynamics</hook_author> <hook_email>[email protected]</hook_email> <hook_website>http://massive-dynamics.biz</hook_website> <hook_update_check /> - <hook_requirements>

- <![CDATA[ a:4:{s:20:"hook_ipb_version_min";i:31000;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.1</hook_version_human> <hook_version_long>101</hook_version_long> - <hook_extra_data>

- <![CDATA[ a:4:{s:13:"settingGroups";a:1:{s:0:"";s:2:"47";}s:8:"settings";a:0:{}s:7:"display";a:2:{s:8:"settings";s:43:"Setting groups: [MD31] IP.Shoutbox Extender";s:8:"language";s:74:"From core_public_md: ipse_replied, ipse_topic_make_in, ipse_topic_make_pre";}s:8:"language";a:1:{s:14:"core_public_md";a:3:{s:0:"";s:12:"ipse_replied";i:1;s:18:"ipse_topic_make_in";i:2;s:19:"ipse_topic_make_pre";}}} ]]>

</hook_extra_data> <hook_key>md31_ipse</hook_key>

</config>

</hookdata>- <hookfiles>

- <file>

<hook_file_real>IPSE_Topic.php</hook_file_real> <hook_type>dataHooks</hook_type> <hook_classname>IPSE_Topic</hook_classname> - <hook_data>

- <![CDATA[ a:8:{s:12:"dataLocation";s:12:"postAddTopic";s:14:"libApplication";s:0:"";s:15:"classToOverload";s:0:"";s:9:"skinGroup";N;s:12:"skinFunction";N;s:4:"type";N;s:2:"id";N;s:8:"position";N;} ]]>

</hook_data>- <hooks_source>

- <![CDATA[ <?PHPclass IPSE_Topic{ public $library; public $registry; public $member; public $DB; public $settings; public function handleData($data) { $this->registry = ipsRegistry::instance(); ipsRegistry::getClass('class_localization')->loadLanguageFile( array( 'public_md' ), 'core' ); $lang = ipsRegistry::getClass('class_localization')->words; /* Our library is loaded? */ if( !class_exists('app_class_shoutbox') OR !$this->registry->isClassLoaded('shoutboxLibrary') ) { require_once( IPSLib::getAppDir('shoutbox').'/app_class_shoutbox.php' ); $app_class_shoutbox = new app_class_shoutbox( ipsRegistry::instance() ); } $this->member = $this->registry->member()->fetchMemberData();; /* Let's setup our shortcut =D */ $this->library = $this->registry->getClass('shoutboxLibrary'); /* Startup */ $this->library->_startup(); if ( !$this->member['g_shoutbox_use'] ) { $return; } if ( $this->memberData['restrict_post'] ) { if ( $this->memberData['restrict_post'] == 1 ) { $return; } $post_arr = IPSMember::processBanEntry( $this->memberData['restrict_post'] ); /* Restriction is already ended? */ if ( time() >= $post_arr['date_end'] ) { IPSMember::save( $this->memberData['member_id'], array( 'core' => array( 'restrict_post' => 0 ) ) ); } /* Still restricted, oh well... */ else { $return; } } $this->settings = $this->registry->settings(); if ($this->settings['md31_ipsextender_topics_onoff'] == 0) return; $grps = explode(",", $this->settings['md31_ipsextender_topics_groups']); $cont = false; foreach ($grps as $id => $grp) { if ((int)$grps[$id] == (int)$this->member['member_group_id']) $cont = true; } if (!$cont) return; $fdata = $this->registry->getClass('class_forums')->forum_by_id[$data['forum_id']]; $fgrps = explode(",", $this->settings['md31_ipsextender_topics_forums']); $cont2 = false; foreach ($fgrps as $id => $fgrp) { if ((int)$fgrps[$id] == (int)$fdata['id']) $cont2 = true; } if (!$cont2) return; $url = $this->registry->output->buildSEOUrl( 'showforum=' . $fdata['id'], 'public', $fdata['name_seo'], 'showforum' ); $shout = $lang['ipse_topic_make_pre'] . $data['title'] . $lang['ipse_topic_make_in'] . " " . $fdata['name'] . ""; $shout = $this->library->han_editor->processRawPost( $shout ); $shout = $this->library->parser->preDbParse( $shout ); if ( $this->library->parser->error != "" ) { $return; } if ( strlen( trim( IPSText::removeControlCharacters( IPSText::br2nl( $shout ) ) ) ) < 1 ) { $return; } if ( $this->library->shout_max_length && IPSText::mbstrlen( $shout ) > $this->library->shout_max_length ) { $return; } $this->DB = $this->registry->DB(); // Finally save shout $this->DB->force_data_type = array( 's_mid' => 'int', 's_message' => 'string' ); $this->DB->insert( 'shoutbox_shouts', array( 's_mid' => $this->member['member_id'], 's_message' => $shout, 's_date' => time(), 's_ip' => $this->member['ip_address'] ) ); /** * Update our session when submitting shouts! * By default ajax module doesn't update session */ //$this->member->updateMySession( array( 'current_appcomponent' => 'shoutbox', 'current_module' => 'ajax', 'current_section' => 'submit' ) ); /* Recache & return */ $this->library->recacheShouts('add'); //$this->library->return_shouts(); return $data; } }?> ]]>

</hooks_source>

</file>- <file>

<hook_file_real>IPSE_Post.php</hook_file_real> <hook_type>dataHooks</hook_type> <hook_classname>IPSE_Post</hook_classname> - <hook_data>

- <![CDATA[ a:8:{s:12:"dataLocation";s:12:"postAddReply";s:14:"libApplication";s:0:"";s:15:"classToOverload";s:0:"";s:9:"skinGroup";N;s:12:"skinFunction";N;s:4:"type";N;s:2:"id";N;s:8:"position";N;} ]]>

</hook_data>- <hooks_source>

- <![CDATA[ <?PHPclass IPSE_Post{ public $library; public $registry; public $member; public $DB; public $settings; public function handleData($data) { $this->registry = ipsRegistry::instance(); ipsRegistry::getClass('class_localization')->loadLanguageFile( array( 'public_md' ), 'core' ); $lang = ipsRegistry::getClass('class_localization')->words; /* Our library is loaded? */ if( !class_exists('app_class_shoutbox') OR !$this->registry->isClassLoaded('shoutboxLibrary') ) { require_once( IPSLib::getAppDir('shoutbox').'/app_class_shoutbox.php' ); $app_class_shoutbox = new app_class_shoutbox( ipsRegistry::instance() ); } $this->member = $this->registry->member()->fetchMemberData();; /* Let's setup our shortcut =D */ $this->library = $this->registry->getClass('shoutboxLibrary'); /* Startup */ $this->library->_startup(); if ( !$this->member['g_shoutbox_use'] ) { $return; } if ( $this->memberData['restrict_post'] ) { if ( $this->memberData['restrict_post'] == 1 ) { $return; } $post_arr = IPSMember::processBanEntry( $this->memberData['restrict_post'] ); /* Restriction is already ended? */ if ( time() >= $post_arr['date_end'] ) { IPSMember::save( $this->memberData['member_id'], array( 'core' => array( 'restrict_post' => 0 ) ) ); } /* Still restricted, oh well... */ else { $return; } } $this->DB = $this->registry->DB(); $this->settings = $this->registry->settings(); if ($this->settings['md31_ipsextender_posts_onoff'] == 0) return; $grps = explode(",", $this->settings['md31_ipsextender_posts_groups']); $cont = false; foreach ($grps as $id => $grp) { if ((int)$grps[$id] == (int)$this->member['member_group_id']) $cont = true; } if (!$cont) return; $result = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'topics', 'where' => 'tid='.$data['topic_id'] ) ); $fgrps = explode(",", $this->settings['md31_ipsextender_posts_forums']); $cont2 = false; foreach ($fgrps as $id => $fgrp) { if ((int)$fgrps[$id] == (int)$result['forum_id']) $cont2 = true; } if (!$cont2) return; $shout = $lang['ipse_replied'] . " . "]" . $result['title'] . ""; $shout = $this->library->han_editor->processRawPost( $shout ); $shout = $this->library->parser->preDbParse( $shout ); if ( $this->library->parser->error != "" ) { $return; } if ( strlen( trim( IPSText::removeControlCharacters( IPSText::br2nl( $shout ) ) ) ) < 1 ) { $return; } if ( $this->library->shout_max_length && IPSText::mbstrlen( $shout ) > $this->library->shout_max_length ) { $return; } // Finally save shout $this->DB->force_data_type = array( 's_mid' => 'int', 's_message' => 'string' ); $this->DB->insert( 'shoutbox_shouts', array( 's_mid' => $this->member['member_id'], 's_message' => $shout, 's_date' => time(), 's_ip' => $this->member['ip_address'] ) ); /** * Update our session when submitting shouts! * By default ajax module doesn't update session */ //$this->member->updateMySession( array( 'current_appcomponent' => 'shoutbox', 'current_module' => 'ajax', 'current_section' => 'submit' ) ); /* Recache & return */ $this->library->recacheShouts('add'); //$this->library->return_shouts(); return $data; } }?> ]]>

</hooks_source>

</file>

</hookfiles>- <hookextras_settings>

- <setting>

<conf_is_title>1</conf_is_title> - <conf_title_title>

- <![CDATA[ [MD31] IP.Shoutbox Extender ]]>

</conf_title_title> <conf_title_desc>Configures the options for the IP.Shoutbox Extender hook</conf_title_desc> <conf_title_noshow>0</conf_title_noshow> <conf_title_keyword>ips_shout_extender</conf_title_keyword> <conf_title_app>shoutbox</conf_title_app> <conf_title_tab>Hooks</conf_title_tab>

</setting>- <setting>

<conf_id>405</conf_id> <conf_title>Allow notification of new topics?</conf_title> <conf_description>Allow notification of new topics in the shoutbox?</conf_description> <conf_group>47</conf_group> <conf_type>yes_no</conf_type> <conf_key>md31_ipsextender_topics_onoff</conf_key> <conf_value /> <conf_default>1</conf_default> <conf_extra /> <conf_evalphp /> <conf_protected>1</conf_protected> <conf_position>1</conf_position> <conf_start_group>New topics</conf_start_group> <conf_end_group>0</conf_end_group> <conf_add_cache>1</conf_add_cache> <conf_keywords>MD31 IP.Shoutbox Extender allow new topic notification</conf_keywords> <conf_title_keyword>ips_shout_extender</conf_title_keyword> <conf_is_title>0</conf_is_title>

</setting>- <setting>

<conf_id>406</conf_id> <conf_title>Allowed forums</conf_title> <conf_description>Forums that have this notification allowed</conf_description> <conf_group>47</conf_group> <conf_type>multi</conf_type> <conf_key>md31_ipsextender_topics_forums</conf_key> <conf_value /> <conf_default /> <conf_extra>#show_forums#</conf_extra> - <conf_evalphp>

- <![CDATA[ if ( $save == 1){ if ( is_array($_POST['md31_ipsextender_topics_forums']) ) { $_POST['md31_ipsextender_topics_forums'] = implode(",",$_POST['md31_ipsextender_topics_forums']); } else { $_POST['md31_ipsextender_topics_forums'] = ""; } $key = 'md31_ipsextender_topics_forums';}if ( $show == 1 ){$key = 'md31_ipsextender_topics_forums[]';} ]]>

</conf_evalphp> <conf_protected>1</conf_protected> <conf_position>2</conf_position> <conf_start_group /> <conf_end_group>0</conf_end_group> <conf_add_cache>1</conf_add_cache> <conf_keywords /> <conf_title_keyword>ips_shout_extender</conf_title_keyword> <conf_is_title>0</conf_is_title>

</setting>- <setting>

<conf_id>407</conf_id> <conf_title>Allowed groups</conf_title> <conf_description>Groups that can have these notifications</conf_description> <conf_group>47</conf_group> <conf_type>multi</conf_type> <conf_key>md31_ipsextender_topics_groups</conf_key> <conf_value /> <conf_default /> <conf_extra>#show_groups#</conf_extra> - <conf_evalphp>

- <![CDATA[ if ( $save == 1){ if ( is_array($_POST['md31_ipsextender_topics_groups']) ) { $_POST['md31_ipsextender_topics_groups'] = ','.implode(",",$_POST['md31_ipsextender_topics_groups']).','; } else { $_POST['md31_ipsextender_topics_groups'] = ""; } $key = 'md31_ipsextender_topics_groups';}if ( $show == 1 ){$key = 'md31_ipsextender_topics_groups[]';} ]]>

</conf_evalphp> <conf_protected>1</conf_protected> <conf_position>3</conf_position> <conf_start_group /> <conf_end_group>1</conf_end_group> <conf_add_cache>1</conf_add_cache> <conf_keywords /> <conf_title_keyword>ips_shout_extender</conf_title_keyword> <conf_is_title>0</conf_is_title>

</setting>- <setting>

<conf_id>408</conf_id> <conf_title>Allow notification of new posts?</conf_title> <conf_description>Whether to allow notification of new posts or not</conf_description> <conf_group>47</conf_group> <conf_type>yes_no</conf_type> <conf_key>md31_ipsextender_posts_onoff</conf_key> <conf_value /> <conf_default>1</conf_default> <conf_extra /> <conf_evalphp /> <conf_protected>1</conf_protected> <conf_position>4</conf_position> <conf_start_group>New posts</conf_start_group> <conf_end_group>0</conf_end_group> <conf_add_cache>1</conf_add_cache> <conf_keywords /> <conf_title_keyword>ips_shout_extender</conf_title_keyword> <conf_is_title>0</conf_is_title>

</setting>- <setting>

<conf_id>409</conf_id> <conf_title>Allowed forums</conf_title> <conf_description>Forums that have this notification allowed</conf_description> <conf_group>47</conf_group> <conf_type>multi</conf_type> <conf_key>md31_ipsextender_posts_forums</conf_key> <conf_value /> <conf_default /> <conf_extra>#show_forums#</conf_extra> - <conf_evalphp>

- <![CDATA[ if ( $save == 1){ if ( is_array($_POST['md31_ipsextender_posts_forums']) ) { $_POST['md31_ipsextender_posts_forums'] = implode(",",$_POST['md31_ipsextender_posts_forums']); } else { $_POST['md31_ipsextender_posts_forums'] = ""; } $key = 'md31_ipsextender_posts_forums';}if ( $show == 1 ){$key = 'md31_ipsextender_posts_forums[]';} ]]>

</conf_evalphp> <conf_protected>1</conf_protected> <conf_position>5</conf_position> <conf_start_group /> <conf_end_group>0</conf_end_group> <conf_add_cache>1</conf_add_cache> <conf_keywords /> <conf_title_keyword>ips_shout_extender</conf_title_keyword> <conf_is_title>0</conf_is_title>

</setting>- <setting>

<conf_id>410</conf_id> <conf_title>Allowed groups</conf_title> <conf_description>Groups that can have these notifications</conf_description> <conf_group>47</conf_group> <conf_type>multi</conf_type> <conf_key>md31_ipsextender_posts_groups</conf_key> <conf_value /> <conf_default /> <conf_extra>#show_groups#</conf_extra> - <conf_evalphp>

- <![CDATA[ if ( $save == 1){ if ( is_array($_POST['md31_ipsextender_posts_groups']) ) { $_POST['md31_ipsextender_posts_groups'] = ','.implode(",",$_POST['md31_ipsextender_posts_groups']).','; } else { $_POST['md31_ipsextender_posts_groups'] = ""; } $key = 'md31_ipsextender_posts_groups';}if ( $show == 1 ){$key = 'md31_ipsextender_posts_groups[]';} ]]>

</conf_evalphp> <conf_protected>1</conf_protected> <conf_position>6</conf_position> <conf_start_group /> <conf_end_group>1</conf_end_group> <conf_add_cache>1</conf_add_cache> <conf_keywords /> <conf_title_keyword>ips_shout_extender</conf_title_keyword> <conf_is_title>0</conf_is_title>

</setting>

</hookextras_settings>- <hookextras_language>

- <language>

<word_app>core</word_app> <word_pack>public_md</word_pack> <word_key>ipse_topic_make_in</word_key> - <word_default>

- <![CDATA[ " in ]]>

</word_default> <word_custom /> <word_js>0</word_js>

</language>- <language>

<word_app>core</word_app> <word_pack>public_md</word_pack> <word_key>ipse_replied</word_key> <word_default>I replied to the topic called</word_default> <word_custom /> <word_js>0</word_js>

</language>- <language>

<word_app>core</word_app> <word_pack>public_md</word_pack> <word_key>ipse_topic_make_pre</word_key> - <word_default>

- <![CDATA[ I created a topic called " ]]>

</word_default> <word_custom /> <word_js>0</word_js>

</language>

</hookextras_language> <hookextras_modules /> <hookextras_help /> <hookextras_templates /> <hookextras_css /> <hookextras_tasks /> <hookextras_database_create /> <hookextras_database_alter /> <hookextras_database_update /> <hookextras_database_insert />

</hookexport>

Edytowane przez DawPi
Dodane tagi spoiler.
Opublikowano

Ta oryginalna coś Ci się sypnęła. Do długich kodów na forum mamy tag LONG lub spoiler. Polecam. :P

No właśnie szukałem czegoś takiego jak codebox, ale nie znalazłem, dzięki za info Tip-Hat.gif

Dasz radę z tym oryginalnym kodem, czy mam próbować to jakoś naprawiać?

  • Manager
Opublikowano

Wgraj oryginalną wersję. Nie wgrywaj spolszczenia, skoro jest uszkodzone, a najlepiej je zaraportuj w naszym centrum downloadu - pozwoli nam to sprawniej się tym zająć.

intermedia - profesjonalne rozwiązania Invision Power Board

---

Chcesz uzyskać szybko i sprawnie pomoc? Uzupełnij wersję i adres w profilu.

Opublikowano (edytowane)

Tak jak naisałem w podanym przez Ciebie temacie - teksty w shoutboxie były wciąż po angielsku, spolszczyłem je.

Bądź co bądź mod jest baaardzo niedoskonały przez dwie pierdółki:

1. Powiadomienie o nowym temacie odnosi do działu w jakim się znajduje, a nie bezpośrednio do niego.

2. Powiadomienie o nowej odpowiedzi przenosi do pierwszego posta, zamiast pierwszej nieprzeczytanej, czy ostatniej napisanej odpowiedzi.

Są to błahostki bardzo utrudniające sprawę i jeśli ktoś zdecydowałby się nad tym popracować to mielibyśmy bardzo fajnego moda. Ja niestety nie jestem programistą, więc niewiele poradzę.

Polecam tego moda używać do powiadomień o postach, a do powiadomień o nowych tematach użyć (M31) Shoutbox Topic Alert.

Mi do pełni shoutboxowego szczęścia brakuje jeszcze:

- powiadomień dźwiękowych o nowej wiadomości,

- przenosin do ostatniej napisanej odpowiedzi,

- usuwania shoutów jednym klikiem, np. za pomocą ixa pojawiącego się koło każdego shouta (a może istnieje już coś takiego dla ipb? to jedna z funkcjonalności bodajże wszystkich shoutboxów dla phpbb)

sorki jeśli mało wyraźnie to wyszło, późno jest i oczy mi się same zamykają ;)

Edytowane przez Koczkodan

Jeśli chcesz dodać odpowiedź, zaloguj się lub zarejestruj nowe konto

Jedynie zarejestrowani użytkownicy mogą komentować zawartość tej strony.

Zarejestruj nowe konto

Załóż nowe konto. To bardzo proste!

Zarejestruj się

Zaloguj się

Posiadasz już konto? Zaloguj się poniżej.

Zaloguj się
  • Ostatnio przeglądający   0 użytkowników

    • Brak zarejestrowanych użytkowników przeglądających tę stronę.
×
×
  • Dodaj nową pozycję...

Powiadomienie o plikach cookie

Umieściliśmy na Twoim urządzeniu pliki cookie, aby pomóc Ci usprawnić przeglądanie strony. Możesz dostosować ustawienia plików cookie, w przeciwnym wypadku zakładamy, że wyrażasz na to zgodę.