Advertisement
Guest User

ad code special

a guest
Sep 5th, 2015
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.95 KB | None | 0 0
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <hookexport>
  3. <hookdata>
  4. <config>
  5. <hook_name>adCode Speciali</hook_name>
  6. <hook_desc>annunci pubblicitari personalizzati per sezioni aree...</hook_desc>
  7. <hook_author>BomAle</hook_author>
  8. <hook_email>ale54@live.it</hook_email>
  9. <hook_website>http://nodownloadzoneforum.net</hook_website>
  10. <hook_update_check/>
  11. <hook_requirements><![CDATA[a:3:{s:21:"required_applications";a:0:{}s:20:"hook_php_version_min";s:0:"";s:20:"hook_php_version_max";s:0:"";}]]></hook_requirements>
  12. <hook_version_human>1.0.0</hook_version_human>
  13. <hook_version_long>10000</hook_version_long>
  14. <hook_extra_data><![CDATA[a:2:{s:7:"display";a:1:{s:8:"settings";s:30:"Impostazioni Mobile, Sexy zone";}s:8:"settings";a:2:{i:0;s:14:"ad_code_mobile";i:1;s:12:"ad_code_sexy";}}]]></hook_extra_data>
  15. <hook_key>adcode_special</hook_key>
  16. <hook_global_caches/>
  17. </config>
  18. </hookdata>
  19. <hookfiles>
  20. <file>
  21. <hook_file_real>adCode_special_topic_view_first_post.php</hook_file_real>
  22. <hook_type>libraryHooks</hook_type>
  23. <hook_classname>adCode_special_topic_view_first_post</hook_classname>
  24. <hook_data><![CDATA[a:8:{s:12:"dataLocation";s:0:"";s:14:"libApplication";s:6:"forums";s:15:"classToOverload";s:25:"app_forums_classes_topics";s:9:"skinGroup";N;s:12:"skinFunction";N;s:4:"type";N;s:2:"id";N;s:8:"position";N;}]]></hook_data>
  25. <hooks_source><![CDATA[<?php
  26.  
  27. /**
  28. * Description of adCode_special_topic_view_first_post
  29. *
  30. * @author Alessandro <ale54@live.it>
  31. * @date 13-lug-2015, 15.19.02
  32. */
  33. class adCode_special_topic_view_first_post extends (~extends~)
  34. {
  35. public function parsePost( array $post )
  36. {
  37. $after_post = parent::parsePost($post);
  38.  
  39. if ( $after_post['post']['_adCode'] && !IPS_IS_AJAX && $this->registry->getClass('IPSAdCode')->userCanViewAds() )
  40. {
  41. if(in_array( $this->request['f'], $this->registry->getClass('class_forums')->forumsGetChildren(113, array(113)) ))
  42. {
  43. $after_post['post']['_adCode'] = $this->registry->getClass('IPSAdCode')->getAdCode( 'ad_code_sexy' );
  44. }
  45. elseif( $this->registry->output->isTouchDevice() || $this->registry->output->getAsMobileSkin() )
  46. {
  47. $after_post['post']['_adCode'] = $this->registry->getClass('IPSAdCode')->getAdCode( 'ad_code_mobile' );
  48. }
  49. }
  50.  
  51. return $after_post;
  52. }
  53. }
  54. ]]></hooks_source>
  55. </file>
  56. <file>
  57. <hook_file_real>adCode_special_topic_view.php</hook_file_real>
  58. <hook_type>commandHooks</hook_type>
  59. <hook_classname>adCode_special_topic_view</hook_classname>
  60. <hook_data><![CDATA[a:8:{s:12:"dataLocation";s:0:"";s:14:"libApplication";s:0:"";s:15:"classToOverload";s:27:"public_forums_forums_topics";s:9:"skinGroup";N;s:12:"skinFunction";N;s:4:"type";N;s:2:"id";N;s:8:"position";N;}]]></hook_data>
  61. <hooks_source><![CDATA[<?php
  62.  
  63. /**
  64. * Description of adCode_special_topic_view
  65. *
  66. * @author Alessandro <ale54@live.it>
  67. * @date 13-lug-2015, 14.42.43
  68. */
  69. class adCode_special_topic_view extends (~extends~)
  70. {
  71. public function doExecute( ipsRegistry $registry )
  72. {
  73. if( $this->registry->getClass('IPSAdCode')->userCanViewAds() )
  74. {
  75. if( in_array( $this->request['f'], $this->registry->getClass('class_forums')->forumsGetChildren(113, array(113)) ) )
  76. {
  77. ipsRegistry::$settings['ad_code_topic_view_header'] = $this->settings['ad_code_sexy'];
  78. ipsRegistry::$settings['ad_code_topic_view_footer'] = $this->settings['ad_code_sexy'];
  79. //$this->registry->getClass('IPSAdCode')->setGlobalCode( 'header', 'ad_code_sexy' );
  80. //$this->registry->getClass('IPSAdCode')->setGlobalCode( 'footer', 'ad_code_sexy' );
  81. }
  82. elseif( $this->registry->output->isTouchDevice() || $this->registry->output->getAsMobileSkin() )
  83. {
  84. ipsRegistry::$settings['ad_code_topic_view_header'] = $this->settings['ad_code_mobile'];
  85. ipsRegistry::$settings['ad_code_topic_view_footer'] = $this->settings['ad_code_mobile'];
  86. //$this->registry->getClass('IPSAdCode')->setGlobalCode( 'header', 'ad_code_mobile' );
  87. //$this->registry->getClass('IPSAdCode')->setGlobalCode( 'footer', 'ad_code_mobile' );
  88. }
  89. }
  90.  
  91. parent::doExecute( $registry );
  92. }
  93. }
  94. ]]></hooks_source>
  95. </file>
  96. <file>
  97. <hook_file_real>adCode_special_forum_view.php</hook_file_real>
  98. <hook_type>commandHooks</hook_type>
  99. <hook_classname>adCode_special_forum_view</hook_classname>
  100. <hook_data><![CDATA[a:8:{s:12:"dataLocation";s:0:"";s:14:"libApplication";s:0:"";s:15:"classToOverload";s:27:"public_forums_forums_forums";s:9:"skinGroup";N;s:12:"skinFunction";N;s:4:"type";N;s:2:"id";N;s:8:"position";N;}]]></hook_data>
  101. <hooks_source><![CDATA[<?php
  102.  
  103. /**
  104. * Description of adCode_special_forum_view
  105. *
  106. * @author Alessandro <ale54@live.it>
  107. * @date 13-lug-2015, 13.42.05
  108. */
  109. class adCode_special_forum_view extends (~extends~)
  110. {
  111. public function doExecute( ipsRegistry $registry )
  112. {
  113. if( $this->registry->getClass('IPSAdCode')->userCanViewAds() )
  114. {
  115. if( in_array( $this->request['f'], $this->registry->getClass('class_forums')->forumsGetChildren(113, array(113)) ) )
  116. {
  117. ipsRegistry::$settings['ad_code_forum_view_header'] = $this->settings['ad_code_sexy'];
  118. ipsRegistry::$settings['ad_code_forum_view_footer'] = $this->settings['ad_code_sexy'];
  119. //$this->registry->getClass('IPSAdCode')->setGlobalCode( 'header', 'ad_code_sexy' );
  120. //$this->registry->getClass('IPSAdCode')->setGlobalCode( 'footer', 'ad_code_sexy' );
  121. }
  122. elseif( $this->registry->output->isTouchDevice() || $this->registry->output->getAsMobileSkin() )
  123. {
  124. ipsRegistry::$settings['ad_code_forum_view_header'] = $this->settings['ad_code_mobile'];
  125. ipsRegistry::$settings['ad_code_forum_view_footer'] = $this->settings['ad_code_mobile'];
  126. //$this->registry->getClass('IPSAdCode')->setGlobalCode( 'header', 'ad_code_mobile' );
  127. //$this->registry->getClass('IPSAdCode')->setGlobalCode( 'footer', 'ad_code_mobile' );
  128. }
  129. }
  130. parent::doExecute( $registry );
  131. }
  132. }]]></hooks_source>
  133. </file>
  134. <file>
  135. <hook_file_real>adCode_special_forum_view_first_topic.php</hook_file_real>
  136. <hook_type>skinHooks</hook_type>
  137. <hook_classname>adCode_special_forum_view_first_topic</hook_classname>
  138. <hook_data><![CDATA[a:8:{s:12:"dataLocation";s:0:"";s:14:"libApplication";s:0:"";s:15:"classToOverload";s:10:"skin_forum";s:9:"skinGroup";N;s:12:"skinFunction";N;s:4:"type";N;s:2:"id";N;s:8:"position";N;}]]></hook_data>
  139. <hooks_source><![CDATA[
  140.  
  141. /**
  142. * Description of adCode_special_forum_view_first_topic
  143. *
  144. * @author Alessandro <ale54@live.it>
  145. * @date 13-lug-2015, 15.02.23
  146. */
  147. class adCode_special_forum_view_first_topic extends (~extends~)
  148. {
  149. public function topic($data, $forum_data, $other_data, $inforum)
  150. {
  151. if( isset($data['_adCode']) AND $data['_adCode'] )
  152. {
  153. if(in_array( $this->request['f'], $this->registry->getClass('class_forums')->forumsGetChildren(113, array(113)) ))
  154. {
  155. $data['_adCode'] = $this->registry->getClass('IPSAdCode')->getAdCode( 'ad_code_sexy' );
  156. }
  157. elseif( $this->registry->output->isTouchDevice() || $this->registry->output->getAsMobileSkin() )
  158. {
  159. $data['_adCode'] = $this->registry->getClass('IPSAdCode')->getAdCode( 'ad_code_mobile' );
  160. }
  161. }
  162.  
  163. return parent::topic($data, $forum_data, $other_data, $inforum);
  164. }
  165. }
  166. ]]></hooks_source>
  167. </file>
  168. <file>
  169. <hook_file_real>adCode_special_global.php</hook_file_real>
  170. <hook_type>skinHooks</hook_type>
  171. <hook_classname>adCode_special_global</hook_classname>
  172. <hook_data><![CDATA[a:8:{s:12:"dataLocation";s:0:"";s:14:"libApplication";s:0:"";s:15:"classToOverload";s:11:"skin_global";s:9:"skinGroup";N;s:12:"skinFunction";N;s:4:"type";N;s:2:"id";N;s:8:"position";N;}]]></hook_data>
  173. <hooks_source><![CDATA[class adCode_special_global extends (~extends~)
  174. {
  175. /**
  176. * Description of adCode_special_global
  177. *
  178. * @author Alessandro <ale54@live.it>
  179. * @date 5-sett-2015, 22.19.05
  180. */
  181. public function globalTemplate($html, $documentHeadItems, $css, $jsModules, $metaTags, array $header_items, $items=array(), $footer_items=array(), $stats=array())
  182. {
  183. if( $this->registry->getClass('IPSAdCode')->userCanViewAds() && ( $this->registry->output->isTouchDevice() || $this->registry->output->getAsMobileSkin() ) )
  184. {
  185. $items['adHeaderCode'] = $this->registry->getClass('IPSAdCode')->getAdCode( 'ad_code_mobile' );
  186. $items['adFooterCode'] = $this->registry->getClass('IPSAdCode')->getAdCode( 'ad_code_mobile' );
  187. }
  188.  
  189. return parent::globalTemplate( $html, $documentHeadItems, $css, $jsModules, $metaTags, $header_items, $items, $footer_items, $stats );
  190. }
  191. }]]></hooks_source>
  192. </file>
  193. </hookfiles>
  194. <hookextras_settings>
  195. <setting>
  196. <conf_is_title>1</conf_is_title>
  197. <conf_title_title>Ad Code Integration</conf_title_title>
  198. <conf_title_desc>These settings will allow you to enter ad codes that can then be displayed throughout your forum</conf_title_desc>
  199. <conf_title_noshow>0</conf_title_noshow>
  200. <conf_title_keyword>adcodeintegration</conf_title_keyword>
  201. <conf_title_app>core</conf_title_app>
  202. <conf_title_tab>System</conf_title_tab>
  203. </setting>
  204. <setting>
  205. <conf_id>1336</conf_id>
  206. <conf_title>Mobile</conf_title>
  207. <conf_description>testtttttttttttttt</conf_description>
  208. <conf_group>1</conf_group>
  209. <conf_type>textarea</conf_type>
  210. <conf_key>ad_code_mobile</conf_key>
  211. <conf_value/>
  212. <conf_default/>
  213. <conf_extra/>
  214. <conf_evalphp/>
  215. <conf_protected>0</conf_protected>
  216. <conf_position>15</conf_position>
  217. <conf_start_group/>
  218. <conf_add_cache>1</conf_add_cache>
  219. <conf_keywords>adcode_special</conf_keywords>
  220. <conf_title_keyword>adcodeintegration</conf_title_keyword>
  221. <conf_is_title>0</conf_is_title>
  222. </setting>
  223. <setting>
  224. <conf_id>1327</conf_id>
  225. <conf_title>Sexy zone</conf_title>
  226. <conf_description><![CDATA[disponibile per le sezioni <a href="http://nodownloadzoneforum.net/forum/113-sexy-zone/">sexy e figlie</a>...]]></conf_description>
  227. <conf_group>1</conf_group>
  228. <conf_type>textarea</conf_type>
  229. <conf_key>ad_code_sexy</conf_key>
  230. <conf_value/>
  231. <conf_default/>
  232. <conf_extra/>
  233. <conf_evalphp/>
  234. <conf_protected>0</conf_protected>
  235. <conf_position>14</conf_position>
  236. <conf_start_group>SPECIALI BY BOMALE</conf_start_group>
  237. <conf_add_cache>1</conf_add_cache>
  238. <conf_keywords>adcode_special</conf_keywords>
  239. <conf_title_keyword>adcodeintegration</conf_title_keyword>
  240. <conf_is_title>0</conf_is_title>
  241. </setting>
  242. </hookextras_settings>
  243. <hookextras_language/>
  244. <hookextras_modules/>
  245. <hookextras_help/>
  246. <hookextras_templates/>
  247. <hookextras_css/>
  248. <hookextras_replacements/>
  249. <hookextras_tasks/>
  250. <hookextras_database_create/>
  251. <hookextras_database_alter/>
  252. <hookextras_database_update/>
  253. <hookextras_database_insert/>
  254. </hookexport>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement