outchy (@outchy)

Forum Replies Created

Viewing 25 replies - 26 through 50 (of 68 total)
  • @outchy

    Member

    yes, good call:

    <?php
    $latestpost = $bbdb->get_row("
    SELECT *
    FROM $bbdb->posts
    WHERE post_status = 0

    ORDER BY post_time DESC
    LIMIT 1

    ");
    ?>

    Re:
    <a href="<?php echo get_topic_link($latestpost->topic_id); ?>"><?php echo get_topic_title($latestpost->topic_id); ?></a>:<br /><br />

    <a href="<?php user_profile_link($latestpost->poster_id); ?>"><?php echo get_user_name($latestpost->poster_id); ?></a> said:

    <?php echo $latestpost->post_text; ?>

    @outchy

    Member

    it works great, thanks!

    citizenkeith: you don’t have to add anything to post.php, just enable the plugin, edit your profile and add a signature, then it should show up beneath all of your posts.

    @outchy

    Member

    excellent! i got it to work with this just before i checked back for your reply:

    <a href="<?php echo get_topic_link($latestpost->topic_id); ?>"><?php echo get_topic_title($latestpost->topic_id); ?></a>

    i think i understand it better now, thanks again! :D

    @outchy

    Member

    wait, i got this to work to display the name:

    <?php echo get_user_name($latestpost->poster_id); ?>

    and this to make it into a link to the person’s profile:

    <a href="<?php user_profile_link($latestpost->poster_id); ?>"><?php echo get_user_name($latestpost->poster_id); ?></a>

    now all i need is to display the topic title and make it a link … i need help with this one please :)

    @outchy

    Member

    so to get the last poster’s username to display, do you do something like this?

    <?php echo get_user_name($user_id); ?>

    i guess i don’t understand the whole passing parameters thing :/

    @outchy

    Member

    yes, that worked, thank you.

    i’m going through the template-functions.php trying to find how to display the last poster’s username and his/her profile link, as well as the link to the topic itself but the only ones i can get to work are these:

    <?php echo $latestpost->post_text; ?>

    <?php echo $latestpost->poster_id; ?>

    <?php echo $latestpost->post_time; ?>

    any suggestions? :)

    @outchy

    Member

    ok cool, thank you. it’s doing something so that’s good :)

    this is what i’m using:

    <?php
    $latestpost = $bbdb->get_row("
    SELECT *
    FROM $bbdb->posts
    WHERE post_status = 0
    LIMIT 1
    ");
    ?>

    <?php echo $latestpost->post_text; ?>

    it’s displaying the first post from forum 3 for some reason, not the most recent post. i’ve posted a few new posts since then in other forums and it never changes on the front page, it still shows that first post from that forum 3. any idea how come?

    (thanks for your help on this)

    @outchy

    Member

    i want to display the most recent post, no matter what forum it happens to be from. is that possible?

    i tried doing what you said but maybe i messed it up because i’m getting a mysql syntax error. here is what i have, forgive me if it looks glaringly stupid:

    <?php
    $forum_id = 1;
    $forum_one_topics = $bbdb->get_row("SELECT * FROM $bbdb->topics WHERE forum_id = $forum_id ORDER BY topic_time DESC ") ?>
    <?php
    $forum_one_topic_posts = get_thread( $forum_one_topics->topic_id); ?>
    Re: <a href="<?php topic_link(); ?>"><?php topic_title(); ?></a>
    <span class="gray">
    <a href="<?php get_user_profile_link( $id = 0, $page = 1 ); ?>">
    <?php echo $forum_one_topics->topic_last_poster_name; ?></a> said:</span> <span class="justify"><?php echo $forum_one_topic_posts[0]->post_text;
    ?></span>

    sorry, i’m really trying to get it :/

    @outchy

    Member

    sure, here is line 13:

    foreach($forum_one_topics as $topic) :

    and here is the surrounding stuff:

    <h2><?php _e('Latest Post'); ?></h2>

    <?php
    $forum_id = 1;
    $forum_one_topics = $bbdb->get_results("SELECT * FROM $bbdb->topics WHERE forum_id = $forum_id ORDER BY topic_time DESC LIMIT 0,1") ?>
    <?php
    foreach($forum_one_topics as $topic) :
    $forum_one_topic_posts = get_thread( $topic->topic_id); ?>
    Re: <a>"><?php topic_title(); ?></a>

    <span class="gray">
    <a>">
    <?php echo $topic->topic_last_poster_name; ?></a> said:</span> <span class="justify"><?php echo $forum_one_topic_posts[0]->post_text;
    endforeach;
    ?></span>

    @outchy

    Member

    thank you, i will try that.

    any idea about the “invalid argument” error i’m getting?

    @outchy

    Member

    i have another question about the most recent post on the front page. i got it working great from what was written in this post. however, i then deleted a forum (from position 0) and once i did that, an error appeared where the text from the most recent post used to be:

    Warning: Invalid argument supplied for foreach() in /Library/WebServer/Documents/bb-templates/superbold/front-page.php on line 13

    any thoughts on how i can correct this and make it work again?

    @outchy

    Member

    i hear what you’re saying but believe me, i tried my damndest to figure it out myself before i posted (as i do before all my questions). the problem is i don’t really understand the syntax of php code just yet so i don’t know how to use the get_user_profile_link(); function in this particular example (getting the profile link of the last poster from the entire messageboard onto the front page, it’s a little confusing). if you can give me some help on this one, i’d appreciate it.

    @outchy

    Member

    worked for me, good stuff. thanks!

    @outchy

    Member

    awesome, how would i get the poster’s name to become a link to their profile?

    In reply to: Plugin: bb-Topic-Views

    @outchy

    Member

    this works really well on the front page, although i’m having a slight issue with my dashboard. when this plugin is active, i get the following error text on the right-hand side:

    Recently Moderated

    * Post on

    bbPress database error: [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘AND meta_key=’views” at line 1]

    SELECT meta_value FROM bb_topicmeta WHERE topic_id = AND meta_key=’views’

    bbPress database error: [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘ ‘views’, )’ at line 1]

    INSERT INTO bb_topicmeta ( meta_id, topic_id, meta_key, meta_value) VALUES ( NULL , , ‘views’, )

    Welcome to SK6Fans.com by neddi.

    Here is a screenshot

    Any thoughts?

    In reply to: css help

    @outchy

    Member

    awesome :D

    In reply to: Plugin: Avatar Upload

    @outchy

    Member

    perfect, the new avatar.php did the trick! thank you very, very much.

    In reply to: Plugin: Avatar Upload

    @outchy

    Member

    i’m trying to reinstall it but i still seem to be missing the avatar.php file. is that in the .zip somewhere? i don’t see it, although when i unzip the file, things don’t look quite right. i have two files that are 0kb:

    Screenshot

    are “avatars” and “my-templates” supposed to be folders?

    also, i have a version of avatar.php but i’m not sure where it came from, i thought maybe i cut and pasted it from a forum post but i can’t be sure. you can see it here

    @outchy

    Member

    yeah that’ll work for now, thanks.

    In reply to: Plugin: Avatar Upload

    @outchy

    Member

    i did that and did a diff on all the files and they’re all the same. where do i get the code for avatar.php?

    In reply to: Plugin: Avatar Upload

    @outchy

    Member

    i’m missing that option on my avatar page for some reason, i may have deleted that line by mistake. any thoughts on how i might get it back?

    @outchy

    Member

    awesome, just what i was looking for! thanks :)

    In reply to: Plugin: Avatar Upload

    @outchy

    Member

    how does one revert back to the default identicon after they’ve uploaded a custom image?

    In reply to: Topic Pages

    @outchy

    Member

    try this if you want to change the number on the front page:

    https://bbpress.org/plugins/topic/3

    @outchy

    Member

    i feel like i should send you a check, fel.

    thanks :D

Viewing 25 replies - 26 through 50 (of 68 total)