Skip to content

Adding reputation

Solved Customisation


1/17

20 Jul 2023, 22:47



Related Topics
  • 0 Votes
    2 Posts
    94 Views
    @DownPW Technically, it should be possible with the addition of the below Toolbar: { display: { left: ["infobar"], middle: [ "zoomIn", "zoomOut", "toggle1to1", "rotateCCW", "rotateCW", "flipX", "flipY", ], right: ["slideshow", "thumbs", "close"], }, }, Meaning your code block becomes function fancybox() { if (top.location.pathname !== '/login') { $(document).ready(function() { $('a').not('.forum-logo').not(".avatar").not(".emoji").not(".bmac-noanimate").each(function() { $('a[href*=".jpg"], a[href*=".jpeg"], a[href*=".png"], a[href*=".gif"], a[href*=".webp"], a[href*=".svg"]').addClass("noanimate"); }); }); Fancybox.bind( 'a[href*=".jpg"], a[href*=".jpeg"], a[href*=".png"], a[href*=".gif"], a[href*=".webp"], a[href*=".svg"]', { Toolbar: { display: { left: ["infobar"], middle: [ "zoomIn", "zoomOut", "toggle1to1", "rotateCCW", "rotateCW", "flipX", "flipY", ], right: ["slideshow", "thumbs", "close"], }, }, } ); } } Note, that you just need to add/remove the elements in the toolbar you do not need. Obviously, zoomIn and zoomOut are the ones you are specifically interested in. However, if Fancybox detects that the image has already been zoomed as far as possible, then this will not work. You’d need an external library such as zoom.js to add this functionality, or perhaps simpler https://www.jacklmoore.com/zoom/ A good example of how you’d make these two independent libraries work together is below https://codepen.io/ezra_siton/pen/VgrjKw It’s worth nothing that this specific code is based on Fancybox 3, so may need to be refactored to work with the latest version 5.
  • 14 Votes
    17 Posts
    399 Views
    No problem dude ! I hope you have a good vacation. Enjoy your loved ones!
  • Sudonix and fediverse

    Solved Customisation 17 Aug 2024, 13:04
    4 Votes
    16 Posts
    371 Views
    @Panda said in Sudonix and fediverse: Federation will have huge advantages, especially for starting off forums that would otherwise be quiet, because it can bring in posts from similar sites to increase content. Can’t say I agree with this statement. To me, if I visit a new forum, I’d much rather be viewing original content rather than that which I can easily consume elsewhere. I understand that new forums are often empty with not much content, but the growth needs to be organic rather than ingested from elsewhere to make it look busy. Using RSS feeds to pull in content from remote sites is fine as long as you use it for reading reference and create a discussion around the topic you are referring to (as I do with Sudonix), but absolutely pointless if you include the entire article and all associated responses - you may as well just visit the origin site instead. Another issue is SEO and the impact duplicated content will have on your own forum when it comes to Google indexing your site. Duplicated content negatively impacts SEO and in addition, that same content may be proprietary meaning you need permission to include it on your site. Potentially, it’s a legal minefield which should be treated with trepidation to ensure no copyright infringement takes place.
  • 3 Votes
    6 Posts
    693 Views
    @kadir-ay-0 marking as resolved based on https://community.nodebb.org/topic/17109/manual-build-a-night-mode-for-harmony/5 Please do not raise requests in two places - here and the NodeBB forums. All this does is create unnecessary load for both parties.
  • 25 Votes
    27 Posts
    2k Views
    @crazycells it is, yes - I think I’ll leave it as there is no specific PWA CSS classes I know of. Well, you could use something like the below, but this means multiple CSS files for different operating systems. /** * Determine the mobile operating system. * This function returns one of 'iOS', 'Android', 'Windows Phone', or 'unknown'. * * @returns {String} */ function getMobileOperatingSystem() { var userAgent = navigator.userAgent || navigator.vendor || window.opera; // Windows Phone must come first because its UA also contains "Android" if (/windows phone/i.test(userAgent)) { return "Windows Phone"; } if (/android/i.test(userAgent)) { return "Android"; } if (/iPad|iPhone|iPod/.test(userAgent) && !window.MSStream) { return "iOS"; } return "unknown"; // return “Android” - one should either handle the unknown or fallback to a specific platform, let’s say Android } Once you’re in that rabbit hole, it’s impossible to get out of it.
  • 1 Votes
    4 Posts
    343 Views
    @Vijay-Kumavat-0 I think you’d be better off customising the plugin above to be honest. It seems like you’d be reinventing the wheel otherwise. I’d modify /nodebb/node_modules/nodebb-rewards-essentials/lib/conditions.js /nodebb/node_modules/nodebb-rewards-essentials/lib/rewards.js These seem to be the two files that control what is in the dropdown lists.
  • 1 Votes
    4 Posts
    617 Views
    @eeeee if you’re using the console, you could try node app.js > app.log 2>&1 This would redirect stdout to a file named app.log and redirect stderr to stdout. I’m not sure about standard logging under NodeBB, but there is an error log located at logs/error.log. Failing that, you could always stop the NodeBB service then use ./nodebb dev from the console which would then provide debug output.
  • 5 Votes
    9 Posts
    1k Views
    is there any way to see whose reputation is changed by this plugin?