11 years ago
7
Topic

Hello,

Thanks for this magic tool.

I created a form (let call it Deposer_Annonce) with fields A, B

I fix the Seblod field “article state” to “1” (ie. Unpublished) è so the articles created by the form Deposer_Annonce have the status == Unpublished

I created à form search & list content:

ð  Search form with the 2 fields A & B

ð  List with the 2 fields A & B

When I exectute a search the list shows both of the published and UNPUBLISHED articles

But I want to show only PUBLISHED articles

Thanks for help.

-------------------

Bonjour,

D’abord je vous remercie pour c magnifique outil.

J’ai un problème avec l’affichage des articles (annonces) : en effet quand je lance une recherche ça me retourne toutes les annonces répondant aux critères MAIS en affichant aussi bien els articles NONPUBLIES que les articles PUBLIES.

Mon besoin est de n’afficher que les annonces qui sont au statut == Publié.

---------------

Voici rapidement ce que j’ai fait :

J’ai créé un formulaire pour permettre au visiteur de déposer une annonce avec les 2 champs A et B.

J’ai positionné le champ «article state » [qui d’ailleurs ne fait pas partie des champs de mon formulaire] à  « 0 » è ceci pour que les annonces déposées soient par défaut à « Non Publié » et que je puisse les publier après vérification du contenu.

J’ai créé un formulaire de recherche avec les 2 champs A et B (ci-dessus).

Quand je lance une recherche ça me remonte bien une liste de résultats qui correspondent bien au 2 critères A et B MAIS le problème est que ça remonte les articles NON PUBLIES aussi !

Merci de m’indiquer comment faire pour ne remonter dans la liste des résultats que les articles (annonces) qui ont un statut == Publié.

Merci encore pour votre aide.

Cdt.


Get a Book for SEBLOD
11 years ago
6
Level 1

Hi wimax92,

Thank you for your post and welcome to SEBLOD forum.

In order to have only published articles as results of your content type, please check if you don't have a field "Article State" in your search form.

Otherwise, if you would like to add this field in your search fields, make sure to initialize this field with the value "1".
To set the value "1" to this field, click on button "2" and put value "1" in the "live value" column.

Finally, if your problem remains, enable debug mode to check SQL query. To enable "debug" mode, click on "configuration" button of your "search type" and select option "Everyone" for the "debug" setting.

Regards,
Mehdi.

11 years ago
0
Level 2

Hi Mehdi,

Thanks for your help.

I reinstalled Seblod ( because I had many other From tools on my Joomla) and I fixed the artcile satate field to "1".

It worked!

Regards,


6 Posts
Brousse
10 years ago
4
Level 2

Hi,

How to display articles published and unpublished at the same time?
I tested on article state the dynamic value >= 0
It does not work.

Thanks

10 years ago
3
Level 3

Hi Brousse,

In order to do that you can create a new "State" field. This field should be a "Select Simple" field with the following option:

  • All=1,0
  • Published=1
  • Unpublished=0

After that, you should click on button "3" to apply a Match operator "Any Words Exact". You should click on button "+" and add separator , "comma".

Regards,
Mehdi.

6 Posts
Brousse
10 years ago
0
Level 4

Thanks for this quick reply.
I followed the steps exactly, but he must miss something. It still does not work.
Here is the result de query:

WHERE t1.state = 1 AND t1.access IN (1,1,2,3) AND ( t1.publish_up = '0000-00-00 00:00:00' OR t1.publish_up <= '2014-06-11 14:52:29' ) AND ( t1.publish_down = '0000-00-00 00:00:00' OR t1.publish_down >= '2014-06-11 14:52:29' ) AND t0.cck LIKE '%auteurs%' GROUP BY t0.pk
ORDER BY t1.title ASC

6 Posts
Brousse
10 years ago
1
Level 4

It's Ok, after long hours of tests and research!

I did not understand the first method. My tailor is rich but my English is poor ;>)

Eventually Lionel solution is the right one, and clearly explained in this post.

Merci Mehdi, merci Lionel, merci à l'équipe Octopoos

10 years ago
0
Level 5

Hi Brousse,

I'm happy for you.

So, with the solution of Lionel, you will display all times published, unpublished and archived articles.

I don't know if it's relevant for you but in some case it's necessary to have a real status filter in the search form. With the solution described above, you can do it. Can you retry again ? If you have an issue, can you share with us a screenshot to see the configuration of your search form.

Regards,
Mehdi.

Get a VIP membership