Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

Viewing 25 replies - 851 through 875 (of 1,007 total)
  • @rogercoathup

    Participant

    @tubruk : As I said in my previous post… you’ll have to post your code (use pastebin.com) so that we can see where your problem might be.

    @rogercoathup

    Participant

    @r-a-y: I’m not sure this fix will work for Tatiana. I think she’s wanting to show the whole post (rather than the excerpt) in the activity stream, and make sure that formatting (paragraph breaks) is maintained. The posts are are poems, and many have an image at the top.

    Her problem, is that posts over a certain length are automatically shown just as text excerpts, with all the breaks gone (although a thumbnail image is still preserved.. see other thread).

    Using the excerpt would, without removing filters, lose the images and the paragraph breaks.

    In reply to: Gravatar Settings?

    @rogercoathup

    Participant

    @lunakm: rather than modifying the core code, which will need changing every time BP is upgraded, you might be better trying to do it as a filter.

    I suspect the filter you’d want to work with is bp_core_fetch_avatar_url. Try hooking a function onto this (in your bp-custom.php file) that appends the &r=x to the url.

    It might be worth raising it as an enhancement request for future BP releases, to give more control over the parameters that can be passed to Gravatar.

    Cheers, Roger

    @rogercoathup

    Participant

    @rogercoathup

    Participant

    @svetka812 – these questions are also better asked in the forum “how to and troubleshooting” rather than “requests and feedback”

    @rogercoathup

    Participant

    @svetka812

    Hi Tatiana – it would be better to ask this as 2 separate questions in the forums (one about images, and one about text). Also make the title a bit clearer, as that will get more people to help you (“activity stream 1.2.5.2” is too general).

    To get more help and quicker: I suggest you create two question threads, something like: “how do I stop small images from blog post excerpts getting enlarged in the activity stream updates?” and “Why are my blog post updates missing paragraph breaks when shown in the activity stream?”

    My quick thoughts:

    images
    The problem with image sizes is because a core function in BuddyPress is forcing activity images, that don’t have their height or width set explicitly, to be 100px high. The function causing the problem is bp_activity_thumbnail_content_images().

    I’ll raise this as problem in the forums or maybe bug trac.

    update text
    I don’t have a problem with paragraph breaks in the activity stream. My blog posts are being shown correctly with the breaks. I’m using a default installation of BP1.2.5.2

    Paragraphs can be removed by a filter in WordPress / BuddyPress. Have you made any changes to your functions.php or bp-custom.php to turn off the ‘autop’ filter? i.e. do you have any code like this in those files:

    add_action(“init”,”remove_autop_filters_from_activity”);
    function remove_autop_filters_from_activity(){
    remove_filter( ‘bp_get_activity_content_body’, ‘wpautop’ );
    remove_filter( ‘bp_get_activity_content’, ‘wpautop’ );
    }

    Perhaps there is something in the blog template you are using that is doing this?

    Ask this one about paragraph breaks as a separate question in the forum (and include my comment).

    Cheers, Roger

    @rogercoathup

    Participant

    My code snippet is indicative, and shows you the basics of what you need to do… You can’t just insert it verbatim. Did you edit my code snippet, and add your image code as needed? Did you place it in the correct place in profile-loop.php?

    It may be because I used “else if” with colons, which apparently is invalid – try combing “else if” into one word “elseif”.

    Generally, for an unexpected T_IF, you just need to go in and check your PHP is balanced / syntactically correct, but in this case it might well be the “else if” separation.

    If you still have a problem… post your code (via pastebin). It’s impossible to know from the information you’ve given where you’ve inserted my snippet, what’ve you added, and consequently what’s causing the unexpected T_IF.

    In reply to: page title in BP

    @rogercoathup

    Participant

    @bpuser44 : Thanks for the positive feedback. I hit the support forums a little hard over the weekend.

    You can find stuff on bp-custom.php and / or functions.php (which can be used for similar things in your theme folder) by searching the forums. BuddyPress development is not as simple as WordPress theming – you are looking at hooks, filters, and reworking core functions a lot more in BP. This should lessen as the API develops in future releases.

    BP would benefit no end from a great set of developer tutorials; finding the resource (right people) and time to write them is the big challenge in the Open Source world.

    There was a short lived job board forum on the site – that would be a great place to advertise and for you to find BuddyPress consultants, plugin developers, and website designers. Unfortunately, the board was taken down – I don’t know why. We have a current freelance opportunity for a skilled BuddyPress developer, but nowhere effective to advertise it – which is really frustrating.

    Most of our work is on commercial BuddyPress developments – so feel free to give me a shout if you want to explore the consultancy route (http://21inspired.com).

    In reply to: page title in BP

    @rogercoathup

    Participant

    @rogercoathup

    Participant

    The apply filters line at the end of the bp_page_title() / mikey_page_title() function sets the order of the title string, try changing it from:

    return apply_filters( ‘bp_page_title’, $blog_title . ‘ | ‘ . esc_attr( $title ), esc_attr( $title ) );

    to something like:

    return apply_filters( ‘bp_page_title’, esc_attr( $title ) . ‘ | ‘ . $blog_title, esc_attr( $title ) );

    Does that do the trick?

    @rogercoathup

    Participant

    @tubruk

    Are you using the default theme, or something similar? Are you trying to do this in the profile-loop.php file inside the profile loop? Is it only the About Me field you want to replace?

    if so, you need to edit your profile loop with something like this (note: the default template files use tables for the profile display):

    http://pastebin.com/zUZCvn6z

    Making use of the bp_get_the_profile_field_name() to check you are only applying your image to the correct field.

    And use the CSS files to style the table cells appropriately.

    @rogercoathup

    Participant

    @tubruk

    I’m not really sure what you are trying to do with your code. Whereabouts are you trying to hide fields with no data? In the default theme profile-loop.php, fields without values are already not displayed.

    As for quick fixes: You’ll need to replace ‘your-field-id’ with a variable that’s got the field id in it. You’ll also need to write valid PHP e.g. closing the PHP code before beginning your html. I’d steer clear of inline style definitions as well; the default BuddyPress theme comes with a comprehensive set of CSS files, and you’d be better augmenting these with style definitions.

    Unfortunately, this forum isn’t really the appropriate place for PHP coding tutorials – You might be better reading up on PHP before attempting to modify the theme templates in any depth.

    @rogercoathup

    Participant

    As pointed out by @intimez, this is already in the trac with a fix: https://trac.buddypress.org/ticket/2548

    @rogercoathup

    Participant

    @intimez:

    yes, that’s the same problem as I’m experiencing:

    … the !bp_current_component() clause in the if statement in bp_page_title() is what’s causing the problem for sub-page titles.

    I’ve identified that in another thread: https://buddypress.org/community/groups/how-to-and-troubleshooting/forum/topic/sub-pages-e-g-about-are-not-getting-the-correct-title-tag-set/

    But, hadn’t seen your entry in the trac.

    @rogercoathup

    Participant

    The problem is because !bp_current_component() is returning true for all pages, so all pages are getting the title set as ‘Home’

    @rogercoathup

    Participant

    Investigating further, the function bp_get_page_title() is not returning the correct result for sub pages:

    This if at the start of the function is returning true for all pages not just the home page:

    if ( is_front_page() || !bp_current_component() || ( is_home() && bp_is_page( ‘home’ ) ) ) {
    $title = __( ‘Home’, ‘buddypress’ ) ;

    Anyone got ideas?

    @johnjamesjacoby – does this need adding as a fix in the trac?

    @rogercoathup

    Participant

    I’m on WordPress 3.0.1 single site install

    Don’t just cut and paste my comment and edit in the word “NOT” – it will confuse people.

    On my default installation post titles DO work correctly, but page titles don’t work.

    If they don’t work on your installation, please make this clear in your reply. I’ll have to leave you to figure out why that is giving a problem on your install, or someone else to step in with thoughts.

    I’ve posted the page title problem separately.

    @rogercoathup

    Participant

    @tubruk

    in your child theme, wherever you want to hide fields that have no data, you can put a simple if statement, something like:

    if (bp_get_profile_field_data(‘field=your-field-id’) === “”) :
    // don’t display code
    else:
    // display code
    endif;

    Which file to edit, all depends where it is you are wanting to display / hide the profile field. The most likely file for displaying profile fields is profile-loop.php in members/single/profile, but that already skips blank fields (using a call to bp_field_has_data(); that function has to be used inside the profile field loop).

    @rogercoathup

    Participant

    Your terminology is what’s confusing people – when you say “headline” you actually mean the title of the post.

    In my default installation, posts are working correctly: posts like “Hello World” – they are getting the title of the post added to the title tag (albeit at the end of the string)

    You are right about pages though: pages such as About are not getting the correct title tag set.

    I’ll report this as a separate thread.

    @rogercoathup

    Participant

    @djpaul – I think this might be a wider problem – I investigated this for another user.

    I’ve installed the default BuddyPress installation, and using the default theme. If I click on the “about” page, the title tag still displays “home”

    In reply to: Profile field

    @rogercoathup

    Participant
    In reply to: Profile field

    @rogercoathup

    Participant

    p.s. delete the style directive from your post… it’s screwing up formatting of the thread

    In reply to: Profile field

    @rogercoathup

    Participant

    @rogercoathup

    Participant

    I don’t know what you mean by “headline post and pages”? You’ll have to explain further.

    Do you mean meta title = “..” ? In which case, I recommend installing “all in one seo” in your blog.

    If you mean the h1, h2 tags, etc. on a page … then that will all be in your theme’s template files (header.php, single.php, page.php)

    @rogercoathup

    Participant

    You’ll have to give your function a different name, e.g. mikey_page_title(), and change the call in header.php (in your child theme) to call mikey_page_title() instead of bp_page_title.

    If you are not using your own child theme, you will have to use the filter approach, or edit the parent theme (which will lead to upgrade problems in the future)

Viewing 25 replies - 851 through 875 (of 1,007 total)
Skip to toolbar