Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

Viewing 25 replies - 1 through 25 (of 49 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.

    @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.

    @elgunvo – how is it coming along?


    aljuk
    Member

    @aljuk

    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.


    aljuk
    Member

    @aljuk

    Solved.


    aljuk
    Member

    @aljuk

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


    aljuk
    Member

    @aljuk

    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.

    @mercime k thx for that, I’ll do as you suggest.

    same as you, I’ve had it years. I’ll look into it at wp.

    Thanks paul, still no go. Both sites log me in fine, but both tracs refuse the login. I use a password manager, so no chance of typos. My WP login has been active for several years, I’m unsure what could be wrong.

    Of course. I don’t mind hacking plugins at all – in fact I enjoy it – it’s a great way to learn, and a good way to develop conversation and feedback with other developers. But obviously it’s way harder if the basic site code is invalid since one’s then aiming at a moving target. I’m having to constantly log out to check my edits, and since my install is going to be hidden from non logged-in visitors, this presents a problem going forward. Valid markup should be a cornerstone imho.

    Trac doesn’t accept my user login from this site. I have several bug reports that have cropped up with user testing from my early adopters, stretching back months in some cases, and no way of posting them.

Viewing 25 replies - 1 through 25 (of 49 total)
Skip to toolbar