Skip to:
Content
Pages
Categories
Search
Top
Bottom

Missing Argument for Get_User_Profile_Link

Viewing 8 replies - 1 through 8 (of 8 total)

  • _ck_
    Participant

    @_ck_

    Offhand I’d guess that the last poster function is meant to be “in the loop” for a per topic basis. Because you are trying to use it for an entire sub-forum, it’s missing a topic id reference. You’d have to calculate the last topic that the last poster posted in.

    Posting the code to that part of the template would help (at least for me)

    Are you using .8.2.1?

    get_user_profile_link() doesn’t actually have any required arguments in the newest version (https://trac.bbpress.org/browser/tags/0.8.2.1/bb-includes/template-functions.php, line 1070). I can’t understand why you’d have a problem like that.

    I don’t think it needs to be used in the loop. It does if you’re not going to provide arguments, but this is an error generated by PHP not bb. Any variables passed to it that would have been set in the loop but aren’t set outside it would simply be passed along, without an error, albeit unset.

    Well, it turns out I’m NOT using .8.2.1, just .8.1… Is the newest version REALLY new?

    The code I’ve used in the template is, I think, outside the loop, and is this:

    <H2><?php _e('Last Poster'); ?></H2>
    <UL><LI><a href="<?php get_user_profile_link() ?>">
    <?php topic_last_poster(); ?></a></LI></UL>

    I may not have made my problem all that clear, anyway… the fact is that the Last Poster bit works fine… it pulls up the last poster’s name fine. But when you mouseover the link, it becomes clear that it doesn’t work, presenting the problem I mentioned before…

    YES! The newest version is ALWAYS really new. REALLY new. There is NEVER a situation where you shouldn’t upgrade.

    You have a problem and you’re not running the latest version. What do you do? Go upgrade.

    You don’t have a problem. You’re not running the latest version. What do you do? GO UPGRADE.

    Upgrading might not even fix this problem, it’s not sure. But it does fix several security exploits and adds a bunch of featurs. Go upgrade!

    What’s worst is that you’re on a support forum asking for help and you’re not even on the latest version. You clearly haven’t tried everything before making other people take time to help you. Then you’re advised to upgrade … GO UPGRADE already.

    If I wasn’t clear … GO UPGRADE

    Sheesh, okay, I did that already. Before you even posted.

    It didn’t fix my problem but on the other hand, it DID make the dashboard nicer.

    Oh, and broke at least one of the key plugins on the site :-(

    But yeah, ultimately, I will always upgrade, when I realise there IS an upgrade.

    Want to know something interesting? Now, instead of a link to a broken page, the displayed names of the most recent poster ALL link back to my forum address, apparently regardless of the user… Any suggestions?

    I can’t remember which version added what, but make sure to activate your plugins in bb-Admin/Site Management or they won’t work.

    Try this:

    <?php $user = bb_get_user( topic_last_poster() );
    get_user_profile_link( $user->ID ); ?>

    You can make it one line if you want but you need those semicolons.

    Fel,

    I’ve managed to get the plugins mostly working, although not entirely well… but I’m asking for help on those in their relevant forums.

    As far as that code goes, it still works fine as far as displaying the last poster, but the profile link still isn’t working… Although I think we’re moving in the right direction, as now instead of linking to a fault page, or the forum index, it’s just not showing a link at all.

    Anyone got any ideas?

Viewing 8 replies - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.
Skip to toolbar