26 Replies Latest reply on Nov 23, 2017 10:15 PM by ab6866

    How do I create a new 'update status' link

    mrowbory

      I'd like to create a 'update status' link next to the users' profile in the main header.

       

      I want this to have the same effect as using the update option from the create menu. (creates a small popup)

       

      It seems that there is a javascript event being attached to the link in the create menu, but I can't work out what, or where from.

       

      It seems like it should be something really simple.

       

      Any ideas how I can replicate this?

       

      Not sure who do ask on this one.

        • Re: How do I create a new 'update status' link
          mrowbory

          Maybe I should have posted this in Jive Developers?

           

          Also, is there any chance that the user's current status is available in the navbar soy template

            • Re: How do I create a new 'update status' link
              mrowbory

              Ryan King I don't suppose you might know anyone that might be able to help?

                • Re: Re: How do I create a new 'update status' link

                  Hey Martin,

                   

                  The Create Status Update link in the Create menu is defined within the CreateStatusUpdateLink class.  That class defines both when the link is displayed, and the URL it executes.

                   

                  public class CreateStatusUpdateLink extends AbstractCreateLink {
                  
                      private ActivityActionHelper activityActionHelper;
                  
                      public boolean isVisible() {
                          return !uiComponentContext.getUser().isAnonymous() && activityActionHelper
                                  .checkPerms(uiComponentContext.getUser()).canCreateMbEntry();
                      }
                  
                      @Override
                      public String getUrl() {
                          return "/create-wentry-quick!input.jspa";
                      }
                  
                      @Override
                      public Map<String, String> getUrlParams() {
                          Map<String, String> params = new HashMap<String, String>();
                          params.put("contentType", String.valueOf(JiveConstants.WALL_ENTRY));
                          return params;
                      }
                  
                      public void setActivityActionHelper(ActivityActionHelper activityActionHelper) {
                          this.activityActionHelper = activityActionHelper;
                      }
                  }
                  

                   

                  As you can see, it just executes the CreateWallEntryQuickAction, and displays the popup using a Soy template.

                   

                          <action name="create-wentry-quick"
                                  class="com.jivesoftware.community.microblogging.action.CreateWallEntryQuickAction">
                              <result name="success" type="soy">jive.statusinput.containers.microbloggingStatusInputModal</result>
                              <result name="input" type="soy">jive.statusinput.containers.microbloggingStatusInputModal</result>
                              <result name="unauthenticated">/template/microblogging/create-wallentry-quick-unauthenticated.ftl</result>
                              <result name="unauthorized">/template/microblogging/create-wallentry-quick-unauthorized.ftl</result>
                          </action>
                  

                   

                  To save you some time, the template itself lives in /war/src/main/webapp/WEB-INF/classes/soy/status_input/status_input_containers.soy.

                   

                  You should be able to manually construct a link that points to the same action in the top nav.

                   

                  Hope this helps!

                  1 person found this helpful
              • Re: How do I create a new 'update status' link
                adriannadinapoli

                Rather than building this into the code, is there a "link" that I can distribute in emails  that would populate to an "update status" page?

                 

                Would love to hear back if anyone knows a way to do this.Thanks!

                  • Re: How do I create a new 'update status' link
                    danthomas

                    Amazingly, I found an answer to this one! fistbump

                     

                    The secret is in the 'actions' widget. I dug into the source code and extracted the start of the unordered list class definition and the list item for status. In short, to create a 'status update' hyperlink you can use:

                     

                    <ul id="ul_socialgroup-actions-tab" class="j-icon-list js-actions-list " data-tab-id="socialgroup-actions-tab" data-tab-index="0" data-jive-view="apps/socialgroup/actions">

                     

                                        <li id="jive-link-createStatus" style="">

                                            <a href="#" class="" rel="nofollow" onclick="" title="">

                                                <span class="jive-icon-med jive-icon-status"></span>

                                                Create a status update

                                            </a>

                                        </li>

                     

                            </ul>

                     

                    You can use the full code below to make links for any actions, just surround the <li> with the <ul> line and closing </ul> above. The only one that doesn't work at the moment is projects as that triggers a different modal window. Still trying to work that out...

                     

                    adriannadinapoli

                     

                    ------------------------

                     

                     

                    <ul id="ul_socialgroup-actions-tab" class="j-icon-list js-actions-list " data-tab-id="socialgroup-actions-tab" data-tab-index="0" data-jive-view="apps/socialgroup/actions">

                     

                                        <li id="jive-link-createThread" style="">

                                            <a href="                       

                                           

                    /discussion/create.jspa?containerID=1002&amp;containerType=700" class="" rel="nofollow" onclick="" title="">

                                                <span class="jive-icon-med jive-icon-discussion"></span>

                                                Start a discussion

                                            </a>

                                        </li>

                     

                                        <li id="jive-link-createDocument" style="">

                                            <a href="/document/create.jspa?containerType=700&amp;containerID=1002" class="" rel="nofollow" onclick="" title="">

                                                <span class="jive-icon-med jive-icon-document"></span>

                                                Write a document

                                            </a>

                                        </li>

                     

                                        <li id="jive-link-createDocument-upload" style="">

                                            <a href="#" class="" rel="nofollow" onclick="" title="">

                                                <span class="jive-icon-med jive-icon-document-upload"></span>

                                                Upload a file

                                            </a>

                                        </li>

                     

                                        <li id="jive-link-createBlogPost" style="">

                                            <a href="/blog/create-post.jspa?containerType=37&amp;containerID=1003" class="" rel="nofollow" onclick="" title="">

                                                <span class="jive-icon-med jive-icon-blog"></span>

                                                Write a blog post

                                            </a>

                                        </li>

                     

                                        <li id="jive-link-createPoll" style="">

                                            <a href="/poll/create.jspa?containerID=1002&amp;containerType=700" class="" rel="nofollow" onclick="" title="">

                                                <span class="jive-icon-med jive-icon-poll"></span>

                                                Create a poll

                                            </a>

                                        </li>

                     

                                        <li id="jive-link-createProject" style="">

                                            <a href="/groups/homepage/create-project!input.jspa?parentObjectType=700&amp;parentObjectID=1002" class="" rel="nofollow" onclick="" title="">

                                                <span class="jive-icon-med jive-icon-project"></span>

                                                Create a project

                                            </a>

                                        </li>

                     

                                        <li id="jive-link-createStatus" style="">

                                            <a href="#" class="" rel="nofollow" onclick="" title="">

                                                <span class="jive-icon-med jive-icon-status"></span>

                                                Create a status update

                                            </a>

                                        </li>

                     

                                        <li id="jive-link-author-by-email" style="">

                                            <a href="#" class="" rel="nofollow" onclick="launchAuthorByEmailModal(); return false;" title="">

                                                <span class="jive-icon-glyph icon-mail-send"></span>

                                                Create by email

                                            </a>

                                        </li>

                     

                                        <li id="jive-link-inviteToGroup" style="">

                                            <a href="#" class="" rel="nofollow" onclick="" title="">

                                                <span class="jive-icon-glyph icon-user-plus"></span>

                                                Invite people to join this group

                                            </a>

                                        </li>

                     

                                        <li id="receive-rss-link" style="">

                                            <a href="/groups/feeds?socialGroup=1002" class="" rel="nofollow" onclick="" title="">

                                                <span class="jive-icon-glyph icon-feed"></span>

                                                Group feeds

                                            </a>

                                        </li>

                     

                                        <li id="jive-link-create-socialgroup-event" style="">

                                            <a href="/groups/homepage/create-event!input.jspa?containerID=1002&amp;containerType=700&amp;contentType=96891546" class="" rel="nofollow" onclick="" title="">

                                                <span class="jive-icon-med jive-icon-event"></span>

                                                Create an event

                                            </a>

                                        </li>

                     

                                        <li id="jive-link-create-socialgroup-idea" style="">

                                            <a href="   /groups/homepage/create-idea!input.jspa?containerID=1002&amp;containerType=700" class="" rel="nofollow" onclick="" title="">

                                                <span class="jive-icon-med jive-icon-idea"></span>

                                                Create an idea

                                            </a>

                                        </li>

                     

                                        <li id="jive-link-createVideo" style="">

                                            <a href="/create-video!input.jspa?contentType=1100&amp;containerType=700&amp;containerID=1002" class="" rel="nofollow" onclick="" title="">

                                                <span class="jive-icon-med jive-icon-video"></span>

                                                Create a video

                                            </a>

                                        </li>

                     

                     

                            </ul>

                  • Re: How do I create a new 'update status' link
                    mcollinge

                    We're just taking another look at this for a UI change we're making on element14.com.. this JS snippet will trigger the Update Status box;

                     

                    $j.get(_jive_base_url+'/create-wentry-quick!input.jspa', function(data) { (new jive.Navbar.Menu.Create.QuickCreateView).showQuickView({body:data}); });

                    1 person found this helpful