Forum Replies Created

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

    (@jossi)

    It seems that the problem is related to a plugin.

    I did some traces and when I try to access the theme editor, WP calls the function validate_file_to_edit for this file:

    /data/www/mysite/htdocs/wp-content/plugins/ym/ym.php/

    validate_file_to_edit calls another function called validate_file (in functions.php) which returns 3. According to the documentation, return value of ‘3’ means that the file is not in the allowed files list.

    I have contacted the plugin owner, but would like to better understand what is the “allowed files list”.

    Forum: Plugins
    In reply to: qtranslate – 2 problems

    to change the date format, you need to set the qtranslate Configuration option to “Use strftime instead of date”

    — jossi

    it works for me as well on 2.6.2

    Yes. That hack works OK.

    Just change the version check in qtranslate_wphacks.php, line 74:

    if($GLOBALS['wp_version']!="2.6")

    to

    if($GLOBALS['wp_version']!="2.6.3")

    and it will work OK.

    jossi

    (@jossi)

    Here you go:
    Edit your theme’s comments.php

    Instead of this:
    <cite><?php comment_author_link() ?></cite> Says:

    use this:

    <?php
    	$commenter_id = $comment->user_id;
    	$commenter_fname =  get_usermeta($commenter_id,'first_name');
    	$commenter_lname =  get_usermeta($commenter_id,'last_name');
    	$commenter_name = ucwords(strtolower($commenter_fname . " " . $commenter_lname));
    ?>
    <code><cite><?php echo $commenter_name; ?></cite> Says:</code>
    Forum: Fixing WordPress
    In reply to: User first name
    Thread Starter jossi

    (@jossi)

    This will display the first name, the first letter of the last name, nicely formatted:

    <?php
    	$commenter_id = $comment->user_id;
    	$commenter_fname =  get_usermeta($commenter_id,'first_name');
    	$commenter_lname =  substr(get_usermeta($commenter_id,'last_name'), 0, 1);
    	$commenter_name = ucwords(strtolower($commenter_fname . " " . $commenter_lname . "."));
    ?>
    Forum: Fixing WordPress
    In reply to: User first name
    Thread Starter jossi

    (@jossi)

    Got it.

    Changed my comments template to use this:

    <?php
    	$commenter_id = $comment->user_id;
            $commenter_name =  get_usermeta($commenter_id,'first_name');
    ?>
    			<cite><?php echo $commenter_name; ?></cite> Says:
    Forum: Fixing WordPress
    In reply to: User first name
    Thread Starter jossi

    (@jossi)

    I can see that wp-comments-post.php uses the display name:

    $comment_author = $wpdb->escape($user->display_name);

    I could change this to
    $comment_author = $wpdb->escape($user->fist_name);

    But I just do not want to change that and mess with core files…. and also this will mean that only new comments will have the first name displayed, and I need to be able to make it work with existing comments.

    Forum: Fixing WordPress
    In reply to: User first name
    Thread Starter jossi

    (@jossi)

    My blog requires registration, so all users have a username which is displayed in the comment.

    What I need, is that instead of the user name, the first name of the user is displayed. (I am forcing users to register with first name and last name.)

    I have been checking the docs, and I can see that this information is not stored on the wp_comments table, so I will need to:
    a. Get the ID of the commenter
    b. Use the ID to retrieve the first name using get_usermeta

    <?php $commenter_name = get_usermeta($commenter_ID,'first_name'); ?>

    The question is how do I get the user_ID of the commenter?

    Forum: Fixing WordPress
    In reply to: User first name
    Thread Starter jossi

    (@jossi)

    Any ideas how to solve this, I have looked everywhere and cannot find a solution for this.

    Thread Starter jossi

    (@jossi)

    Thanks hungzai!

    Yes that did it.

    First I unchecked the sort year/month, then I uploaded the logo and then checked again the sort year/month, which I need.

    All seems to work now

    does not work for me either, and I am using WP 2.6

    ??

    I have a problem as well. WP 2.6

    default uploads folder:
    wp-content/uploads

    But when I try to upload a custom logo, nothing happens…

    Any ideas?

Viewing 15 replies - 1 through 15 (of 15 total)