Jump to content

Zeka

Members
  • Posts

    1,065
  • Joined

  • Last visited

  • Days Won

    11

Posts posted by Zeka

  1. @Marc I think you can do the same with hosts.

    On 19.04.2017 at 11:53 PM, horst said:

    In the modules config screen you can set it under "sender_reply". Also a "sender_errors_to" is available.

    58f7ce523b5fd_fireshot_screen_capture_133.png.65d465c1517632f261929bd7d23e2715.png

    If you need to set it dynamically, you must go the workaround with modifying module config-settings via API. If so, you will find examples here in this thread or the forums in general.

     

    you can use this:

    
    $data = wire('modules')->getModuleConfigData("WireMailSmtp");
    
    // or, regarding on scope,
    $data = $modules->getModuleConfigData("WireMailSmtp");

    than modify the reply adress:

    
    $data["sender_reply"] = "you@example.com";

    after modifying, you can write it back:

    
    wire('modules')->saveModuleConfigData("WireMailSmtp", $data);
    
    // or
    
    $modules->saveModuleConfigData("WireMailSmtp", $data);
    
     
     
    • Like 2
  2. Hi @Kass

    Solution mostly depends on your menu implementation. 

    As for me, when I have some complex menu system, usually I build it with repeater field. For every menu item I have Selector field ( InputfieldSelector ) where I define selector when current menu item will be active, and then in my code I use 

    $page->matches($selector);

    https://processwire.com/api/ref/page/matches/

      In that way, I can set the active state for every menu item even if the current page is not under current parent.

    • Like 1
  3. Maybe you can create separate template for participants, wich will contain all needed field for it. In your event template add page field (Autocomplete or InputfieldChosenSelect) and allow a creation of new pages through this field. So, if your participant is registered you would select it, but if not, you can just enter a name of this participant and add it to the list, but for the next event it will be already in the list of your participants ( will contain only name ). In that way, all of the partisipant will have some unique identifier and it will be quite easy to count them 

    https://processwire.com/api/ref/wire-array/unique/

    • Like 1
  4. Hi @thmsnhl

    Have you seen this thread? 

    There is an example that you may find useful

    $events = $pages->find("template=sectionItem, parent=1025|1066|1073|1069|1013|1247|1101, sort=startTime, start=10, limit=3");
    $events_array = array();
    
    foreach ($events as $event) {
        
        $start = "".date(strtotime($event->startTime))."";
        $title = $event->title;
        
        $events_array[] = array(
            'title' => $title, 
            'date' => $start
        );
    }
    
    $events_json = json_encode($events_array, true);
    echo $events_json;

     

  5. Hi @franciccio-ITALIANO

    You can look for cache files in 

    site/assets/cache/Page

    But there will be files only if your template cache is on.

    About modules: 

    First is to manually create DB backup, but the second one is to trigger backup creation periodically.

    You can install and use only the first one. But if you want to use second, you have to install also the first, because it depends on it. 

×
×
  • Create New...