Jump to content

heldercervantes

Members
  • Posts

    319
  • Joined

  • Last visited

  • Days Won

    7

heldercervantes last won the day on March 28 2018

heldercervantes had the most liked content!

1 Follower

Contact Methods

  • Website URL
    http://heldercervantes.com

Profile Information

  • Gender
    Male
  • Location
    Porto, Portugal

Recent Profile Visitors

3,829 profile views

heldercervantes's Achievements

Sr. Member

Sr. Member (5/6)

488

Reputation

1

Community Answers

  1. Thanks for the input guys. Sounds like a page per report is the most reasonable option. It all depends on the budget of course. There are a couple of issues that may carry a lot of complexity. First is how the clients (companies) are handled. I can either have a company be a user and then relate a report to that user for simplicity, or I can have the company as a page, a master user that's able to create sub-users for their staff. I'll need to build a UI to handle all that, which sounds lovely. Then there's the UI for uploading. Doing it one by one is not reasonable. Even uploading 50 reports and then being presented with a list where you select a company for each report sounds like something that's bound to cause errors (not sure if basing it on file naming convention would be much better though). I'll see that when I get there. Can't be sure of the best solution without seeing how those are produced.
  2. Hey guys, gals and everyone else. So, I'm sketching out a solution for a client, a platform where they deliver weekly reports to their clients, with a UI where clients log in to view their reports history. Each report is a PDF file Around 120 clients, meaning about the same number of PDFs submitted weekly Each client sees only their own reports, oc. What I'm unsure about is how to store all this. I'm thinking of making an interface where a zip file is uploaded, each PDF inside follows a rule like starting with the client's id or reference so it can be properly assigned to the client. What do you think is better? Store all this in a files field? Store each report as a page? Sounds weird to me to have hundreds of files in a field, but then again it also sounds much to have 120 new pages added every week. And of course this has to be organised, searchable by dates and whatnot.
  3. Damn, what a noob. That was it. How does one make a full project, publish it, test it, and never see a broken pages or a piece of red text anywhere saying Hey, where's your <body> tag? A mistery. Thank you sir, beer's on me 🍻
  4. @wbmnfktr The script tag is embedded but the cookie is not there. https://maisliberdade.pt/biblioteca/riqueza-das-nacoes-vol-i/ No errors on the console too. Checked again, cookieless tracking is off.
  5. Weird, this is not tracking anything for me. Is it supposed to update in real-time? Right now I have it assigned to 3 different templates, I see the phits field is there, but it always stays at zero. Templates are assigned on both auto-tracking and api tracking, tried cookieless tracking on and off, disabled the bot filter and IP validation. Nothing seems to work.
  6. @wbmnfktr Switching them around does the same thing @Robin S Adding namespace makes it worse, with that even the workaround doesn't work πŸ₯° Well at least for now I managed to get it working. I'm just afraid that the whole thing crumbles and I have to setup everything in the cms from scratch. I've never backed up my DB so frequently as I'm doing now πŸ˜‚
  7. @wbmnfktr It gets weirder πŸ˜… So here, $b->blockType is a php file name. In that file, the first line is echoing a __() string. I'd really love to understand why it works in the first include and not in the second. It's right up there among the weirdest things in the history of weirdness. Anyways, I'm just glad I have a workaround. Thanks for your time 🍻
  8. @wbmnfktr Strange. If I do that on a template file directly, it works fine. But if I put it in a file that's included, it breaks. WTH? πŸ€” Also, I just tested on another site that I'm working on and it works there. Both projects were setup the same way, in fact, the one that has this issue started from the other (basic setup with a docker-compose that sets up a container running the PW installer). Environment is exactly the same and the only difference I can see is that in the other one I selected the languages profile on install.
  9. Hello guys and gals. First time I've done this, took a site that started from the blank template and added language support. Everything's working except when I try to add translatable strings to my templates. I'm getting a `Call to undefined function __()`. No idea what I need to do. Can someone help? Thanks in advance. H
  10. First time I ran into it in some 7 or 8 years making stuff in PW πŸ˜…
  11. Hey guys. First time I'm having this issue. Started a new project, downloaded the current master 3.0.165, set it up using the languages template. First field I add is a repeater with a title and image field, add that to the home template, edit the page, put some content, save... and the title is blank. Further testing and all other fields seem to work. This is the only one that reverts to blank when I save. Being required or not makes no difference. Nothing in the log. Any idea what's going on? I'm about to give up and make a new field. SOLVED For anyone who hits this snag, it seems this happens when you have languages but only one is set up. As soon as I added a second language, this behaviour stopped.
  12. Sorry, only noticed this message now. If you're still wondering about this, go to the InputfieldSelectFile.module file and look at line 96. Should be something like this: $output.= "<select name='" . $this->name . "' id='" . $this->name . "' class='uk-select'>" . implode('', $array) . "</select>"; In your file you're probably missing this id=... part. You just need to add that.
  13. Long time no post. Here's my latest: https://maisliberdade.pt/ Mais Liberdade is a liberal think-tank in Portugal, promoting the values of liberal-democracy, individual freedom and free market economy. It's a non profit that gathers collaboration from people from multiple portuguese political parties, members of the european parliament, economists, professors, etc. During development, an announcement page was set up with a registration form for founding members. In that period of about a month, around 200 subscriptions were expected, but in the end we got over 6000 subscribers. This website features essays, events, videos and a free library that, at the time of this post is counting 400 books. The frontend was built using web components (Stencil js). Basic pages are built with a modular approach, I'm attaching a video of how they are created. The approach is a simple repeater with a custom block type selector interface. That selector is basically a modified version of FieldtypeSelectFile. I've hacked that module to expect a PNG to be available for each PHP file in the blocks folder, and modified the input field to generate a button grid after the select. This is lovely to use from the editor's perspective, but it's something to improve for the developer experience, because in the end this is a repeater, that has to contain all fields that each type of block needs, and for each of those fields I have to set it to show only if the blockType field equals X, Y or Z. With a lot of different block types this takes some planning and easily becomes hard to manage, but it's the best approach I found yet and the benefit for the editor's experience is well worth it. covered-compressed.mp4
  14. Ok this one is mindblowing, looks like a perfect upgrade from the solution I'm currently using. I'm getting by with a repeater and a modded version of FieldtypeSelectFile that basically lets you select a php from a given content blocks directory, assumes there's a png that goes with it, and renders a neat block selector. From there, it's just hiding and showing fields depending on the value of that selector. It's not the most elegant of solutions from the "setting up" perspective, but quite nice and comprehensive for the editor and the php code on the frontend super understandable. Brad seems to try to do just enough. Looks great for custom, controlled content blocks. Too much freedom and the editor usually makes a mess πŸ™‚
  15. Found the solution. Thanks @teppo for your help. Your suggestion gave me the clue I needed. Here's the fixed code: $results = ** a somewhat complex search that returns a pagearray ** $perPage = 20; $start = ($input->pageNum -1) * $perPage; $results->setLimit($perPage); $results->setStart($start); if ($input->get->f) $input->whiteList('f', $input->get->f); if ($input->get->l) $input->whiteList('l', $input->get->l); if ($input->get->a) $input->whiteList('a', $input->get->a); if ($input->get->t) $input->whiteList('t', $input->get->t); $pager = $modules->get('MarkupPagerNav'); $pager->setPageNum($input->pageNum); $pagination = $pager->render($results, [ 'nextItemClass' => 'next', 'previousItemClass' => 'previous', 'currentItemClass' => 'current', 'separatorItemClass' => 'separator', 'numPageLinks' => 5 ]); foreach($results->slice($start, $perPage) as $item) { // render the thing } echo $pagination; Basically all that was missing was that setStart() call. Makes sense, as usual.
Γ—
Γ—
  • Create New...