This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
121
Features: Miscellaneous / Re: Gravatar support
« on April 25th, 2012, 06:16 PM »It's been around for a very long time really... Heck, my gravatar uses an e-mail address I haven't used in like 8 years...
And anyway: if Wedge outlives Gravatar, we'll release a version that removes them.
If Gravatar outlives Wedge, no problemo :P
122
The Pub / Re: The Cookie Law (in the UK at least)
« on April 25th, 2012, 06:09 PM »
Why they don't make the law require it at the browser level and leave webmasters out of it. The browser can then prompt "This site is requesting to store a cookie, bla bla bal, do you accept." It should be required in browsers, set by default depending on location, with the ability to disable. I would disable it if my browser had something like that, annoying. :lol:
I don't get what the big fuss is about cookies, there are other means of tracking, useless law IMHO.
I don't get what the big fuss is about cookies, there are other means of tracking, useless law IMHO.
123
Features: Miscellaneous / Re: Gravatar support
« on April 24th, 2012, 05:59 PM »
Gravatar sounds like something Gri would say, whatever happened to him/her?
On to the topic though, are you sure remote services that may or may not be there in a few years is a wise choice for a core feature? I understand if you make it as a aftermarket plugin but a core feature, nah.
On to the topic though, are you sure remote services that may or may not be there in a few years is a wise choice for a core feature? I understand if you make it as a aftermarket plugin but a core feature, nah.
124
The Pub / Re: The Cookie Law (in the UK at least)
« on April 24th, 2012, 05:53 PM »Except for the fact that US law makers are in the process of an equivalent Federal statute ....Quote from nend on April 23rd, 2012, 06:10 PM How about us that operate and live in the US and decide to ignore the foreign law. I shouldn't be expected to follow by a law that I am in no way bound by, should I?Ah you're the original author! You created a great modification and, IMHO, the best of its type I found for SMF.Quote *edit, this system also helps reduce server load. Hopefully you didn't disable it, the mod IMHO is useless without this system in place because it can bring your site to a slow down. It is hard to remember everything from back then, lol.
Changing its index.php file was actually very simple - even for a 61 year old non-programmer like me!All I needed to do was to move the loading of Settings.php and Subs-Compat.php up from below session_start(), then load the Cookie checking code. All your basic logic remains as it was before and now what happens is that if the Cookie authorisation Cookie is not detected, the chat application isn't executed. The load checking and balancing code is still there and fully-operative but only, of course, if cookies are authorised.Code: [Select] define('SMF', 1);
// Experimental Optimizer
define('loadOpt', 1);
// Lets go head and load the settings here.
require_once(str_replace('//','/',dirname(__FILE__).'/').'../Settings.php');
// Load SMF's compatibility file for unsupported functions.
if (@version_compare(PHP_VERSION, '5') == -1) {
require_once($sourcedir . '/Subs-Compat.php');
}
//
// Load Emanuele's 'EU Cookie-checker Modification.
require_once($sourcedir . '/Subs-EclWarning.php');
// If the user hasn't accepted cookies, get out! We can not go ahead and load SA-Chat
// because set_session() sets cookies and so potentially does SA-Chat's javascript.
if (!ecl_authorized_cookies())
die();
// Okay, cookies can be set so continue.
session_start();
session_cache_limiter('nocache');
//<-------------------------------------------------------------------------------
// Load the theme
if (isset($_REQUEST['theme']) && !strstr('..', $_REQUEST['theme']) && is_file('./themes/'.$_REQUEST['theme'].'/template.php') && is_file('./themes/'.$_REQUEST['theme'].'/style.css')) {
$themeurl = $boardurl.'/sachat/themes/'.$_REQUEST['theme'];
$themedir = $boarddir.'/sachat/themes/'.$_REQUEST['theme'];
$thjs = 'theme='.$_REQUEST['theme'].'&';
require_once($themedir.'/template.php');
}
125
Off-topic / Re: How to center a div in the middle of the screen
« on April 23rd, 2012, 06:21 PM »Yeah you don't, but it's cleaner to add it because vertical margins don't do anything when you set them to auto. 'margin: auto' might imply 'center horizontally and vertically' ;)
*edit
Well in fact I have seen it done both ways, but this is when your in a container and a height is set for the container you are in. When a height isn't set it then it isn't a problem. :D
126
The Pub / Re: The Cookie Law (in the UK at least)
« on April 23rd, 2012, 06:10 PM »
How about us that operate and live in the US and decide to ignore the foreign law. I shouldn't be expected to follow by a law that I am in no way bound by, should I?Quote from markham on April 22nd, 2012, 03:16 PM Yeah, the vision was lost there, not due to the current developer but due to members requesting SMF related features that I had no interest in that broke compatibility for other systems. The idea of the chat system was to be compatible with various systems. I later on lost interest and gave the project away.
But the system was set up on a basic bridge like system, it checks the SMF cookie and loads the DB within the chat, no SMF required. I don't think that is what is causing the problem though. It uses sessions and cookies to figure out what has been sent to the user or if the user needs to connect to the db. The mod doesn't connect to the db unless it has to. The mod will still work I think if this was disabled but there may be sync issues, messages getting sent more than once or not at all.
*edit, this system also helps reduce server load. Hopefully you didn't disable it, the mod IMHO is useless without this system in place because it can bring your site to a slow down. It is hard to remember everything from back then, lol.
With Emanuele's help (he used some kind of analyser on my site) I discovered that PHPSESSID was being set was because I have SA-Chat installed and, for some strange reason, it has its own index.php file. One of the very first things that happens is that there's a call to start_session(). A simple edit was all it took me to prevent the Mod from loading unless cookies had been authorised.
But the system was set up on a basic bridge like system, it checks the SMF cookie and loads the DB within the chat, no SMF required. I don't think that is what is causing the problem though. It uses sessions and cookies to figure out what has been sent to the user or if the user needs to connect to the db. The mod doesn't connect to the db unless it has to. The mod will still work I think if this was disabled but there may be sync issues, messages getting sent more than once or not at all.
*edit, this system also helps reduce server load. Hopefully you didn't disable it, the mod IMHO is useless without this system in place because it can bring your site to a slow down. It is hard to remember everything from back then, lol.
127
Off-topic / Re: How to center a div in the middle of the screen
« on April 23rd, 2012, 05:51 PM »
I already knew the answer to this one, too late I guess. Also on margins you don't need the 0 in there, just the auto. ;)
128
Features / Re: Things to do before the Mayan apocalypse: membergroups
« on April 20th, 2012, 05:16 PM »- Custom membergroups: this one is harder because it has so many ramifications. I'm going to try and address most of them. So,
1/ Add an id_owner (id_member) field to the membergroups table.
2/ Add an interface for users to create membergroups.
3/ Add more membergroup types. Things like 'hidden' and such are good
4/ Add more membergroup fine-tuning. This is a thing I have in Noisen and am really fond of -- I can determine whether people can see all or part of my friends list. Some of my friends I chose to keep in a 'hidden' state so that they would benefit from being in my friends list, without being visible as one of my friends. Perhaps this could be 'simplified' (for code) into two groups: a regular 'friends' group and a hidden 'friends' group... I'd rather have an extra field for that, though. And it's just an example.
(a) Write some UI for group selection in privacy settings. Not too complicated when it comes to setting privacy from the posting page, but I also want to be able to set privacy on the fly through a select box, like I'm doing on Noisen.com (although it's not a select box there, it's actually a rewrite of the icon selector). The difficulty is not in writing the thing, but in making it so that it's *easy* to understand and use.
(b) And the single most frightening thing for me... Dealing with the aftermath of being able to create membergroups for anything. Basically, from my experience on Noisen, I know that people aren't going to spend their days creating membergroups, but if they end up doing it, it could easily break Wedge if not handled correctly. Do you remember when Facebook had a limit on how many friends you could have? I think it was 5000. It was a lot though, and I doubt any forum would be penalized by having such a high limit on the number of friends. I'm still going to assume that 10k users are going to add Mike42 to at least one of their membergroups, and Mike42 is going to add 10k users to his own 'friends' group (reciprocal friend additions -- that'd be asynchronous in Wedge, i.e. not mandatory, unlike SMF.)
So, we have a members table where the additional_groups field for Mike42 contains 10k comma-separated group IDs... Which probably makes it even impossible to store additional_groups into a TEXT field. (I guess MEDIUMTEXT would do...)
Even then -- it's going to kill performance, whatever we do about it. So we need 3NF for membergroups too. We discussed it at length but, yet, nothing has come of it. I'm getting wary of it, Pete is getting wary of it... I even recently read an old discussion on sm.org where Pete (yes, you Pete :P) actually discussed how 3NF could kill performance if table joins were used everywhere.
Now we have 3 ways of dealing with this... Either we just set a (relatively) low limit on the number of people you can put into a custom membergroup, and/or number of groups you can be put into, in which case I guess staying with the current SMF way of doing things is all right, or we add 3NF and still keep the additional_groups field and up the limit (but not too much), or we do it entirely 3NF and get rid of additional_groups, get rid of any limits and scream at the performance issues later...
I'm not going to get into the meat of things here, because there's a lot of things that this impacts on, but I will take care of the issue relating to 3NF.
There are times and places that normalised data can have performance concerns. (And really, 3NF is tame. Wait until you start dealing with 5NF. :niark:) Like everything else, that is.
Now, a lot of my concern about normalising everything is that you end up generating far more rows in a resultset than you need or you start getting more queries, and for information you're loading at certain times, it's going to get hideous.
I actually have an example in SMF for this: board level moderators. They're stored in their own table, and during the board index gathering query, they're actually pulled via join into the main query. Now, on a forum without any board level moderators, it's not a problem. But if you have one board with 3 moderators, that board is returned three times, once for each moderator, which has to be cleaned up in PHP, and that accounts for some of the overhead attached to the board index stuff (which is, indirectly, one of the reasons the sub-board-of-a-sub-board problem occurs).
In that particular case, I'd almost argue that having board moderators would almost be better handled as a comma-separated value stored inline in the board table, precisely because there aren't many of them in most cases.
Getting back to the concern here, separating out friends to another table will give you the proper asynchronous structure you want. But it means that loading the list of friends up front is not cheap, because it means either overloading the first query where mem.* is loaded (which for any number of friends is non trivial), or we add a new query at that point, or we push it into a cache.
That said, we can consider a few alternatives... where exactly do we need to know and care about whether a given user is a friend of ours? Well, for the users online area in the footer, certainly, but with an asynch table we can actually do a join from *that* query and figure it out that way. For the PM area we can do a query as needed there, and so on.
Like everything else, it's a change, but it can bring other changes to balance it out.
129
Bug reports / Re: Pretty URL remarks
« on April 17th, 2012, 08:27 PM »
On SMF caching I cache 1 file per page, it would be too much of a waste 1 file per URL. I figured there are only going to be a few pages hit often and allot of pages not so often, so I believe it will even itself out using this method.
On to the 404 thing, the forum has always been a Pretty URL forum, so Google or any other search engine does not know the old urls.
However though, I had bad performance when I started but had to work on allot of aspects to get it up to par. The DB cache system though that it had was the worst feature, the board and topic cache in the db was good but the other url cache was just junk.
Sorry I don't know the history of the mod that much. I hardly even stop by SMF though or keep up with the mods they release there. I hate trying other peoples mods also, usually full of bad coding anyways, but I gave a few a try to get a site up and ready fast. Usually after a while I end up make the system incompatible for future updates, don't care though file comparison tools help allot here, maybe more work but worth it to see if there is any valuable code updates. Getting off topic here though... :whistle:
On to the 404 thing, the forum has always been a Pretty URL forum, so Google or any other search engine does not know the old urls.
However though, I had bad performance when I started but had to work on allot of aspects to get it up to par. The DB cache system though that it had was the worst feature, the board and topic cache in the db was good but the other url cache was just junk.
Sorry I don't know the history of the mod that much. I hardly even stop by SMF though or keep up with the mods they release there. I hate trying other peoples mods also, usually full of bad coding anyways, but I gave a few a try to get a site up and ready fast. Usually after a while I end up make the system incompatible for future updates, don't care though file comparison tools help allot here, maybe more work but worth it to see if there is any valuable code updates. Getting off topic here though... :whistle:
130
Bug reports / Re: Pretty URL remarks
« on April 17th, 2012, 04:31 PM »
So no caching?
On Pretty URL's by vb I have done allot of modifications to the code. I have reported some of what I have done to his code back to him hoping it will get implemented. Some does and some doesn't. However I figured it easier to cache url's with SMF caching instead of using the DB. At least this way I can let old data just die, the database option didn't allow for this. Also it will serve as a big performance boost if the page ever becomes the center of attention.
I have also removed index.php from the urls with the mod. Added one little extra rule to the source. Among that I have also added allot of extra rules for other mods.
Separately though I have made all old urls illegal and display a 404 page. I have found through access logs that allot of bots look for say action=, topic= or board= to identify SMF.
On Pretty URL's by vb I have done allot of modifications to the code. I have reported some of what I have done to his code back to him hoping it will get implemented. Some does and some doesn't. However I figured it easier to cache url's with SMF caching instead of using the DB. At least this way I can let old data just die, the database option didn't allow for this. Also it will serve as a big performance boost if the page ever becomes the center of attention.
I have also removed index.php from the urls with the mod. Added one little extra rule to the source. Among that I have also added allot of extra rules for other mods.
Separately though I have made all old urls illegal and display a 404 page. I have found through access logs that allot of bots look for say action=, topic= or board= to identify SMF.
131
Archived fixes / Re: SMF bug 4956 (slash in cache key causes cache to fail)
« on April 17th, 2012, 06:12 AM »
How about convert the string to something that can't possibly be a collision risk and file name safe. I just thought of this while writing this post and ran a test in the middle of the post, bin2hex. From test I am getting real fast speeds from this function, the only problem I forsee though is filename limits.
Maybe key compression of some sort if the key is too long or maybe say a folder structure for long keys where the key can be continued over the span of multiple folders.
Test resultsQuote
Maybe key compression of some sort if the key is too long or maybe say a folder structure for long keys where the key can be continued over the span of multiple folders.
Test results
Carrying out 500000 iterations
String: `something short`
MD5: 0.32972002029419 seconds
SHA1: 0.47672295570374 seconds
B64: 0.17632007598877 seconds
B64/strtr: 0.57628583908081 seconds
B64/str_replace: 0.93950510025024 seconds
bin2hex: 0.16528415679932 seconds
String: `something much much much much much longer that we can use to benchmark these things.`
MD5: 0.42671203613281 seconds
SHA1: 0.69267106056213 seconds
B64: 0.22752213478088 seconds
B64/strtr: 0.70388197898865 seconds
B64/str_replace: 1.0751059055328 seconds
bin2hex: 0.25826096534729 seconds
String: `something impossibly and unrealistically long, after longer than the typical cache key will be but just in case it is worth having an idea of relative performance`
MD5: 0.51122808456421 seconds
SHA1: 0.90426898002625 seconds
B64: 0.30805087089539 seconds
B64/strtr: 0.89947199821472 seconds
B64/str_replace: 1.3907599449158 seconds
bin2hex: 0.33286499977112 seconds
132
Archived fixes / Re: SMF bug 4956 (slash in cache key causes cache to fail)
« on April 16th, 2012, 03:32 AM »
My test results, I added a few on there, it looks like strtr by itself would be allot better. :cool:
PHP 5.3 on grid/cloud hosting.Quote
PHP 5.3 on grid/cloud hosting.
Carrying out 500000 iterations
String: `something short`
MD5: 0.34987902641296 seconds
SHA1: 0.48932695388794 seconds
B64: 0.16412401199341 seconds
B64/sstrtr: 0.57090711593628 seconds
B64/str_replace: 0.92343997955322 seconds
sstrtr: 0.41409516334534 seconds
str_replace: 0.85998892784119 seconds
String: `something much much much much much longer that we can use to benchmark these things.`
MD5: 0.48175501823425 seconds
SHA1: 0.70720291137695 seconds
B64: 0.23448801040649 seconds
B64/sstrtr: 0.6997401714325 seconds
B64/str_replace: 1.0725769996643 seconds
sstrtr: 0.48645901679993 seconds
str_replace: 0.88212299346924 seconds
String: `something impossibly and unrealistically long, after longer than the typical cache key will be but just in case it is worth having an idea of relative performance`
MD5: 0.52688503265381 seconds
SHA1: 0.93148612976074 seconds
B64: 0.32354092597961 seconds
B64/sstrtr: 0.91212201118469 seconds
B64/str_replace: 1.3229742050171 seconds
sstrtr: 0.60456418991089 seconds
str_replace: 1.0461859703064 seconds
133
Archived fixes / Re: SMF bug 4956 (slash in cache key causes cache to fail)
« on April 16th, 2012, 03:21 AM »
Bickering about a bug I reported to SMF, lol.
So far all I know about it is it affects file caching for sure, as to any other caching means, I am not sure. So if it doesn't affect any of the other systems then it would be appropriate not to make the key safe for them since they are able to handle it. This is speculation since I don't know how the other cache systems work.
However one could argue it is up to the developer to send safe keys to the cache but I am sure some will not follow.
IMHO base64 is just going to cause more problems, since your going to have to check the output of it to make sure that it didn't make illegal characters in the key, so basically it will put you back to where you started.
So far all I know about it is it affects file caching for sure, as to any other caching means, I am not sure. So if it doesn't affect any of the other systems then it would be appropriate not to make the key safe for them since they are able to handle it. This is speculation since I don't know how the other cache systems work.
However one could argue it is up to the developer to send safe keys to the cache but I am sure some will not follow.
IMHO base64 is just going to cause more problems, since your going to have to check the output of it to make sure that it didn't make illegal characters in the key, so basically it will put you back to where you started.
134
Off-topic / Re: Another reason to dislike reCaptcha
« on April 5th, 2012, 07:27 PM »
I don't mind reCaptcha, but it shouldn't be the only line of defense. You have to consider what reCaptcha was designed for and that is what Google is using it for. IMHO it wasn't really designed to be a captcha but a decipher system, captcha just came second nature.
However on a second note, how about a captcha question system. The question and instructions will be generated like a captcha, so the bot will have to decipher the question and answer it too, lol.
IMHO though, most bots I have seen get through most security lately are not bots but people. They create a account and get it unlocked for the bots to use it later. You can captcha the post maybe, allot of junk though just to keep a few bots out. :whistle:
However on a second note, how about a captcha question system. The question and instructions will be generated like a captcha, so the bot will have to decipher the question and answer it too, lol.
IMHO though, most bots I have seen get through most security lately are not bots but people. They create a account and get it unlocked for the bots to use it later. You can captcha the post maybe, allot of junk though just to keep a few bots out. :whistle:
135
The Pub / Re: Nice work
« on March 21st, 2012, 05:16 PM »
I just want to add this in, a bit off topic though but here I go. For one of my SMF 2.0.2 sites I coded in support for admin privileges per user basis for individual boards and their children. I set this in the admin panel per board in the manage board section and the board admin can edit their boards and add and remove children in the mod center.
Is this something that may be considered or all ready implemented in Wedge?
Is this something that may be considered or all ready implemented in Wedge?