Jump to content

heldercervantes

Members
  • Posts

    388
  • Joined

  • Last visited

  • Days Won

    14

Posts posted by heldercervantes

  1. 1 hour ago, bernhard said:

    Why is creating pages any worse than populating a repeater? I'd prefer pages I guess.

    Page loads on every step. Adding to a repeater is a lot quicker and less frustrating than creating a page. I usually add a "Global settings" tab to the homepage where I put a repeater for the social networks, email for form submissions and stuff like that, so I was wondering if I could have a field there to manage this list instead of pages. It would also seem more tidy and even intuitive for the admin than using pages on the tree. The idea that pages on the tree might not be actual pages but also the options for a field is super weird to me.

     

    1 hour ago, bernhard said:

    I don't understand the last part. Could you please explain what you mean exactly?

    image.png.33bef39a5bb8606519d4789df1bf51db.png

    This is what I mean. The amenities are grouped in sections, but those are lost when selecting them on the page. Not an issue with the 9 or 10 that I have now, but considering in the end there will be 50 of them, it won't be very user-friendly. Oh, as I was writing this, @BitPoet pointed out the solution. Thanks man, great timing 😄
     

  2. Happy new year, everyone!

    I'm working on a BnB website and I need to have an anemities list like this:

    image.png.4108273ace7ef700249dc5dbf9884156.png


    How would you approach something like this in the admin? I need to create a global list of amenities, with sections, each with a title, icon and optional note, that in each unit I can just select with checkboxes.

    The most viable option is probably to create separate pages for each + a multi-page select field. But there are a couple of things I don't quite like in that approach. One is creating / managing the options. Having to create these as pages one by one makes my skin crawl, and I'd much rather have someting like a repeater on a global config section of the homepage. The other is selecting them. I've created amenities/section/amenty templates, the pages select field looks for the amenity template, and in the end the sections aren't accounted for when I'm selecting in the unit page. I'll probably have to grind a bit to get them to display organised by section in the end, now that I think about that.

    Any better ideas?

  3. Has this been deprecated? Just tried this module on a site, trying to get watermarks on its opengraph images, and I'm getting this error:

    Compile Error: Array and string offset access syntax with curly braces is no longer supported (line 2385 of site/modules/PageImageManipulator/ImageManipulator.class.php)

    (My server is running PHP 8.0)

    • Thanks 1
  4. 8 minutes ago, BitPoet said:

    Maybe a namespacing / file compiler issue? Is site/assets/cache/FileCompiler writable? Are there any stale files in there?

    The directory is writable and there's stuff there. It's weird that the older version works. I'll probably just leave it at that

  5. Here I am doing maintenance on a site that seems to have went through some hard times and had multiple issues.

    I started off by updating to version 3.0.229 and then went ahead to finding crap and cleaning up, replacing the old SEO module with the new one, refactoring some stuff, yadda yadda.

    Most of it's done but now I'm getting a weird error on WireMailSmtp. I can configure it fine, but when I send a test email or uninstall the module I'm getting this: Class "WireMailSmtp" not found in site/modules/WireMailSmtp/WireMailSmtpAdaptor.php:143

    Any idea what's going on? I've already removed the module manually from the file system, refreshed modules to remove it from the database and installed it again, but the same thing happens.

    **EDIT**
    I've downgraded from version 0.6.3 to 0.6.0 (just copied the folder from another site) and I don't get this error anymore 🤷‍♂️

  6. On 8/25/2023 at 11:46 PM, wbmnfktr said:

    Let me know where it breaks your boilerplate setup.

    The problem isn't breaking the boilerplate, but rather breaking my habits 😅

    I mean I'm so used to just making my own vanilla js and getting it doing what I want that needing to flip the switch to Alpine's way is enough to make me postpone the decision to the next project.

    • Like 1
    • Haha 1
  7. 20 hours ago, wbmnfktr said:

    Like TailwindCSS or AlpineJS.

    Love this! Makes total sense.

    Although I did try to make AlpineJS part of my boilerplate and quickly gave up. Just easier for me to add a JS file and do my stuff with vanilla. Right now I just have a Vite thing, a js that imports and inits scripts from a file (like the one that Bernhard mentioned).

    Effects like my text reveal thing require adding the type of ready-made JS and CSS that I tend to avoid. However if it could be part of a library of stuff a developer can browse and easily add to their project, it might be a cool idea. Alpine might help with this.

    • Like 2
  8. On 8/11/2023 at 11:30 AM, Stefanowitsch said:

    I love the text-reveal animation for the headlines. Really neat! 

    How did you approach this feature? It seems that every letter in the headline text gets wrapped inside a <span> element via JavaScript and is then animated via CSS transforms?

    It's my own script. Basically I'm identifying every text to animate with a data-attribute. Then my JS starts by breaking each word into a div with overflow:hidden and each letter in a span shifted down and incremented css transition-delay. Then, an intersectionObserver detects when it comes into view and adds a css class that changes each letter's position back to zero and the transition-delay makes them appear one by one.

    It's a cool approach and practically a snap-on script that I can reuse (and have done so already) on other pages. It still has that error @netcarver pointed out, though.

    I also have something similar for the images that makes a fade-in reveal effect.

    • Like 2
  9. http://shift-up.pt/

    Shift-Up is a consultancy company from Portugal that specializes in government incentives and financing.

    This is my first project using ProFields and RockFrontend, and I can't really believe how long it took me to start using both. Profields' InputMatrix is a huge step up from my previous custom module that I hacked together using file selects and custom field visibility. And RockFrontend, just by getting latte in the mix, makes everything a lot more polished and professional.

    The project is a fresh start from the previous old Wordpress solution they had, taking care as to not harm the SEO standing this site had built up with all its content. I started out by writing a content import script that took hundreds of pages from the oh so messy WP export and turned them into neat PW pages. I also had to handle the URLs in the process, ensuring that the old unstructured WP links would be fed to the Redirects module. So the focus here was more on carrying over the content without having to rewrite everything, and now that we're here, when new programs come up we have a platform that can properly grow and add new layout solutions and features.

    • Like 10
    • Thanks 1
  10. 16 hours ago, Robin S said:

    You could use the Find Merge module and supply it with two selectors: one for products without an archived ancestor and one for products with an archived ancestor. You'd probably start by finding the archived categories, then your selectors would include "has_parent!=$archived" and "has_parent=$archived".

    Well, I can just do two searches. I'm just being stubborn assuming there's a straightforward solution for this 😆

  11. Hey guys and gals.

    I have a page tree that I want to search, where the second level has an "archived" checkbox. Something like this:

    • Home
      • Products
        • Category ('archived' checkbox field is here) 
          • Product (these also can have subpages that I want to catch too)
          • Product
          • Product 

    And now that I'm making the search engine for this site, I want to query all product pages, and I want to sort them showing "non-archived" items first. I suppose there's a way I can incorporate something like 'sort=$page->parents[2]->archived' (not like this of course, but...)

    Any ideas?

  12. Hi guys.

    I'm making an import script for a weird site's content. I got to the point where I can successfully clean everything up and shepherd most data from the exported mess to their new home in page fields. I'm also finding file links and image urls that I want to upload to a new files field. I don't have them locally, so basically I need to start from an array of URLs and somehow upload them to the page's files field. But how?

    I just can't wrap my head around uploading stuff. It's always a pain

  13. 1 hour ago, ryan said:

    @heldercervantes Great description. This is amazing to me coming from traditional HTML/CSS/JS, to see something like this, and read how it was built. I wasn't familiar with the threejs library before, this looks really interesting. The planets are 3D objects? How did you make those, or where did they come from? It all looks very realistic, it really is something special. Very cool how ChatGPT helped out with the game part too. 🙂 Thanks. 

    Planets are sphere primitives with an image texture applied. The Voyager is a GTLF model from NASA (threejs has importers for that). There's a background that's basically a cube with inward facing images and the Saturn rings is just a plane with a PNG texture.

    You can also see some specs coming towards the camera that's a particle system. Basically 2000 randomly placed vertices that move and get reset once they're past the camera.

    It's a ton of fun to work with this stuff.

    • Like 3
  14. On 6/9/2023 at 7:58 PM, ryan said:

    Wow, that's amazing, how did you make it? 

    Hey Ryan!

    This is basically a full-viewport Threejs scene on a fixed element behind the content. Planets have a static position, and the probe just moves along the Z axis with the camera attached to it. As the user scrolls, the scrollTop is translated to a Z position for the probe. I had to add a little compensation for the window size so that the probe's position matches the content the user is seeing as is intended. There's also an intersectionObserver detecting each slide coming into view, and depending on what's visible the camera changes position to look left or right.

    The flying logos are relatively simple. From PW I just generate a JSON with the list from an images field. The script that generates the scene loops through that array, adds planes and textures for each one. X and Y positions just cycle through an array with presets, and Z is incremented with a set distance between them.

    Content itself is basic Tailwind stuff. Although I have some custom made scripts handling entrance animations, like the typing effect on the dotted text.

    The game is the result of a conversation with ChatGTP. I had the basic idea of making the user spin the cursor around a dot, mimicking the probe's orbit around Earth, but took the opportunity to challenge the AI. It actually gave me a pretty decent script right off the bat that served as a proof of concept. Then I discussed how to make it challenging and it gave me a few ideas. I iterated over them, and eventually came to the solution of adding movement speed to a variable multiplied by the number of consecutive unbroken turns. Had to refactor the whole thing to make it work properly, but ChatGTP was pretty darn useful in the process.

    • Like 6
    • Thanks 1
  15. So I've just updated my personal website after some 7 or 8 years. It's a small one pager, but with some quirks that I hope you'll enjoy.

    Have a look: https://heldercervantes.com/

    First, the approach was to somehow reinterpret my CV into a web experience. My last CV, along with my Supertiny agency's website share this space exploration / alien contact theme, so the idea here was to incorporate a journey through space as the user scrolls through the website. In the end you'll find a mini-game, where you can attempt to reach the far depths of space and discover what's out there.

    Most content is static, but I'm using PW to manage the logos you'll fly by at some point and the projects, the game's highscores and SEO.

    I intend to improve it a bit in time. Sound is probably the next thing I'll add, and I have some ideas to make the game more interesting.

    Fun fact: Setting up PW for this one took about 2h.

    • Like 13
    • Thanks 1
  16. On 4/21/2023 at 10:51 PM, netcarver said:

    Do you have an estimate of the number of emails you expect to send in a month?

    Right now, just one or two hundred. I have a universe of 600 potential users, and I expect about 100 to enroll. These users will get email notifications selectively if a gig is posted that matches their preferences. But this is intended to grow and there will be an effort to increase the user base.

  17. 7 hours ago, gebeer said:

     Sending emails directly from this hook will take some time until the admin user gets a message displayed. So this might not be optimal.

    This is one of my worries. Right now we have a universe of 600 potential users, so we might be talking about hundreds of emails. Not even sure if the hosting provider will be happy with it.

    In terms of UI I'm thinking of having a checkbox at the end of the page for "Send email alerts on save", which would be used in the hook. And then maybe tie this with ProMailer for throttled sending, handling unsubscribe and all those nice things it does. But I haven't tried it yet so idk if there are any cons.

  18. Hi guys.

    I'm currently developing a volunteering board solution. Basically users register saying what are their areas of interest and how they are available for helping, and then there's a "job board" of sorts that lists where help is needed.

    So I'm doing a simple user registration form, creating users with a specific role. And when I publish a new help request, I want the admin to be able to select from the options of the areas of interest and availability fields, and that should fire an email alert to all corresponding users. This process should be as dummy-proof and straightforward as possible.

    Any suggestions on how to approach something like this?

  19. Hey guys.

    Shouldn't the showcase section have a list by author feature? I just found myself wanting to send someone a link to the showcase of the sites I made in PW and there doesn't seem to be a way to do it.

    And while at it, how about mentioning which projects were featured on PW Weekly?

    We now have a quite large projects list there, and if the point is to show off the best work made with PW to legitimise it, we might as well bring out the best projects and make it cool to be featured.

    What do you think?

    • Like 6
×
×
  • Create New...