-
Catalog in frontend - register user adding their "article"
I'm working on project which has, registration of new user, user can add their "article" via frontend catalog and user can edit their added "article". User must be able to do this on frontend.
So far I've done registration for users and everything works fine. The problem is that I don't know how to setup the catalog that user could add their article from frontend (It should look like contact form). I need catalog because somewhere on webpage there will be filter's page for sorting and displaying those "articles".
Help please.
-
Re: Catalog in frontend - register user adding their "articl
The Catalog list module has a checkbox for "Enable Editing". There is also a module called Catalog edit.
-
Re: Catalog in frontend - register user adding their "articl
Thank you for that.
Now how can I limit user that he can only add one "article" meanwhile he can edit and "repair" only his "article" which he submitted?
-
Re: Catalog in frontend - register user adding their "articl
Argh...just can't figure it out :(
-
Re: Catalog in frontend - register user adding their "articl
I figure out how to edit the catalog items, when I just said well let's try it. I just choose in Catalog list catalog_simple in Catalog layout and it's work perfect.
But I still can't figure it out, how to limit FE member to publish only one catalog item and how to do that user can edit only his catalog item. It should be some extra btn on webpage Edit item and on this page would be only his catalog item, but how to build smth. like that?
Thanks.
-
Re: Catalog in frontend - register user adding their "articl
Wotanskrieg,
I do not know what to tell you, as I have never worked with frontend catalog editing. It seems that these questions are best answered by Thyon or Xtra.
-
Re: Catalog in frontend - register user adding their "articl
There are permissions per item and catalog. However I'm not sure how it was implemented, as Xtra developed that part in detail.
-
Re: Catalog in frontend - register user adding their "articl
Ok Ben and Thyon. I've send email to Xtra.
-
Re: Catalog in frontend - register user adding their "articl
I've done this by adding userid filed and set it to Frontend user in catalog. Than I made it editable in catalog edit and works fine. Now I only need to figure it out that the "Edit the item details" is only shown to user by clicking, lets say, button edit item in main navigation.
I really don't know how to automate this, that the content of "Edit item" will shown only one, user item.
-
Re: Catalog in frontend - register user adding their "articl
Ok I'm trying to do following:
I made new catalog-list (new site-structure) and is the same as the one where all items are displayed. The difference would be only in condition but I don't know the right insertag to limit item, to be shown only to user who created this item.
That would be a simple solution for me....I just need the right inserttag to limit items to user.
Thanks.
-
Re: Catalog in frontend - register user adding their "articl
You should look into setting a condition in that catalog listing module where it only shows entries that match the id of the logged in member.
-
Re: Catalog in frontend - register user adding their "articl
Hi Ben, I imagine in theory what should be done, but my skills of "programming" isn't well enough, so again I'm stuck with my limited knowledge :(
-
Re: Catalog in frontend - register user adding their "articl
Hi wotanskrieg,
here you are :
Code:
(userid={{user::id}} OR userid=0)
That means: show only Items by this user ore Items with none user (when it was addet at the backend).
But i realy don't know how to deal with only one Item here....
regards
---
Edit:
German catalog dokumentation is here: http://de.contaowiki.org/Kategorie:Catalog
Maybe Google Translate kan help, because there is also one Site for Frontend-Edit and workflow ;-)
-
Re: Catalog in frontend - register user adding their "articl
Thank you very much, it works like charm. Next time I will use google trans :)
Any clue about limiting users adding item to 1 ?
Regards.
-
Re: Catalog in frontend - register user adding their "articl
I found an extension that will be helpful for connecting FE users to catalog entries: http://www.contao.org/extension-list/vi ... 03.en.html
I don't know how to limit users to only have one entry, though.
-
Re: Catalog in frontend - register user adding their "articl
Hi Ben.
I've installed this extension before and as far as I know It allows you, that user can edit only their own item which works for now....now the only problem remains limiting....:) only if Xtra would had some time :)
-
Re: Catalog in frontend - register user adding their "articl
What if you wrapped the "add another catalog entry" link in something along these lines:
Code:
<?php if (count($entry['data']['memberID'])): ?>
You've already added an entry
<?php else: ?>
[the link to add an entry]
<?php endif: ?>
I haven't tested this, but it's just an idea I had.
-
Re: Catalog in frontend - register user adding their "articl
Ben I'm trying with your code, but there is no effect I even tried ->
Code:
<?php if (count($entry['data']['memberID']) <=1): ?>
but in that case it only shows "You've already added an entry". (p.s. I changed memberID to userid which I have defined in column name).
-
Re: Catalog in frontend - register user adding their "articl
the condition clause would be, since leo doesn't provide the USERID inserttag.
Code:
myuseridfield={{user::username}}
http://www.contao.org/insert-tags.html
if that fails, try to insert the userID directly by quering the USER object:
Code:
<input type="text" value="<php echo $this->User->id; ?>" />
-
Re: Catalog in frontend - register user adding their "articl
Quote:
Originally Posted by thyon
the condition clause would be, since leo doesn't provide the USERID inserttag.
Code:
myuseridfield={{user::username}}
http://www.contao.org/insert-tags.html
if that fails, try to insert the userID directly by quering the USER object:
Code:
<input type="text" value="<php echo $this->User->id; ?>" />
You wrote this for issue that user can edit only his items?
Cause this was solved with this condition
Code:
(userid={{user::id}} OR userid=0)
Now the new issue is to limit user to add only one item.
-
Re: Catalog in frontend - register user adding their "articl
Äh.. maybe i explaned it not right.
That code:
Quote:
(userid={{user::id}} OR userid=0)
is for the condition in the List Module, so that Members only can see her own Items.
The Members can always only edit there Items when you use the UserID Field :)
So it's just a little usability of the page when the Members don't get 'you can't edit this' when they try to edit an Item of an other Member.
regards
-
Re: Catalog in frontend - register user adding their "articl
Quote:
Originally Posted by MacKP
Äh.. maybe i explaned it not right.
That code:
Quote:
(userid={{user::id}} OR userid=0)
is for the condition in the List Module, so that Members only can see her own Items.
The Members can always only edit there Items when you use the UserID Field :)
So it's just a little usability of the page when the Members don't get 'you can't edit this' when they try to edit an Item of an other Member.
regards
That's right! :)
Argh, why is so hard to limit users by adding only one item ?:) I prefer developing some extension for this ;)
-
Re: Catalog in frontend - register user adding their "articl
Does anyone know how to add "Field description" so that is shown bellow the field in Frontend where you edit or add new item?
-
Re: Catalog in frontend - register user adding their "articl
Anyone ? I only need to put some text under input...like Explanation in form generator.
-
Re: Catalog in frontend - register user adding their "articl
Ok I will ask in another way....
in catalog_edit, the edit fields are generated like that
Code:
<?php echo $this->field; ?>
I figure it out that is "token" from form generator in FormTextField.php
How can I manually add edit filed to catalog_edit.php?
-
Re: Catalog in frontend - register user adding their "articl
It is possible to display page ID in Format title string. I've try with {{env::page_id}} or {{env::page_name}} but no effect.
-
Re: Catalog in frontend - register user adding their "articl
I have a question.
I have a two catalogs with fields:
No 1:
user - useridfield
client - text
and some others
No 2:
user - useridfield
client - select and the source table is table No 1, and Option value column is column "client"
and some others
and what I need to do while i want taht users can only add records to No 2 catalog with possibility to select client name from previously added records only by them to catalog No 1?
If I post in filter client=1 i any user can chose from records added by user with id 1, but when I write user={{user::id}} its not working :(
P.S. Sorry for my terrible english.
-
Re: Catalog in frontend - register user adding their "articl
try with this ->
Code:
userid={{user::id}} OR userid=0
-
Re: Catalog in frontend - register user adding their "articl
I tried this already but this don't want to work :/
Can I filter items in select tag using inser tags??
-
Re: Catalog in frontend - register user adding their "articl
You created a new field in catalog named userid ?
-
Re: Catalog in frontend - register user adding their "articl
You created a new field in catalog named userid and type Frontend user? Than you must in Catalog Edit choose userid too, but don't displayed in catalog list...
-
Re: Catalog in frontend - register user adding their "articl
This are my catalogs:
No.1
http://imgur.com/MMPBJ.png
No.2
http://imgur.com/9hWKv.png
and in No.2 klient field look like this:
http://imgur.com/mwBgJ.png
but its not working.
When I for example write in Filter items: uzytkownik=1 i have all positions added by user with id=1, and uzytkownik=uzytkownik_wpis dont want to work :/
I have enabled useridfield in both.
-
Re: Catalog in frontend - register user adding their "articl
As i wrote in this post before (Page 3 on top) this is the condition you search for:
Code:
(userid={{user::id}} OR userid=0)
So plz read the threads before you ask ;-)
And the condition is for the catalog-LIST-module. The filter has a checkbox that it will do it with the condition at the list.. so that would be the way you has to do it.
regards
-
Re: Catalog in frontend - register user adding their "articl
I read this and im using it with list module, and its working.
But I need to do something when user is adding new record to catalog he should see only these position that he previously added in other catalog.
That is why i want to do it in field filter:
http://imgur.com/gYHFV.png
but if i make it like this:
(uzytkownik={{user::id}} OR uzytkownik=0) [uzytkownik is word for userid]
then i dont get any results:
http://imgur.com/clNeA.png
Pleas help me if you know what im doing wrong.
-
Re: Catalog in frontend - register user adding their "articl
I've never used catalog, but your query doesn't make sense.
username might equal 'uzytkownik', but id is always a number. Also you cant reverse it like that, or you're asking a field called uzytkownik if it has a value of whatever you assign
-
Re: Catalog in frontend - register user adding their "articl
uzytkownik is a field with user id [int].
And it works in condition for catalog LIST module.
So its not a field type problem but im doing something wrong with filter option.
But what?
[Edit: nvm ;)]
-
Re: Catalog in frontend - register user adding their "articl
oops, i thought you meant uzytkownik was the users name :oops:
dont know sorry
-
Re: Catalog in frontend - register user adding their "articl
Hey ArturMaly,
sorry.. i hadn't understand it right.
Now i get it.
This feature is not implementet yet and will not work.
So please open a new Ticket there -> http://code.google.com/p/typolight-catalog/issues/list
regards
-
Re: Catalog in frontend - register user adding their "articl
NVM
I already done that, but thanks.
-
Re: Catalog in frontend - register user adding their "articl
Hi to all... I have the same Issue of wotanskrieg.
But in my case I don't have to limit the submission of new catalog items.
Here I have to limit each frontend user to edit his own (and only) catalog's item which is a sort of personal page.
The problem is almost solved, since I have limited the list of editable items adding a condition to the listing module so it appears to be modifiable only one catalog item (the condition I've used in sql syntax of the listing module is different because I used
Code:
email="{{user::email}}"
The problem is that in this way I can only limit to one the visible editable item, but if a crafty user chenge the url alias is able to modify even other catalog items. How to prevent this?
My idea is to modify the edit page and printing it via php only if the previous condition is true (email=="{{user::email}}) but how to implement this?
I installed the extension suggested by Ben:
But I saw this extension limit the editing to a member group rather than an one member... the ideal thing would be modify this extension making in it my condition email="{{user::email}}?
Anyone can help me?
Thanks.