It presents an invalid cert, and then gives you a 404 error.
Interestingly http://www.thedailywtf.com (without HTTPS) and http{,s}://thedailywtf.com all works.
It presents an invalid cert, and then gives you a 404 error.
Interestingly http://www.thedailywtf.com (without HTTPS) and http{,s}://thedailywtf.com all works.
So, while fixing the forum today, I found this bit of code:
def self.markdown(text, opts = {})
# we use the exact same markdown converter as the client
# TODO: use the same extensions on both client and server (in particular the template for mentions)
baked = nil
text = text || ""
protect do
context = v8
custom_emoji = {}
Emoji.custom.map { |e| custom_emoji[e.name] = e.url }
buffer = +<<~JS
__optInput = {};
__optInput.siteSettings = #{SiteSetting.client_settings_json};
#{"__optInput.disableEmojis = true" if opts[:disable_emojis]}
__paths = #{paths_json};
__optInput.getURL = __getURL;
#{"__optInput.features = #{opts[:features].to_json};" if opts[:features]}
__optInput.getCurrentUser = __getCurrentUser;
__optInput.lookupAvatar = __lookupAvatar;
__optInput.lookupPrimaryUserGroup = __lookupPrimaryUserGroup;
__optInput.formatUsername = __formatUsername;
__optInput.getTopicInfo = __getTopicInfo;
__optInput.categoryHashtagLookup = __categoryLookup;
__optInput.customEmoji = #{custom_emoji.to_json};
__optInput.emojiUnicodeReplacer = __emojiUnicodeReplacer;
__optInput.lookupUploadUrls = __lookupUploadUrls;
__optInput.censoredRegexp = #{WordWatcher.word_matcher_regexp(:censor)&.source.to_json};
JS
if opts[:topicId]
buffer << "__optInput.topicId = #{opts[:topicId].to_i};\n"
end
if opts[:user_id]
buffer << "__optInput.userId = #{opts[:user_id].to_i};\n"
end
buffer << "__textOptions = __buildOptions(__optInput);\n"
buffer << ("__pt = new __PrettyText(__textOptions);")
# Be careful disabling sanitization. We allow for custom emails
if opts[:sanitize] == false
buffer << ('__pt.disableSanitizer();')
end
opts = context.eval(buffer)
DiscourseEvent.trigger(:markdown_context, context)
baked = context.eval("__pt.cook(#{text.inspect})")
end
baked
end
Is this a good WTF material?
@sockpuppet7 Thanks! A FOSS solution would be best, but if I need to pay, it better installs itself.
Also I'd prefer a somewhat 'modern' interface, if you know what I mean. I personally couldn't care less, but that seems to be what the forum admins want.
Yeah... I guess my real question is, how is your experience with the popular software these days. Like NodeBB (which powers this forum), Flarum, BBPress and so on.
Hello,
I've recently been handed a forum using the software mentioned in my username, and while attempting to manage it, my hair has turned white, my parents divorced and now I'm infected with coronavirus.
Could anyone suggest a forum software that is at least somewhat stable, easy to deploy, and rather customisable with a sane plugin architecture. I don't mind doing custom developments, I just don't want to watch my life passing by while it constantly rebuilds itself.
Thanks