Witam,
Wgrałem modyfikację (TH) Hide Links From Guests 1.0.0
Po wgraniu jak potrzeba od momentu wyświetlenia się komunikatu: "zaloguj się itd" wszystko pogrubia aż po stopkę.
<?xml version="1.0" encoding="utf-8"?>
<hookexport>
<hookdata>
<config>
<hook_name>(TH) Hide Links From Guest</hook_name>
<hook_desc>Hides Links from guests</hook_desc>
<hook_author>TheHappenen</hook_author>
<hook_email>
[email protected]</hook_email>
<hook_website>http://thehappenen.com</hook_website>
<hook_update_check/>
<hook_requirements><![CDATA[a:3:{s:21:"required_applications";a:0:{}s:20:"hook_php_version_min";s:5:"3.2.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:3:{s:7:"display";a:1:{s:8:"settings";s:76:"Setting groups: Hide Links From Guests<br />Settings: Hide Links From Guests";}s:13:"settingGroups";a:1:{s:0:"";s:16:"dg_hideLinkGuest";}s:8:"settings";a:1:{s:0:"";s:22:"dg_hideLinkGuest_onoff";}}]]></hook_extra_data>
<hook_key>dg_hideLinkGuest</hook_key>
<hook_global_caches/>
</config>
</hookdata>
<hookfiles>
<file>
<hook_file_real>dg_hideLinkGuest.php</hook_file_real>
<hook_type>skinHooks</hook_type>
<hook_classname>dg_hideLinkGuest</hook_classname>
<hook_data><![CDATA[a:8:{s:12:"dataLocation";s:0:"";s:14:"libApplication";s:0:"";s:15:"classToOverload";s:10:"skin_topic";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[class dg_hideLinkGuest extends skin_topic(~id~)
{
function post($post, $displayData, $topic, $forum=array())
{
if($this->settings['dg_hideLinkGuest_onoff'] == 1)
{
if (!$this->memberData['member_id'])
{
$dg_acc_register = $this->registry->getClass('output')->formatUrl( $this->registry->getClass('output')->buildUrl( "app=core&module=global§ion=register", "public",'' ), "", "" );
$dg_acc_login = $this->registry->getClass('output')->formatUrl( $this->registry->getClass('output')->buildUrl( "app=core&module=global§ion=login", "public",'' ), "", "" );
$post['post']['post'] = preg_replace('#<a(.*?)rel=\'nofollow external\'(.*?)<(.*?)a>#', ' <p class=\'message error\'><span style=\'font-size:10pt\'>Please Login <a href="'.$dg_acc_login.'" style=\'text-decoration:none;\'><b>HERE</b></a> or Register <a href="'.$dg_acc_register.'" style=\'text-decoration:none;\'><b>HERE<b></a> to see this link!</span></p> ', $post['post']['post']);
}
}
return parent::post($post, $displayData, $topic, $forum=array());
}
}]]></hooks_source>
</file>
</hookfiles>
<hookextras_settings>
<setting>
<conf_is_title>1</conf_is_title>
<conf_title_title>Hide Links From Guests</conf_title_title>
<conf_title_desc>Allows you to hide links from Guests</conf_title_desc>
<conf_title_noshow>0</conf_title_noshow>
<conf_title_keyword>dg_hideLinkGuest</conf_title_keyword>
<conf_title_app>core</conf_title_app>
<conf_title_tab>Hooks</conf_title_tab>
</setting>
<setting>
<conf_id>611</conf_id>
<conf_title>Hide Links From Guests</conf_title>
<conf_description/>
<conf_group>60</conf_group>
<conf_type>yes_no</conf_type>
<conf_key>dg_hideLinkGuest_onoff</conf_key>
<conf_value/>
<conf_default>0</conf_default>
<conf_extra/>
<conf_evalphp/>
<conf_protected>0</conf_protected>
<conf_position>1</conf_position>
<conf_start_group/>
<conf_add_cache>1</conf_add_cache>
<conf_keywords/>
<conf_title_keyword>dg_hideLinkGuest</conf_title_keyword>
<conf_is_title>0</conf_is_title>
</setting>
</hookextras_settings>
<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>
Nie jestem programistą, co mam zrobić?