Jump to content

Macrura

PW-Moderators
  • Posts

    2,780
  • Joined

  • Last visited

  • Days Won

    41

Everything posted by Macrura

  1. I'm guessing php version, i will probably need to either change the code to make it work for earlier PHP versions; all of my hosting is now > 5.4. What php version are you on?
  2. It is definitely managed by OG tags - if you have the correct meta then FB will use your specified OG image, otherwise it will search for and use the first image. here is an example <meta property='og:title' content='###' /> <meta property='og:type' content='website' /> <meta property='og:site_name' content='###' /> <meta property='og:locale' content='en_US' /> <meta property='og:url' content='http://www.website.com/' /> <meta property='og:description' content='###' /> <meta property='og:image' content='http://www.website.com/site/assets/files/####/image.1200x630.jpg' /> <meta property='og:image:url' content='http://www.website.com/site/assets/files/####/image.1200x630.jpg' /> <meta property='og:image:type' content='jpg' /> <meta property='og:image:width' content='1200' /> <meta property='og:image:height' content='630' />
  3. Maybe consider using a javascript select such as Selectize.js; you could init those fields and let selectize get the options from a custom js array... that's probably the only way to make an icon select in a column of table without actually making it a page select or options; Plus you could actually show the icon when using a select and store the class as the value; when rendering i don't think you'd need bother with hanna code, you could just output the icon.
  4. ok fixed - hopefully this example can work for your scenario...
  5. you have to find the repeater events for the month, so you first have to apply a runtime property to each repeater event for the the month... $newsletterrepeater = $thispage->newsletterrepeater; $months = array(); foreach($newsletterrepeater as $n) { $months[] = date("m",$n->getUnformatted("newsletterdate")); $n->month = date("m", $n->getUnformatted("newsletterdate")); } $months = array_unique($months); rsort($months); foreach($months as $m) { $monthName = date('F', mktime(0, 0, 0, $m, 10)); $monthNews = $newsletterrepeater->find("month=$m"); echo '<table><tr><th colspan="3">'.$monthName.'</th></tr>'; foreach ($monthNews as $archivenews) { echo '<tr><td>'.$archivenews->newsletterdate.'</td>'; echo '<td>'.$archivenews->newslettertitle.'</td>'; echo '<td><a href="'.$archivenews->newsletterlink->url.'">View File</a></td>'; } }
  6. you can group by months by creating an array of all the used months: $months = array(); foreach ($newsletterrepeater as $item) { $months[]= date("m", $item->getUnformatted("date")); } $months = array_unique($months); rsort($months); to get your month name you can do something like this: $dateObj = DateTime::createFromFormat('!m', $month); $monthName = $dateObj->format('F'); but you probably need to do 2 loops where you do the years first and then the months within the years..
  7. yes i would do piwik in a subdomain
  8. that is really cool - hopefully others find it useful also; i was able to create a 'restricted' role with that permission, and add it to selected superadmins on the project, and now they have a much smaller, restricted set of tracy items – working great! thanks as always!
  9. right - ok thanks, sure - yes, a per-superuser permission is best, to limit the panels, or none at all (sorry for being dense, doing like 10 things at once here..)
  10. When i posted that, i hadn't registered that you made the user bar; I haven't used the module config for this enough to be able to give a coherent answer about the panels but will study and return with more comments.. Hopefully i set this up right – i created a new permission called tracy-debugger-superuser, then i created a new role called 'developer' and then added that permission to that role; so now only people with the developer role should be able to see the tracy debug bar (?)
  11. checking this out now, so the new user bar solves this i think..
  12. no, i don't think i ever mentioned it; it's just sort of a part of this ad-hoc sub-framework i use for developing sites..., and came into being way before Tracy was born... I do use it extensively since it would show for non superadmin under circumstances where Tracy might be confusing; this one is super simple and just shows a handful of links to the site editors/managers.. on the next project, i am going to pursue using Tracy instead of this, and i'll post back here in terms of how it works out with using the php code...
  13. wow, that officially makes my custom admin bar obsolete... would probably just put a function call there and then hook into that function on a template-by-template basis (e.g. some templates need specific links - if there is a feed, then i put a feed validator, if there is schema, i put a structured data test... )
  14. no pick a template - the repeater field itself becomes the sub-fieldgroup ('template"); you probably just need to use ACF to do some CSS and JS adjustments to disable/hide the "add new item"
  15. @giannisok thanks for this post! though we probably need to move your post to it's own thread, as this topic is for the Module by @justb3a
  16. I think what you are proposing might be doable now with a repeater field, somehow set to a maximum of 1 item... seem to recall this being discussed not too long ago... i do agree that if you did have some common set of fields you wanted on a lot of templates, there could be some way of improving things to allow for it. One example that comes to mind is that on almost all recent projects I have done, we have had a set of fields that allow users to flag pages (with stuff like statuses/issues) and these fields include around 3-4 fields that all need to be on the template and have certain conditional visibility settings common to them. I do recall that it was a pain to add those same fields to all of the templates that needed them...
  17. @adrian quick question - is it possible have Tracy active only for only select users, or limit by IP? The current behavior is that tracy is active for all logged in users, unless you specify the IP but the IP only prevents non superadmins, seems to be always active for all superadmins..
  18. ok - any other info on that error - line # or anything - it is probably something about you need to set the theme... i will see about fixing it asap
  19. it should be functionally equivalent to product_images->find('tags=prod') would need to see full code you are using to assist further, as well as the exact error message; this might also be helpful: https://processwire.com/api/ref/pagefiles/find-tag/
  20. ok b/c you used getTag which only gets the first, have you tried findTag yet (returns WireArray)
  21. you might try using Tracy debugger, this way you can bd($str) inside the function when viewing the frontend and see what's going on there.
  22. one problem with this is that i think you wanted to use findTag('prod')->getRandom() (?)
  23. wow, that's awesome, i can't imagine how many places i could have really used that in the past year...dude i gotta go back and revisit a lot of template editor setups if this is true... are you sure this works!
  24. See https://processwire.com/api/selectors/inputfield-dependencies/#limitations
  25. ok - sure, I can add CSS to help this issue - i will try adding overflow: hidden to the UL and update the module (might not get to it till Sept. as i'm away at the moment...)
×
×
  • Create New...