Steve Grant_189967
Clients-
Posts
19 -
Joined
-
Last visited
Steve Grant_189967's Achievements
-
konon reacted to a post in a topic: Limit JS script loading to specific usergroups
-
(please ignore similar message on different user, I thought I was logged in with this one and couldn't then delete the post) I've just done the update to version 4.7.4, which obviously necessitated the update of PHP to version 8. Along with that, the PECL Redis library needed rebuilding. Everything seemed to go smoothly, but I'm now getting a red error message telling me the cache is not working: I tried re-saving the cache settings, which removed a similar message related to the data storage, but that hasn't changed the situation with the caching. However, on the "Get Support" page which shows all the different components and their status with any potential issues, I get this: Which seems to suggest everything is in order with the cache. So what should I do in this situation? They can't both be correct...
-
SeNioR- reacted to a post in a topic: Limit JS script loading to specific usergroups
-
Ah, so I'm getting an error saying there's an error in template includeJS which may be out of date, so I'm guessing $member isn't available there. But if I try isolating just the guests: <!-- Ad Testing --> {{if !\IPS\Member::loggedIn()}} <script type="text/javascript" src="script.js"></script> {{endif}} <!-- End Ad Testing --> So my logic is if the member is NOT logged in, allow the <script> tag to be included. That doesn't work - all I see is the comments wrapped around the if statement.
-
One feature of my site is that there is limited free access to anybody who wishes to have it, but for unlimited access there is an annual subscription payable. For the "free" users (including guests), the tradeoff is that they are served adverts. I would like to ensure that the JavaScript file(s) that are loaded for the adverts are not even in the output HTML code for paid subscribers. For example: {{some template code to say "if user is not in Administrators, Moderators or Paid Subscribers groups, output this line"}} <script type="text/javascript" src="/some/path/to.js"></script> {{endif}} How would I achieve this?
-
Steve Grant_189967 reacted to a post in a topic: Word Filter - Rebuild Posts/Content
-
My site has millions of posts going back 16 years, that isn't a viable option for me. Surely a word filter should be applied on the display of the word, not on the process of saving it to the database - what if a filter was deleted as it was deemed unnecessary? Any prior posts with that filter applied would not have the post reverted. The data is the post that someone has saved, that should not be altered in the database. If the site administrator wants to change how words within that data are displayed, then the filtering should be done at the post-display level.
-
I've recently started using the word filter to try to filter out some occasional bad language being used by members - I don't especially mind the language too much, it's used in reasonable context most of the time, but Google AdSense takes a very different view! - but having made a change, I don't see that change being reflected in posts that have already been made. Is there a background process that needs to run in order for this to work on posts previously made?
-
PurplePixel reacted to a post in a topic: Allow Conversion process to take place via CLI
-
Using SendGrid Free Plan for Bulk Mails
Steve Grant_189967 replied to evcom's topic in Classic self-hosted technical help
Even the entry-level paid plan for SendGrid places you in shared IP pools, so you still run a high risk of being blocked from Microsoft's email servers. You need to upgrade to their Pro plan (starting at $89.95 a month) to get access to a dedicated IP address where you would be in complete control of your own spam score. My site is hosted on AWS, so I use their SES setup, which seems to do the job pretty well. The main downside is the reporting on opens, bounces, etc, is rubbish, but there are ways around it, albeit those ways are a bit fiddly and time-consuming. -
sobrenome reacted to a post in a topic: Multiple servers behind load balancer
-
It's written in Node.js 12.x exports.handler = __f0; function __f1(__0, __1, __2, __3) { return (function() { with({ }) { return function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } return new (P || (P = Promise))(function (resolve, reject) { function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; } }).apply(undefined, undefined).apply(this, arguments); } function __getTaskUrl(__0) { return (function() { with({ __awaiter: __f1, axios_1: require("axios/index.js"), getTaskUrl: __getTaskUrl }) { return function /*getTaskUrl*/(url) { return __awaiter(this, void 0, void 0, function* () { try { const response = yield axios_1.default.get(url); console.log(response); } catch (error) { console.error(error); throw (error); } }); }; } }).apply(undefined, undefined).apply(this, arguments); } function __f0(__0) { return (function() { with({ __awaiter: __f1, getTaskUrl: __getTaskUrl, url: "https://###SITE_URL###/applications/core/interface/task/web.php?key=680cb24a3d18c05c1d5d35e169cb9a4a" }) { return (event) => __awaiter(void 0, void 0, void 0, function* () { console.log('getting url'); yield getTaskUrl(url); console.log('exiting...'); }); } }).apply(undefined, undefined).apply(this, arguments); } I should also add that I've since reverted back to using cron. While if you're running multiple instances there is a risk of encountering a race condition with the cron running on multiple servers simultaneously, I've found that my site currently hasn't needed to use the autoscaling capability - generally getting average CPU usage of about 20%. My bottleneck is the database, the schema is baffling, to be honest - using InnoDB as it's best for relational tables and yet using denormalised tables 🤔
-
sobrenome reacted to a post in a topic: Multiple servers behind load balancer
-
sobrenome reacted to a post in a topic: Multiple servers behind load balancer