Webmastersite.net
Register Log In

Comments in selected language
not sure what's the best way

Comments on Comments in selected language

chris
Member

Usergroup: Customer
Joined: May 04, 2008
Location: Liège, BELGIUM

Total Topics: 13
Total Comments: 43
chris
Posted Nov 28, 2008 - 6:02 AM:

Hi,

I have comments "subject", "message", and I added a field "commentlanguage" whre users can select the language, the comment is written in. What I want to achieve is that only comments in the useres selected language are shown. In detailscomment.tpl I found the following code:

<table {STANDARDTABLE}>
<!-- BEGIN POST -->
<!-- BEGIN REGULAR -->
[INSERTFILE=postbit]
<!-- END REGULAR -->
<!-- END POST -->
</table>


How can I achieve, that this section does only show comments with e.g "commentlanguage={VISITORLANGUAGE}"?

Cheers,
Chris
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
Posted Nov 28, 2008 - 1:27 PM:

Either around the postbit call there, or in the postbit template itself, use
<IF {COMMENTLANGUAGE} is {THISMEMBERLANGUAGE}>everything</IF>
chris
Member

Usergroup: Customer
Joined: May 04, 2008
Location: Liège, BELGIUM

Total Topics: 13
Total Comments: 43
chris
Posted Nov 29, 2008 - 10:01 AM:

Yes that worked! Thank you.
I also tried to use a filter to show comments within detailcomments.tpl only in a selected language.
"commentlang" is a customer-comment-field I added (only two possible values "english" or "german"). In detailcomments I used:


<form action="comments.php?id={LINKID}&filter=commentlan g&commentfilteraction=add" method="post">
<select name="filtervalue">
<option value="removefilter">show all</option>
<option value="english">English</option>
<option value="deutsch">Deutsch</option>
<input type="submit" value="Filter">
</form>


I also tried:


<form action="comments.php?id={LINKID}&filter=commentlan g&filtercondition=contains&commentfilteraction=add" method="post">
<select name="filtervalue">
<option value="removefilter">show all</option>
<option value="english">English</option>
<option value="deutsch">Deutsch</option>
<input type="submit" value="Filter">
</form>


Only removefilter works, but "english" and "deutsch" in both cases results in:


Unknown column 'english' in 'where clause'
Number of rows is Unknown column 'english' in 'where clause'

or

Unknown column 'deutsch' in 'where clause'
Number of rows is Unknown column 'deutsch' in 'where clause'


What am I doing wrong?

Cheers,
Chris
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
Posted Dec 06, 2008 - 12:10 AM:

Why did you type commentlang when your field appears to be named language, not commentlang, based on what you said earlier?
chris
Member

Usergroup: Customer
Joined: May 04, 2008
Location: Liège, BELGIUM

Total Topics: 13
Total Comments: 43
chris
Posted Dec 06, 2008 - 4:34 AM:

Because I made a mistake in my first post. I was not able to call the field "language", because this name was forbidden by the system. So I called it commentlang.
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
Posted Dec 06, 2008 - 8:58 PM:

There do seem to be issues with comment filtering. Looking into it.
chris
Member

Usergroup: Customer
Joined: May 04, 2008
Location: Liège, BELGIUM

Total Topics: 13
Total Comments: 43
chris
Posted Dec 07, 2008 - 3:12 AM:

OK. Thanks.
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
Posted Dec 07, 2008 - 10:20 AM:

Should work now (your top one).
Search thread for
Download thread as
  • 0/5
  • 1
  • 2
  • 3
  • 4
  • 5



Sorry, you don't have permission to post posts. Log in, or register if you haven't yet.