WordPress.org

Ready to get started?Download WordPress

Forums

WordPress Mobile Edition (9 posts)

  1. alexking_org
    Member
    Posted 10 years ago #

    I've converted my b2 Mobile Edition hack to work on WordPress.
    http://www.alexking.org/software/b2/
    There are a couple of changes you'll want to make so your unpublished posts aren't shown. Make these changes to the next_post() and previous_post() functions in b2template.functions.php.
    Find this line in next_post()
    $nextpost = @$wpdb->get_row("SELECT ID,post_title FROM $tableposts WHERE post_date > '$current_post_date' AND post_date < '$now' AND post_category > 0 $sqlcat $sql_exclude_cats ORDER BY post_date ASC LIMIT $limitnext,1");
    and change it to:
    $nextpost = @$wpdb->get_row("SELECT ID,post_title FROM $tableposts WHERE post_date > '$current_post_date' AND post_date < '$now' AND post_category > 0 AND post_status = 'publish' $sqlcat $sql_exclude_cats ORDER BY post_date ASC LIMIT $limitnext,1");
    Find this line in previous_post()
    $lastpost = @$wpdb->get_row("SELECT ID, post_title FROM $tableposts WHERE post_date < '$current_post_date' AND post_category > 0 $sqlcat $sql_exclude_cats ORDER BY post_date DESC LIMIT $limitprev, 1");
    and change it to:
    $lastpost = @$wpdb->get_row("SELECT ID, post_title FROM $tableposts WHERE post_date < '$current_post_date' AND post_category > 0 AND post_status = 'publish' $sqlcat $sql_exclude_cats ORDER BY post_date DESC LIMIT $limitprev, 1");

  2. Anonymous
    Unregistered
    Posted 10 years ago #

    Well thta's great ;) did the changes but the message then is SQL/DB Error [Unknown column 'publish' in where clause]

  3. Anonymous
    Unregistered
    Posted 10 years ago #

    This is when i want the lastest 10 posts. The lastest post (was link) is then no link no more, and the lastset 10 posts remain a clickable link. So when first in the error is there and when Latest or latest 10 posts is clicked

  4. Anonymous
    Unregistered
    Posted 10 years ago #

    Well the 'from the forum made the error, so if you copy and paste from here, check the 'if they are really ' ;) Now the next thing is to show actually a post which is not happing at the moment.
    Archives is working till you want to see a post. the first come in is not showing a post and latest 10 is not working on my pda (ipaq 3970)

  5. alexking_org
    Member
    Posted 10 years ago #

    'publish' is a value in those SQL statements, not a column, you may have a typo in there which is probably causing your problems.

  6. Anonymous
    Unregistered
    Posted 10 years ago #

    Well as i already sayed the sql error is gone now that was caused by the copyed script from here. The 'signs are transformed (as you can see if you look closely to the posted script.
    Now it's not displaying a post

  7. alexking_org
    Member
    Posted 10 years ago #

    It's working on my box (of course), why don't you dig into the code and try to see what is going wrong. I'm afraid there's nothing else I can tell you from what you've written here.

  8. Anonymous
    Unregistered
    Posted 10 years ago #

    well i do dig ;) but the hole picture of how it's done with the one post i don't get. And the one post thats whats not showing. Not showing default and not showing after a selection. If i knew what was the cource (i tried a couple of thing) i would be back here and tell ;) but for now i cannot find why the last post is not showing, everything else is do. see for yourself http://swapdepths.nl

  9. Anonymous
    Unregistered
    Posted 10 years ago #

    I've updated the mobile edition to make it compatible with the latest version of WordPress. It is also now (almost) XHTML transitional 1.0 compatible (just the AvantGo meta tag is not compatible).

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.