Jump to content

Macrura

PW-Moderators
  • Posts

    2,770
  • Joined

  • Last visited

  • Days Won

    40

Everything posted by Macrura

  1. @MarcoPLY, I've never tried the media={media} parameter; But in general the way this works is you have to have the correct markup on the page itself, meaning valid og tags and twitter card in the header. Maybe you already know this and are trying to override, but if not.... <meta property='og:image' content='bsolute/link/to/image.jpg' /> <meta property='og:image:url' content='absolute/link/to/image.jpg' /> <meta property='og:image:type' content='png' /> <meta property='og:image:width' content='1200' /> <meta property='og:image:height' content='630' /> <meta name='twitter:card' content='summary_large_image' /> <meta name='twitter:site' content='your-twitter-handle' /> <meta name='twitter:title' content='Page Title' /> <meta name='twitter:description' content='Some description' /> <meta name='twitter:creator' content='your-twitter-handle' /> <meta name='twitter:image:src' content='absolute/link/to/image.jpg' />
  2. it's really pretty easy, just get a json array of the data and use DataTables to output the data.. the DataTables documentation is good enough to get you going, should you decide to try it out..
  3. $date->getUnformatted("date") that method is only going o work for a field, like $page->getUnformatted("field")'
  4. you can just pass the path of the page that handles the segments; if you are on the page, then $page is what you want. how can the system know which part of the URL is the segment? The whole point of URL segments is that they are not real pages, so there is no way to "look them up".
  5. you can also just return $this->halt() at the end of your ajax template... (similar to exit as @kongondo posted but possibly a tad more elegant ( https://processwire.com/blog/posts/processwire-2.6.8-brings-new-version-of-reno-admin-theme-and-more/#new-this-gt-halt-method-for-use-in-template-files )
  6. yep, and if you are doing any custom routing, you can write your own function to get the real page, my theme engine module includes a getVirtualPage() method that can find real pages based on conditions of the segment(s), which templates exist at each segment level, using name matching combined with template; this doesnt help if you are rendering real virtual pages like tag, category or archive filters, or feeds etc. /** * Given an array of expected templates used at each segment index, return the page we are on * @param array $segmentTpls [plain array of template names used for segments] * @return [Page] */ public function getVirtualPage(array $segmentTpls) { $pages = wire('pages'); $sanitizer = wire('sanitizer'); $input = wire('input'); $maxSegs = count($segmentTpls); $segsCount = count($input->urlSegments); if($segsCount > $maxSegs) return false; if($segsCount) { $lastSeg = $input->urlSegments[$segsCount]; $segPlate = $segmentTpls[$segsCount - 1]; $pageName = $sanitizer->pageName($lastSeg); $vPage = $pages->get("template=$segPlate, name=$pageName"); return $vPage; } }
  7. i do this with selectize, or with some js that updates the selected opt; requires an extended input with data attr for img src
  8. @manuel1981 not sure if this would solve your problem, but i have a 3.x site that uses this module, and i do know that I changed line 389 https://github.com/Da-Fecto/TextformatterImageInterceptor/blob/master/TextformatterImageInterceptor.module#L389 from $class['align'] . " " to this: isset($class['align']) ? $class['align'] . " " : '', i'm not sure if that would be the cause of an error, but i was getting tracy log errors with this module before i changed it. Also, speaking of Tracy, you should have that installed so you can detect what if any errors this module may be generating in your setup...
  9. The ProcessDashboards module which is the latest iteration of this is back to being a simple helper module, close to the original Dashboard module by @Pete, but with some additional features, and that the module no longer changes anything in the admin, meaning that it doesn't auto-change the admin page to use the process; instead you create one or more dashboards, and input the path to a php file to render the dashboard; if you want to use one of them as the admin home screen, then you just change that admin page's process to use this module (ProcessDashboards). Since making dashboards is fundamentally creating markup, it is better to keep all of the files for the dashboard in the templates folder. Also, if there were to be any dashboard module that output markup, it could become difficult to support multiple admin themes. Users of UIKit theme could build a simple dashboard using all native UIKit markup and not have to include a css framework (as i have done for the examples, which run inside the reno theme). Since this type of setup is not really suitable for a standalone module, or a site profile, i see it more as a construction kit. You need the base module; if you want to use the shortcuts and widgets functionality, there is another module that installs all of the fields & templates for that setup; You need the files that generate the dashboard(s) and the widgets that go in the templates folder, including css/js, libraries, widget partials, and functions. Hopefully this can all be on GitHub soon, once i sort out some issues with my current dev computer (old os no longer being able to connect to github)...
  10. Haven't used it directly in a while, but it is live and running on at least 3 sites and haven't had any troubles with those.
  11. @neosin pls use jumplinks or see @kixe‘s fork above
  12. @Peter Falkenberg Brown are you sure you don't have it improperly configured? The only way to get the module to output the XSL stylesheet would be if you set that in the module config. You shouldn't have to comment out any code. this is the config setting: https://github.com/ryancramerdesign/ProcessWire/blob/master/wire/modules/Markup/MarkupRSS.module#L258 this line means it would only output XSL if you entered the path to that stylesheet in your settings: https://github.com/ryancramerdesign/ProcessWire/blob/master/wire/modules/Markup/MarkupRSS.module#L90
  13. i have a request in also to add hook to UI Kit theme, especially for being able to manipulate css files; i was able to sort out my issue (FontAwesomePro module) using another way, but i do think it is important to add api hooks in key/strategic areas on the admin themes, for customization. https://github.com/processwire/processwire-requests/issues/120
  14. not sure if it is still the case but used to have to use first as a function, like $image = $child->images->first(); $out .= "<img src='{$image->width(500)}'>";
  15. Do love me some input masks – one benefit could be using less fields, e.g. not needing a separate area code field for a phone, or enforcing consistency in places..
  16. PW can definitely handle it, the API is ideal for this type of data import and updating. If i understand correctly, you'd need to code up an import script to read the CSV records, and create or update your pages... i do a lot of CSV imports when building sites to get data populated from client's spreadsheets. there should be code on the forum for importing CSV files, creating or updating pages...
  17. It has been said here many times that PW is like a dream PHP/MySQL API with a free admin on top. The ProcssWire admin has no explicit connection to the frontend unless you make it so. You could for example have a completely hardcoded HTML frontend page, and an admin that does nothing but serve as a CRM tool. The frontend is completely up to you; You may be confused because it comes with a free/default/demonstration front end, but nobody really uses that frontend. You will see the value of it when you have clients using the CMS for content management (from simple to extremely complex content), which is what the admin is for. If you have clients who will never use the admin, and only the developer, well that is your own unique set of circumstances, and no assumption should be made that everyone else does it this way. Therefore your definition of who is using the CMS admin is making a vast assumption, and you have also made the assumption that the admin is somehow 'behind the scenes' when in reality it can be behind the scenes, or it could be 'the scene'.
  18. You could also just use selector arrays and avoid the mess of that selector string. https://processwire.com/blog/posts/processwire-3.0.13-selector-upgrades-and-new-form-builder-version/#building-a-selector-string-with-user-input-example
  19. I think checkboxes are sometimes confusing to users and replacing them with an on/off switch can go a long way to making it more obvious. For example, a Yes/No button is more obvious/clear than the assumption that "if this is checked it means yes, and if this is not checked it means no"; For example i'm using this library (incorporated and initialized on some checkbox inputs): https://github.com/olance/jQuery-switchButton Here is my initialized checkbox in PW admin: This still doesn't solve the conundrum of where you want to have it checked by default... the checkbox reversed module is a clever way to solve that...other than js to set the checked attrib..
  20. I can see one possible advantage to not extending WireMail – the ability to ad-hoc switch mailing system when you send an api email. For example, some of the emails in one list i'm sending to are being bounced due to the Mailgun server ip address; i can't switch to another wiremail email since Mailgun is extending Wiremail and then wiremail is using Mailgun... if i understand this correctly. With this module, i could just instantiate it and send using it, and avoid any conflicts with WireMail (?)
  21. it may have something to do with output formatting being off; not sure, i haven't worked with language yet. But it would be good to know how to explain to get this to work for multilanguage sites.
  22. Right! my memory must be going... forgot about that...
  23. You may be running into the multilanguage issue that was brought up here: also, are you using the correct inputfield type (e.g. multiple vs single)?
×
×
  • Create New...