1
khmerr
How to filter comments using $extra_params (e.g. by language)
  • 2006/4/26 11:13

  • khmerr

  • Just popping in

  • Posts: 4

  • Since: 2006/4/26


I'm using xLanguage module, but the topic is not module-dependent.

I managed to assign the chosen language value to each comment by editing one variable in /include/comment_post.php. The value is written to DB in comments' table, com_exparams column, which seems to be unused.

PROBLEM: I could not find the file and place, where the com_exparams value is READ from the DB and assigned to a variable.

Can somebody help me? Without modifying the kernel, if possible.

The rest would be simple: show all comments that mach chosen language (in my case). This could be even done through templates.

2
khmerr
Re: How to filter comments using $extra_params (e.g. by language)
  • 2006/4/26 19:27

  • khmerr

  • Just popping in

  • Posts: 4

  • Since: 2006/4/26


Oh well, I managed it myself. Now the comments are filtered by language.

When I choose "english" (xlanguage module), only those comments are displayed which were posted when "english" was chosen.

I added additional variable in /class/commentrenderer.php and assigned a smarty variable in /includes/comment_view.php (didn't know where else).

Comments are still counted in all languages and I have to hack the search and edit more templates, but the main work is done. Pretty close to a real multilingual site now.

Comments can be sorted not only by language using this technique, I guess. However, I'm not sure if the com_exparams column in xoopscomments table is really never used. Will get a surprise someday..

Thank for help, friends

Login

Who's Online

123 user(s) are online (59 user(s) are browsing Support Forums)


Members: 0


Guests: 123


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits