Mad Dog

Forum Replies Created

Viewing 15 posts - 106 through 120 (of 130 total)
  • Author
    Posts
  • Mad Dog
    Participant

    Further testing….I can add an event using a New Venue but get the same errors mentioned above whenever I try to use a Saved Venue.

    in reply to: change Title on Edit an Event page #1001850
    Mad Dog
    Participant

    Thanks for keeping up with this. I got an email that the new release is pending. Do you have an ETA? There’s one thing in particular (CSV import handling custom fields) that is important…wondering how long I’ll need to wait.

    One other question: I’ve done a good bit of customizing. The one file in particular that I see will have a lot of change is Community Events edit-event.php. Being new to customizing EC, will there be some guidelines to help me know what I’ll need to do to adapt the new page? Can I just add a new module from the new page to mine? Or will I have to add my changes (lord knows I’ll need to remember them!) to the new file?

    Thanks

    in reply to: Limit Characters in textareas – Reopening #1000158
    Mad Dog
    Participant

    For anyone wanting to add a Character counter to a text area (such as in the Add an Event or Modify an Event pages), here’s what I did that worked really well. It’s based on http://jsfiddle.net/X28Xe/2/ which came from I believe a post on Stack Overflow but I lost track of it so I can’t give the original person credit. Sorry. But thanks to him!

    <script>
    jQuery(document).ready(function ($) {
        // Set your character limit
        var count_limit = 10;
    
        // Set the initial symbol count on page load
        $('#excerpt-wc span').text($('#excerpt').val().length);
    
        $('#excerpt').on('keyup', function () {
            var char_count = $(this).val().length;
            var excerpt = $(this).val();
    
            // Update the character count on every key up
            $('#excerpt-wc span').text(char_count);
    
            if (char_count >= count_limit) {
                $('#excerpt-wc').css('color', 'red');
                $(this).val(excerpt.substr(0, count_limit));
            } else {
                $('#excerpt-wc').css('color', null);
            }
    
        }).after('<p id="excerpt-wc">Count: <span>0</span></p>');
    });
    </script>
    

    Basically, change the ID “excerpt” to whatever your textarea ID is. Do keep the “-wc” suffix though! Change the character count and you’re good.

    I’m using this in the file: edit-event.php

    If you want to use this for the Description textarea you have to add a line to the top of the code. For some reason that textarea has no ID so you need to add this right after the opening <script>:

        // Add ID to Description textarea
    	$('textarea[name=tcepostcontent]').attr('id','tcepostcontent');

    Make sure “tcepostcontent” is the name of that textarea (it was for me) and if you want to use a different ID change the last one on the line.

    I first added this in the child verstion of edit-event.php but decided to keep things cleaner and pull it out. I created a function using “tribe_events_community_before_the_content” to insert it. I might put it in a separate .js file and just call that file into the page with a function….(see following response from support about that).

    I hope this is clear!

    MD

    in reply to: Limit Characters in textareas – Reopening #1000155
    Mad Dog
    Participant

    Well, I got it all working, including adding an ID to the text area. In a few minutes I think I’ll post my solution here so anyone searching can see it.

    One (hopefully) last question: I pulled the <scripts> out of the child version of edit-event.php and am inserting it via a function using tribe_events_community_before_the_content. It works fine. Okay, two questions:

    – Is there a better hook to use?

    – I actually feel like it would be better to put this into a .js file and then use the hook to call that file. Seems cleaner (and less cluttered in functions.php). If that sounds like a good way to go, where should I put the .js file and how should I call it? I’m not sure where in the child file structure under theme/tribe-events/etc it should go.

    Pretty slick!

    in reply to: CSV Import linking to user for Community Events #999963
    Mad Dog
    Participant

    Yeah…probably not worth that, but I’ll check with the client and see.

    If I could access it as a plain post in WP admin I could change the author but there doesn’t seem to be a way to do it.

    Might have to tell the client we can import them okay but the users can only work with new events they add from then on.

    Thanks!

    in reply to: Limit Characters in textareas – Reopening #999961
    Mad Dog
    Participant

    When I look at the raw Post Edit in WP (text view without TinyMCE) and inspect it, the TextArea has a Name, ID and Class.

    in reply to: CSV Import linking to user for Community Events #999954
    Mad Dog
    Participant

    Sounds like no matter how I do it there will be hand work involved. I’m not importing from a WP set-up even….it’s an old Perl script the client’s been using for 12 years! I was going to modify the CSV it exported to work with it but it sounds like it’s going to be messy.

    If I did import them, is there a way to after the fact assign them to various users?

    in reply to: Limit Characters in textareas – Reopening #999950
    Mad Dog
    Participant

    Thanks for the kind words. I added this in a child file so it won’t be affected by a plugin update though I will take it out of there.

    I’ll mess with the jQuery though that’s not my area of expertise. I still find it odd that the textarea element for Description on the Community Events Add/Modify screen has a Name (tcepostcontent) assigned but not an ID assigned to it. Especially since my Custom Field textarea has both. Is this a coding oversight?

    MD

    in reply to: Limit Characters in textareas – Reopening #999766
    Mad Dog
    Participant

    This reply is private.

    in reply to: Add ‘Required’ label to Organizer fields #999756
    Mad Dog
    Participant

    I can’t believer you’re making me break all the rules by editing the plugin!

    (:})

    I made the change, no problem. Any way to be on a list to be updated when this is fixed so I can do it right?

    Thanks.

    in reply to: Change text on Find Events search button? #999751
    Mad Dog
    Participant

    Easy change. THANKS

    in reply to: Fixing Community Events Datepicker #999735
    Mad Dog
    Participant

    This reply is private.

    in reply to: Fixing Community Events Datepicker #999609
    Mad Dog
    Participant

    Perfect! Thanks.

    Now…why is this datepicker so much nicer and convenient to use than the one on the List Events Search Bar??

    in reply to: Change text on Find Events search button? #999607
    Mad Dog
    Participant

    Thanks. I should be able to get this changed. I’ve been making lots of these changes but the template hierarchy gets complicated and the Themer’s Guide doesn’t list all the module files. Maybe the Guide can be updated to include the module files — I never would have guessed bar.php was the one without drilling down through a couple of other template files first.

    in reply to: change Title on Edit an Event page #999602
    Mad Dog
    Participant

    Thanks….kind of strange that they forgot this page. (:})

Viewing 15 posts - 106 through 120 (of 130 total)