Adding photos to events (or groups)

How to create a button/form within the actual event/group page, to add photos (polls/videos) to that particular event?

As far as I could see, if you join an event, then once you go to the add a photo page from the dropdown menu, you can then use the huge dropdown "post to" to select the place where you want to post.

However, for a person that joined 10 groups, 20 hashtags, 5 events, and so on, it is not convenient to have such a huge dropdown, but that's ok. 

The problem is that I can't seem to find a block to put on the "photos" page of a particular event or group, so that members(admins) of that group/event could add photos through that page to that page, rather than having to go through a long dropdown. 

So I'm trying to upload photos to an event directly through one of that event pages, as opposed to through a dropdown. Any suggestions?

  • 489
  • More
Replies (15)
    • Hello titanium !

      The simplest way is to post the photo content of the Events / Group feed.

      • Hi LeonidS !

        I'm not sure I understand.

        I attached two screenshots of what it currently looks like in the studio & on the actual page.

        The place that I'm editing is the Photos>Photos in context, because that's where the group's photo page is pulling the content from. I can't seem to find any appropriate block for this. I don't mind creating a custom link, but it needs to have a dynamic URL then,  to lead to the photo-creation page corresponding to this group. 

        image_transcoder.php?o=bx_froala_image&h=4315&dpx=1&t=1607773076

        image_transcoder.php?o=bx_froala_image&h=4316&dpx=1&t=1607773105

        • I mean to enable this block on the View Group page (see attached pic). It is the simplest way to add the media for the group only.

          • I mean to enable this block on the View Group page (see attached pic). It is the simplest way to add the media for the group only.

            Hi, I was looking for a way to add a block "Add a photo" to a group profile page or group photos page. And same with Events, 

            I already have that block enabled and displaying the posts, though.

            • LeonidS Basically, for every "___ in context" page, such as "Videos in context", "Events in context" - I'm looking for a "post in context" block (similar to the personal profile context pages). That "post in context" block would post the video/event/article in the corresponding group.

              • Update - here requireed the results of this ticket https://github.com/unaio/una/issues/979 

                • Sounds like that's exactly what I need!
                  Just not only photos, but posts, polls, discussions, videos, and files to have a +ADD button on their respective pages within groups/events/orgs.

                  Is there any ETA or priority on this ticket?

                  • Actually this ticket is obsolete, since those time we added possibility to post photos (and other content) to group/event/etc using post to context form, however this form is supposed to be used on main group's page, not in sub-tags (like photos in context), you can add this block using pages builder:

                    • Got it, yep that's what we're using now, and it works.

                      Is there any way to include some button in sub-tags (like photos in context), as you mentioned above, as well?

                      • To add a button which will display post to context form for specific content module you can add RAW block with the following content on "Albums in context" page:

                        <button class="bx-btn" onclick="bx_add_custom(this)">Add</button>
                        <script>
                        function bx_add_custom (e) 
                        {
                              var sModuleUri = 'albums';
                              var iContextId = -{profile_id};
                              $.get(
                                sUrlRoot + 'modules/?r=' + sModuleUri + '/get_create_post_form/', {
                                    ajax_mode: true,
                                    dynamic_mode: true,
                                    absolute_action_url: true,
                                    context_id: iContextId,
                                    custom: {},
                                    _t:(new Date).getTime(),
                                },
                                function(oData) {
                                    if(!oData || !oData.content) 
                                        return;
                                    $(e).parent().html(oData.content);
                                }, 
                                'json'
                            );
                        }
                        </script>

                        To adopt it to some other module replace albums in var sModuleUri = 'albums'; string with another module URI.

                        • Fantastic, this is exactly what I needed. Thank you!

                          • subscribe

                            • Hello, how did you do the sModuleUri? Did you just put 'discussion' or the full url thank you 

                              • Hello lance !

                                For the Discussions, the sModuleUri variable will have the "forum" value.

                                • Thank you work!

                                  Login or Join to comment.