Forum Replies Created

Viewing 15 replies - 1 through 15 (of 17 total)
  • Thread Starter Felix

    (@ltse)

    Sorry for the late reply.

    For final validating, I like to use JSLint. However, you will most likely have to change the default options for your code to pass. It will always be best to adjust the options so that the code passes instead of ignoring errors.

    It will be easier for you if you have some Linting in your Editor. You could for example use SublimeLinter for Sublime Text 3 with the gjslint plugin (Interface for Google Closure Linter).

    If you need any help or more resources, I can email you.

    Thread Starter Felix

    (@ltse)

    Haha, cool I was looking at the code and couldn’t find any updates so I modified it myself.

    It’s running now and working quite well. I will update the plugin when it’s done with all posts and try out your method.

    You might want to consider optimizing the whole eio. It’s pretty confusing from a code style point of view and also doesn’t pass validation.

    Good job tho, don’t get me wrong 🙂

    Thread Starter Felix

    (@ltse)

    Okay, cool!

    Looking forward to see what you come up with.

    Thread Starter Felix

    (@ltse)

    Well the authors site is called in the plugin, thus affecting any admin who opens the plugins settings page. That’s why I brought it to attention.

    Thank you

    Thread Starter Felix

    (@ltse)

    Naw, I’m not hacked. The plugin settings page contains an iframe at the authors website (latest version after re-install)

    http://prelovac.com/plugin/news.php?id=5&utm_source=plugin&utm_medium=plugin&utm_campaign=Theme%252BTest%252BDrive

    Is the origin of the malware warning. Try this url in Chrome. It’s straight from the plugin.

    The author should maybe take a look at that.

    Thread Starter Felix

    (@ltse)

    hmm, sorry can’t make the code public. I doubt that the problem has anything to do with the code surrounding the main query because the same template is also used by the category and tag and search pages and those don’t have the problem. They are using the unmodified query.

    if (have_posts()) : while (have_posts()) : the_post();

    Thread Starter Felix

    (@ltse)

    Thanks for the advice. Changed all non-main loops to use WP_Query. However, both errors keep occurring.

    They also only appear on the main page and the popular page.

    Thread Starter Felix

    (@ltse)

    I have a few other queries before that one on the same page, yes.

    Thread Starter Felix

    (@ltse)

    wp_reset_query();
    
    $args = array(
        'category_name' => 'test',
        'posts_per_page' => 12,
        'meta_key' => 'post_views_count',
        'orderby' => 'meta_value_num',
        'order' => 'DESC',
        'paged' => $paged
    );
    
    query_posts($args); while (have_posts()): the_post();

    ^This

    Forum: Hacks
    In reply to: Images only for registered

    Well you can use that php snippet to do almost anything. Here is what it would look like if you want your image to only display to logged in users. Note that this will only work in your template and not for posted content

    global $user_ID; if( $user_ID ) { if( current_user_can('level_0') ) {
    
     echo '<img src="intro10.jpg">';
    
     } else {
    
     echo 'you have to be logged in to see this picture';
    
     }
    }
    Forum: Hacks
    In reply to: Images only for registered

    You can use this code to display content according to user levels in your theme:

    global $user_ID; if( $user_ID ) { if( current_user_can('level_10') ) {
    
     // stuff only level 10 users can see
    
     } else {
    
     // stuff everyone else can see
    
     }
    }

    level_10 targets page admins. For all user levels check this page:
    http://codex.wordpress.org/User_Levels

    To check if a user is simply restricted you should use level_0

    Thread Starter Felix

    (@ltse)

    I got this to work with update_post_meta and the multi array value

    array( array ( “field” => “value , … ) ).

    However, when I do the same with add_post_meta, WCK will not recognize the data.

    Thread Starter Felix

    (@ltse)

    I tried installing pngout and gifsicle for testing if they would work (I don’t actually need them).

    However, EWWW did not recognize them.

    Also, since the last update, it says, that there is an update for jpegtran which I also can’t seem to get working either by manual or automatic installation.

    It’s probably something with the server. Thanks for helping nevertheless!

    Thread Starter Felix

    (@ltse)

    Thanks for your answer!

    Sadly, I still experience the same problem. The status report gives an “OK” on everything except for “mime_content_type(): MISSING”.

    The processing will still “work” but there won’t be any savings.

    This is true for original uploads, bulk optimization and single optimization (tested with unoptimized large jpgs).

    Thread Starter Felix

    (@ltse)

    Thanks for your reply. Sadly, that method will always return a true (might be the php version and isset problem with multidimensional arrays?)

    Anyway, this will do the trick even though it’s not pretty:

    <?php $info = get_post_meta($post->ID, 'info', true);  foreach($info as $info) { 
    
     if ($info['test']) { echo 'true'; } else { echo 'false'; }
    
      }  ?>
Viewing 15 replies - 1 through 15 (of 17 total)