Tagged: 

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #42398
    Anonymous
    Inactive

    i want to add an action to the new event creation process so that when i create the event an extra piece of data gets stored somewhere. specifically: i create a unique twitter hashtag that shows on every event page — it looks like this “twitteracct#M#d#Y” — but when i create an event, i also want to save this tag to a list of all tags.

    is there an easy way to hook into the event creation function, so that in addition to calling event_create() or whatever, i can also call add_hashtag(‘tagname’)?

    sorry if this is covered in the documentation — didn’t see anything about hooks or filters on the website though…

    #46116
    Franky
    Keymaster

    No hooks yet. But I’ll try to add some later on.

    #46117
    Franky
    Keymaster

    I added an action after inserting or updating an event in the db:

    eme_insert_event_action (1 parameter: $event)

    eme_update_event_action (1 parameter: $event)

    I also added a filter for the events list:

    eme_event_list_filter (1 parameter: array of events)

    Update to the trunk version (http://downloads.wordpress.org/plugin/events-manager-extended.zip) and let me know the result 🙂

    #46118
    Anonymous
    Inactive

    you’re amazing, franky.

    the first two events are pretty self-explanatory, but to clarify for the next guy can you explain when this happens — eme_event_list_filter ? does this happen when stuff gets outputted; and if so, is it just lists or single events too?

    thanks so much!!

    #46119
    Franky
    Keymaster

    eme_event_list_filter allows you to play with the result of e.g. [events_list], so you can add/remove events/info etc…

    Btw: did you test the action hooks?

    #46120
    Anonymous
    Inactive

    I haven’t worked with tags too much like the 2 action tags you’ve created. Would these be put into the ‘header.php’ file or what?

    And once an Event is added (submitted), does this action take place with the file being called? ( I guess that’s why I want to know which file would be best to put this in. Since header.php gets called every time, it seems a good place to put it, checking with a conditional. Would that be right?)

    What file is used to display single events on the front end?

    Thanks for any help on this!

    #46121
    Franky
    Keymaster

    If you want to use actions, read up on the wordpress doc: http://codex.wordpress.org/Function_Reference/add_action , you’ll want this in your theme’s function.php

    #46122
    Anonymous
    Inactive

    Hi, thanks for the clarification above. The events_list_filter is a really good idea!

    As to the eme_insert_event_action, it works like a charm.

    Thanks again.

Viewing 8 posts - 1 through 8 (of 8 total)
  • The forum ‘Bug fixed or feature request implemented’ is closed to new topics and replies.
Scroll to Top