wrong comments count?
hi, i just installed vanilla 2.0.18.10, on my first post, with NO COMMENTS, but it always show 1 comment on mainpage. any help would be appricated. thanks.
Best Answer
-
peregrine MVP
you could change your /conf/locale.php
to these and put the vietnamese translation on the right.
or you could add them to the bottom of the definitions file (and remove them from conf/locale.php
/home4/giesu/public_html/forum/locales/ViVN/definitions.php"
If you want to rename a Translation - anything with T("something") "You DON'T change it in the core T("to something else"). That is the whole purpose of definitions - not to change the core.
the precedence is as follows for definitions
- you change or add a definition in one of the following files
the order of locales (the higher the number on the list, the higher precedence).
en-CA is a country code (substitute your own country code that you use
1 - application based and dashboard based definitions applications/locale/en-CA/definitions.php applications/dashboard/locale/en-CA/definitions.php 2- plugin based - plugins/yourplugin/locale/en-US.php plugins/your plugin/locale/en-US/definitions.php 3 - theme based - themes/yourtheme/locale/en-CA.php 4 - locale based - /locales/en-US/definitions.php 5 - locale based locales/en-US/other_definitions.php 6- conf based - conf/locale.php 7- conf - specialized conf/locale-en-US.php
you could create a file called conf/locale.php
<?php if (!defined('APPLICATION')) exit(); $Definition['Start a New Discussion'] = 'Erzähl uns was!'
or add it to your locale based definitions - and make sure you don't have duplicates, other wise the last one will take precedence in the file and the highest number on the above chart will take precedence.
it is better than changing the core.
when modifying locales or adding locale files - always clear the ini files in the /cache folder - for best results.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
6
Answers
you could change the word comments to posts. and it will be correct.
If I Recall Correclty
that is the default behavior in 2.0.18.10 - discussion counts as 1 in the comment count.
where as in 2.1x discussions without comments are 0 comments.
P.S. IIRC (you can always qualify anything you say with an IIRC
you could try statsbox plugin. I think there is a fix there.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
hi, thanks for the quick reply. which file do i edit ? and where is it located? thanks.
changing comments to posts.
http://vanillaforums.org/discussion/comment/163542/#Comment_163542
http://vanillaforums.org/addon/1104/stats-box
you can search the forum for this previousl asked question "comment count" as well as I can, there are numerous answers. pick the one most approprate to what you want to do. The ones that recommend changing the core files are the ones you should avoid.
http://vanillaforums.org/search?adv=&search=comment+count
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
hi, i'm using the stats-box plugin, but it still shows wrong comment count. i like the idea of changing comments to posts as stated in the first link you provide, but i dont know which files to edit, it doesnt say in that post, can you please advise. thanks.
For that you need to add those definitions to your conf/locale.php file ...
❌ ✊ ♥. ¸. ••. ¸♥¸. ••. ¸♥ ✊ ❌
still doesnt work
what "still doesn't work"
delete your ini files in /cache folder . read some other discussions to get some insights
how do I change this text ... etc. etc. etc.
http://vanillaforums.org/discussion/comment/199091/#Comment_199091
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
i've researched about this topic for a week now. and couldn't find a way to correct it. anyway, there's something in my mind might be pose a problem. i'm using the BrandFriend theme, plus a different locale definition.php file for the forum for a different language than english. also, i've deleted the cache ini files everytime i insert new code and upload them back.
i've also tried to put the code above inside the new definition.php file, but it still doesnt work.
the /conf/locale.php is the last one checked and will override the other ones.
did you delete the ini files in your cache?
if you do that, we can troubleshoot.
if you don't post the contents of the two files, you can drag this thread on for another week or two.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
yes, i did delete ini files in my cache everytime i changed a file & re-upload it, here it is:
conf/locale.php :
<?php if (!defined('APPLICATION')) exit();
cache/locale_map.ini :
[vi-VN]
0 = "/home4/giesu/public_html/forum/locales/ViVN/definitions.php"
1 = "/home4/giesu/public_html/forum/conf/locale.php"
make your /conf/locale.php
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
the first two definitions will change comments without the use of statsbox plugin
and the
$Definition['Comments'] = "Posts"; // will change "Comments" to "Posts".
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
hi, i just did that ealier, and it didnt work. i just tried it again, here are the current contents:
/conf/locale.php
<?php if (!defined('APPLICATION')) exit();
$Definition['%s comment']='%s post';
$Definition['%s comments']='%s posts';
****cache/locale_map.ini ****
0 = "/home4/giesu/public_html/forum/locales/ViVN/definitions.php"
1 = "/home4/giesu/public_html/forum/conf/locale.php"
re-read my post.
http://vanillaforums.org/discussion/comment/205594/#Comment_205594
and do as exactly as it says.
then post a screenshot of your site.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
did exactly what you said, still counting 1 post as 1 comment, attached screenshot of forum.
ok you changed Comments to Posts. as you asked for and said it won't work but it does indeed work as noted in your screenshot.
Your second issue is changing count to subtract 1 from the comment count.
change the line 98 in class.statsbox.plugin.php
from
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
WOW! IT'S WORKING NOW! what a releive! , thanks a millionnss...
ok, the 2nd question i want to ask is, how do i translate the word "Posts" in that column to my language? where do i define it?
and one last thing, there's a yellow tag flying on the right of the categories space, how do i move it to the post, or remove it for good?
thanks.
you could change your /conf/locale.php
to these and put the vietnamese translation on the right.
or you could add them to the bottom of the definitions file (and remove them from conf/locale.php
/home4/giesu/public_html/forum/locales/ViVN/definitions.php"
If you want to rename a Translation - anything with T("something") "You DON'T change it in the core T("to something else"). That is the whole purpose of definitions - not to change the core.
the precedence is as follows for definitions
the order of locales (the higher the number on the list, the higher precedence).
en-CA is a country code (substitute your own country code that you use
you could create a file called conf/locale.php
or add it to your locale based definitions - and make sure you don't have duplicates, other wise the last one will take precedence in the file and the highest number on the above chart will take precedence.
it is better than changing the core.
when modifying locales or adding locale files - always clear the ini files in the /cache folder - for best results.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
YOU'RE AWSOME! the translation works!
i dont know why the "new" yellow tag is flying around on top of the categories, do you have any ideas? attached screenshot.