Jump to content

Clarity

Members
  • Posts

    125
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by Clarity

  1. I think it is not good if admin's path is known to hacker, since they potentially can brute-force superusers' accounts by this URL and eventually hack someone's account, receiving the access to the Admin Panel. The hackers may know which CMS the site uses from the site https://whatcms.org/, and if they know a thing or two about ProcessWire, they will attack /processwire path first.
  2. Hi, @adrian! I have tried it, but it's not quite what I need - if I pick a value in some field, the other field shouldn't entirely disappear. Only a single value of AsmSelect (which is picked in another select) should disappear from a list of selectable items.
  3. Hi, @adrian! I almost completed writing custom admin action and I have a question. I have a select in which we can pick a single language, and AsmSelect in which we can pick multiple languages. If we pick some language on select, it automatically shouldn't be pickable in AsmSelect. There must be some setting which I miss. Since we pick language on browser (on client side), I'm not sure how to do it in PHP. Could you please point me how to do it in PHP's ProcessWire, without writing own JS for it?
  4. I'm writing custom admin action and trying to figure which types can be written in 'type' field, like in this code: return array( array( 'name' => 'fields', 'label' => 'Fields', 'description' => 'Select the fields you want to delete', 'notes' => 'Note that all fields listed are not used by any templates and should therefore be safe to delete', 'type' => 'checkboxes', 'options' => $fieldOptions, 'required' => true ) ); If these types fully correspond to Inputfields in ProcessWire, then it solves my problem. I was not sure about it. Thank you.
  5. Hello, @adrian! Can you please add the exhaustive list of available types and fields ("name', 'type', etc.) and how to work with them? There are 'select', 'text, 'AsmSelect', etc., but can you please document all the types and fields? Or maybe I'm missing something?
  6. Hi Chris, This error usually occurs when your page is loading too slowly (there might be many reasons of this). It's good to check the performance of the sites where the error occurs.
  7. I personally don't think that forum search is bad - it's quite flexible, you can search with AND and OR logical operators on words, search in different topics and forums, choose whether to search in titles and body or in titles only. What can be improved is searching synonyms for words like Google does, i.e. when we search for "teapot", we also should get results for "kettle".
  8. Hello everyone! I have a cyrillic string transliteration of which I want to use as a name for the new page via cloning another page with a custom title. I'm using this function: function foo($copyFromPage, $parent, $newTitle, $language) { $copyFromPage->of(false); $clone = wire('pages')->clone($copyFromPage); $clone->of(false); $clone->title->setLanguageValue(wire('languages')->get($language), $newTitle); $clone->name = $newTitle; $clone->parent = $parent; wire('pages')->save($clone, ['ignoreFamily' => true]); } Usage of my function is like: foo(65536, 32768, 'Новая страница', 'ru'); I need to translate 'Новая страница' into a name like novaya-stranitsa in order to have a page to be named correctly (now I have hyphen instead of name). Could you please tell me how to do it in ProcessWire?
  9. Thank you, @horst. Possibly that was the core of the problem.
  10. _strings.php contains variables which are translations from one language to another (e.g. $var1 = __('Text 1')). I thought it is a standard ProcessWire file.
  11. Hello everyone! I have _strings.php file which I need to use on entire site. It is included in _init.php file like that: include_once("{$config->paths->templates}_strings.php"); However, our site uses partially uses Wire Render Pattern (https://github.com/joyofpw/wire-render-pattern), which is why _strings.php isn't getting included to some files automatically. Can you please tell us what to do in this case?
  12. Hello everyone! I have a problem: when I upload this (namely this, others work well) animated GIF on local site, it appears normally. However, if I upload it on site at hosting, it gets screwed up. What can be wrong with this image?
  13. Thank you, but not quite. I meant how to get the page data from "editing" page but not reverse. EDIT: Problem solved, $pages->get($input->get->id)->language performs the trick.
  14. Hello, I have language field on some template. Need to get data from this field via API in order to send it to settings. But if I write, say, $page->language , I get the data only on the page where it is called, but not on "editing" page. So how to get data from $page to "editing" page?
  15. Clarity

    Community Gamers

    Good day, @Ivan Gretsky! Yes, also online games with English-writing players can teach some English slang (e.g. "ty" stands for "thank you", "np" stands for "no problem"). Also generally online games can teach how to write messages quickly (as you need to play and communicate at the same time unless you're using voice talk), which can be a good skill for programmer too.
  16. Clarity

    Community Gamers

    I'm a huge fan of Perfect World.
  17. Thank you for the response! However, I meant the user avatar on ProcessWire forums. Sorry for being somewhat inexact in my question. Suddenly I found that in my profile option "Profile Photo" appeared and was able to place my avatar, so the problem is solved now.
  18. Hello everyone! I'm new here and I want to set an user avatar to my profile. However, I don't see any option in my personal cabinet that can do it. Could you please tell me if there are there some requirements for user for setting an avatar or I'm missing something?
×
×
  • Create New...