Jump to content

newbie LAC

Members
  • Posts

    5,244
  • Joined

  • Days Won

    40

Community Answers

  1. newbie LAC's post in How to check what a Storage Setting Configuration is set to? was marked as the answer   
    if (get_class(\IPS\File::getClass('core_Emoticons')) == 'IPS\File\Amazon') { } if (get_class(\IPS\File::getClass('core_Theme')) == 'IPS\File\FileSystem') { }  
  2. newbie LAC's post in Error 2S100/6: requested_route_404 was marked as the answer   
    Hello,
    Debug next code (system\Dispatcher\Standard.php)
    try { $this->module = \IPS\Application\Module::get( $this->application->directory, \IPS\Request::i()->module, static::i()->controllerLocation ); } catch ( \OutOfRangeException $e ) { \IPS\Output::i()->jsFiles = array_merge( \IPS\Output::i()->jsFiles, \IPS\Output::i()->js( 'app.js' ) ); throw new \DomainException( 'requested_route_404', 6 ); }  
  3. newbie LAC's post in Template, Inlcude external php was marked as the answer   
  4. newbie LAC's post in Lazy load in 3rd-party resources was marked as the answer   
    You should to use additional attributes
    img[data-src]
    [data-background-src]
    iframe[data-embed-src]
    video[data-video-embed]
    + controllers which support lazy load or attribute data-ipsLazyLoad
     
    Examples
    <div data-controller='core.front.core.lightboxedImages'> {{if settings.lazy_load_enabled}} <img src='{expression="\IPS\Text\Parser::blankImage()"}' data-src='link_to_img' alt="alt_text"> {{else}} <img src='link_to_img' alt="alt_text"> {{endif}} </div>  
    <div data-ipsLazyLoad> {{if settings.lazy_load_enabled}} <img src='{expression="\IPS\Text\Parser::blankImage()"}' data-src='link_to_img' alt="alt_text"> {{else}} <img src='link_to_img' alt="alt_text"> {{endif}} </div>  
  5. newbie LAC's post in How to set currency in Commerce programmatically? was marked as the answer   
    See template chooseCurrency
    {{$memberCurrency = ( ( isset( $_SESSION['currency'] ) and in_array( $_SESSION['currency'], \IPS\nexus\Money::currencies() ) ) ? $_SESSION['currency'] : \IPS\nexus\Customer::loggedIn()->defaultCurrency() );}}  
  6. newbie LAC's post in Geolocation was marked as the answer   
    Hello,
    try { $geoData = \IPS\GeoLocation::getByIp( \IPS\Member::loggedIn()->ip_address ); if ($geoData['country'] == 'DE') { // Show message } } catch ( \Exception $e ) { }  
×
×
  • Create New...