Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

Viewing 25 replies - 1 through 25 (of 59 total)
  • I’ve further pinned down the whats-new bug. It can be more accurately described thus:

    “You cannot successfully post two or more sequential updates from the whats-new form”

    You can post an update, a reply, an update, a reply etc. no problem, but sequential updates require up to 15 clicks on the submit button.

    Yes to an option with admin settings, which sets the limit in php, with a js counter. Not everyone is going to want this, and it’s critical that the site dev has full control over character limit, not to mention that different spoken languages can have quite different character counts for similar semantics.

    @modemlooper – I’ve gone back to your script. For some reason it was running super slow for me the other day when testing, but then I found that @nahummadrid ‘s method breaks the form submit when javascript is disabled, so I’ve gone back to it, and it’s super snappy. Pilot error on my part, clearly.

    Actually the nahummadrid method issue could be regarded as a feature in a sense, since it would prevent circumnavigation of the script limit by disabling js in the browser ;) The problem with that script without js appears to be the (depricated) form name, which has been specified with a hyphen and not camelCase, and doesn’t work with the inline onkeyup/onkeydown call. I’m not one for inline scripting anyway, so modemlooper’s is the one for me now.

    @djpaul – I’ve had problems logging into trac, and am fried for time, but we’re launching at the end of the month, and then I’ll have the time to engage with trac properly and post the bugs that have cropped up during the site build and testing. There are a few (eg. the multiple nested tags bug when any buddypress user content is edited – just have a look at the source code of this comment!). The fact that the whats-new form only works properly once between page refreshes is a bummer… On subsequent postings, the submit button has to be clicked 5 – 15 times before it fires (confirmed with fresh vanilla install in firefox, camino, safari and opera).

    Adendum – going back to the first method (nahummadrid’s). The problem with modemlooper’s method (as things stand with the whats-new bug) is that once an update is posted, if the user then wants to reply to an update before refreshing the page or navigating away, the comment reply form character limit is temporarily broken – the reply counter no longer works, and the reply limit doesn’t work either.

    Agh! This really should NOT be this hard. This has to be due to the plethora of identical nonce ids, no?

    @nahummadrid @justbishop @modemlooper

    modemlooper – you’re totally right, the script should be called from the header or an external js. Placing it in post-form.php only calls it for the whats-new form, and placing it in entry.php calls it repeatedly for every comment reply, leading to multiple instances.

    I adapted your reset script suggestion for use with nahummadrid’s technique of using a read-only text input field to display the count:

    `jQuery(‘#aw-whats-new-submit,.ac_form_submit’).click(function() {
    jQuery(‘.charlimitinfo’).val(’240′);
    });`

    `.charlimitinfo` is my count field
    `.ac_form_submit` is a class I’ve attached to the submit input for activity comments (in entry.php)
    240 is my chosen text limit

    The only issue I’ve encountered is that if you post something via the whats-new form and then post a comment reply without refreshing the page first, the reset for the character limit for the comment reply doesn’t fire. I guess this is related to the bug in Buddypress that prevents the whats-new form functioning correctly after an update’s been made and the page hasn’t been refreshed – perhaps due to the use of multiple identical ids and nonce field ids in the activity stream? I’m no expert, just a guess.

    One slight niggle. How to reset the counter upon submit?

    @nahummadrid – nice solution. It’s concise, and responsive (VERY important). Every other solution I’ve tested slows down the text input to a crawl, which isn’t acceptable for a public site and will really annoy anyone who types with all their fingers. I haven’t encountered the issue to which you alluded re. users breaking the limit with copy/paste. It’s working flawlessly. Thanks a bunch for it.

    @justbishop – yes, the code display has been mangled by wp texturise, and contains a cpl small errors. Here it is clean:

    `
    //<![CDATA[
    function limitText(limitField, limitCount, limitNum) {
    if (limitField.value.length > limitNum) {
    limitField.value = limitField.value.substring(0, limitNum);
    } else {
    limitCount.value = limitNum - limitField.value.length;
    }
    }
    //]]>
    `

    `@ `

    Incidentally, I think it’s best to place the script itself in entry.php, not post-form.php (assuming you’re also setting a character limit on replies). The reason for this is that it should only be loaded once, and if you place it in post-form.php it won’t be available on an individual activity page (ie. the page you get when you click the “View” link), but if you place it in entry.php it will be loaded when viewing the activity stream, and also when viewig the individual activity.

    @mahype – that’s good news! This plugin is a winner waiting to happen. I do commercial wp seo, so I just copied the bp title tag code and replaced and extended it in functions.php, then added tag and custom field support for the wp post types. I’m still playing with the meta for the bp components. I’ll follow your progress and revisit it when you’re ready. Keep up the good work. I realise how involved it is.

    @cezar – I didn’t, for the precise reason you mentioned.

    @valuser – it broke the search on those directories.

    Changing it for certain other plugins that make use of search (Buddyvents, Global Forums) has been successful, and I did that by straightforward hacking those plugins.

    Brilliant, thanks for posting this.

    Avatar of aljuk
    aljuk
    Member

    @aljuk

    @ds123 – I’ve got blog post Liking on mine (ie. in single.php). It was there out of the box, and is still there. Initially installed about 4 months ago I think. The only edit I’ve made to it is to swap bp_before_blog_single_post for bp_after_blog_single_post in Line 841. I also commented out the css in Line 880 and supplied my own. It renders just below my div.author-box. In my wp-admin I only have one settings page for it. Am I right in thinking there was a second settings page (or did I imagine that…)? I only ask because a couple of other plugins I’ve engaged fell over at the last WP update and needed tweaks to display settings in wp-admin again.

    Avatar of aljuk
    aljuk
    Member

    @aljuk

    @elgunvo – how is it coming along?

    There’s another issue with dates and Buddypress profiles – perhaps it’s related?

    When an Admin performs an edit from the front end of the site on a user’s profile that contains a date field, that date field is automatically populated with the corresponding value from the Admin’s profile ie. I can’t edit a user’s profile on the front of the site without re-setting the user’s birthday to the same date as my own.

    This is with BP single, latest versions, out of the box.

    @svenl77 @mahype

    Title tags don’t work for Buddypress components, and the default shortags are outputting some strange stuff. Is further development planned?

    Solved.

    @marto – in the functions.php of bp-default, change:
    `require_once( TEMPLATEPATH . ‘/_inc/ajax.php’ );`
    to
    `require_once( STYLESHEETPATH . ‘/_inc/ajax.php’ );`

    I’d pay for a premium version of this plugin gladly, so long as users can edit and delete their links, and edit their links’ privacy settings.

    bump.

    For anyone reading this thread, definitely do as suggested above, not as I did, which led to some unforseen complications.

    Awesome, thanks @r-a-y .

    @gunju2221 Thanks, I saw that, but as far as I can tell, that’s for the hint text if searching using ajax (?)

    What I’ve done is replaced the appropriate strings in :

    bp-blogs/bp-blogs-templatetags.php
    bp-core/bp-core-templatetags.php
    bp-forums/bp-forums-templatetags.php
    bp-groups/bp-groups-templatetags.php

    which appears to have done the trick. Searches are working fine, as is the hint text.

    Let me know if you foresee any problem with this!

    I adapted it a little, to display a link to the category the post is in (assuming one category, and category slug of ‘category’) :

    `class PJW_Translation_Mangler {

    function filter_gettext($translation, $text, $domain) {
    global $post;
    $category = get_the_category($post->ID);
    $cat_slug = $category[0]->slug;
    $category = $category[0]->cat_name;
    $translations = &get_translations_for_domain( $domain );
    if ( $text == ‘%s wrote a new blog post: %s’ ) {
    return $translations->translate( ‘%s wrote a new post: %s, in ‘.$category.’‘);
    }
    return $translation;
    }
    }
    add_filter(‘gettext’, array(‘PJW_Translation_Mangler’, ‘filter_gettext’), 10, 4);`

    Got it:

    `global $post;
    $category = get_the_category($post->ID);
    $cat_slug = $category[0]->slug; // gets the slug
    $category = $category[0]->cat_name; // gets the name
    $postslug = basename(get_permalink()); // gets the post permalink`

    @sbrajesh thank you so much.

    @mercime oh awesome! needed that.

    @gunju2221 glad to hear it :)

    Perfect. Thank you.

Viewing 25 replies - 1 through 25 (of 59 total)