YOOtheme Pro is here! The best WordPress and Joomla theme. Learn more

Avatar uemit.madenoglu.5 asked

Yootheme ZOO App - Change order of comments and comment field

Hi,

I want to change the order of the comments and comment field for a Yootheme Zoo Business App item .
As you can see at below there are over 40 comments and the comment field stay at quite down and the user have to scroll too much to enter his
comment:

Image

So I want to have the comment field first and than the comments itself.

How can I change the order of both?

Thank you in advance

Best regards

sokrates

  • ZOO

Edited

7 Answers

0

Avatar michael.maass Support answered

Now that you provided a link to your site, I can see that you use a 3rd party Joomla frontend template. So this template's CSS applies and adds the bullet as well as the margin.

To remove the "bullet" to the left of the comments please try and add the following declaration at the end of your Joomla template's custom CSS:

ul.uk-comment-list {  
list-style: none;  
margin-left: 0;  
}

Please refer to your Joomla template's manual about where to add custom CSS.


Regarding the different avatar:

  • If the comment's author does not provide an e-mail-address the standard avatar image is loaded from media/zoo/assets/images/avatar.png.

  • Whenever a comment is post with an e-mail-address ZOO will load the avatar image from the "Gravatar" service.

    Should the e-mail address be either not listed in Gravatar's database or there is no image provided for it, the standard placeholder image from Gravatar will be displayed, but not the locally stored standard avatar image in the ZOO folder.

Currently you have configured your app instance's comments feature with name and e-mail as mandatory:

Image

This setting is a property of the chosen ZOO template. It must have been differently set when your app instance used the previous template. Otherwise you could not have posted all the comments without e-mail.

Thank you

Edited

0

Avatar michael.maass Support answered

So I want to have the comment field first and than the comments itself.

You mean you want the comment form at the top, followed by the existing comments?

To move the comment form to the top, please carefully follow these steps:

  • Create a custom ZOO template for your "business" app using your app instance's currently set ZOO template as a blueprint.

    The procedure is described for the "Cookbook" app in [Tutorial] Get a custom ZOO app template. The steps to take for the "Business" app are very similar.

    Important:

    • If you create a custom ZOO template as described the following changes are update-safe.
      Do not skip this step. Do not modify an original ZOO template or your changes will be lost with an update.

    • For the sake of argument I will assume that your custom ZOO template is named "uikit-custom" and resides in the following path:

      media/zoo/applications/business/templates/uikit-custom/

  • Once you have a custom template, open the file
    media/zoo/applications/business/templates/uikit-custom/_comments.php
    (mind the precise file name!)

  • Move lines 35 through 44

    <?php endif; ?>  
    <?php  
        if($item->isCommentsEnabled()) :  
            echo $this->partial('respond', compact('active_author', 'params', 'item', 'captcha'));  
        endif;
    
        if($item->canManageComments()) :  
            echo $this->partial('edit');  
        endif;  
    ?>
    

    to immediately after

    <h3><?php echo JText::_('Comments').' <span class="uk-text-muted">('.$count.')</span>'; ?></h3>
    

    As a result the complete div element should look as follows:

    <div id="comments" class="uk-margin">
    
        <?php if ($count = count($comments)-1) : ?>  
        <h3><?php echo JText::_('Comments').' <span class="uk-text-muted">('.$count.')</span>'; ?></h3>
    
        <?php endif; ?>  
        <?php  
            if($item->isCommentsEnabled()) :  
                echo $this->partial('respond', compact('active_author', 'params', 'item', 'captcha'));  
            endif;
    
            if($item->canManageComments()) :  
                echo $this->partial('edit');  
            endif;  
        ?>
    
        <ul class="uk-comment-list">  
            <?php  
            foreach ($comments[0]->getChildren() as $comment) {  
                echo $this->partial('comment', array('level' => 1, 'comment' => $comment, 'author' => $comment->getAuthor(), 'params' => $params));  
            }  
            ?>  
        </ul>
    
    </div>
    
  • Save and close the file.

Reload the page in the frontend and test.

Thank you

Edited

0

Avatar uemit.madenoglu.5 answered

Hi Michael,

I follow all the steps you recommend and so far it works technically as I want, BUT two little things in the layout has change as it was before.

1- There appear little dots at the left side of the avatar comments, this was not the case before. What I can do for removing them?
2- The "area of operations" (item category) appears suddenly, but wasnt that all in all just a copy of the existing template I modified before? Why does this change wasnt assigned? I forget where I disabled the item category before. Can you tell me where exactly I can disable it, please?

Image

Thank you for your help Michael !

Best regards from Berlin

sokrates

0

Avatar uemit.madenoglu.5 answered

I check up in the Template Layouts - UIkit Custom: Edit | Feed | Full | Maps | Submission | Teaser
For Full view it looks like below:

Image

there is no element in the sidebar...

How it comes that it does appear now?

0

Avatar michael.maass Support answered

1- There appear little dots at the left side of the avatar comments, this was not the case before. What I can do for removing them?

The "little dots" might be standard HTML "List" item bullets, but that can only be a guess.

Mind that the information you provide is not sufficient to assist you with this kind of fully fledged customization.

When asking for assistance of any kind please generally post a link to your site and — where applicable — a page showing the subject of your question. A first hand look at the page could possibly tell us more about several aspects regarding current settings, which style you use, the markup in its context, as well as other details which are probably important when it comes to explanations, instructions or troubleshooting.

Without providing sufficient information you will rarely get a spot-on answer because everybody is left to guessing what might be wrong and how to approach your issue.

If you don't want to openly post the URL or it is set "Offline" (Joomla) or otherwise locked (via .htaccess/.htpasswd for instance) just click Edit at the bottom right of your initial question (= the first post in this thread) and then use Add hidden information at the bottom left to provide the required access data.

Anything in the Hidden Information field will only be visible to the YOOtheme support team.

Once there is a page to inspect I will take a look to see what I can suggest.


2- The "area of operations" (item category) appears suddenly, but wasnt that all in all just a copy of the existing template I modified before? Why does this change wasnt assigned? I forget where I disabled the item category before. Can you tell me where exactly I can disable it, please?

Copying a template doesn't copy the elements and positions.

Thoroughly revise the configuration of your custom template's layouts (Full, Teaser, etc.).

Please take a look at the ZOO documentation in general and the chapter on how to Assign Elements to Layout Positions in particular.


there is no element in the sidebar...

Mind that the layout shown in your screenshot is completely empty. If it were really used for the frontend no content at all would be displayed. If you see content it is a clear hint that your are looking at the wrong ZOO template and the wrong layout.

How it comes that it does appear now?

Make sure you are looking at the very ZOO template and layout which is actually assigned to your app instance, not just any layout of any template.

Thank you

Edited

0

Avatar uemit.madenoglu.5 answered

Hi Michael,

first of all thank you very much for your detailled answers ! I could get really good insights in the ZOO structure.

I could remove the sidebar content, as you guess right I dont change the assigned template layout to the item.

After implementing the custom template two things in the layout has changed and I could not find the cause.
Image

I hope you can help me to fix these issues . Put on an access for you in the hidden area.

Thank you in advance Michael!

Best regards from Berlin

sokrates

Edited

0

Avatar uemit.madenoglu.5 answered

Dear Michael,

everything work out now as wished ! I have to thank you a lot for your great support in my case !

Greetings from Berlin
sokrates

Know someone who can answer? Share a link to this question via email or twitter.