Jump to content

wbmnfktr

Members
  • Posts

    2,183
  • Joined

  • Last visited

  • Days Won

    55

Everything posted by wbmnfktr

  1. _init,php isn't a regular template file. It's more kind of a universal settings file with variables and presets you might need later on your page(s). So you could add the following line to site/config.php $config->prependTemplateFile = '_init.php'; The _init.php in /site/templates/ will be included every page load and therefore the login check is always in place. Within this file you could and should add psy's / your code <?php $loginPage = $pages->get('template=loginregister'); // in my case yours might be different if(!$user->isLoggedin() && $page->id!=$loginPage->id) { // checks if user is logged in and not on login page $session->set('returnPage', '/path/to/welcome/'); // set your welcome site $session->redirect($loginPage->httpUrl); die; }; This would redirect every user that is not logged in to your login page and sets the returnPage. Be careful with the check conditions. You might want to fine tune this check.
  2. Have a look at this post: @psy's code does almost exactly that what you need/want. At least you get the idea and can adjust it to your needs.
  3. The frontend looks nice and clean but what caught my attention was the backend. We see lots and lots of frontend but this one is a nice look behind the scenes. I love it! Would be interesting to see or know more about this and some other backend solutions.
  4. @AndZyk MapMarker is a nice module and does most of the things most people want. But there is still some overhead if you build and use your own Google Maps with custom scripts and markup. All @suntrop does and probably needs is grabbing lat/long from Google and saving it to text fields. A super lightweight solution btw. I played around with Profields: Textareas and the lat/long script. Still everything is fine. With and without language support and german language pack.
  5. None of my text fields or textarea fields convert 50.43578373748 to 50,43578373748. Can you explain your field setup a bit more detailed as your description sounds kind of weird to me right now.
  6. Try this: $options = $fieldtypes->get('FieldtypeOptions')->getOptions("optionsfield")->get('id=2')->title; Easier to maintain and for further use: $options = $fieldtypes->get('FieldtypeOptions')->getOptions("optionsfield"); $options->get("id=$yourId")->title;
  7. With your code: $options = $fieldtypes->get('FieldtypeOptions')->getOptions("experienced_in")->title; Much shorter and probably much easier in page context: $optionsId = $page->optionsfieldname; // the ID $optionsValue = $page->optionsfieldname->value; // the value $optionsTitle = $page->optionsfieldname->title; // the title
  8. $static_translations['telephone']['default'] = "Τηλ:<br><a href=\"tel:2821011111\">2821011111</a>"; $static_translations['telephone']['english'] = "Phone:<br><a href=\"tel:+302821011111\">00302821011111</a>"; OR $static_translations['telephone']['default'] = "Τηλ:<br><a href='tel:2821011111'>2821011111</a>"; $static_translations['telephone']['english'] = "Phone:<br><a href='tel:+302821011111'>00302821011111</a>";
  9. Another idea... Create a new parent for each kind of event type. Set corresponding template restrictions in the template settings (family tab) and the users were forced to choose what kind of event they want to create.
  10. You're welcome. Could there be any field name conflicts or Hooks that interfere here in any kind?
  11. In order to complete the testing scenario I added a form to my login page now as well - embed method A, B, and C with FormBuilder form above and below login form. Login still works fine without any errors.
  12. Tested your exact same code with ProcessWire 3.0.79 and PHP 5.6.25. It works as expected with all kinds of users. No entries in the logs or errors on the page. Are there any security or session related functions or modules installed?
  13. Have had the same issue a few days back and got it working by adding this in line 1 of my template. <?php namespace ProcessWire; ?> The translatable strings are defined in this way: <?php echo __('Kontakt'); ?>
  14. Try to load all files (images, scripts, etc.) with a full path including even protocol and domain. So instead of using this: /site/assets/files/1114/livery-corporate.png Try this: http://www.justrightmarquees.co.uk/site/assets/files/1114/livery-corporate.png Maybe this gets the job done: <base href="http://www.justrightmarquees.co.uk/" />
×
×
  • Create New...