Jump to content

Hari KT

Members
  • Posts

    126
  • Joined

  • Last visited

Posts posted by Hari KT

  1. So, I was looking to implement the remember me for the login. I didnot find a module for that.

    The functionality will be some token saved on the user side, and on the first request make the user authenticate if he/she has the token with the request.

    So the question is what will be the first hook, which will be called, so I can implement the hook to add the implementation.

    Do you have any insights on the same?

  2. Hey,

    I was also checking for this. The problem why I am searching is I have a template with fieldtype of Page.

    And this fieldtype Page can be same or different .

    I want to only get the unique fieltype Page , from the template.

    Edit : I know I can get the results and traverse why I am asking is the selector I made was having a limit 5, and I don't know whether loading the PagesArray of 1000's will be a drawback and make it slow to compare the results.

    Thank you.

  3. Sorry @Martijn Geerts , @Soma ,

    Not sure how I missed these topics. I thought I didn't got any reply. My bad.

    By the way what I was doing is like some custom input fields for username , password.

    User Name : <input type="text" name="username" />
    Password : <input type="password" name="password" />
    

    And I was going to register the user via the api . So basically I am not sure whether it is good idea to create a form via PW api form and render . Or make use of the api and the validation via some validation library .

    Thank you.

  4. Hi guys,

    I have a category template and articles in different category ( articles template ).

    category1
      - articles
    category2
      - articles
    category3
      - articles
      - articles

    I am listing all the articles via the selector "template=articles" . When the category is made as unpublished or hidden then also the articles are displaying. Is there a way other than doing

    $category = $pages->find("template=category");
    $category_ids = $category->__toString();
    $articles = $pages->find("template=articles, parent=$category_ids");

    I can get only the articles for published ones?

    Thank you

  5. First thank you for the snippets and nice discussion. I was trying to logout the user.

    $session->logout();
    if($user->isLoggedin()) {
        echo "Logged in";
    }
    

    If I have not done a redirect like

    $session->redirect("/login/");

    then the

    $user->isLoggedin()

    is true. Seems like a bug to me for the $user->id is not rest on logout. We need to reset the user->id .

    Thank you.

  6. $config->styles->append("/site/templates-admin/styles/custom.css");
    $config->scripts->append("/site/templates-admin/scripts/custom.js");
    

    Not PW guru myself, are you getting the things rendered in view source ?

    If so what are you getting the url as and when clicking the same are you getting the desired output .

    • Like 1
  7. @apeisa I eneded up at PageListSelect .

    Thank you for the suggestion.

    @adrian the idea is when a user save an article, we need to get the date and time when the user saved the article.

    Say there is a list of articles. When X saved the article for future ( say like twitter favourite ) and at some point of time, he needs to look into the details when he saved it etc.

    I have a similar discussion at http://processwire.com/talk/topic/5301-looking-for-some-suggestions-help/

    Thank you to all for the help.

  8. @apeisa the template is created via add template . See the edit image .

    pw_edit.png

    See the article field, which is a PageArray . To load this page (only ) it is slow. I feel the reason is to populate the select box. My question is, whether there is a way not to populate it, and only load a few ones on the initial load.

    @Soma : Sorry for the vague question.

    Thank you.

  9. Hi Guys,

    So I have a template lots of articles .  Approximately 23559 pages .

    I have a field article_id in say example template which is of type of PageArray to the articles template.

    Now when you try to load that particular template ( example ) PW is becoming slow....

    And yes another server we have around 293363 pages and this can grow. So what is the best way to get much speed, or say the PageArray not to load all the stuffs for this is mainly used from an admin point of view.

    Any suggestions is welcome.

    Thanks

  10. Hi Guys,

    Probably this has been asked, or have some modules which have the similar functionality. If you think so please link to it . I did searched a lot whether any question is asked. My apologies if I didn't find that.

    I was wondering whether there is a way in PW which can create the needed fields for my template, and copy the template to the site/templates folder.

    I noticed the __install() hook can be used to create Fields and FieldType.

    $field = new Field();
    $field->setName('somefunnyfield');
    $data = array(
        'label' => 'Some nice label',
        'type' => 'Page',
    );
    

    Now the problems are more customization. Is there a module or something that can generate the necessary information from the already created fields?

    The idea is want to create module say ( Blog ) which has certain fields and that can be installed in any PW installation, which out any changes other than in code.

    Thank you

    • Like 1
×
×
  • Create New...