Forum Replies Created

Viewing 15 replies - 121 through 135 (of 153 total)
  • Thread Starter chavo

    (@chavo)

    Nothing changes.

    Update:

    Works with this hardcode:

    if ( $previous )
        return previous_post_link($format, $title, FALSE, '10 and 11');
    else
        return next_post_link($format, $title, FALSE, '10 and 11');

    Thread Starter chavo

    (@chavo)

    Hi Scribu. I was thinking about this issue. Is there a way to harcode the plugin to do something like “If you come from home, prev and next buttons have to navigate between portfolio category”?.

    Thanks.

    Thread Starter chavo

    (@chavo)

    Ok. Thank you scribu!

    Thread Starter chavo

    (@chavo)

    Where I put:

    $this->month_abbrev_eng[__(‘May’)] = __(‘May’);

    I must have to put:

    $this->month_abbrev_eng[__(‘May’)] = __(‘May_May_abbreviation’);

    Thread Starter chavo

    (@chavo)

    Well Scribu. I hardcoded the locale.php file at wp-includes folder to get the plugin workings as I wanted. I duplicated de get_month_abbrev function as it follows:

    First, I duplicated month_abbrev:

    $this->month_abbrev_eng[__('January')] = __('Jan');
    $this->month_abbrev_eng[__('February')] = __('Feb');
    $this->month_abbrev_eng[__('March')] = __('Mar');
    $this->month_abbrev_eng[__('April')] = __('Apr');
    $this->month_abbrev_eng[__('May')] = __('May');
    $this->month_abbrev_eng[__('June')] = __('Jun');
    $this->month_abbrev_eng[__('July')] = __('Jul');
    $this->month_abbrev_eng[__('August')] = __('Aug');
    $this->month_abbrev_eng[__('September')] = __('Sep');
    $this->month_abbrev_eng[__('October')] = __('Oct');
    $this->month_abbrev_eng[__('November')] = __('Nov');
    $this->month_abbrev_eng[__('December')] = __('Dec');
    
    foreach ($this->month_abbrev_eng as $month_ => $month_abbrev_eng_) {
    $this->month_abbrev_eng[$month_] = preg_replace('/_.+_abbreviation$/', '', $month_abbrev_eng_);}

    Then, I declared the function:

    function get_month_abbrev_eng($month_name) {
    return $this->month_abbrev_eng[$month_name];}

    And finally, apply conditional tags to generator.php file from your plugin:

    if ($_SESSION["idioma"]=="esp") {
    // HERE I CALL NORMAL TRANSLATION FROM WP->LOCAL IN LOCALE.PHP
    $month = $wp_locale->get_month_abbrev($month);
    } else {
    // HERE I CALL SPECIAL HARDCODED TRANSLATION IN LOCALE.PHP
    $month = $wp_locale->get_month_abbrev_eng($month);
    }

    That’s all! Thanks for your plugin.

    Thread Starter chavo

    (@chavo)

    Hi Scribu. Thanks for your always generous reply. I see the guide but I can’t catch how to apply a filter or customize the wp_locale output.

    I found the lines in generator.php where is supposed to code the wp_locale output and I was a long time roundarounding it…but I couldn’t get it working.

    I’m do this:

    if ( 'short' == $format )
    if ($_SESSION["idioma"]=="esp") {
    $month = $wp_locale->get_month_abbrev($month);
    } else {
    /* here is supposed to be the english month abbreviation stuff */
    ...
    }
    $months[$i] = esc_html($month);

    Do you know what I have to do to apply and english month format?

    Thanks!

    Thread Starter chavo

    (@chavo)

    I guess that I have to apply some filter, but don’t know how.

    Thread Starter chavo

    (@chavo)

    Hi Scribu. It’s me again. Well…I just code a little bit the output format of months links editing generator.php

    Take a look at this:

    if ($_SESSION["idioma"]=="esp") {
    if ( $posts = $wpdb->get_results($query) ) {
    $month = array(
    'posts' => $posts,
    'link' => get_month_link($year, $i) .'?category_name=esp'
    );
    self::$monthsWithPosts[$year][$i] = $month;
    }
    } else {
    if ( $posts = $wpdb->get_results($query) ) {
    $month = array(
    'posts' => $posts,
    'link' => get_month_link($year, $i) .'?category_name=eng'
    );
    self::$monthsWithPosts[$year][$i] = $month;
    }
    }

    Now I’m wondering how to change the timestamp format. I mean…I want that if session = esp, month abbreviation be in spanish (ENE, FEB, MAR, etc.) but if session = eng display JAN, FEB, MAR, etc.

    Thanks in advance and sorry for my bad english.

    Thread Starter chavo

    (@chavo)

    Hi Scribu. Development version works fine now. I just want to know if is possible to exclude child categories. I have a parent category named as “News / Blog”. This category has 2 child categories: “eng” (for english posts) and “esp” for spanish posts. When you are at “news-blog” category, I use conditional tags and language sessions. So, if session = esp, I use a query_post call to show only posts belonging to “esp” child category. And if session = eng, show only posts from “eng” child categories. I tried to duplicate the plugin, but if doesn’t works.

    Thread Starter chavo

    (@chavo)

    Hi Scribu. I’m using version 1.8.3. I’m using the template tag <?php smart_archives(); ?>

    And the settins page is like this:

    Exclude Categories by ID: 1,2,3,4,5,6,7,8

    Format: block

    Use wp-cron: unckecked.

    Hi. This is exactly what I was looking for. I want to know if is possible to use conditional if statements with this function. I will clarify what I want to do:

    I have a parent category named as “News” with 2 child categories “esp” (for spanish posts) and “eng” (for english post). So…I’m managing what type of posts to show from “News” category depending of which is the current language SESSION. If session = esp, I display (with a query_post call) only post from “esp” child category, else if session = eng, I display posts from “eng” child category. What I want to know is if is possible to use the excluding category function as this way:

    if session = esp, so exclude “eng” post
    else if session = eng, exclude “esp” post.

    That’s the first thing that I want to attemp. Once I could resolve this, I have to research how to show wp_get_archives in english months format por “eng” and in spanish month format for “esp”.

    Thanks in advance!

    ps: sorry for my bad english.

    Thread Starter chavo

    (@chavo)

    There is still a plugin that gets a thumbnail from Vimeo but it doesn’t was as usefull as I want. This plugin is Vimeo Badge

    http://www.colak.net/vimeo-badge/

    I currently use a workaround using Vimeo widget to emulate a video list player. Therefore I will try using the code that Tomas posted.

    jtclark18: I guess that you have to put the code within the_loop as follows:

    <?php if (have_posts()) : ?>
    		<?php while (have_posts()) : the_post(); ?>
    <?
    $imgid = 4715514;
    $hash = unserialize(file_get_contents("http://vimeo.com/api/v2/video/$imgid.php"));
    print_r($hash);
    echo '<br />';
    foreach($hash as $hashed){
    echo $hashed[thumbnail_medium];
    }
    
    ?>
    		<?php endwhile; endif; ?>

    I not sure if $imgid = 4715514; is equal to the vimeo video id.

    Thanks for your help to everyone!

    Thread Starter chavo

    (@chavo)

    Does anyone know a solution?

    Thanks

    I found this link. Maybe you can create your own code from this one.

    http://www.tyssendesign.com.au/articles/cms/fetching-posts-in-wordpress-expressionengine-with-jquery-ajax/

    Hi. I’m looking for similar solution as ThreeD. I want to have a div with a post from a certain category in my home page (it isn’t the difficult part). Below the div that contains this post, a list of the 10 previous posts from same category (it is simple to get too).

    But,
    1- I can’t figure out how to get a post inside same div when I click a link from the list (ThreeD, can you post the code that you have been using to do it trought ajax? Thanks in advance)

    2. If I’m not wrong, I think that I have read once that the call to wp header is always necessary because of the functions its calls. Although that, I have never tried to use a query_posts call without <?php get_header(); ?> so I don’t know what will happen if I do it.
    I think that you are near to get I working ThreeD. Maybe with a call directly to the_content or something similar.

    Did you find a solution to this issue yet?

    Thanks in advance.

    ps: sorry for my bad english.

Viewing 15 replies - 121 through 135 (of 153 total)