Page 1 of 2 12 LastLast
Results 1 to 40 of 48

Thread: Catalog in frontend - register user adding their "article"

  1. #1

    Default 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.
    Web design agency - EDsolution.si Izdelava spletnih strani

  2. #2
    Experienced user
    Join Date
    06-10-09.
    Location
    Atlanta, Georgia
    Posts
    611

    Default 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.

  3. #3

    Default 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?
    Web design agency - EDsolution.si Izdelava spletnih strani

  4. #4

    Default Re: Catalog in frontend - register user adding their "articl

    Argh...just can't figure it out
    Web design agency - EDsolution.si Izdelava spletnih strani

  5. #5

    Default 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.
    Web design agency - EDsolution.si Izdelava spletnih strani

  6. #6
    Experienced user
    Join Date
    06-10-09.
    Location
    Atlanta, Georgia
    Posts
    611

    Default 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.

  7. #7
    Experienced user
    Join Date
    06-10-09.
    Location
    Cape Town, South Africa
    Posts
    1,387

    Default 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.

  8. #8

    Default Re: Catalog in frontend - register user adding their "articl

    Ok Ben and Thyon. I've send email to Xtra.
    Web design agency - EDsolution.si Izdelava spletnih strani

  9. #9

    Default 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.
    Web design agency - EDsolution.si Izdelava spletnih strani

  10. #10

    Default 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.
    Web design agency - EDsolution.si Izdelava spletnih strani

  11. #11
    Experienced user
    Join Date
    06-10-09.
    Location
    Atlanta, Georgia
    Posts
    611

    Default 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.

  12. #12

    Default 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
    Web design agency - EDsolution.si Izdelava spletnih strani

  13. #13
    User MacKP's Avatar
    Join Date
    06-19-09.
    Location
    Duisburg (Germany)
    Posts
    211

    Default 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 ;-)
    Mediendepot Ruhr
    For real-time chat the (inofficial) Chatroom in IRC:
    -> irc.freenode.net #contao | irc.freenode.net #contao.de

  14. #14

    Default 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.
    Web design agency - EDsolution.si Izdelava spletnih strani

  15. #15
    Experienced user
    Join Date
    06-10-09.
    Location
    Atlanta, Georgia
    Posts
    611

    Default 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.

  16. #16

    Default 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
    Web design agency - EDsolution.si Izdelava spletnih strani

  17. #17
    Experienced user
    Join Date
    06-10-09.
    Location
    Atlanta, Georgia
    Posts
    611

    Default 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.

  18. #18

    Default 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).
    Web design agency - EDsolution.si Izdelava spletnih strani

  19. #19
    Experienced user
    Join Date
    06-10-09.
    Location
    Cape Town, South Africa
    Posts
    1,387

    Default 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; ?>" />

  20. #20

    Default 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.
    Web design agency - EDsolution.si Izdelava spletnih strani

  21. #21
    User MacKP's Avatar
    Join Date
    06-19-09.
    Location
    Duisburg (Germany)
    Posts
    211

    Default Re: Catalog in frontend - register user adding their "articl

    Äh.. maybe i explaned it not right.
    That code:
    (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
    Mediendepot Ruhr
    For real-time chat the (inofficial) Chatroom in IRC:
    -> irc.freenode.net #contao | irc.freenode.net #contao.de

  22. #22

    Default Re: Catalog in frontend - register user adding their "articl

    Quote Originally Posted by MacKP
    Äh.. maybe i explaned it not right.
    That code:
    (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
    Web design agency - EDsolution.si Izdelava spletnih strani

  23. #23

    Default 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?
    Web design agency - EDsolution.si Izdelava spletnih strani

  24. #24

    Default Re: Catalog in frontend - register user adding their "articl

    Anyone ? I only need to put some text under input...like Explanation in form generator.
    Web design agency - EDsolution.si Izdelava spletnih strani

  25. #25

    Default 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?
    Web design agency - EDsolution.si Izdelava spletnih strani

  26. #26

    Default 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:age_id}} or {{env:age_name}} but no effect.
    Web design agency - EDsolution.si Izdelava spletnih strani

  27. #27
    New user
    Join Date
    06-23-09.
    Posts
    29

    Default 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.

  28. #28

    Default Re: Catalog in frontend - register user adding their "articl

    try with this ->
    Code:
    userid={{user::id}} OR userid=0
    Web design agency - EDsolution.si Izdelava spletnih strani

  29. #29
    New user
    Join Date
    06-23-09.
    Posts
    29

    Default 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??

  30. #30

    Default Re: Catalog in frontend - register user adding their "articl

    You created a new field in catalog named userid ?
    Web design agency - EDsolution.si Izdelava spletnih strani

  31. #31

    Default 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...
    Web design agency - EDsolution.si Izdelava spletnih strani

  32. #32
    New user
    Join Date
    06-23-09.
    Posts
    29

    Default Re: Catalog in frontend - register user adding their "articl

    This are my catalogs:
    No.1

    No.2

    and in No.2 klient field look like this:

    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.

  33. #33
    User MacKP's Avatar
    Join Date
    06-19-09.
    Location
    Duisburg (Germany)
    Posts
    211

    Default 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
    Mediendepot Ruhr
    For real-time chat the (inofficial) Chatroom in IRC:
    -> irc.freenode.net #contao | irc.freenode.net #contao.de

  34. #34
    New user
    Join Date
    06-23-09.
    Posts
    29

    Default 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:

    but if i make it like this:
    (uzytkownik={{user::id}} OR uzytkownik=0) [uzytkownik is word for userid]
    then i dont get any results:


    Pleas help me if you know what im doing wrong.

  35. #35
    Experienced user
    Join Date
    06-20-09.
    Posts
    1,311

    Default 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

  36. #36
    New user
    Join Date
    06-23-09.
    Posts
    29

    Default 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 ]

  37. #37
    Experienced user
    Join Date
    06-20-09.
    Posts
    1,311

    Default Re: Catalog in frontend - register user adding their "articl

    oops, i thought you meant uzytkownik was the users name ops:
    dont know sorry

  38. #38
    User MacKP's Avatar
    Join Date
    06-19-09.
    Location
    Duisburg (Germany)
    Posts
    211

    Default 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
    Mediendepot Ruhr
    For real-time chat the (inofficial) Chatroom in IRC:
    -> irc.freenode.net #contao | irc.freenode.net #contao.de

  39. #39
    New user
    Join Date
    06-23-09.
    Posts
    29

    Default Re: Catalog in frontend - register user adding their "articl

    NVM
    I already done that, but thanks.

  40. #40
    New user
    Join Date
    03-24-10.
    Posts
    13

    Default 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:

    Quote Originally Posted by Ben
    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
    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.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •