SamC

Members
  • Content count

    229
  • Joined

  • Last visited

Community Reputation

129 Excellent

About SamC

  • Rank
    Sr. Member

Profile Information

  • Gender
  • Location
    Surrey, UK

Recent Profile Visitors

512 profile views
  1. I've been hard working on JavaScript and things are finally starting to fall into place. I've missed the PW forum though so I thought I'd swing by and share this. Kept me amused for awhile, enjoy
  2. Can I add to this, in case anyone is using an RME babyface and linux, and has no sound. The solution for me was to boot into linux, unplug the USB from the babyface, plug it back in whilst holding down select and recall buttons. This puts the device into class compliant mode, which can then be seen in (in my case) Ubuntu Budgie. I'm on linux right now, with sound!
  3. Thanks @lecrackffm I bought this course a while ago on a deal for about £10, only about halfway through but so far it's been excellent Working through another one at the moment but definitely going back to the weird parts afterwards!
  4. Nice, thanks @lecrackffm I'm still learning vanilla JS and think these will be great for me. It's been a LONG journey for me to get into it but I think I'm finally making headway, getting deeper into objects, closures etc. moving onto prototype next. I think it's fair to say I'm as good as the amount of effort I've put in. Doing about an hour a day now, really need my JS to be as good as my CSS/HTML to be a much better all rounder. PHP is something I'm not brilliant with either but I can live with that thanks to the PW API
  5. This looks really interesting. Thanks @LostKobrakai for sharing.
  6. Thanks @rick I always like to read how other people approach a problem as it gives me more options when said problem becomes one of mine!
  7. How did I miss this? Here's me logging into cpanel > phpmyadmin > export DB > unchecking cache data... blaaaaaaah! Must give this a try. Thanks @Ivan Gretsky.
  8. @rick I forgot to ask, how do you handle '/home/policy/'? Does 'policy' have a template file to match the one set in the admin? I set '/misc/' to published but hidden so this page throws a 404. I have no template file for my 'misc-pages' template. All that was supposed to be for was a parent for listing child pages. i.e. I have: /misc/faq/ /misc/privacy-policy/ /misc/cookie-policy/ /misc/terms-and-conditions/ ...with templates set up like this: /misc-pages/basic-page/ If that makes sense.
  9. Well played sir!
  10. Ah, I see, thanks for the help
  11. Thanks @Zeka Ok, so the reveal shows, but the hide button doesn't seem to toggle the class now. Think I need to dig in at what closest & siblings are doing here. I updated the pen to show what I'm talking about.
  12. I'm still learning vanilla JS at the moment but trying out a bit of jQuery here and there. This has me stumped though: I don't know how to target only the element that's clicked on. Of course, when clicking now, both overlays pop up because a class 'show' is added to any element with class 'card-reveal' i.e. to both of them. Probably pretty simple for someone with more experience but I'm finding this awkward to search for a solution online. Any help is appreciated, thanks.
  13. This works as expected: /** * mystyles.js */ CKEDITOR.stylesSet.add( 'customstyles', [ { name: 'Generic List', element: 'ul', attributes: { 'class': 'generic-list'} }, { name: 'Inline Code', element: 'code' }, { name: 'Inline Quotation', element: 'q' }, { name: 'Left Aligned Photo', element: 'img', attributes: { 'class': 'align_left' } }, { name: 'Right Aligned Photo', element: 'img', attributes: { 'class': 'align_right' } }, { name: 'Centered Photo', element: 'img', attributes: { 'class': 'align_center' } }, { name: 'Small', element: 'small' }, { name: 'Deleted Text', element: 'del' }, { name: 'Cited Work', element: 'cite' } ] ); Just didn't use 'mystyles'... Still don't know why the 'mystyles' didn't work, but I can live with this https://github.com/ryancramerdesign/ProcessWire/blob/dev/wire/modules/Inputfield/InputfieldCKEditor/README.md#custom-editor-js-styles-set "The term mystyles is just something we made up, and you may use whatever keyword you like (as long as it's not mystyles!), but note you will have to use that same keyword in the file itself. In our example below, you will see where we used the term mystyles again. If you want to keep things simple, then just stick with using mystyles."
  14. That's it. Personally, after using Drupal, then Wordpress, I find it very liberating not having to set up predefined 'regions' or any of that stuff. I create the fields, populate them, then they go where I want them to go by simply sticking them in a template, job done. Craft CMS is very similar to this approach but has a price tag with it per site that led me to PW. Glad I did though, try it out, you might like it. Absolutely
  15. It's not working again now for some reason. I tried something out, I deleted everything in: /wire/modules/Inputfield/InputfieldCKEditor/mystyles.js ...but left the file there. Now when I go to the body field, my styles dropdown is empty even though I have my custom styles in: /site/modules/InputfieldCKEditor/mystyles.js ...like so: // mystyles.js CKEDITOR.stylesSet.add( 'mystyles', [ { name: 'Generic List', element: 'ul', attributes: { 'class': 'generic-list'} }, { name: 'Inline Code', element: 'code' }, { name: 'Inline Quotation', element: 'q' }, { name: 'Left Aligned Photo', element: 'img', attributes: { 'class': 'align_left' } }, { name: 'Right Aligned Photo', element: 'img', attributes: { 'class': 'align_right' } }, { name: 'Centered Photo', element: 'img', attributes: { 'class': 'align_center' } }, { name: 'Small', element: 'small' }, { name: 'Deleted Text', element: 'del' }, { name: 'Cited Work', element: 'cite' } ] ); I thought maybe a typo but I can't see anything wrong with it. Something is not right here, my file is not being used. Viewing the source on the edit page shows me this: "InputfieldCKEditor_body": { "baseHref": "/", "contentsCss": "/wire/modules/Inputfield/InputfieldCKEditor/contents.css", "extraAllowedContent": "", "extraPlugins": "pwimage,pwlink,sourcedialog", "removePlugins": "image,magicline", "toolbar": [ [ "Format", "Styles", "-", "Bold", "Italic", "-", "RemoveFormat" ], [ "NumberedList", "BulletedList", "-", "Blockquote" ], [ "PWLink", "Unlink", "Anchor" ], [ "PWImage", "Table", "HorizontalRule", "SpecialChar" ], [ "PasteText", "PasteFromWord" ], [ "Scayt", "-", "Sourcedialog" ] ], "format_tags": "p;h1;h2;h3;h4;h5;h6;pre;address", "language": "en", "entities": false, "height": "20em", "stylesSet": "mystyles:/site/modules/InputfieldCKEditor/mystyles.js?nc=1495895634", // << yes, that's my file, so where are my styles? "customConfig": "/site/modules/InputfieldCKEditor/config-body.js?nc=1474392859" }, Anyone else having problems with this? Thanks for any advice. ==EDIT== After a fair bit of testing, changes in the styles dropdown only happen when I edit mystyles.js in the /wire/modules/Inputfield/InputfieldCKEditor/ folder. My custom styles are ignored by the system. Do I have the correct path in my body field? This is on a subdomain, dev.mysite.com, but the relative path should be the same.