Plugin Directory

Changeset 778840


Ignore:
Timestamp:
09/26/2013 03:25:27 PM (11 years ago)
Author:
sudiptomahato
Message:

Minor bug fix.

Location:
link-to-url-post
Files:
3 added
2 edited

Legend:

Unmodified
Added
Removed
  • link-to-url-post/trunk/link-to-url.php

    r719083 r778840  
    44Plugin URI: http://letusbuzz.com/link-to-url-post-plugin/
    55Author: Sudipto Pratap Mahato
    6 Version: 1.2
     6Version: 1.3
    77Description: Hide your long ugly affiliate links with your own short and easy to remember links or redirect your old posts to a new post or external link!!
    88Requires at least: 3.0
    9 Tested up to: 3.5.1
     9Tested up to: 3.6.1
    1010*/
    1111
    1212add_action('admin_menu', 'l2u_addmenu');
    13 add_action( 'init', 'l2u_redirect_to' );
     13add_action( 'init', 'l2u_redirect_to',1);
    1414function l2u_redirect_to()
    1515{
     
    7272{
    7373    wp_delete_post($did);
     74}
     75if(isset($_GET['resethits']))
     76{
     77    $peid=$_GET['resethits'];
     78    if($peid!="")
     79    {
     80        $sql="UPDATE {$wpdb->posts} SET `comment_count`=0 where `ID`=$peid";
     81        $res = $wpdb->get_results($sql);
     82    }
    7483}
    7584if(isset( $_POST['Submit'] ))l2u_save();;
     
    96105       
    97106        <input type="hidden" name="postid" value="<?php echo $postid; ?>">
     107        <input type="hidden" name="sourceurl2" value="<?php echo $sourceurl; ?>">
    98108            <p class="submit">
    99109                <input type="submit" name="Submit" class="button-primary" value="<?php esc_attr_e('Save Redirection') ?>" />&nbsp;&nbsp;&nbsp;&nbsp;
     
    103113        </form>
    104114</td>
    105 <td width="20%"><b>Follow us on</b><br/><a href="http://twitter.com/letusbuzz" target="_blank"><img src="http://a0.twimg.com/a/1303316982/images/twitter_logo_header.png" /></a><br/><a href="http://facebook.com/letusbuzzz" target="_blank"><img src="https://secure-media-sf2p.facebook.com/ads3/creative/pressroom/jpg/b_1234209334_facebook_logo.jpg" height="38px" width="118px"/></a><p></p>
     115<td width="25%"><b>Follow us on</b><br/><a href="http://twitter.com/letusbuzz" target="_blank"><img src="http://a0.twimg.com/a/1303316982/images/twitter_logo_header.png" /></a><br/><a href="http://facebook.com/letusbuzzz" target="_blank"><img src="https://secure-media-sf2p.facebook.com/ads3/creative/pressroom/jpg/b_1234209334_facebook_logo.jpg" height="38px" width="118px"/></a><p></p>
    106116<p></p>
    107117<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
     
    116126<img alt="" border="0" src="https://www.paypalobjects.com/WEBSCR-640-20110401-1/en_US/i/scr/pixel.gif" width="1" height="1">
    117127</form>
    118 <br />Consider a Donation and remember $X is always better than $0
     128<br />Consider a Donation and remember $X is always better than $0<br/>
     129<a href="http://techxt.com/link2url_ad" target="_blank"><img src="http://techxt.com/link2url_ad.png" /></a>
    119130</td>
    120131</tr>
     
    125136function l2u_save() {
    126137    $sourceurl=l2u_remove_front_slash(trim($_POST['sourceurl']));
     138    $sourceurl2=l2u_remove_front_slash(trim($_POST['sourceurl2']));
    127139    $desturl=trim($_POST['desturl']);
    128140    $postid=trim($_POST['postid']);
     
    130142    if($redtype=="301")$redtype='publish'; else $redtype='draft';
    131143    if($sourceurl=="" || $desturl=="")return false;
    132     $pid=l2u_source_exist($sourceurl);
     144    if($sourceurl2!="")$pid=l2u_source_exist($sourceurl2);
     145    else $pid=l2u_source_exist($sourceurl);
    133146    if($postid!="" && $postid!=$pid){
    134147        l2u_display_message("Duplicate Keyword Exist");
     
    191204            <td style="border:1px solid #eee;padding:2px; word-wrap:break-word;"><?php l2u_list_all_dest($post->post_content); ?></td>
    192205            <td style="border:1px solid #eee;padding:2px;text-align: center;"><?php echo $redtype; ?></td>
    193             <td style="border:1px solid #eee;padding:2px;text-align: center;"><?php echo $post->comment_count; ?></td>
    194             <td style="border:1px solid #eee;padding:2px;"><a href="<?php echo site_url(); ?>/wp-admin/options-general.php?page=l2url&edit=<?php echo $post->ID; ?>">Edit</a></td>
    195             <td style="border:1px solid #eee;padding:2px;"><a href="<?php echo site_url(); ?>/wp-admin/options-general.php?page=l2url&delete=<?php echo $post->ID; ?>">Delete</a></td>
     206            <td style="border:1px solid #eee;padding:2px;text-align: right;"><?php echo $post->comment_count; ?>&nbsp;&nbsp;<a onclick = "if (! confirm('Do you really want to reset hits?')) return false;" href="<?php echo site_url(); ?>/wp-admin/options-general.php?page=l2url&resethits=<?php echo $post->ID; ?>">x</a></td>
     207            <td style="border:1px solid #eee;padding:2px;text-align: right;"><a href="<?php echo site_url(); ?>/wp-admin/options-general.php?page=l2url&edit=<?php echo $post->ID; ?>">Edit</a></td>
     208            <td style="border:1px solid #eee;padding:2px;text-align: right;"><a onclick = "if (! confirm('Do you really want to delete?')) return false;" href="<?php echo site_url(); ?>/wp-admin/options-general.php?page=l2url&delete=<?php echo $post->ID; ?>">Delete</a></td>
    196209        </tr>
    197210           
  • link-to-url-post/trunk/readme.txt

    r719083 r778840  
    44Tags: Link to URL, Link to post, 301 redirect, 302 redirect, Short URL, Hide Link, Post redirection
    55Requires at least: 3.0
    6 Tested up to: 3.5.1
    7 Stable tag: 1.2
     6Tested up to: 3.6.1
     7Stable tag: 1.3
    88
    99Hide your long ugly affiliate links with your own short and easy to remember links or redirect your old posts to a new post or external link
Note: See TracChangeset for help on using the changeset viewer.