How i can block messages by the principle of language

Phoca Guestbook - creating guestbooks in Joomla! CMS
ilunga
Phoca Newbie
Phoca Newbie
Posts: 3
Joined: 14 May 2014, 09:57

How i can block messages by the principle of language

Post by ilunga »

I used Phoca Guestbook on russian site only. Language of the user is limited by site contents.

Did I can insert the filter code which will block any message without Cyrillic letters?
Into what file of a component it is necessary to insert a code?
Did you can help me to make this code?

Thanks.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48403
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: How i can block messages by the principle of language

Post by Jan »

Hi, sorry, I don't understand what you exactly mean?

Jan
If you find Phoca extensions useful, please support the project
ilunga
Phoca Newbie
Phoca Newbie
Posts: 3
Joined: 14 May 2014, 09:57

Re: How i can block messages by the principle of language

Post by ilunga »

I use your guestbook on the Russian site. And I want to forbid the publication of messages that don`t contain any of the Cyrillic characters. I'm ready to use the iQuery.Validate plugin, but I don`t understand - in which file do I need to insert it?

Besides, in your form code is missing the tag LABEL FOR, which complicates the use of the plugin. Suggest some solution, please.
Last edited by ilunga on 23 May 2014, 21:05, edited 2 times in total.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48403
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: How i can block messages by the principle of language

Post by Jan »

Hi, I don't know the jquery plugin, so cannot give any clue advice, no idea if the test is done in frontend - when user writes the message (javascript?) or in backend - in server? So for this some plugin documentation should be followed :idea:

What do you mean exactly with form code and missing Label for? In which file?

Jan
If you find Phoca extensions useful, please support the project
ilunga
Phoca Newbie
Phoca Newbie
Posts: 3
Joined: 14 May 2014, 09:57

Re: How i can block messages by the principle of language

Post by ilunga »

Hi.

I want to insert a filter on message contents using php-function strpbrk ($pgbcontent , $char_list).
Tell me, please, in what file and how do I need to write it down?
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48403
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: How i can block messages by the principle of language

Post by Jan »

Hi, just see the standard view or controller/model:

components/com_phocaguestbook/views/guestbook ...
or
components/com_phocaguestbook/controllers/phocaguestbook.php
components/com_phocaguestbook/models/guestbook.php

Jan
If you find Phoca extensions useful, please support the project
Post Reply