PageRenderTime 43ms CodeModel.GetById 19ms RepoModel.GetById 0ms app.codeStats 0ms

/htdocs/wp-content/plugins/nextgen-gallery/admin/tinymce/window.php

https://bitbucket.org/dkrzos/phc
PHP | 152 lines | 141 code | 10 blank | 1 comment | 2 complexity | 71e3f941037337ef2190bd7af5a2dd23 MD5 | raw file
Possible License(s): GPL-2.0
  1. <?php
  2. if ( !defined('ABSPATH') )
  3. die('You are not allowed to call this page directly.');
  4. global $wpdb, $nggdb;
  5. @header('Content-Type: ' . get_option('html_type') . '; charset=' . get_option('blog_charset'));
  6. // Get WordPress scripts and styles
  7. wp_enqueue_script('jquery-ui-core');
  8. wp_enqueue_script('jquery-ui-widget');
  9. wp_enqueue_script('jquery-ui-position');
  10. global $wp_scripts;
  11. if (!isset($wp_scripts->registered['jquery-ui-autocomplete'])) {
  12. wp_register_script( 'jquery-ui-autocomplete', NGGALLERY_URLPATH .'admin/js/jquery.ui.autocomplete.min.js', array('jquery-ui-core'), '1.8.15');
  13. }
  14. wp_enqueue_script('jquery-ui-autocomplete');
  15. ?>
  16. <html xmlns="http://www.w3.org/1999/xhtml">
  17. <head>
  18. <title>NextGEN Gallery</title>
  19. <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php echo get_option('blog_charset'); ?>" />
  20. <script language="javascript" type="text/javascript" src="<?php echo site_url(); ?>/wp-includes/js/tinymce/tiny_mce_popup.js"></script>
  21. <script language="javascript" type="text/javascript" src="<?php echo site_url(); ?>/wp-includes/js/tinymce/utils/mctabs.js"></script>
  22. <script language="javascript" type="text/javascript" src="<?php echo site_url(); ?>/wp-includes/js/tinymce/utils/form_utils.js"></script>
  23. <?php wp_print_scripts() ?>
  24. <script language="javascript" type="text/javascript" src="<?php echo NGGALLERY_URLPATH ?>admin/js/ngg.autocomplete.js"></script>
  25. <script language="javascript" type="text/javascript" src="<?php echo NGGALLERY_URLPATH ?>admin/tinymce/tinymce.js"></script>
  26. <link rel="stylesheet" type="text/css" href="<?php echo NGGALLERY_URLPATH ?>admin/css/jquery.ui.css" media="all" />
  27. <base target="_self" />
  28. </head>
  29. <script type="text/javascript">
  30. jQuery(document).ready(function(){
  31. jQuery("#gallerytag").nggAutocomplete( {
  32. type: 'gallery',domain: "<?php echo home_url('index.php', is_ssl() ? 'https' : 'http'); ?>"
  33. });
  34. jQuery("#albumtag").nggAutocomplete( {
  35. type: 'album',domain: "<?php echo home_url('index.php', is_ssl() ? 'https' : 'http'); ?>"
  36. });
  37. jQuery("#singlepictag").nggAutocomplete( {
  38. type: 'image',domain: "<?php echo home_url('index.php', is_ssl() ? 'https' : 'http'); ?>"
  39. });
  40. });
  41. </script>
  42. <body class="nextgen_tinymce_window" id="link" onload="tinyMCEPopup.executeOnLoad('init();');document.body.style.display='';" style="display: none">
  43. <!-- <form onsubmit="insertLink();return false;" action="#"> -->
  44. <form name="NextGEN" action="#">
  45. <div class="tabs">
  46. <ul>
  47. <li id="gallery_tab" class="current"><span><a href="javascript:mcTabs.displayTab('gallery_tab','gallery_panel');" onmousedown="return false;"><?php echo _n( 'Gallery', 'Galleries', 1, 'nggallery' ) ?></a></span></li>
  48. <li id="album_tab"><span><a href="javascript:mcTabs.displayTab('album_tab','album_panel');" onmousedown="return false;"><?php echo _n( 'Album', 'Albums', 1, 'nggallery' ) ?></a></span></li>
  49. <li id="singlepic_tab"><span><a href="javascript:mcTabs.displayTab('singlepic_tab','singlepic_panel');" onmousedown="return false;"><?php _e('Picture', 'nggallery'); ?></a></span></li>
  50. </ul>
  51. </div>
  52. <div class="panel_wrapper">
  53. <!-- gallery panel -->
  54. <div id="gallery_panel" class="panel current">
  55. <br />
  56. <table border="0" cellpadding="4" cellspacing="0">
  57. <tr>
  58. <td nowrap="nowrap"><label for="gallerytag"><?php _e("Gallery", 'nggallery'); ?></label></td>
  59. <td><select id="gallerytag" name="gallerytag" style="width: 200px">
  60. <option value="0" selected="selected"><?php _e("Select or enter gallery", 'nggallery'); ?></option>
  61. </select>
  62. </td>
  63. </tr>
  64. <tr>
  65. <td nowrap="nowrap" valign="top"><label for="showtype"><?php _e("Show as", 'nggallery'); ?></label></td>
  66. <td><label><input name="showtype" type="radio" value="nggallery" checked="checked" /> <?php _e('Image list', 'nggallery') ;?></label><br />
  67. <label><input name="showtype" type="radio" value="slideshow" /> <?php _e('Slideshow', 'nggallery') ;?></label><br />
  68. <label><input name="showtype" type="radio" value="imagebrowser" /> <?php _e('Imagebrowser', 'nggallery') ;?></label></td>
  69. </tr>
  70. </table>
  71. </div>
  72. <!-- gallery panel -->
  73. <!-- album panel -->
  74. <div id="album_panel" class="panel">
  75. <br />
  76. <table border="0" cellpadding="4" cellspacing="0">
  77. <tr>
  78. <td nowrap="nowrap"><label for="albumtag"><?php _e("Album", 'nggallery'); ?></label></td>
  79. <td><select id="albumtag" name="albumtag" style="width: 200px">
  80. <option value="0" selected="selected"><?php _e("Select or enter album", 'nggallery'); ?></option>
  81. </select>
  82. </td>
  83. </tr>
  84. <tr>
  85. <td nowrap="nowrap" valign="top"><label for="showtype"><?php _e("Show as", 'nggallery'); ?></label></td>
  86. <td><label><input name="albumtype" type="radio" value="extend" checked="checked" /> <?php _e('Extended version', 'nggallery') ;?></label><br />
  87. <label><input name="albumtype" type="radio" value="compact" /> <?php _e('Compact version', 'nggallery') ;?></label></td>
  88. </tr>
  89. </table>
  90. </div>
  91. <!-- album panel -->
  92. <!-- single pic panel -->
  93. <div id="singlepic_panel" class="panel">
  94. <br />
  95. <table border="0" cellpadding="4" cellspacing="0">
  96. <tr>
  97. <td nowrap="nowrap"><label for="singlepictag"><?php _e("Picture", 'nggallery'); ?></label></td>
  98. <td><select id="singlepictag" name="singlepictag" style="width: 200px">
  99. <option value="0" selected="selected"><?php _e("Select or enter picture", 'nggallery'); ?></option>
  100. </select>
  101. </td>
  102. </tr>
  103. <tr>
  104. <td nowrap="nowrap"><?php _e("Width x Height", 'nggallery'); ?></td>
  105. <td><input type="text" size="5" id="imgWidth" name="imgWidth" value="320" /> x <input type="text" size="5" id="imgHeight" name="imgHeight" value="240" /></td>
  106. </tr>
  107. <tr>
  108. <td nowrap="nowrap" valign="top"><?php _e("Effect", 'nggallery'); ?></td>
  109. <td>
  110. <label><select id="imgeffect" name="imgeffect">
  111. <option value="none"><?php _e("No effect", 'nggallery'); ?></option>
  112. <option value="watermark"><?php _e("Watermark", 'nggallery'); ?></option>
  113. <option value="web20"><?php _e("Web 2.0", 'nggallery'); ?></option>
  114. </select></label>
  115. </td>
  116. </tr>
  117. <tr>
  118. <td nowrap="nowrap" valign="top"><?php _e("Float", 'nggallery'); ?></td>
  119. <td>
  120. <label><select id="imgfloat" name="imgfloat">
  121. <option value=""><?php _e("No float", 'nggallery'); ?></option>
  122. <option value="left"><?php _e("Left", 'nggallery'); ?></option>
  123. <option value="center"><?php _e("Center", 'nggallery'); ?></option>
  124. <option value="right"><?php _e("Right", 'nggallery'); ?></option>
  125. </select></label>
  126. </td>
  127. </tr>
  128. </table>
  129. </div>
  130. <!-- single pic panel -->
  131. </div>
  132. <div class="mceActionPanel">
  133. <div style="float: left">
  134. <input type="button" id="cancel" name="cancel" value="<?php _e("Cancel", 'nggallery'); ?>" onclick="tinyMCEPopup.close();" />
  135. </div>
  136. <div style="float: right">
  137. <input type="submit" id="insert" name="insert" value="<?php _e("Insert", 'nggallery'); ?>" onclick="insertNGGLink();" />
  138. </div>
  139. </div>
  140. </form>
  141. </body>
  142. </html>