BestNa.me Labs [Sat, 5 Mar 2016 17:42:11 +0000 (18:42 +0100)]
Fixing markup and comment
Minor fixes in yourls-infos.php:
1. Removes an unclosed and superfluous <strong> tag in the line reading e.g. '43 hits on January 1, 1970'. This caused wrong HTML and therefore most browsers rendered *all* dates in the list appearing on click of 'Click for more details' with bold font-weight (i.e., not only those of the best year / month / day as intended).
2. Took the liberty of also changing a closing comment token from '/**/' to the more common '**/' (in the comment titled 'I can haz debug data'). While this was perfectly valid code, it confused the syntax highlighter of github (all past the '/**/' appeared in a frightening red).
BestNa.me Labs [Fri, 4 Mar 2016 21:01:56 +0000 (22:01 +0100)]
Fix f. missing chart bar add (+all) icon
Fixes the following bug:
When allowing for multiple short URLs for a same long URL (bitly behavior [behaviour]), the chart bar adding symbol linking to YOURLS_SITE/keyword+all does not show up on infos pages.
ozh [Fri, 22 May 2015 20:07:13 +0000 (22:07 +0200)]
Less if(function_exists())
Because
- it hinders unit tests
- it makes code less readable
- it's easier to have compat functions and eventually deprecate them when no longer needed
I found a problem in Yourls. It's not necessarily a problem with the code, but a problem none the less.
In functions.php, the timestamp is being written to the yourls_log and yourls_url db's differently, and depending on how the server is set up, it can cause a problem.
function yourls_log_redirect() writes the time with MySQL's NOW() keyword, while function yourls_insert_link_in_db() writes it with PHP's date('Y-m-d H:i:s'). On the webhost that I'm using, MySQL is using the server's time, not UTC, so it's 4 hours different than PHP's time, since PHP is being set with date_default_timezone_set( 'UTC' );
This drove me nuts for quite awhile until I realized what was going on. Once I switched from NOW() to date('Y-m-d H:i:s') the problem went away and all my times are now the same. I believe both functions should use the same system for time so as to avoid this scenario.
BTW, great script! I know I probably shouldn't ask ;) but... any idea when the next version will be released? I read something about version 2.0 awhile back, but haven't heard anything since.
In config, readmes, editable files: the generic YOURLS install will be http://your-own-domain-here.com/ so that noob users get an obvious warning when they misconfigure something
In source comments, presumably read by hackers who have a clue, the generic YOURLS install will be http://sho.rt/. The generic long URL can be http://example.com/something-whatever
Fredl [Sat, 28 Feb 2015 16:33:21 +0000 (17:33 +0100)]
Update functions-l10n.php
´yourls_load_custom_textdomain´ can't read *.po files when ´$path´ is an absolute path on the server and the leading slash is removed. (´trim´ removes on both ends)
ozh [Mon, 3 Nov 2014 21:57:41 +0000 (22:57 +0100)]
Better yourls_int2string() & yourls_string2int()
50% faster and without needing BCMaths extension.
Tested with 20,000,000 random numbers and random strings to make sure they produce same results as previous functions
ozh [Sun, 2 Nov 2014 10:57:44 +0000 (11:57 +0100)]
Remove 5.2 from Travis
It made it impossible to test 5.3+ only PHP syntax. From now on and till the min version requirement is officially 5.3, consider YOURLS to be "most likely 5.2 compatible"
Christian Taube [Wed, 29 Oct 2014 22:51:30 +0000 (22:51 +0000)]
Fixes getTabs() in readme.html to work on IE 11
d.innerHTML returns `<li class="Tab" id="MoreTab" ...` on IE 11, while
the regex expects `<li id="MoreTab" ...` It seems like IE is changing
the order of the attributes within the tags.