Gossamer Forum
Quote Reply
Error message USER_
Hello,

I sought several hours on the forum, but I did not find an answer.

I added a column in the table user.

The user is obliged to supplement the fields.

I would like to modify the error message on the page of recording (signup_form.html).

For the table of links, I can modify ADD_NOTNULL (Edit Language).

It is possible to create an error message USER_ (Edit Language) ?
For example USER_NOTNULL.

Currently, it gives : Column Tel cannot be left blank.
I want to translate the message...

Thank you for your assistance.

Mick
Quote Reply
Re: [mick31] Error message USER_ In reply to
Hi,

Those are database errors, and I think they are embedded in one of the SQL files, like GT::SQL.pm I think


PUGDOG� Enterprises, Inc.

The best way to contact me is to NOT use Email.
Please leave a PM here.
Quote Reply
Re: [pugdog] Error message USER_ In reply to
Uh, fixing my post. I almost made a mistake...

No, you are not right.
While GT:SQL has hardcoded error messages, these are also available in language.txt:
Quote:
'ADD_NOTNULL' => 'Column %s can not be left blank.',
Hardcoded messages are required for those cases, when language.txt is not available for some reason...

mick31, just edit language.txt in your used template set.

Best regards,
Webmaster33


Paid Support
from Webmaster33. Expert in Perl programming & Gossamer Threads applications. (click here for prices)
Webmaster33's products (upd.2004.09.26) | Private message | Contact me | Was my post helpful? Donate my help...

Last edited by:

webmaster33: Oct 20, 2004, 3:53 AM
Quote Reply
Re: [pugdog] Error message USER_ In reply to
Hello,

Thank you for your answers.

I published the SQL.pm file and modified the text for :

# Table Errors
NOTNULL ...

That functioned. But, there is perhaps another solution ?

It seems that ADD_ works only for the Links table.

It does not work with the Users table. Frown

But, I am not an expert

Mick
Quote Reply
Re: [mick31] Error message USER_ In reply to
Hey, did you read my previous post? Or you don't trust my words?

Also NOTE:
NEVER DO MODIFICATIONS DIRECTLY IN CORE CODE! IT WILL MAKE YOU HAVE SUCH PROBLEMS WHAT YOU GOT NOW!

Globals, Plugins, templates, language.txt are exactly for this reason. These guarantees to keep your LSQL installation upgrade safe...

Best regards,
Webmaster33


Paid Support
from Webmaster33. Expert in Perl programming & Gossamer Threads applications. (click here for prices)
Webmaster33's products (upd.2004.09.26) | Private message | Contact me | Was my post helpful? Donate my help...
Quote Reply
Re: [webmaster33] Error message USER_ In reply to
Hello Webmaster33

Thank you for your answer.

I tried to publish language.txt but that did not function.

But, perhaps that I do not publish the good file ?
Build > To use Language > ADD > ADD_NOTNULL ... (language.txt )

I do not have a problem if the column is created in the Links table.

The problem is only with the columns created in the Users table.

ADD_NOTNULL is connected with the Users table ?

An idea ?

Mick

Last edited by:

mick31: Oct 20, 2004, 8:16 AM
Quote Reply
Re: [mick31] Error message USER_ In reply to
You mean publish = modify ?

Do you have GCommunity installed?

Best regards,
Webmaster33


Paid Support
from Webmaster33. Expert in Perl programming & Gossamer Threads applications. (click here for prices)
Webmaster33's products (upd.2004.09.26) | Private message | Contact me | Was my post helpful? Donate my help...
Quote Reply
Re: [webmaster33] Error message USER_ In reply to
Hello,

Yes modified...

No, I do not have GCommunity installed.

It is for this reason ?

Thank you.

Mick
Quote Reply
Re: [mick31] Error message USER_ In reply to
If you don't have GCommunity installed, then you should not have Tel column in lsql_users table installed...
Something is really stange there...

Ahh, I see now:
Quote:
I added a column in the table user.

Well instead adding new columns into LSQL user table, you should install the GCommunity v1.0.2, which also makes possible to have user profiles, like Telephone and other new fields... GCommunity is free.

Good luck.

Best regards,
Webmaster33


Paid Support
from Webmaster33. Expert in Perl programming & Gossamer Threads applications. (click here for prices)
Webmaster33's products (upd.2004.09.26) | Private message | Contact me | Was my post helpful? Donate my help...
Quote Reply
Re: [webmaster33] Error message USER_ In reply to
>> NEVER DO MODIFICATIONS DIRECTLY IN CORE CODE! IT WILL MAKE YOU HAVE SUCH PROBLEMS
>> WHAT YOU GOT NOW!

There are times that editing the core modules is the only way to do it.

One such, is the default error messages. Changing the language of the files will only result in them returning to English during an upgrade, and if you've made a backup of the modified file, you can easily restore the other language. Hopefully this will be addressed via an "include" file in a future release.

Other cases are embedded HTML, where you need to change the look/feel of something.

Just keep a backup of both the original and modified versions and you'll be ok.

Just don't make a habit of editing core files, if a plugin or global is available.

But, sometimes, there is just no alternative.


PUGDOG� Enterprises, Inc.

The best way to contact me is to NOT use Email.
Please leave a PM here.
Quote Reply
Re: [pugdog] Error message USER_ In reply to
In Reply To:
There are times that editing the core modules is the only way to do it.
True. There is.
Remember my idea, to support multiple LSQL databases from the same LSQL admin interface?
That one IS the case when likely it can not be solved using just a plugin, but there is need to modify the core code itself.
But the cases like this are rare, and are not for average LSQL users!


In Reply To:
One such, is the default error messages. Changing the language of the files will only result in them returning to English during an upgrade, and if you've made a backup of the modified file, you can easily restore the other language. Hopefully this will be addressed via an "include" file in a future release.
It IS addressed already.
The language.txt has all the error messages, what for example of GT::SQL module use.
Can you tell me a default error message which can not be translated without editing the core code?

I simply did not find any case in LSQL, when I was forced to touch the core code (one exception may be, the example mentioned a few lines above). Everything was possible to solve using plugins or globals. If something was not possible to solve, I asked Alex to add a plugin hook for it. And finally solved every problem using plugin solution.

In case of Mick, the problem was that he wanted to add features to LSQL, which had simply no support in LSQL. But when he installs GCommunity v1.0.2, he gets all the profile features he wanted for LSQL.

I still keep my point, that users should not touch the core code. They will have upgrade problems, they will have strange bugs, we will have strange support cases, and the whole goal of LSQL is sinking back to the level of Links 2.0, where a lot mods appeared, and everybody had problems how to use, install, fix them, wasting support for installation problem...
Installation should be task of the plugin developer, and not task of the users (site admins).

That's why I write my own general plugin installer module. Using this module, installer development will be faster.

Best regards,
Webmaster33


Paid Support
from Webmaster33. Expert in Perl programming & Gossamer Threads applications. (click here for prices)
Webmaster33's products (upd.2004.09.26) | Private message | Contact me | Was my post helpful? Donate my help...