WordPress.org

Ready to get started?Download WordPress

Forums

Displaying certain blog comments (6 posts)

  1. ym
    Member
    Posted 9 years ago #

    I have no idea where to post this, but here goes:
    there's this WordPress blog that has over 3500 posts. Users have to download 4 MB of data just to view the latest post. I want to mirror this blog on my site. Is there a way to display certain blog comments, such as display blog comment #4? Looking around the source code, in wp-blog-header.php, which is included in wp.php, I found the following source:
    $wpvarstoreset = array('m','p','posts','w', 'cat','withcomments','s','search','exact', 'sentence', 'debug', 'calendar','page','paged','more','tb', 'pb','author','order','orderby', 'year', 'monthnum', 'day', 'hour', 'minute', 'second', 'name', 'category_name', 'feed', 'author_name', 'static', 'pagename', 'page_id', 'error', 'comments_popup');

    $wpvarstoreset = apply_filters('query_vars', $wpvarstoreset);

    for ($i=0; $i<count($wpvarstoreset); $i += 1) {
    $wpvar = $wpvarstoreset[$i];
    if (!isset($$wpvar)) {
    if (empty($_POST[$wpvar])) {
    if (empty($_GET[$wpvar]) && empty($query_vars[$wpvar])) {
    $$wpvar = '';
    } elseif (!empty($_GET[$wpvar])) {
    $$wpvar = $_GET[$wpvar];
    } else {
    $$wpvar = $query_vars[$wpvar];
    }
    } else {
    $$wpvar = $_POST[$wpvar];
    }
    }
    }

    Searching around, I cannot find the database schema which would help determine what variable to pass. I found the database creation function, but not the schema.
    GET variable p is the blog number, but which is the comment number? I've tried everything in that array. I want something like p=48&comment=4 passed to index.php
    Is what I'm doing possible?
    Thanks.

  2. ym
    Member
    Posted 9 years ago #


  3. moshu
    Member
    Posted 9 years ago #

    blog that has over 3500 posts. Users have to download 4 MB of data just to view the latest post...

    You mean you are showing all those posts, all the 3500 on the index page???
    Geez :(

  4. ym
    Member
    Posted 9 years ago #

    Yes, this is the blog: http://brokensaints.com/blog/?p=48
    In my page, I would display 20 posts/page and have the page listed on the bottom, much like a regular message board. If you click on page 3, posts 20-29 would be displayed.

  5. Mark (podz)
    Support Maven
    Posted 9 years ago #

    That ONE page weighs in at 3.1MB

    I have seen many more coments on other blogs without such a hefty size.

    Why is it that size ?

  6. ym
    Member
    Posted 9 years ago #

    Scroll through the blog and you'll see why. Some have posted repeating obscene comments, some have posted the entire script of Episode I, the script of a Star Trek movie, etc.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags