• nozz

    (@nozz)


    WordPress Version: 3.2.1
    Lifestream Version: 1.1.3

    It seems like every time the feed updates I lose the CSS style from the Lifestream theme “boxy” or “default”.

    When I go in and simply “save settings” I get the style back.

    I only have the two standard themes “default” and “boxy”.

    Has anyone else had this? Or is there anything I can adjust to help this problem?

    https://www.ads-software.com/extend/plugins/wp-lifestream2/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter nozz

    (@nozz)

    After I diagnosed in the firebug, I think my earlier description is not accurate.

    Indeed, I found that the CSS file was loaded and performed. What makes thing worse is that the lifestream’s page “output” is not what we want. If normal, the output should be from “../themes/default/main.inc.php”(with the help of tag <p class="lifestream-paging">). However, when the theme lost, I think that the “output” is from the “../templates/home.php” because I found the <table class="lifestream"> tag. Surprisely, in the later case, sidebar appears in the bottom of the lifestream page but my wordpress theme is one-column which has disabled sidebar.

    Lacking the knowledge of PHP, I don’t know how lifestream outputs in my Lifestream Page, and I just post what may be useful.

    What’s more, I get lifestream page by insert “[lifestream]” in a new Page.

    Please fix it and thanks a lot.

    Thread Starter nozz

    (@nozz)

    Luckily, I have found a solution to the problem temporarily.

    In /plugins/wp-lifestream2/inc/core.php, we can find the following snippet:

    if (!$this->get_option('page_id'))
    {
    get_currentuserinfo();
    
    // First let's see if they have a legacy page:
    
    $results = $wpdb->get_results($wpdb->prepare("SELECT <code>ID</code> FROM <code>&quot;.$wpdb->prefix.&quot;posts</code> WHERE <code>post_type</code> = 'page' AND (<code>post_content</code> LIKE '%%[lifestream]%%' OR <code>post_title</code> LIKE 'Lifestream') AND <code>post_author</code> = %d AND <code>post_status</code> != 'trash' LIMIT 2", $userdata->ID));
    if (count($results) == 1)
    {
    $this->update_option('page_id', $results[0]->ID);
    }
    elseif (!count($results))
    {
    $this->create_page_template();
    }
    }

    change $results[0]->ID to '0', it’s done!

    In fact, I even don’t know how it works. I just know in my mysql table, when page_id=0, the theme works; when page_id=2753(my lifestream page id),it is broken. I have writed a post to describe it. You can visit https://bit.ly/rWFBz1

    I hope the author fix the bug ASAP. Thank you!

    Plugin Author Shelby DeNike

    (@sdenike)

    Can you provide the corrected code and I will push it into the next build

    Thread Starter nozz

    (@nozz)

    if (!$this->get_option('page_id'))
    {
    get_currentuserinfo();
    
    // First let's see if they have a legacy page:
    
    $results = $wpdb->get_results($wpdb->prepare("SELECT <code>ID</code> FROM <code>".$wpdb->prefix."posts</code> WHERE <code>post_type</code> = 'page' AND (<code>post_content</code> LIKE '%%[lifestream]%%' OR <code>post_title</code> LIKE 'Lifestream') AND <code>post_author</code> = %d AND <code>post_status</code> != 'trash' LIMIT 2", $userdata->ID));
    if (count($results) == 1)
    {
    	$this->update_option('page_id', '0');
    }
    elseif (!count($results))
    {
    	$this->create_page_template();
    }
    }

    I don’t know how the code work, but the problem was resolved really. You may put forward a better solution.

    And thank you for such a good plugin!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Plugin: WP-Lifestream2] Lifestream changes themes when feeds update’ is closed to new replies.