Jump to content

diogo

Moderators
  • Posts

    4,287
  • Joined

  • Last visited

  • Days Won

    79

Posts posted by diogo

  1. On 5/30/2023 at 2:07 AM, Robin S said:
    $wire->addHookAfter('InputfieldText::getConfigInputfields', function(HookEvent $event) {
    	/** @var InputfieldText */
    	$inputfield = $event->object;
    	/** @var InputfieldWrapper $wrapper */
    	$wrapper = $event->return;
    	$field = $inputfield->hasField;
    	// Only for inputfields that are associated with a Field object
    	if(!$field) return;
    	// Add checkbox field to config to control noTrim setting
    	/** @var InputfieldCheckbox $f */
    	$f = $event->wire()->modules->get('InputfieldCheckbox');
    	$f->name = 'noTrim';
    	$f->label = 'No trim';
    	$f->label2 = 'Do not trim whitespace from the field value';
    	$f->checked($field->noTrim);
    	if(!$field->noTrim) $f->collapsed = Inputfield::collapsedYes;
    	$wrapper->add($f);
    });

    Just used this for a field holding private keys. Perfect! Thanks @Robin S 👍

    • Like 1
  2. 51 minutes ago, Maurilio Rosario Galia said:

    What would be the name of the DB? Where can I find it?

    The database was named by the developer, or even the hosing server.

    If you have access to the hosting control panel, you might be able to upload files via FTP. In that case you could upload a "test.php" file to the root directory of the site (this directory would contain the "wire" and "site" directories and the "index.php" file) with the following code in it:

    <?php
    include("index.php");
    echo $pages->get(2)->httpUrl;

    Than you can open the url http://mywebsite.com/test.php and the answer will show up.

    I also attached the file so you can download it 👇

    test.php

    • Like 3
  3. Clearly I didn't make my point efficiently. I would hope the heavy use of emojis could even point out the lightheartedness of what I was writing. I referred to Cargo because people were talking about it, the idea was not to defend it on this particular situation but to try show a different side of it that people might have missed. To make it clear, I do agree that it's not the best tool to use for a client, and I admit that I went on a tangent to the conversation. That said, I would like to point out one or two things:

    1 hour ago, FireWire said:

    I've never met a graphic designer that knew what the optimum width, in character count, text content should be for a user experience.

    Wow, I have to say, I'm finding it really hard to believe this whole paragraph, but this statement is particularly mind boggling. Of course I believe what you're saying is true, but, being originally a graphic designer myself and having worked for the web with many others, all I can assume is that you are meeting the wrong graphic designers.

    1 hour ago, FireWire said:

    I'm on the side of the developer and I believe we have a profession that is constantly challenged by people who have been lulled into a false sense of "my opinion is as good as your facts". Having said all of that- if this is a company that simply does not care about anything other than creating high art on the internet- then they don't need a web designer/developer professional, they need to go find software like they did to create posters- or just put a .jpg up as their home page.

    Graphic design, or design in general, is not just about artistry and creativity, but a very technical craft. I genuinely feel that you are not paying the same respect to another profession as you are demanding for your own.

    • Like 1
    • Thanks 1
  4. I have to chime in here to say that I love the Cargo website myself 🙂

    I think we should take our developer hats off when thinking about this kind of page builder. In the case of Cargo, it's not even aimed primarily at professional designers, but artists in general. We are talking about people with a strong desire to experiment visually on their own website, and who may not have the money to invest upfront on a more robust tool. For them, the subscription plan that Cargo offers is quite nice, especially because they don't have to pay while building the website. Just browse through their site directory, and you will find some real gems — they might not appeal to you, but there are some very interesting solutions.

    I actually think the people at Cargo did a pretty good job at simplifying the job of building a website, with some original solutions for common problems. Just as an example, there is no concept of header and footer. Everything is a page (where did I hear this before? 🤔) and if you pin them, they appear on every webpage of the site. Because it works in such a different way then we are used from web dev and other page builders, it needs some tinkering before you get the hang of it. But we have to think that for someone who never built a website before, that doesn't pose a problem at all.

    Ok, enough ranting... just want to add that I also love their newsletter (don't expect any technical stuff there), that I open religiously every week, even if I don't use the service 😅

  5. All props to Jan! The PW people are definitely not an easy crowd for a page builder, but PAGEGRID is very well integrated in the system, with all the content that you add to the page saved as PW pages (a bit like with repeaters). Also, with PAGEGRID being just a PW field, like any other, you don't lose any of the flexibility of PW. It's not for everyone — it won't appeal to pure developers that don't care so much about design, and because it requires some knowledge of how CSS works, it may also not appeal to designers who don't care at all about the platform. Hopefully, there will be enough people in that middle who will appreciate it 🙂 

    • Like 2
  6. Thanks again for catching the font issue @monollonom! Actually it was not Haas Grotesque causing the problem with the vertical metric. The problem was that the font was not loading at all, probably due to the file being corrupted and you were probably seeing the Helvetica present on your computer. This also must have happened when transferring the site to the server. Thanks again!

    • Like 2
  7. 15 hours ago, ryan said:

    @diogo @jploch Wow that is awesome! It's completely different than anything I've seen before. It's really fun to scroll through too. I'm curious about the development side, how do you take over the scroll behavior in that way? If I view the source, there are two completely separate <html> documents in the output, how is that possible? 🙂 

    Thanks Ryan! We just take the vertical scroll position and convert it to translateX values on the rows, using requestAnimationFrame() to make it smooth. Well, PAGEGRID is doing it 🙂.

    There was a second <html> added by $config->prependTemplateFile. We forgot to remove it when we moved it from local to a new install in the server 🤣 
    Thanks for catching this!

    15 hours ago, monollonom said:

    Congratulations to both of you! I wish you all the best as well.

    Small note: it seems the font you’re using has a (rather common) vertical metrics issue on Firefox leading to your text being cut by the overflow: hidden

    Thanks Romain! 

    Thanks for catching the problem with the font. For now we added a max-height only for Firefox using @-moz-document url-prefix(). We'll see if there's another version of Neue Haas Grotesk that doesn't have this problem. 

    • Like 3
  8. Hey! I would like to announce that there is a new ProcessWire powered collaboration between me and Jan Ploch 👉 @jploch. When I moved to Hamburg, I contacted him through the forum and we ended up working at the same shared office. Meanwhile we collaborated on some projects and then started our own company (a GbR, in Germany). We named it KONKAT Studio.

    Now we are publishing our brand new website konkat.studio

    As you may know, Jan developed a page builder for ProcessWire called PAGEGRID. At first, we were going to develop our website the usual way, but then we decided that we should take PAGEGRID for a spin and beat the hell out of it, to see what we could come up with 😄

    We had this idea of three rows scrolling in different directions, and because PAGEGRID has scroll animations built in, we managed to do it all without writing a line of code. We may write a case study soon for those who are interested.

    • Like 17
    • Thanks 1
  9. 1 hour ago, Boost said:

    Funny, because I don't remember changing any text formatter setting.

    And, according to your screenshot, you didn't. The text formatters selector is empty.

    Since you have Tracy installed, What do you get in the tracy dumps if you bd() the body?

    <div id="content">
    	<?php foreach($page->sections as $x) : ?>
      		<?php bd($x->body)?>
    		<?= $x->body ?>
    	<?php endforeach ?>
    </div>

    1072646187_Screenshot2023-05-31at14_34_01.png.dc0623198151e6bff24be3363893a9f5.png

  10. 1 minute ago, Boost said:

    @diogo sorry, but which Id are you talking about? Where can I find it?

    Every repeater item is given an ID that you can access inside a foreach with $item->id (or $x->id, in the case of your foreach). You can see on the screenshot that you posted, that the ID of your single repeater item is 1110. This would be just to see if your foreach is correct, but as I pointed out before, the most important is to understand why the body isn't even appearing in the array. You are sure you added the body to the repeater field, and not to the home template itself?

  11. 15 hours ago, BrendonKoz said:

    I'm getting off-topic, but you are 100% correct now that I've searched. Now my curiosity is piqued. I want to find, from the source, what his personal CMS history was! 😀 Either way, looking forward to future videos!

    Here you go 😉 https://codingpad.maryspad.com/2013/07/19/interview-with-ryan-cramer-processwire-cms-founder-and-lead-developer/

    Here are the interesting bits for this particular topic:

    Quote

    I started RCD (Ryan Cramer Design, LLC) in 2003, and began to focus on a reusable CMS platform, rather than custom coding one for every site I did. Dictator CMS was the result. Around 2007, this evolved to ProcessWire 1.0.

    (...)

    Before deciding on open source, at one point, I thought I should stop putting so much effort towards my own CMS project and just use another like Drupal. So I spent some months with Drupal (and a little less with EE) and couldn’t believe how much of a pain these tools were, and how far behind they seemed.

    (...)

    I don’t have enough experience with MODX to offer any real comparison

    Edit:

    I knew there was another one https://www.cloudways.com/blog/processwire-ryan-cramer-interview/

    • Like 1
    • Thanks 2
  12. how friendly is the processwire community?

    Quote

    The ProcessWire community is generally known for being friendly and helpful. ProcessWire is an open-source content management system (CMS) that is used by developers and web designers to build and manage websites and web-based applications. The community includes a wide range of users, including developers, designers, and site administrators, who are all interested in using and improving the CMS.

    There are several ways to get involved in the ProcessWire community and ask for help or advice. The ProcessWire forums are a good place to ask questions and get answers from other users. The ProcessWire documentation is also a helpful resource, with detailed guides and tutorials on using the CMS.

    In addition, the ProcessWire community is active on social media platforms such as Twitter and Facebook, where users can share news, ask questions, and connect with other users. There are also several ProcessWire meetups and conferences held around the world, which provide an opportunity for users to connect in person and learn more about the CMS.

    Overall, the ProcessWire community is a supportive and welcoming group of users who are passionate about the CMS and are willing to help others get the most out of it.

     

    • Like 5
    • Thanks 1
    • Haha 1
×
×
  • Create New...