GavickPro / News-Show-Pro-GK5

Advanced Joomla! content module.
28 stars 37 forks source link

Comment style modifications! #299

Closed sirdna closed 8 years ago

sirdna commented 9 years ago

Hello!

We would like to change comment style on our news show pro gk5 module

We have "2 (apspriest)" We would like to have Apspriest (2) (apspriest menas comment or disucss)

To get the idea I have attached an image to visualize

Basicly we need to put comments in brackes and switch palces, first is "Apsrpiest" than comments count, seems eas (brakcet with apspriest i get changing the language file lv-LV.mod_news_pro_gk5 its no problem without brackes)

As i undestand we have to change something there: in the mod_news_pro_gk5/tmpl/com_content/view.php file (or mod_news_pro_gk5/tmpl/com_k2/view.php

probably there $infocomments = JText::('MOD_NEWS_PRO_GK5_NO_COMMENTS'); // if(isset($item['comments'])) { if($item['comments'] == 1) { $infocomments = JText::('MOD_NEWS_PRO_GK5_1COMMENT'); } else if($item['comments'] > 1 && $item['comments'] < 5) { $infocomments = $item['comments'] . ' ' . JText::('MOD_NEWS_PRO_GK5_MORECOMMENTS'); } else if($item['comments'] >= 5) { $infocomments = $item['comments'] . ' ' . JText::('MOD_NEWS_PRO_GK5_MUCHMORECOMMENTS'); } }

Try to do it by myself but it dont worked for me, somehow we need swithch places un put comments in brackets

Can you please help me..?

apspriest

dziudek commented 9 years ago

Hello,

You should first of all check the language file for the phrases used in the mentioned code fragments - because the text "(apspriest)" doesn't exists in our files so you probably have a translation where word "comments" is replaced with "(apspriest)".

Regarding the code fragment - you have to revert the order of code i.e.:

JText::('MOD_NEWS_PRO_GK5_MUCHMORECOMMENTS') . ' ' . $item['comments'] 

to:

JText::('MOD_NEWS_PRO_GK5_MUCHMORECOMMENTS') . ' ' . $item['comments']

You can also wrap $item['comments'] into brackets.

sirdna commented 9 years ago

Thank you! Worked for me!