Guest
17 Feb 2014 23:19

I would like to eliminate the use of the word "article" on the front end, because site users will not understand what an "article" is. As illustrated, many of the error messages, notices and titles use this. How can I change:

Notice: The article was added but it will be published after approving by the moderator. (There's a type in this message, btw)

Save failed with the following error: Article with the same title already exists

Also, to avoid the above error, I would like to use a title that incorporates a generated time-date stamp, random number or something similar so that it remains unique each submission. How can I achieve this?

Last Modified: 02 Mar 2014


Sergey
Total posts: 13,688
18 Feb 2014 07:18

If you do not want title exists error turn off unique title.

All error texts are in Cobalt language file. You have to create language overrides.


Guest
18 Feb 2014 16:08

Thank you, I will use Joomla!'s language override per your instruction.

  1. Besides using CSS, is there a way so that the Notice doesn't even appear?

  2. Also, could I use a Title that incorporates a generated time-date stamp, random number or something similar so that it remains unique each submission?


pepperstreet VIP
Total posts: 3,832
18 Feb 2014 20:30
  1. Also, could I use a Title that incorporates a generated time-date stamp, random number or something similar so that it remains unique each submission?

Do you still need the regular title input? Or just a hidden unique auto-title? Then you can set the "Title mode" in your type to "No Title". This hides the title on submission form... and adds a No-Title language constant + timestamp instead!

If you want both, the normal title + timestamp you have to create a custom submission form template. You can utilize the technique from the "No-Title mode" at line# 135.

(../components/com_cobalt/views/form/tmpl/default_form_default.php)

Or you can be creative and add other infos to the title: i.e. PHP for a random number

Alternative by configuration (maybe too much overhead) :

You might add a Cobalt Text field as a new Title, and a Cobalt Date/Time field. Set its default to NOW and set a proper custom format. Hide date field on submission and article display. Use both field ID#s in your Type -> Title mode -> Composite Title -> Title Mask

**

@Sergey**

For easy usage and configuration... it might be a nice addition for the "Composite Title" mode and "Title mask" parameter. Additional placeholder i.e.: - random number [RND] , maybe with min/max limit? [RND8], [RND4] , [RND12]
- current date [DATE] , [D] - current time [TIME] , [T] , or for a timestamp like in No-Title mode. - current date&time [DT]


Sergey
Total posts: 13,688
19 Feb 2014 00:27
  1. Besides using CSS, is there a way so that the Notice doesn't even appear?

Perhaps. I did not try. not sure you can identify that this notice is exactly this one.

  1. Besides using CSS, is there a way so that the Notice doesn't even appear?

@Sergey

For easy usage and configuration... it might be a nice addition for the "Composite Title" mode and "Title mask" parameter. Additional placeholder i.e.:

  • random number [RND] , maybe with min/max limit? [RND8], [RND4] , [RND12]

  • current date [DATE] , [D]

  • current time [TIME] , [T] , or for a timestamp like in No-Title mode.

  • current date&time [DT]

Already working on it. Will be there next release.


pepperstreet VIP
Total posts: 3,832
19 Feb 2014 05:34

Already working on it. Will be there next release.

:D

Maybe the date can be more specific? - create date [CDATE] - initial!!! create date [IDATE] - modified date (does the composite title change on edit/re-save?) [MDATE] - record id [ID] , [RECID] , [RECORD]


Sergey
Total posts: 13,688
20 Feb 2014 00:52

i use

[DATE::Y-m-d]

Where Y-m-в is the date format.

We cannot use modified date or record isd or any other property of this record. Because by the time we generate title those values may not yet exists. Like ID for example. It is there only after record is saved.

For rand

[RND::10::1::0]

Where 10 is number of symbols, 1 to use or not digits, and 0 to use or not letters.

Powered by Cobalt