Changeset 1545335
- Timestamp:
- 12/04/2016 01:22:06 PM (9 years ago)
- Location:
- good-url-preview-box/trunk
- Files:
-
- 3 edited
-
gurlpb-activated.php (modified) (1 diff)
-
gurlpb-settings-admin.php (modified) (1 diff)
-
gurlpb-start.php (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
good-url-preview-box/trunk/gurlpb-activated.php
r1533330 r1545335 12 12 } 13 13 14 if ( ! get_option( 'gurlpb- id-admin-id' ) ) {14 if ( ! get_option( 'gurlpb-admin-id' ) ) { 15 15 update_option( 'gurlpb-admin-id', get_current_user_id() ); 16 16 update_option( 'gurlpb-setting-a', 'manual' ); 17 update_option( 'gurlpb-hide-setting-a', 'true' ); 17 18 update_option( 'gurlpb-showexcerpt', '1' ); 19 18 20 } elseif ( get_option( 'gurlpb-showexcerpt' ) !== '1' && get_option( 'gurlpb-showexcerpt' ) !== '0' ) { 19 21 update_option( 'gurlpb-showexcerpt', '1' ); -
good-url-preview-box/trunk/gurlpb-settings-admin.php
r1536878 r1545335 129 129 130 130 131 <div class="postbox-container" style="margin: 5px; padding: 3px; font-size: 30px; font-weight: bold;"> 132 <?php _e( 'How-many-URL-Previews?', 'gurlpb' ); ?> 133 </div> 134 <br class="clear"/> 135 <div class="postbox-container" style="margin: 5px; padding: 3px; border: 1px solid #999"> 136 <input id="inputSingle" type="radio" name="gurlpb-setting-a" 137 <?php if ( get_option('gurlpb-setting-a') == 'single' ) echo 'checked="checked"'; ?> 138 onclick="this.form.submit();" 139 value="single" /> 140 <?php _e( 'Add-maximal-one', 'gurlpb' ); ?><br /> 141 <?php _e( 'and-add-it.', 'gurlpb' ); ?><br /><br /> 142 <a href="javascript:document.getElementById( 'inputSingle' ).checked = 'checked'; document.getElementById( 'formGurlpbOneMany' ).submit()"> 143 <img src="<?php echo plugins_url( 'gurlpb-single.jpg', __FILE__ );?>"/></a><br /> 144 </div> 145 <div class="postbox-container" style="margin: 5px; padding: 3px; border: 1px solid #999"> 146 <input id="inputMutiple" type="radio" name="gurlpb-setting-a" 147 <?php if ( get_option('gurlpb-setting-a') == 'multiple' ) echo 'checked="checked"'; ?> 148 onclick="this.form.submit();" 149 value="multiple" /> 150 <?php _e( 'Add-one-URL,', 'gurlpb' ); ?><br /> 151 <?php _e( 'one-per-P-Tag.', 'gurlpb' ); ?><br /><br /> 152 <a href="javascript:document.getElementById( 'inputMutiple' ).checked = 'checked'; document.getElementById( 'formGurlpbOneMany' ).submit()"> 153 <img src="<?php echo plugins_url( 'gurlpb-multiple.jpg', __FILE__ );?>" /></a><br /> 154 </div> 155 <div class="postbox-container" style="margin: 5px; padding: 3px; border: 1px solid #999"> 156 <input id="inputMutiple" type="radio" name="gurlpb-setting-a" 157 <?php if ( get_option('gurlpb-setting-a') == 'manual' ) echo 'checked="checked"'; ?> 158 onclick="this.form.submit();" 159 value="manual" /> 160 <?php _e( 'setting-manual-URL', 'gurlpb' ); ?><br /> 161 <?php _e( 'setting-manual-URL2', 'gurlpb' ); ?><br /> 162 163 <img src="<?php echo plugins_url( 'gurlpb_editor-help.jpg', __FILE__ );?>" style="display:block; margin-right:auto;margin-left:auto;"/> 164 <div style="margin-left:auto;margin-right:auto;text-align: center"> 165 <?php _e( 'setting-manual-URL3', 'gurlpb' ); ?><br /> 131 <?php if ( get_option( 'gurlpb-hide-setting-a' ) ) { ?> 132 <div style="text-align: left; border: 1px solid #999; padding: 10px"> 133 <div class="postbox-container" style="font-size: 30px; font-weight: bold;"> 134 <?php _e( 'How to', 'gurlpb' ); ?> 166 135 </div> 167 168 <br /><br /> 169 </div> 136 <br class="clear"/><br /> 137 <?php _e( 'setting-manual-URL', 'gurlpb' ); ?><br /> 138 <?php _e( 'setting-manual-URL2', 'gurlpb' ); ?><br /> 139 <br > 140 ----<br /><br /> 141 <img src="<?php echo plugins_url( 'gurlpb_editor-help.jpg', __FILE__ );?>" xstyle="display:block; margin-right:auto;margin-left:auto;"/> 142 <div xstyle="margin-left:auto;margin-right:auto;text-align: center"> 143 <?php _e( 'setting-manual-URL3', 'gurlpb' ); ?><br /> 144 </div> 145 <br class="clear"/> 146 <iframe width="560" height="315" src="https://www.youtube.com/embed/CpecfL_FIzM" frameborder="0" allowfullscreen ></iframe> 147 <br class="clear"/> 148 </div> 149 <?php } else { ?> 150 151 <div class="postbox-container" style="margin: 5px; padding: 3px; font-size: 30px; font-weight: bold;"> 152 <?php _e( 'How-many-URL-Previews?', 'gurlpb' ); ?> 153 </div> 154 <br class="clear"/> 155 <div class="postbox-container" style="margin: 5px; padding: 3px; border: 1px solid #999"> 156 <input id="inputSingle" type="radio" name="gurlpb-setting-a" 157 <?php if ( get_option('gurlpb-setting-a') == 'single' ) echo 'checked="checked"'; ?> 158 onclick="this.form.submit();" 159 value="single" /> 160 <?php _e( 'Add-maximal-one', 'gurlpb' ); ?><br /> 161 <?php _e( 'and-add-it.', 'gurlpb' ); ?><br /><br /> 162 <a href="javascript:document.getElementById( 'inputSingle' ).checked = 'checked'; document.getElementById( 'formGurlpbOneMany' ).submit()"> 163 <img src="<?php echo plugins_url( 'gurlpb-single.jpg', __FILE__ );?>"/></a><br /> 164 </div> 165 <div class="postbox-container" style="margin: 5px; padding: 3px; border: 1px solid #999"> 166 <input id="inputMutiple" type="radio" name="gurlpb-setting-a" 167 <?php if ( get_option('gurlpb-setting-a') == 'multiple' ) echo 'checked="checked"'; ?> 168 onclick="this.form.submit();" 169 value="multiple" /> 170 <?php _e( 'Add-one-URL,', 'gurlpb' ); ?><br /> 171 <?php _e( 'one-per-P-Tag.', 'gurlpb' ); ?><br /><br /> 172 <a href="javascript:document.getElementById( 'inputMutiple' ).checked = 'checked'; document.getElementById( 'formGurlpbOneMany' ).submit()"> 173 <img src="<?php echo plugins_url( 'gurlpb-multiple.jpg', __FILE__ );?>" /></a><br /> 174 </div> 175 <div class="postbox-container" style="margin: 5px; padding: 3px; border: 1px solid #999"> 176 <input id="inputMutiple" type="radio" name="gurlpb-setting-a" 177 <?php if ( get_option('gurlpb-setting-a') == 'manual' ) echo 'checked="checked"'; ?> 178 onclick="this.form.submit();" 179 value="manual" /> 180 <?php _e( 'setting-manual-URL', 'gurlpb' ); ?><br /> 181 <?php _e( 'setting-manual-URL2', 'gurlpb' ); ?><br /> 182 183 <img src="<?php echo plugins_url( 'gurlpb_editor-help.jpg', __FILE__ );?>" style="display:block; margin-right:auto;margin-left:auto;"/> 184 <div style="margin-left:auto;margin-right:auto;text-align: center"> 185 <?php _e( 'setting-manual-URL3', 'gurlpb' ); ?><br /> 186 </div> 187 188 <br /><br /> 189 </div> 190 <?php } ?> 191 192 170 193 <br class="clear"/> 171 194 <hr /> -
good-url-preview-box/trunk/gurlpb-start.php
r1544317 r1545335 147 147 } 148 148 149 if ( isset( $_REQUEST['gurlpb-setting-selector'] ) ) { 150 $str = $_REQUEST['gurlpb-setting-selector']; 151 152 if ($str == 'delete') { 153 delete_option('gurlpb-setting-selector'); 154 Gurlpb_utils::log( __FUNCTION__ . '[' . __LINE__ . "] delete gurlpb-setting-selector"); 155 $strResp .= ( $strResp ? ',' : '' ) . "delete-selector"; 156 } elseif ( preg_match( '/^[a-z0-9\.\,\:\;\=\-\ \*+_#\_\[\]]*$/i', $str ) ) { 157 update_option('gurlpb-setting-selector', sanitize_text_field( $str ) ); 158 $strResp .= ( $strResp ? ',' : '' ) . "update-selector"; 159 Gurlpb_utils::log( __FUNCTION__ . '[' . __LINE__ . "] gurlpb-setting-selector set to $str"); 160 } else { 161 $strResp .= ( $strResp ? ',' : '' ) . "invalid-selector"; 162 Gurlpb_utils::log( __FUNCTION__ . '[' . __LINE__ . "] INVALID PARAMETER gurlpb-setting-selector"); 163 } 164 } 165 149 166 if ( isset( $_REQUEST['gurlpb-setting-postids'] ) ) { 150 167 $str = $_REQUEST['gurlpb-setting-postids']; … … 176 193 . get_option( 'gurlpb-setting-postids' ) . ' ## ' 177 194 . 'THISPOSTID ## ' 195 . get_option( 'gurlpb-setting-selector' ) . ' ## ' 178 196 . ' ##GURLPB'; 179 197 } … … 257 275 $email = $author ? $author->user_email: ''; 258 276 //$name = $author ? $author->display_name: ''; 277 $nZoom = get_option('gurlpb-zoom'); 278 if ( ! $nZoom ) $nZoom = 1; 279 259 280 if ( get_option( 'gurlpb-regcd' ) ) { 260 281 $email = get_option( 'gurlpb-regcd' ); … … 266 287 267 288 $strSettingA = get_option('gurlpb-setting-a'); 289 if ( get_option( 'gurlpb-setting-a-extern' ) ) { 290 $strSettingA = get_option( 'gurlpb-setting-a-extern' ); 291 } 292 268 293 if ( $strSettingA == 'manual' ) { 269 294 $selector = 'span[guteurls]'; … … 277 302 } 278 303 279 if ( get_option( 'gurlpb-setting- a-extern' ) ) {280 $selector = get_option( 'gurlpb-setting- a-extern' );304 if ( get_option( 'gurlpb-setting-selector' ) ) { 305 $selector = get_option( 'gurlpb-setting-selector' ); 281 306 } 282 307 … … 311 336 . ' selector="' . $selector .'"' 312 337 . ( get_option('gurlpb-hideimages') ? ' hideimages="1"': '' ) 313 . ( get_option('gurlpb-zoom')? ' zoom="' . get_option( 'gurlpb-zoom' ) . '"' : '' )338 . ( $nZoom != 1 ? ' zoom="' . get_option( 'gurlpb-zoom' ) . '"' : '' ) 314 339 . ( $email ? ' email="' . base64_encode( $email ) . '"' : '' ) 315 340 . ' pluginversion="' . Gurlpb_config::$_VERSION . '"'
Note: See TracChangeset
for help on using the changeset viewer.