Forum Replies Created

Viewing 11 replies - 16 through 26 (of 26 total)
  • So I dug. Here’s the solution:

    before </head>:
    <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js?ver=1.3.2"></script>

    call UserPhoto with prettyphoto:
    <a id="user-avatar-link" href="<?php echo admin_url('admin-ajax.php'); ?>?action=user_avatar_add_photo&step=1&uid=<?php echo $current_user->ID; ?>?iframe=true&width=520&height=350" rel="prettyPhoto[iframes]">Cambia Avatar</a>

    just below add:

    <script type='text/javascript'>
    var swrAjax = {
    ajaxurl: "https://your_blog.com/wp-admin/admin-ajax.php"
    };
    </script>

    Replace “your_blog” with the URL of your site. Let me know

    @benetic

    I forgot to say that we must add:

    <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js?ver=1.3.2"></script>

    before the closing tag </head>

    Hi,

    so if I understand correctly, you should not install it in wp-content/plugins but wp-cotent? confirmed?

    I discovered another thing: if you use on your blog PrettyPhoto or similar you can call the function without Thickbox.

    eg PrettyPhoto will use the following code:

    <a id="user-avatar-link" href="<?php echo admin_url('admin-ajax.php'); ?>?action=user_avatar_add_photo&step=1&uid=<?php echo $current_user->ID; ?>?iframe=true&width=520&height=350" rel="prettyPhoto[iframes]">Cambia Avatar</a>

    Hi,

    I dug and I got the solution for the User Photo plugin.

    1 = Open your theme function.php and call Thickbox in frontend:

    function tb_enqueue() {
     wp_enqueue_script(‘jquery’);
     wp_enqueue_script(‘thickbox’);
    }
    
    function tb_inject() {
    ?>
    
    <link rel="stylesheet" href="<?= get_option(‘siteurl’); ?>/<?= WPINC; ?>/js/thickbox/thickbox.css" type="text/css" media="screen" />
    <script type="text/javascript">
    var tb_pathToImage = "<?= get_option(‘siteurl’); ?>/<?= WPINC; ?>/js/thickbox/loadingAnimation.gif";
    var tb_closeImage = "<?= get_option(‘siteurl’); ?>/<?= WPINC; ?>/js/thickbox/tb-close.png"
    </script>
    
    <?php
    }
    
    add_action(‘wp_head’, ‘tb_enqueue’, 1);
    add_action(‘wp_footer’, ‘tb_inject’, 10);

    2 = Call User Photo frontend:

    <div id="user-avatar-display" >
    <h3>Avatar</h3>
    <p id="user-avatar-display-image"><?php echo get_avatar( $current_user->ID, 150);?></p>
    <a id="user-avatar-link" class="button thickbox" href="<?php echo admin_url('admin-ajax.php'); ?>?action=user_avatar_add_photo&step=1&uid=<?php echo $current_user->ID; ?>&TB_iframe=true&width=720&height=450" title="Personalizza il tuo Avatar" >Cambia Avatar</a>
    </div>
    <script type="text/javascript">
    function user_avatar_refresh_image(img){
    jQuery('#user-avatar-display-image').html(img);
    }
    </script>

    3 = open your css your theme and add :

    #user-avatar-display {
    background-color: #000;
    border:1px solid #454545;
    -moz-border-radius: 5px;
    -webkit-border-radius:5px;margin: 0 auto;
    padding: 0 20px 20px;
    position: absolute;
    right: 250px;
    text-align: center;
    top: 390px;
    }
    #user-avatar-display-image{
    border:4px solid #323232;
    width:150px;
    height:150px;
    }
    #user-avatar-link{
    float:left;
    margin:15px 0 15px 32px;
    font-size:13px;
    }

    https://img16.imageshack.us/img16/4346/userphotofrontend.png

    P.S: Beware of formatting quotes ”

    Forum: Hacks
    In reply to: WP Password Strength Meter

    very good! thanks sunriseweb, works very well.

    Thread Starter Fask

    (@fask)

    ok I found the solution:

    <div class="statistics">
    <?php
    $today = current_time('mysql', 1);
    $howMany = 10; //Number of posts you want to display
    if ($recentposts = $wpdb->get_results("SELECT ID, post_title, post_modified FROM $wpdb->posts    WHERE post_status = 'publish' AND post_type = 'post' AND post_name NOT LIKE  '%revision%' AND post_name NOT LIKE '%autosave%' AND post_modified_gmt < '$today' ORDER BY post_modified_gmt DESC LIMIT $howMany")) :
    ?>
    <h2><?php _e('ULTIME REVISIONI'); ?></h2>
    <ul>
    <?php $args = array('category' => '4');
    $recent_posts = wp_get_recent_posts($args);
    foreach ($recent_posts as $post) {
    if ($post["post_title"] == ''){ $post["post_title"] = sprintf(__('Post #%s'), $post["ID"]);
    }
    ?>
    <li><a href='<?php echo get_permalink($post["ID"]) ?>'>
    <?php echo mysql2date('d/m/Y', $post["post_modified"]) ?>
    &nbsp;-&nbsp;
    <?php echo $post["post_title"] ?>
    </a></li> <?php } ?>
    </ul>
    </div>
    <?php endif; ?>
    Thread Starter Fask

    (@fask)

    I thank you for the alert but there is without solution to the problem

    Thread Starter Fask

    (@fask)

    guys can anyone help me?

    Try adding the following to your theme’s functions.php file:

    function excerpt_ellipse($text) {
       return str_replace('[...]', ' <a href="'.get_permalink().'">Continue...</a>', $text);
    }
    add_filter('get_the_excerpt', 'excerpt_ellipse');
    Thread Starter Fask

    (@fask)

    hello men, I resolved. For those interested enough to open the file TA_multi_toolkit.php and replace “view all” in line: 91, 101, 480.

Viewing 11 replies - 16 through 26 (of 26 total)