Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 21,876 through 21,900 (of 32,481 total)
  • Author
    Search Results
  • #33518
    Arturo
    Participant

    hi, i’ve added the code require_once(‘/path/to/wp-load.php’); on my bb-config.php in a subdomain of my site but when i try to visit the site i see only a blank page… any idea to resolve this issue?

    my installation is: wp 2.9.2 and bbpress 1.0.2

    thanks!

    #85493

    Here is my bbPress resource page :P

    http://blog.ashfame.com/bbpress

    bbuser12345
    Participant

    I have one particular forum for which I would like the threads in that forum to NOT appear in the latest discussions list. Is there a small bit of code I can add to do this. I would also love it if there was an additional column that indicated the forum that the thread listed in “Latest Discussions” came from.

    #85410
    johnhiler
    Member

    @karma1981 – That’s a bug with the plugins page… there are two issues:

    1) The download only works if you are registered, for some reason. So first, you have to sign into the plugins install.

    2) The signin isn’t automatic because bbpress.org/forums and bbpress.org/plugins are using different versions of bbPress and don’t have cookies integrated.

    So in short: sign into the plugins page, and the download should work! :-)

    #85491
    gerikg
    Member
    #85537

    Oh you top man Tom! Yep, worked first time, perfect.

    Over on the other forum at: https://bbpress.org/forums/topic/how-to-keep-just-display-name-which-links-to-profile-in-posts#post-58301

    they tried this, which didn’t quite work;

    <a href="http://www.example.com/forum/profile/<?php bb_get_profile_link(post_author()); ?>">
    <?php bb_get_profile_link(post_author()); ?>
    </a>

    I’ll mark this thread as resolved then, and put a link to here on there. Nice one, thanks.

    James

    #85536
    deadlyhifi
    Participant

    Usernames can have a space in them because there is also a user_nicename set. This is all lowercase and any spaces are replaced with underscores. If you look at the link to your member page here you’ll see it ending in ‘james-blacker’.

    I presume you’re wanting a link to the profile page when you click on a username.

    To do that you need to something along the lines of

    <a href="<?php user_profile_link(get_post_author_id()); ?>"><?php post_author(); ?></a>

    #85529

    Ah, I’ll change that back to 10 then. :-)

    #85528

    Thanks, Tom. Just having a read of the codex now.

    Cheers,

    James

    #85527
    deadlyhifi
    Participant

    Presumably if I changed (or removed) the spelling of the codes in the names (not that I will), it would break and any info people had put in previously would be lost.

    Only if you changed the name of the value. i.e.

    'first_name' => array(0, __('What do they call you?')),

    should be fine, as long as the first_name stays intact.

    And I’ve increased the number parameter at the end of your add_action(‘extra_profile_info’, ‘add_descriptions’,15); – even I could work out that was important.

    That number is the priority that the function should get in relation to everything else that’s loading on the page. Read about that here: https://codex.wordpress.org/Function_Reference/add_action

    My code, btw, was at point got from this forum somewhere, so I can’t take credit for it. But it shows that anything in the functions.bb-pluggable.php file is easily replaced or manipulated.

    #85526

    That’s great! That’s brilliant Tom, thanks very much. I was obviously missing a few commands there!

    Thanks both of you, you just made a lot of integral practitioners very happy with their new found ability to register what they’re doing with their practice for mind, body, spirit and shadow on their new forum. Here’s the handiwork in action: http://wholelifewholeworld.com/forums/profile/james-blacker

    Presumably if I changed (or removed) the spelling of the codes in the names (not that I will), it would break and any info people had put in previously would be lost.

    And I’ve increased the number parameter at the end of your add_action(‘extra_profile_info’, ‘add_descriptions’,15); – even I could work out that was important.

    Tom, if you’re on a roll, do you have an insight for the one I posted on why linking poster names to their Profile doesn’t support usernames with spaces? Presumably you’ve linked Posts to people’s Profiles on your forum having done the extra work to modify your own profile pages?: https://bbpress.org/forums/topic/are-usernames-with-spaces-sensible

    Thanks again, both, greatly appreciated.

    Cheers, James.

    PS. Paul, no relation to my colleague, Gary Hawke, presumably? http://integral-uk-symposium.wholelifewholeworld.com/meet-the-people/gary-hawke/

    #85525
    deadlyhifi
    Participant

    What you are saying, basically, is instead of using the built in profile form use mine. So you need to replicate it then add anything, or take out anything you want.

    I’ve done that on my site so people can put in a visible email field for others to contact them, and added an explanation for the signup page.

    function extra_profile_keys() {
    return apply_filters(
    'extra_profile_keys', array(
    'first_name' => array(0, __('First name')),
    'last_name' => array(0, __('Last name')),
    'display_name' => array(1, __('Display name as')),
    'user_email' => array(1, __('Email'), 'email'),
    'user_url' => array(0, __('Website'), 'url'),
    'from' => array(0, __('Location')),
    'occ' => array(0, __('Occupation'), 'role'),
    'interest' => array(0, __('Interests')),
    'visible_email' => array(0, __('Visible Email')),
    ) );
    }

    function add_descriptions() {
    echo '<fieldset><legend>'.__("Visible Email").'</legend>';
    echo '<p>'.__("<span style="font-size: 1.2em;">Visible Email allows you to place an email address so others can contact you. This is visible to ALL!</span><br/>e.g. <span style="font-weight: bold;">meATexampleDOTcom</span>").'</p>';
    echo '</fieldset>';
    }

    // hooks
    add_filter('get_profile_info_keys', 'extra_profile_keys');
    add_action('extra_profile_info', 'add_descriptions',10);

    What I haven’t figured out is how to create checkboxes and other form elements instead of just fields.

    #85524
    paulhawke
    Member

    I lifted the following list from functions.bb-core.php where bbPress defines the set of fields that should make up the user profile:

    'first_name' => array(0, __('First name')),
    'last_name' => array(0, __('Last name')),
    'display_name' => array(1, __('Display name as')),
    'user_email' => array(1, __('Email'), 'email'),
    'user_url' => array(0, __('Website'), 'url'),
    'from' => array(0, __('Location')),
    'occ' => array(0, __('Occupation'), 'role'),
    'interest' => array(0, __('Interests'))

    If you want any of these fields to appear in your custom profile, you will need to add them to the list of fields you were building. Basically, the filter in your plugin takes over defining the definitive list that will be used, not a list of additions above-and-beyond the defaults given by bbPress … least I think that is what the code is telling me! :-)

    johnhiler
    Member

    Instant Password definitely works in 0.9. I have it installed on 12 separate 0.9 installs. :-)

    But until you can hire someone to upgrade Instant Password to work in 1.0, your best bet is probably making sure that your server is configured to be able to send email.

    Chriahajer wrote a great post on it here:

    https://bbpress.org/forums/topic/registration-email-not-being-sent-new-issue?replies=15#post-6931

    If your server isn’t sending out email, you could also install this plugin… to give bbPress access to an SMTP mailer:

    https://bbpress.org/plugins/topic/smtp-mailer-for-bbpress/

    #33505

    Is it ‘done’ to choose usernames with spaces? I’m just looking at this forum homepage, and I’m the only one who has chosen one, which is also why I have a problem with links from Post to my Profile on my own discussion board, even though it works for users who have an unbroken string as a username. Obviously, looking at the URL’s it’s the space that stops it being found, but given that the system (both, in fact) allowed me to choose a username with a space, is that no reasonable? Givem that it’s functionally possible, it would be poor to say to my subscribers to not use spaces.

    Here’s the example of posts where link to my profile doesn’t work, but the link to another (non-spaced) user does;

    http://wholelifewholeworld.com/forums/topic/everything-respectful-and-supportive

    http://wholelifewholeworld.com/forums/topic/ilp-practice-session-2912010

    And here’s the change I made to the post.php code, putting in; `<a>”>

    <?php bb_get_profile_link(post_author()); ?></a>` – is this not the best/quoted way to do this?

    <div class="threadauthor">
    <p><strong><a>">
    <?php bb_get_profile_link(post_author()); ?></a></strong>
    <small><?php post_author_title(); ?></small></p>
    </div>

    Thanks,

    James

    #85534

    In reply to: single forum

    xananax
    Member

    Ok, thanks to your idea, I’ve got it working. I quickly slapped together a theme that names the forums “categories” and uses the “latest topics” as the main view. It’s a very awkward theme, the CSS is crap, there is repeated code here and there but it is just a proof of concept. I’ll work more on it later.

    You can get it here:

    http://www.yelostudio.com/dump/yelobbpress.zip

    #81522
    Mark-k
    Participant

    I don’t like to mess with SVN, but I have no objection that someone will upload it to there ;)

    #81014
    xananax
    Member

    ok scratch that, the code is:

    <a href="<?php forum_link($topic->forum_id); ?>"><?php forum_name($topic->forum_id);?></a>

    tried it, it works.

    #81013
    xananax
    Member

    this is what I did:

    <a href="<?php forum_link($topic); ?>"><?php forum_name($topic);?></a>

    I have no idea if it is the best way…No documentation, I just tried some function names that seemed logical to me and it worked.

    #85523

    Thanks, Paul,

    That corrected it to the point that it was happy with it and allowed it to activate.

    Unfortunately, the impact of the thing was that other than the passwords the fields and their content disappared from the Profile and Edit Profile pages, so there’s obviously a bit more to ardentfrost’s approach other than this so far (as I’m sure you corrected the code right), if you or anyone else know what it needs? It seemed to be an officially approved approach to doing the thing on that other forum page.

    So I’ve de-activated it for now, and fortunately the fields and their content were still there and returned.

    Thanks again, Paul.

    James

    #85522
    paulhawke
    Member

    I just loaded the code into an editor, and reformatted for clarity

    <?php
    /*
    Plugin Name: jbs_own_plugin
    (etc....)
    */

    add_filter( 'get_profile_info_keys',
    array('user_email' => array(1, __('Email')),
    'user_url' => array(0, __('Website')),
    'from' => array(0, __('Location')),
    'occ' => array(0, __('Occupation')),
    'interest' => array(0, __('Interests')),
    'extra' => array(0, __('Extra'))));

    ?>

    Basically, it was missing a closing ) and semi-colon on the line. I cant promise that it does exactly what you are after, but this ought to solve the PHP syntax error. :-) Good luck.

    #33501

    Hi,

    I’ve just been following this instruction – http://bbpress.org/forums/topic/adding-custom-profile-fields (and as per http://bbpress.org/forums/topic/add-new-fields-to-user-profile#post-14767) – to create a plugin of my own to add a couple of extra fields for my post/edit post, as per ardentfrost’s instructions.

    I’m not overly familiar with php so wonder if anyone can see what is wrong with my code. The plugin I created for myself, which I’ve uploaded to /forums/my-plugins/jbs_own_plugin.php is as follows:-

    <?php

    /*

    Plugin Name: jbs_own_plugin

    (etc….)

    */

    add_filter( ‘get_profile_info_keys’, array(‘user_email’ => array(1, __(‘Email’)), ‘user_url’ => array(0, __(‘Website’)), ‘from’ => array(0, __(‘Location’)), ‘occ’ => array(0, __(‘Occupation’)), ‘interest’ => array(0, __(‘Interests’)), ‘extra’ => array(0, __(‘Extra’)))

    ?>

    And when I try to activate it in bbPress plugins I get;

    Parse error: syntax error, unexpected ‘;’ in /var/www/vhosts/wholelifewholeworld.com/httpdocs/forums/my-plugins/jbs_own_plugin.php on line 13

    I’ve tried it with one less ), and with ; after, and a couple of other combos, but can anyone see what I’m doing wrong please? Just want to add a few extra fields that people can fill in from Edit profile and have displayed on the Profile page.

    Also, I found out I don’t actually HAVE a functions.php page in bb-includes at all, so that is slightly worrying me (though everything else is working okay).

    Thanks,

    James

    #33452

    Topic: Toggle Forums

    in forum Themes
    driz
    Member

    Hi,

    I’m adding a toggle switch on categories for my forum, but they need to each have unique ids or something along those lines in order for the toggle to talk to each individual category.

    Any ideas how I could do this? Here is the code I have for the toggle.

    <script>

    $(“.toggle”).click(function () {

    $(“#box”).slideToggle(“slow”);

    });

    </script>

    #85481

    In reply to: No Plugins Found

    chrishajer
    Participant

    The permissions on your my-plugins should be 755. Are the permissions correct?

    Depending on when you installed and what version, the default permissions on the folder were 750, but that’s fixed now.

    If the permissions on the my-plugins directory are 755, we will look at something else.

    #85407
    paulhawke
    Member

    @chrishajer – D’oh! You’re right – it does say when an email is already in use. What was I thinking? ;-)

Viewing 25 results - 21,876 through 21,900 (of 32,481 total)
Skip to toolbar