37 Posts
geolits
9 years ago
5
Topic

Hello,

i have a form where someone in public, can insert an article, i have the article upublished, untill an authorized user see it and publish it.

In the form i have a field "type-email" where i send a e-mail to the person who wrote the article (public) and to one person wich must get this in his e-mail too, to authorize the publication of the article.

I have two problems if you can help me:

1) I want in the e-mail message to have the value of the article id, in wich is saved the article that a public person just submit. I can't take this value.

I tried to put in the form an "article id" field, and in the e-mail message i tried #art_id# or $cck->getValue('art_id'); or put in the live value of "article id" field the "url->variable" and in configure type:"int" variable: "id". I don't take nothing for article id in the e-mail that is sent.  

2) If someone give the same article title with an article wich is allready in the site, then will be an article alias conflict and the article is not saved. Is there a solution for this?


Can someone hel me please?


Thanks in advanced


Get a VIP membership
9 years ago
1
Level 1

Hello geolits,

in the configuration of the email field, you have a link "How to setup this field ?".


For your second question, you can add a validation on the title field, with the option 3 in the form.

Here, you can add the required, and one validation.

In your case, you must add the validation "Ajax - Availability" : (I assume that your title field is the standatd joomla title)

  • Table : #__content
  • Column : title
  • Key column : id
  • Fields : the name of your category field. (Joomla allow articles with same title (alias) in differents categories)


Best regards.

Lionel

37 Posts
geolits
9 years ago
0
Level 2

Hello Lionel,

thanks for your time.

For the first question i have read the "how to setup my field" but i can't find the way to have the article id in my e-mail. I tried many different configurations without result.

Do you have any idea how to configure it? 

For the second, i'll give it a try, but i don't understand something. With this solution what are we achieve? Will this work for all circumstances? I give at users the choice of the category, so the category isn;t only one.


Sorry for my quastions,help me a little to understand it, because i'm confused.


Thanks again for the help and yout time

37 Posts
geolits
9 years ago
0
Level 1

Ok i think, i got it.

With tha "Ajax availability" it checks if there is another article with the same article title and category (I don't understand here why we youse the "Key Column=id) . 

This is not what i want because there is time's where it is needed to have the same title in different articls in the same category. Is there another solution? Something to put the article id for example only at alias?

I didn't find yet a solution for my first answer too.

Any help?

Thanks again  

9 years ago
1
Level 1

Hello geolits,

effectively, the help must be updated.

You can access to the ID of the content with the tag "[PK]"


In the ajax availability, we must set the primary key, because on some table it's not id by default.

For your need, you must modify the alias before storage. 

You can try the SD Concat plugin, or use the plugin code Beforestore (cf tutorial below)


Best regards.

Lionel

37 Posts
geolits
9 years ago
0
Level 2

Thanks Lionel for your help.

The [pk] in e-mail message is what i need.

I will look for the other two suggestions for the alias problem.

thanks one more time

Get a Book for SEBLOD