Guest User

Untitled

a guest
Sep 5th, 2016
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 22.83 KB | None | 0 0
  1. <div class="td-page-options-tab-wrap">
  2. <div class="td-page-options-tab td-page-options-tab-active" data-panel-class="td-post-option-general"><a href="#">General</a></div>
  3. <div class="td-page-options-tab" data-panel-class="td-page-option-post-smart-list"><a href="#">Smart list</a></div>
  4. <div class="td-page-options-tab" data-panel-class="td-page-option-post-review"><a href="#">Reviews</a></div>
  5. </div>
  6.  
  7.  
  8. <div class="td-meta-box-inside">
  9.  
  10.  
  11. <!-- post option general -->
  12. <div class="td-page-option-panel td-post-option-general td-page-option-panel-active">
  13.  
  14. <div class="td-meta-box-row">
  15. <span class="td-page-o-custom-label">
  16. Post template:
  17. <?php
  18. td_util::tooltip_html('
  19. <h3>Post templates:</h3>
  20. <p>When this is set to "From panel" the theme will load the template that is set in the panel.</p>
  21. <ul>
  22. <li><strong>If set, this setting overrides</strong> the Theme panel setting from <i>Post settings > Default post template</i></li>
  23. </ul>
  24. ', 'right')
  25. ?>
  26. </span>
  27. <div class="td-inline-block-wrap">
  28. <?php
  29. echo td_panel_generator::visual_select_o(array(
  30. 'ds' => 'td_post_theme_settings',
  31. 'item_id' => '',
  32. 'option_id' => 'td_post_template',
  33. 'values' => td_api_single_template::_helper_td_global_list_to_metaboxes(),
  34. 'selected_value' => $mb->get_the_value('td_post_template')
  35. ));
  36. ?>
  37. </div>
  38. </div>
  39.  
  40.  
  41. <!-- primary category -->
  42. <div class="td-meta-box-row">
  43. <span class="td-page-o-custom-label">
  44. Primary category:
  45. <?php
  46. td_util::tooltip_html('
  47. <h3>Primary category explained:</h3>
  48. <p>In '. TD_THEME_NAME . ' theme each post has a <i>Primary category</i> and all the settings from that category will be trasfered to the post. The Primary category will
  49. also be used as a category label that appears on the thumbs and the category breadcrumb</p>
  50.  
  51. <p>Here are the settings that are inherited from the <i>Primary category</i>: Custom sidebars, Sidebar position and Background</p>
  52. <p>How the Primary category is picked</p>
  53. <ul>
  54. <li><strong>Manually</strong> - If you select it from this box, this post will inherit all the settings form the <i>Primary category</i>.</li>
  55. <li><strong>If the post has only one category</strong> - that will be the <i>Primary category</i></li>
  56. <li><strong>If the post has multiple categories and no manual Primary category</strong>, the theme will pick the first category from the categories of this post ordered alphabetically</li>
  57.  
  58. </ul>
  59. ', 'right')
  60. ?>
  61. </span>
  62. <?php $mb->the_field('td_primary_cat'); ?>
  63. <div class="td-select-style-overwrite td-inline-block-wrap">
  64. <select name="<?php $mb->the_name(); ?>" class="td-panel-dropdown">
  65. <option value="">Auto select a category</option>
  66. <?php
  67. $td_current_categories = td_util::get_category2id_array(false);
  68.  
  69. //print_r($td_current_categories);
  70. //die;
  71. foreach ($td_current_categories as $td_category => $td_category_id) {
  72. ?>
  73. <option value="<?php echo $td_category_id?>"<?php $mb->the_select_state($td_category_id); ?>><?php echo $td_category?></option>
  74. <?php
  75. }
  76. ?>
  77. </select>
  78. </div>
  79. <span class="td-page-o-info">If the posts has multiple categories, the one selected here will be used for settings and it appears in the category labels.</span>
  80. </div>
  81.  
  82.  
  83.  
  84. <!-- sidebar position -->
  85. <div class="td-meta-box-row">
  86. <span class="td-page-o-custom-label">
  87. Sidebar position:
  88. <?php
  89. td_util::tooltip_html('
  90. <h3>Sidebar position:</h3>
  91. <p>For best results and easy to maintain websites we recommend that you set the sidebar from the <i>Primary category</i> of this post. That way if you have
  92. multiple posts, when you change the category settings all the posts will match the category</p>
  93. <ul>
  94. <li><strong>This setting overrides</strong> the Theme panel setting from <i>Post settings > Default post template</i> and the <i>Category settings</i></li>
  95. <li><strong>On default</strong> - the post will look at the primary category settings and it will try to get the position form there. If the primary category
  96. does not have a custom sidebar position, the post will load the setting from <i>Template settings > Blog and posts template</i></li>
  97.  
  98. </ul>
  99. ', 'right')
  100. ?>
  101. </span>
  102. <?php
  103. echo td_panel_generator::visual_select_o(array(
  104. 'ds' => 'td_post_theme_settings',
  105. 'item_id' => '',
  106. 'option_id' => 'td_sidebar_position',
  107. 'values' => array(
  108. array('text' => '', 'title' => '', 'val' => '', 'class' => 'td-sidebar-position-default', 'img' => get_template_directory_uri() . '/includes/wp_booster/wp-admin/images/panel/sidebar-default.png'),
  109. array('text' => '', 'title' => '', 'val' => 'sidebar_left', 'class' => 'td-sidebar-position-left', 'img' => get_template_directory_uri() . '/includes/wp_booster/wp-admin/images/panel/sidebar-left.png'),
  110. array('text' => '', 'title' => '', 'val' => 'no_sidebar', 'class' => 'td-no-sidebar', 'img' => get_template_directory_uri() . '/includes/wp_booster/wp-admin/images/panel/sidebar-full.png'),
  111. array('text' => '', 'title' => '', 'val' => 'sidebar_right', 'class' => 'td-sidebar-position-right','img' => get_template_directory_uri() . '/includes/wp_booster/wp-admin/images/panel/sidebar-right.png')
  112. ),
  113. 'selected_value' => $mb->get_the_value('td_sidebar_position')
  114. ));
  115. ?>
  116. </div>
  117.  
  118.  
  119. <!-- custom sidebar -->
  120. <div class="td-meta-box-row">
  121. <span class="td-page-o-custom-label">
  122. Custom sidebar:
  123. <?php
  124. td_util::tooltip_html('
  125. <h3>Custom sidebar:</h3>
  126. <p>For best results and easy to maintain websites we recommend that you set the sidebar from the <i>Primary category</i> of this post. That way if you have
  127. multiple posts, when you change the category settings all the posts will match the category</p>
  128. <ul>
  129. <li><strong>This setting overrides</strong> the Theme panel setting from <i>Post settings > Default post template</i> and the <i>Category settings</i></li>
  130. <li><strong>On default</strong> - the post will look at the primary category settings and it will try to get the sidebar form there. If the primary category
  131. does not have a custom sidebar, the post will load the setting from <i>Template settings > Blog and posts template</i></li>
  132. </ul>
  133. ', 'right')
  134. ?>
  135. </span>
  136. <?php
  137. echo td_panel_generator::sidebar_pulldown(array(
  138. 'ds' => 'td_post_theme_settings',
  139. 'item_id' => '',
  140. 'option_id' => 'td_sidebar',
  141. 'selected_value' => $mb->get_the_value('td_sidebar')
  142. ));
  143. ?>
  144. </div>
  145.  
  146.  
  147.  
  148.  
  149.  
  150. <div class="td-meta-box-row">
  151. <?php $mb->the_field('td_subtitle'); ?>
  152. <span class="td-page-o-custom-label td_text_area_label">Subtitle:</span>
  153. <textarea name="<?php $mb->the_name(); ?>" class="td-textarea-subtitle"><?php $mb->the_value(); ?></textarea>
  154. <span class="td-page-o-info">This text will appear under the title</span>
  155. </div>
  156.  
  157. <div class="td-meta-box-row">
  158. <?php $mb->the_field('td_quote_on_blocks'); ?>
  159. <span class="td-page-o-custom-label">Quote on blocks:</span>
  160. <input class="td-input-text-post-settings" type="text" name="<?php $mb->the_name(); ?>" value="<?php $mb->the_value(); ?>"/>
  161. <span class="td-page-o-info">Show a quote (only when this article shows up in blocks that support quote and only on blocks that are on one column)</span>
  162. </div>
  163.  
  164. <div class="td-meta-box-row">
  165. <?php $mb->the_field('td_source'); ?>
  166. <span class="td-page-o-custom-label">Source name:</span>
  167. <input class="td-input-text-post-settings" type="text" name="<?php $mb->the_name(); ?>" value="<?php $mb->the_value(); ?>"/>
  168. <span class="td-page-o-info">This name will appear at the end of the article in the "source" spot on single posts</span>
  169. </div>
  170.  
  171. <div class="td-meta-box-row">
  172. <?php $mb->the_field('td_source_url'); ?>
  173. <span class="td-page-o-custom-label">Source url:</span>
  174. <input class="td-input-text-post-settings" type="text" name="<?php $mb->the_name(); ?>" value="<?php $mb->the_value(); ?>"/>
  175. <span class="td-page-o-info">Full url to the source</span>
  176. </div>
  177.  
  178. <div class="td-meta-box-row">td_set_post_setting
  179. <?php $mb->the_field('td_via'); ?>
  180. <span class="td-page-o-custom-label">Via name:</span>
  181. <input class="td-input-text-post-settings" type="text" name="<?php $mb->the_name(); ?>" value="<?php $mb->the_value(); ?>"/>
  182. <span class="td-page-o-info">Via (your source) name, this will appear at the end of the article in the "via" spot</span>
  183.  
  184. </div>
  185.  
  186.  
  187. <div class="td-meta-box-row">
  188. <?php $mb->the_field('td_via_url'); ?>
  189. <span class="td-page-o-custom-label">Via url:</span>
  190. <input class="td-input-text-post-settings" type="text" name="<?php $mb->the_name(); ?>" value="<?php $mb->the_value(); ?>"/>
  191. <span class="td-page-o-info">Full url for via</span>
  192. </div>
  193.  
  194. <div class="td-meta-box-row">
  195. <?php $mb->the_field('td_source2'); ?>
  196. <span class="td-page-o-custom-label">Source name:</span>
  197. <input class="td-input-text-post-settings" type="text" name="<?php $mb->the_name(); ?>" value="<?php $mb->the_value(); ?>"/>
  198. <span class="td-page-o-info">This name will appear at the end of the article in the "source" spot on single posts</span>
  199. </div>
  200.  
  201. <div class="td-meta-box-row">
  202. <?php $mb->the_field('td_source_url2'); ?>
  203. <span class="td-page-o-custom-label">Source url:</span>
  204. <input class="td-input-text-post-settings" type="text" name="<?php $mb->the_name(); ?>" value="<?php $mb->the_value(); ?>"/>
  205. <span class="td-page-o-info">Full url to the source</span>
  206. </div>
  207.  
  208. </div> <!-- /post option general -->
  209.  
  210.  
  211.  
  212.  
  213.  
  214.  
  215. <!-- post option smart list -->
  216. <div class="td-page-option-panel td-page-option-post-smart-list">
  217. <!-- smart list -->
  218. <div class="td-meta-box-row">
  219. <span class="td-page-o-custom-label">
  220. Use a smart list? :
  221. <?php
  222. td_util::tooltip_html('
  223. <h3>Smart Lists:</h3>
  224. <p>Using <i>Smart lists</i> you can transform your article in a list of items. Each item must have a title, an image and a description</p>
  225. <p>How to make an item:</p>
  226. <ul>
  227. <li><strong>add a text wrapped in H3</strong> - this will be the title of the item</li>
  228. <li><strong>add any picture</strong> from the media library</li>
  229. <li>in a new paragraph below the picture, <strong>add some text</strong></li>
  230. <li><i>repeat the last 3 steps for each item that you want to add</i></li>
  231. </ul>
  232.  
  233. <p>The system will use the H3 from the tiles to split your article and make each individual slide or numbered item</p>
  234. ', 'right')
  235. ?>
  236. </span>
  237.  
  238. <div class="td-inline-block-wrap">
  239. <?php
  240. echo td_panel_generator::visual_select_o(array(
  241. 'ds' => 'td_post_theme_settings',
  242. 'item_id' => '',
  243. 'option_id' => 'smart_list_template',
  244. 'values' => td_api_smart_list::_helper_td_smart_list_api_to_panel_values(),
  245. 'selected_value' => $mb->get_the_value('smart_list_template')
  246. ));
  247. ?>
  248. </div>
  249. </div>
  250.  
  251.  
  252. <!-- title tag -->
  253. <div class="td-meta-box-row">
  254. <span class="td-page-o-custom-label">
  255. Title tags:
  256. <?php
  257. td_util::tooltip_html('
  258. <h3>Smart lists title tags:</h3>
  259. <p>Customize what tag is used for <i>Title</i> lookup. This setting is useful if for example, you already have articles that use H2 for items</p>
  260. ', 'right')
  261. ?>
  262. </span>
  263. <?php $mb->the_field('td_smart_list_h'); ?>
  264. <div class="td-select-style-overwrite td-inline-block-wrap">
  265. <select name="<?php $mb->the_name(); ?>" class="td-panel-dropdown">
  266. <option value="h1"<?php $mb->the_select_state('h1'); ?>>Heading 1 ( H1 tag )</option>
  267. <option value="h2"<?php $mb->the_select_state('h2'); ?>>Heading 2 ( H2 tag )</option>
  268. <option value="" <?php $mb->the_select_state(''); ?>>Heading 3 ( H3 tag )</option>
  269. <option value="h4"<?php $mb->the_select_state('h4'); ?>>Heading 4 ( H4 tag )</option>
  270. <option value="h5"<?php $mb->the_select_state('h5'); ?>>Heading 5 ( H5 tag )</option>
  271. <option value="h6"<?php $mb->the_select_state('h6'); ?>>Heading 6 ( H6 tag )</option>
  272. </select>
  273. </div>
  274. <span class="td-page-o-info">The tags that wrap the title of each Smart List item.</span>
  275. </div>
  276.  
  277.  
  278. <!-- smart list numbering -->
  279. <div class="td-meta-box-row">
  280. <span class="td-page-o-custom-label">
  281. Smart list numbering:
  282. <?php
  283. td_util::tooltip('Change the sort order of the items', 'right')
  284. ?>
  285. </span>
  286. <?php $mb->the_field('td_smart_list_order'); ?>
  287. <div class="td-select-style-overwrite td-inline-block-wrap">
  288. <select name="<?php $mb->the_name(); ?>" class="td-panel-dropdown">
  289. <option value=""<?php $mb->the_select_state(''); ?>>Descending (ex: 3, 2, 1)</option>
  290. <option value="asc_1" <?php $mb->the_select_state('asc_1'); ?>>Ascending (ex: 1, 2, 3)</option>
  291. </select>
  292. </div>
  293. <span class="td-page-o-info">The smart lists put a number on each item, select the counting method.</span>
  294. </div>
  295. </div> <!-- /post option smart list -->
  296.  
  297.  
  298.  
  299.  
  300.  
  301.  
  302. <!-- post option review -->
  303. <div class="td-page-option-panel td-page-option-post-review">
  304.  
  305. <div class="td-meta-box-row">
  306. <span class="td-page-o-custom-label">Is product review?:</span>
  307. <?php $mb->the_field('has_review'); ?>
  308. <div class="td-select-style-overwrite td-inline-block-wrap">
  309. <select id="reviewSelector" name="<?php $mb->the_name(); ?>" class="td-panel-dropdown">
  310. <option value="">No</option>
  311. <option value="rate_stars"<?php $mb->the_select_state('rate_stars'); ?>>Stars</option>
  312. <option value="rate_percent"<?php $mb->the_select_state('rate_percent'); ?>>Percentages</option>
  313. <option value="rate_point"<?php $mb->the_select_state('rate_point'); ?>>Points</option>
  314. </select>
  315. </div>
  316. </div>
  317.  
  318.  
  319. <div class="rating_type rate_Stars">
  320. <p>
  321. <strong>Add star ratings for this product:</strong><br>
  322. </p>
  323.  
  324. <?php while($mb->have_fields_and_multi('p_review_stars')): ?>
  325. <div class="td-meta-box-row">
  326. <?php $mb->the_group_open(); ?>
  327.  
  328. <?php $mb->the_field('desc'); ?>
  329. <span class="td-page-o-custom-label">Feature name:</span>
  330. <input style="width: 200px;" type="text" name="<?php $mb->the_name(); ?>" value="<?php $mb->the_value(); ?>"/>
  331.  
  332. <?php $mb->the_field('rate'); ?>
  333.  
  334. <select name="<?php $mb->the_name(); ?>">
  335. <option value="">Select rating</option>
  336. <option value="5"<?php $mb->the_select_state('5'); ?>>5 stars</option>
  337. <option value="4.5"<?php $mb->the_select_state('4.5'); ?>>4.5 stars</option>
  338. <option value="4"<?php $mb->the_select_state('4'); ?>>4 stars</option>
  339. <option value="3.5"<?php $mb->the_select_state('3.5'); ?>>3.5 stars</option>
  340. <option value="3"<?php $mb->the_select_state('3'); ?>>3 stars</option>
  341. <option value="2.5"<?php $mb->the_select_state('2.5'); ?>>2.5 stars</option>
  342. <option value="2"<?php $mb->the_select_state('2'); ?>>2 stars</option>
  343. <option value="1.5"<?php $mb->the_select_state('1.5'); ?>>1.5 stars</option>
  344. <option value="1"<?php $mb->the_select_state('1'); ?>>1 stars</option>
  345. <option value="0.5"<?php $mb->the_select_state('0.5'); ?>>0.5 stars</option>
  346. </select>
  347. <a href="#" class="dodelete button">Delete</a>
  348.  
  349. <?php $mb->the_group_close(); ?>
  350. </div>
  351. <?php endwhile; ?>
  352.  
  353. <p><a href="#" class="docopy-p_review_stars button">Add rating category</a></p>
  354. </div>
  355.  
  356.  
  357.  
  358. <div class="rating_type rate_Percentages">
  359. <p>
  360. <strong>Add percent ratings for this product:</strong><br>
  361. <strong>Note:</strong> The percent range is between 0 and 100 (do not add the %)
  362. </p>
  363. <?php while($mb->have_fields_and_multi('p_review_percents')): ?>
  364. <div class="td-meta-box-row">
  365. <?php $mb->the_group_open(); ?>
  366.  
  367. <?php $mb->the_field('desc'); ?>
  368. <span class="td-page-o-custom-label">Feature name: </span><input style="width: 200px;" type="text" name="<?php $mb->the_name(); ?>" value="<?php $mb->the_value(); ?>"/>
  369.  
  370. <?php $mb->the_field('rate'); ?>
  371. - Percent:
  372. <input style="width: 100px;" type="text" name="<?php $mb->the_name(); ?>" value="<?php $mb->the_value(); ?>"/>
  373.  
  374.  
  375. <a href="#" class="dodelete button">Delete</a>
  376.  
  377. <?php $mb->the_group_close(); ?>
  378. </div>
  379. <?php endwhile; ?>
  380.  
  381. <p><a href="#" class="docopy-p_review_percents button">Add rating category</a></p>
  382. </div>
  383.  
  384.  
  385. <div class="rating_type rate_Points">
  386. <p>
  387. <strong>Add points ratings for this product:</strong><br>
  388. <strong>Note:</strong> The points range is between 1 and 10
  389. </p>
  390. <?php while($mb->have_fields_and_multi('p_review_points')): ?>
  391. <div class="td-meta-box-row">
  392. <?php $mb->the_group_open(); ?>
  393.  
  394. <?php $mb->the_field('desc'); ?>
  395. <span class="td-page-o-custom-label">Feature name: </span><input style="width: 200px;" type="text" name="<?php $mb->the_name(); ?>" value="<?php $mb->the_value(); ?>"/>
  396.  
  397. <?php $mb->the_field('rate'); ?>
  398. - Points:
  399. <input style="width: 100px;" type="text" name="<?php $mb->the_name(); ?>" value="<?php $mb->the_value(); ?>"/>
  400.  
  401.  
  402. <a href="#" class="dodelete button">Delete</a>
  403.  
  404. <?php $mb->the_group_close(); ?>
  405. </div>
  406. <?php endwhile; ?>
  407.  
  408. <p><a href="#" class="docopy-p_review_points button">Add rating category</a></p>
  409. </div>
  410.  
  411. <div class="review_desc">
  412. <div><strong>Review description:</strong></div>
  413. <p class="td_help_section">
  414. <?php $mb->the_field('review'); ?>
  415.  
  416. <textarea class="td-textarea-subtitle" type="text" name="<?php $mb->the_name(); ?>"><?php $mb->the_value(); ?></textarea>
  417. </p>
  418. </div>
  419.  
  420.  
  421.  
  422. <script>
  423. jQuery().ready(function() {
  424. td_updateMetaboxes();
  425.  
  426. jQuery('#reviewSelector').change(function() {
  427. td_updateMetaboxes();
  428. });
  429.  
  430. function td_updateMetaboxes() {
  431. var cur_selection = jQuery('#reviewSelector option:selected').text();
  432.  
  433. if(cur_selection.indexOf("No") !== -1) {
  434. //alert('ra');
  435. jQuery('.rating_type').hide();
  436. jQuery('.review_desc').hide();
  437.  
  438. } else {
  439. jQuery('.rating_type').hide();
  440. jQuery('.rate_' + cur_selection).show();
  441. jQuery('.review_desc').show();
  442. //alert(cur_selection);
  443. }
  444.  
  445.  
  446.  
  447. }
  448. }); //end on load
  449. </script>
  450. </div> <!-- /post option review -->
  451.  
  452.  
  453.  
  454.  
  455.  
  456. </div>
Advertisement
Add Comment
Please, Sign In to add comment