oma

Members
  • Content Count

    557
  • Joined

  • Last visited

Community Reputation

60 Excellent

About oma

  • Rank
    Hero Member

Profile Information

  • Gender
    Not Telling

Recent Profile Visitors

4,320 profile views
  1. Thanks for your reply @rafaoski – much appreciated. I guess if I wanted the client to update this the only way would be CMS fields, right? EDIT: I had a look at Functional Fields (and this is what I remembered reading about) but I cannot see the benefit of just creating a normal text field, especially if you have to create a field anyway? Probably missing the point entirely.
  2. I’m sure there was a PW Weekly or blog post recently about best practice for static word translations in your code for multi-language sites (for things like ‘Read more’ or ‘Submit’ etc) but I cannot find it anywhere... Have I made this up?
  3. oma

    Is there any way I can find out more about the error?
  4. oma

    It works on my dev server and locally so could it be that something isn't enabled? Thing is if I try to get a feed from say The Guardian, it works. I'm stuck.
  5. oma

    Thanks, Robin. Must be the forum. See screenshot of what I entered into the console too to check and still get the same error. Weird
  6. oma

    Not sure why it's showing that. This is my code which was working before it forced https (I changed http to https in the load). $imRss = $modules->get('MarkupLoadRSS'); $imRss->limit = 1; $imRss->cache = 3600; $imRss->load("https://insidemodernism.co.uk/feed/"); bd($imRss);
  7. oma

    Hi folks. Does this work over https? A few sites I was pulling the latest RSS feed from, since going to https, now no longer works. I've bar dumped it and it states: error protected => "Unable to load RSS feed at https://insidemodernism.co.uk/feed/: error protected => "Unable to load RSS feed at https://insidemodernism.co.uk/feed/: Any thoughts?
  8. Yes this worked perfectly. I overlooked thinking to use str_replace. Much appreciated!
  9. Apologies if this has been asked before but couldn't find anything... I have a simple tag system set up, which uses an overview template. At the top of my template is as follows: if ($input->get("tags")) { // If GET ?tags= exists... $currentTags = $input->get("tags"); $currentTags = $sanitizer->text($currentTags); $products->filter("stock_detail_tags.name=$currentTags"); // Filter products by the tags $pageTitle = str_replace('|', ' > ', $currentTags); if (!count($products)) throw new Wire404Exception(); // If no returned data then return 404 } The issue is my URL for if someone selects a furniture tag is /stock/?tags=furniture|mirrors which will return pages that have either the furniture or mirrors tag. What I need to do is amend this so it'll only return pages that have both furniture and mirrors tags. I understand what I need to do (use the AND selector) but I'm a little unsure in this setup whether I should be changing the URL or the code?
  10. oma

    Good to know I'm on the right track... and it's doing what I need I think I definitely need to learn more about having output formatting though... always confuses me.
  11. Aha! This looks gooood. Thanks!
  12. This looks like just the ticket and good to learn about this. Much appreciated. I'll give it a whirl and let you know how I get on.
  13. Upon further testing it doesn't look like you can inject styles using the str_replace without using Page::render, but when using Page::render you cannot check $user or $page->template so I think I'm at a bit of a loss...
  14. I'm wanting to add in some styles (to "hacky" hide the buttons on a RepeaterMatrix field) on pages using a specific template. I've done this a lot with adding new rows to repeaters etc and the message below appears but I cannot seem to get it to add in the <style></style> using string replace. Any thoughts? function eSubmissionStyles($event) { $page = $event->arguments(0); if ($page->template->name == 'events-detail') { // What's On detail $event->return = str_replace("</head>", "<style>html{background:red;}</style>\n</head>", $event->return); wire()->message('this message works above the above doesn't seem to do anything'); } } if ($user->hasRole('e-submission')) { // Ony required for 'e-submissions' //$wire->addHookAfter("Pages::save", null, "eSubmissionStyles"); // I've tried this as well to no avail $wire->addHookAfter("Page::render", null, "eSubmissionStyles"); }
  15. oma

    I'm guessing this does what I think it does? I ran into a problem where I needed to hide a field to a certain user role (and needed to remove it from 'guest') it then disappeared from the front end. I'm guessing this little toggle allows it still to work on the front end but hide it from the backend? If so this is a GOD SEND of a feature.