Changeset 1542243
- Timestamp:
- 11/28/2016 07:45:15 PM (9 years ago)
- Location:
- good-url-preview-box/trunk
- Files:
-
- 3 edited
-
gurlpb-start.php (modified) (7 diffs)
-
gurlpb_editor-plugin.js (modified) (1 diff)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
good-url-preview-box/trunk/gurlpb-start.php
r1539906 r1542243 10 10 static $_f_add_js = 0; 11 11 static $_str_srv_dialog = ''; 12 static $_f_include_javascript = false; 12 13 static $_str_first_url = ''; // needed for except 13 14 … … 52 53 53 54 add_action( 'init', 'gurlpb_buttons' ); 55 add_action( 'wp_footer', 'gurlpb_javascript_include', 20 ); 54 56 55 57 if ( get_option( 'gurlpb-showexcerpt' ) ) { … … 173 175 echo gurlpb_add_previewbox( $strUrl ); 174 176 } 175 add_action( 'wp_footer', 'gurlpb_javascript_include', 20 ); 177 Gurlpb::$_f_include_javascript = true; 178 //add_action( 'wp_footer', 'gurlpb_javascript_include', 20 ); 176 179 } 177 180 … … 180 183 181 184 function gurlpb_add_previewbox( $strUrl ) { 185 Gurlpb::$_f_include_javascript = true; 182 186 $arrUrl = parse_url( $strUrl ); 183 187 $arrDom = explode( '.' , $arrUrl['host']); … … 187 191 188 192 return 189 '<br clear="all" /><span guteurls-remove="true" class="guteurlsRemove" style="display:block; width: 100%; max-width:600px; margin: auto; background-color: #fff">190 <span style="width: 100%; line-height: 20px; font-size: 20px; height: 22px; padding:0; margin:20px 0 0 0; display: block; font-family: Oxygen, Arial, Helvetica, sans-serif; font-weight: normal; font-style: normal; text-transform: uppercase; text-decoration: none; vertical-align: baseline;">193 '<br clear="all" /><span guteurls-remove="true" id="guteurlsLoading" class="guteurlsRemove" style="display:block; width: 100%; max-width:600px; margin: auto; background-color: #fff"> 194 <span style="width: 100%; line-height: 20px; font-size: 20px; height: 22px; padding:0; margin:20px 0 0 0; display: block; font-family: Oxygen, Arial, Helvetica, sans-serif; font-weight: normal; font-style: normal; text-transform: uppercase; text-decoration: none; vertical-align: baseline;"> 191 195 <img src="https://guteurls.de/favicon.ico" align="left" style="height: 20px; margin-right: 10px" /> 192 196 GUTE-URLS … … 200 204 <a href="' . $strUrl .'" style="font-family: Oxygen, Arial, Helvetica, sans-serif; font-weight: normal; font-style: normal; font-size: 13px; line-height: 20px; text-decoration: none; border-bottom: none;">' . $arrUrl['host'] . $strPath . '</a> 201 205 </span> 202 </span><br clear="all" />'; 206 </span> 207 <script type="text/javascript"> 208 var gurlpbLR = function () { 209 var a=document.getElementsByClassName("guteurlsRemove"); 210 if (a) for( var i=0;i<a.length;i++) { a[i].style["display"]="none"; } 211 }; 212 if ( window.addEventListener ) window.addEventListener("load", gurlpbLR, false); 213 else window.setTimeout(gurlpbLR, 2000); 214 </script> 215 <br clear="all" />'; 203 216 } 204 217 205 218 function gurlpb_javascript_include() { 206 219 Gurlpb_utils::log( __FUNCTION__ . '[' . __LINE__ . "]:" ); 220 if ( ! Gurlpb::$_f_include_javascript ) { 221 return false; 222 } 207 223 $post_id = get_the_ID(); //this may not work, depending on where code occurs 208 224 $post = $post_id? get_post( $post_id ) : ''; … … 398 414 399 415 if ( in_the_loop() ) echo gurlpb_add_previewbox( Gurlpb::$_str_first_url ); 400 add_action( 'wp_footer', 'gurlpb_javascript_include', 20 ); 416 //add_action( 'wp_footer', 'gurlpb_javascript_include', 20 ); 417 Gurlpb::$_f_include_javascript = true; 401 418 } 402 419 } -
good-url-preview-box/trunk/gurlpb_editor-plugin.js
r1533336 r1542243 18 18 str = arr[0]; 19 19 var shortcode = '[urlpreviewbox url="' + str + '"/]'; 20 return_text = '<span class="gurlpb">' + shortcode + "</span> ";20 return_text = '<span class="gurlpb">' + shortcode + "</span><br />"; 21 21 ed.execCommand('mceInsertContent', 0, return_text); 22 22 try { -
good-url-preview-box/trunk/readme.txt
r1539906 r1542243 116 116 == Upgrade Notice == 117 117 118 = 1.7 = 119 Nothing big. No new feature. no new functions. Only a bugfix. 120 Bugfix: Text "Guteurls loading..." did not disappear. Now a JS will hide it, after loading page. 121 122 I love to hear your suggestions, to make it even better. 123 124 118 125 = 1.6 = 119 126 * Bugfix: Article title link to external URL … … 142 149 == Changelog == 143 150 151 = 1.7 = 152 * Bugfix: Text: "Guteurls loading..." did not disapear. Now a js will hide it, after loading page. 153 144 154 = 1.6 = 145 155 * Bugfix: Article title link to external URL
Note: See TracChangeset
for help on using the changeset viewer.