Jump to content


  • Content Count

  • Joined

  • Last visited

Community Reputation

12 Good

About Cybermano

  • Rank
    Jr. Member

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Hi to everybody. I developed a bit this works and I would like to share it with you. Install, uninstall, tabs and minor improvements added and debugged. I've also opened a github repo: https://github.com/cybermano/CustomNotes Do you suggest me to open a new thread? CustomNotes.zip CustomNotes.module README.md CustomNotes.js
  2. Thanks for pointing me out those solutions: really rocks! For CKEditor field they are the first solution we'll considering in future. At the point of our production code, also page reference didn't suits well (we would maintain simple textarea and HC). Surely we will change templates and code to use these powerful tools for the next uses. Currently I think the first idea is really flexible (even if less powerful) to adopt it in a lot of ways, for lot of ready-made sites, and with different solutions without efforts. E.g. for food related sites we could use it as the List of Allergens, for many others could be used like a docs repo or a shortcut to a help-desk, tuts o more... pdf-docs.mp4
  3. Thanks Bernhard, your advice spurred me not to settle. I will surely give a look at the solution of BitPoet, it sounds very interesting... P.S. Everyday I discover a mine of treasures...
  4. Hi Robin, thanks for your reply and your suggestions. I totally missed your HC dialogue: I can't wait to study that module, I will look in depth asap πŸ™‚ And the page reference (yes, I use a repeater) is also a great idea ... I hadn't thought of that. Tks!
  5. As promised: I've posted here my little contribution. For who could be interested. πŸ˜‰
  6. Food Allergens Module A simple List of Food Allergens My needs were to provide a simple list of food allergens for our clients with restaurant related activity. The idea was to simply output the list (to speed up the data entry) without leaving the food menu editing, eg. opening another page in new tab or window. This isn't a perfect solution, but it works fine for my needs and I decided to share the base idea. This could also be easily used to show little notes or short "vademecum", not only for the list of food allergens. --- Main features The basis All moves from a short editing of the module in this tutorial: How to create custom admin pages by @bernhard First of all it creates an empty admin page, with a dedicated permission to let safe-user to see it (this permission has to be created as a new ones, manually or by the module). Once the page is created, I have hooked its behaviour into the ready.php, to show the content (basically a list). A step further With the tips of @bernhard, @Soma (and many others), see here , the magic happens. The new page will be shown as a panel, so editors will not abandon their data entry to have a quick view to the list. A little further Why scroll to the top of the page to click a link? The next step was to create a sticky button only in the food menu pages. Again with a @bernhard tip I moved into the customization of this simple module and the related hook. --- How to use this module After installed, it creates the page /admin/page/allergens/ and the module is to be setted up. The first field is a CKEditor with multi-language. This is the place where to write the informations that will be shown into the page. The next field is a simply text-area where to place a bit of JS that will be appended to the markup of the text (omit the 'script' tags). I also putted a checkbox with a silly statement: this to think at least twice on the safety of the written JS. Now comes the first way to display the link to the page Field Note with Link. Enable and save it. The module will display a new row with 4 selects (1 standard and 3 ASM): View mode (to show the page as Panel or as Modal PopUp); Templates to select: select one or more and save before proceed, so the asm-select of the pages will be populated showing all the pages of the selected templates. Pages to select: also here select at least one and save before proceed to populate the asm-select for fields only with the ones that belong to the selected pages. Select the fields where to place the note and save again. That's all: now you will find into the notes of the selected fields the link "See the List of Allergens". At the same way, the option for the sticky button, but with a plus The field select is obviously unnecessary, but you could play with the last row: the inline styles to fix your sticky button where you like. Here you could set the sticky position of the <div> and the absolute ones of the <a>. Video Explanation In these screencasts you could see a custom JS that show a "copy" button near a "hanna-code" call. This because I've set a specific one for each allergen to show up a tooltip in the front end. Registrazione #33.mp4 Registrazione #34.mp4 --- Last but not the least Actually it works fine for my needs, even if it's much improvable: I'm working on the permissions creation, the uninstall section, a separate configs and defaults and how to include the hook into the module leaving free the ready.php. According to a simpler uninstall. Also I would make the link text as a dynamic text field, so it will be more flexible. I always learn a lot here, so I would share my code for whom it could be interested. I removed the hanna code references, but I provide you the html list of the allergens, English and Italian too, so you can paste them into the "source" of the CKEditor field to have a ready to use module. Obviously you are free to modify the code as per your needs. Please, keep in mind that I'm not a pro coder and I beg your pardon for my verbosity (speaking and coding). πŸ˜‰ I hope be helpful or for inspiration. Bye ready.phpList-ITA.htmlList-ENG.htmlAllergens.module README.md
  7. Thanks again. I already wrote only few hooks by myself, but a pro tip is always welcome. πŸ™‚
  8. Hello. I confirm you that I was able to implement the panel view. Thank you so much. I owe you a truck of beers! πŸ˜‰ I dare, for those who may then use the same snippet you posted, that the url of the link must be between the quotes (and in my case I also had to remove #pw-masthead, not having a specific id). $(document).ready(function() { pwPanels.addPanel($("a[href='/your/admin/link/url']")); }); I also thank @Soma for publishing this tutorial, otherwise I would sail in the deepest dark ...;) All you are my hero! πŸ™‚ P.S. My next target is to hook my restaurant menu repeater to create a button with the same link, (so editors could obtain the list in place, without scrolling to top). If all will go right, I will share the code of the hook, the button and the List of Allergens (Hanna Code). Of course I will use your suggestion for the button... πŸ˜‰ admin-pw-panel.mp4
  9. Many thanks Bernhard, for your reply and your time. I’ll surely look at this and try. Then I will update you. Thanks again.
  10. Hi and thanks, From the admin menu (img 01), selecting the relative list-item... Currently it opens as a normal page, but I'm trying to obtain as img 02. .
  11. Hi, I'm setting a custom page via this module ( many thanls to @bernhard for this, to @Soma @bernhard @adrian for their posts, and to all others that raise my level every day ). Awesome stuff! My scenario is to prepare a sort of little vademecum for safe-editors: a simply list of suggestion that they could open while edidting a page, without exit their page and read the custom admin one added via this module, accessible with a specific permission. I've setted all and it works perfectly, but I'm looking for how dispaly this page in panel mode: I suppose (surely I'm wrong... πŸ™‚ ) to have to set a class "pw-panel" in the html link. Well, I've serched along the forum and on the web but I've not find anything useful. I've also tryed (pure guess) to set "link" and "attrs" into the declaration of the page array (at the beginnin of the module), like this way (but it doesn't work): 'page' => [ 'name' => 'allergens', // You guessed! It's the list of the food allergens for a restaurant site :) 'parent' => 'page', 'title' => 'Allergen List', // Could this be correct? // 'link' => $config->urls->admin . "page/allergens/", // 'attrs' => 'class="pw-panel" ' ], Anybody has a suggestion how set panel mode behaviour? Many thanks in advance
  12. Hi all! In free time, I've played a bit with WireMailSmtp. Thanks to a lot of tutorials/explanation found on these forum and in the API pages, I find my way and my settings. For future readers taht maybe could need somthing similar, I've started here, here and here ( tks @ryan, @horst and many other contributors) . The power of PW always impresses... Bye!
  13. Hi there. First of all many thanks for the great module! We are using it only for logged users and it works like a charm. Any suggestions on how to send an email after the user vote ? (Maybe the simplyest way, if there's one...) Could it be an implementation for this module? Tons of thanks in advance.
  • Create New...