HTML Logo by World Wide Web Consortium ( Click to learn more about our commitment to accessibility and standards.

Moving forward with Composr

ocPortal has been relaunched as Composr CMS, which is now in beta. ocPortal 9 will be superseded by Composr 10.

Head over to for our new site, and to our migration roadmap. Existing ocPortal member accounts have been mirrored.

Getting the emotions pallet to appear in Mobile Mode

Login / Search

 [ Join | More ]
 Add topic 
#94557 (In Topic #18848)

Community saint


I would like the emotions pallet to appear both for the "Topic'c emotion" and below the "Your Message" box as per the non-mobile version.

I would also like to experiment as to how the non WYSIWYG links would look and behave for mobile.

We Chris's help I discovered that the form is created in the COMMENTS_POSTING_FORM.tpl template and I could just turn off the checks for mobile around line 151 to allow the emotions to appear:


                                 <div class="comments_posting_form_emoticons">
                                    <div class="box box___comments_posting_form"><div class="box_inner">

                                          <p class="associated_link associated_links_block_group"><a rel="nofollow" tabindex="6" href="#" onclick="window.faux_open(maintain_theme_in_link('{$FIND_SCRIPT*,emoticons}?field_name=post{$KEEP*;}'),'site_emoticon_chooser','width=300,height=320,status=no,resizable=yes,scrollbars=no'); return false;">{!EMOTICONS_POPUP}</a></p>

So this allows the emotions to appear for the Topic but not to insert in the post message itself.
I really am trying to get my hands really dirty with OCP, so I rendered the page using the tree view in an effort to try and find out what is constructing the emotion box for posting.
I Created a new topic without submitting it and then fired up the Template Tree, however I could not find the template COMMENTS_POSTING_FORM.tpl anywhere in it.

So does that mean that it only gets included in mobile mode ? (difficult to check that as you cannot ge the template tree up in mobile mode). I suspect not as it has logic in it for checking if you are in mobile mode.

Any pointers as to which template adds the post emotions block and/or the the block above the message window for adding links, comcode etc greatly appreciated.

Back to the top

I Created a new topic without submitting it and then fired up the Template Tree, however I could not find the template COMMENTS_POSTING_FORM.tpl anywhere in it.

Ah, that explains… this is a different template.

POSTING_FIELD is actually what you want, and that is not in the tree. This is due to POSTING_FORM including it, and the tree optimising that away. I'll see if we can workaround that for the future and make the tree show includes.

POSTING_FIELD is basically for post fields embedded within larger forms. COMMENTS_POSTING_FORM is for standalone post forms, like contact forms, or quick reply.

As you are a developer, you may be comfortable grep'ing the templates directory for $MOBILE.

Usually all separation between mobile/non-mobile is done in CSS or templates. So exactly the same templates are used, and the templates adapt themselves based on the tempcode within them.

Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
1 guests and 0 members have just viewed this: None
Control functions:

Quick reply   Contract

Your name:
Your message: