Page 3 of 4
Re: SamyGO Goes to Digital Ocean Host
Posted: Tue Mar 17, 2015 10:38 pm
by sectroyer
zoelechat wrote:I don't see anything better, there's still only "unread posts" (twice!) and no automatic translation nor URL retrieval

I know, you're trying to drown my better script amongst tons of crap

Yours works only on main page mine also on any subpage

Re: SamyGO Goes to Digital Ocean Host
Posted: Tue Mar 17, 2015 10:40 pm
by zoelechat
sectroyer wrote:mine also on any subpage

Yeah, but new quicklinks menu is already there to work on any subpage. More, nobody ever complained about subpages
Btw, here's a better "breadcrumbs" version, with ALL links, translations, and 4x shorter code

Code: Select all
// ==UserScript==
// @name SamyGO Quicklinks
// @namespace http://forum.samygo.tv/
// @include http://forum.samygo.tv/*
// @grant none
// ==/UserScript==
var divs = document.querySelector('.dropdown-contents').getElementsByTagName('a');
var actionBar = document.getElementsByClassName('breadcrumbs') [0];
for (var i = 0; i <= 4; i++)
{
var newElement = document.createElement('a');
newElement.href = divs[i].href;
newElement.innerHTML = divs[i].innerHTML;
actionBar.appendChild(newElement);
}
How about links-in-title then?
Clipboard01.jpg
Already thinking of another version replacing every "sectroyer" instance by "unread posts" link 
Code: Select all
// ==UserScript==
// @name SamyGO Unread sectroyer
// @namespace http://forum.samygo.tv/
// @include http://forum.samygo.tv/*
// @grant none
// ==/UserScript==
var divs = document.getElementsByClassName('username-coloured');
for (var i = 0; i < divs.length; i++)
{
if (divs[i].innerHTML == "sectroyer")
{
divs[i].href="./search.php?search_id=unreadposts";
divs[i].innerHTML="Unread posts"
}
}

Re: SamyGO Goes to Digital Ocean Host
Posted: Wed Mar 18, 2015 3:18 pm
by zoelechat
"Certificate error" in Internet Explorer seems to be due to an animated gif in "Extras" section spoiler (the one at the right)
The 'S' from HTTP
S should be removed from its URL
Code: Select all
https://forum.samygo.tv/images/new.gif
Re: SamyGO Goes to Digital Ocean Host
Posted: Wed Mar 18, 2015 10:55 pm
by erdem_ua
zoelechat wrote:"Certificate error" in Internet Explorer seems to be due to an animated gif in "Extras" section spoiler (the one at the right)
The 'S' from HTTP
S should be removed from its URL
Code: Select all
https://forum.samygo.tv/images/new.gif
No it can't. It was http but I change it. Because it kills http page and converts the whole page to 'mixed' content page on secured version.
Indeed I am thinking on killing http version of forum. Who need it? I might convert it to https only when stable spdy / http2 mod available for apache2.
Donors->Sort by message twice give:
Code: Select all
Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (@) at position 0 (@): Unexpected character' in /srv/http/forum/phpbb/datetime.php:50 Stack trace: #0 /srv/http/forum/phpbb/datetime.php(50): DateTime->__construct('@', Object(DateTimeZone)) #1 /srv/http/forum/phpbb/user.php(720): phpbb\datetime->__construct(Object(phpbb\user), '@', Object(DateTimeZone)) #2 /srv/http/forum/includes/functions_display.php(1583): phpbb\user->format_date(NULL) #3 /srv/http/forum/memberlist.php(1464): phpbb_show_profile(NULL, false, false, false) #4 {main} thrown in /srv/http/forum/phpbb/datetime.php on line 50
I think this is phpBB error, probably triggered by some donors date_time setting which is null or invalid.
And "Last visit" date/time for zoelechat looks working on me. (Last active: 19 Mar 2015, 00:47)

Re: SamyGO Goes to Digital Ocean Host
Posted: Wed Mar 18, 2015 11:18 pm
by zoelechat
I was talking about "last visit" date/time shown on index page, "last active" in user profile is always accurate. Btw, it has moved once since last time
Screenshot took a minute ago:
Clipboard01.jpg
Doesn't matter anyway, I know when I last came in
Funny about "new.gif", even Firefox doesn't display it until I add samygo.tv to trusted sites after usual fullscreen warning where I'm asked "I understand the risks" (only because of this element):
Clipboard02.jpg
Left .gif is http, right is http
s, otherwise URL is the same.
I agree these are insignificant things, but reporting because sometimes such little bugs can be "the tree that hides the forest"

Re: SamyGO Goes to Digital Ocean Host
Posted: Fri Mar 20, 2015 1:20 am
by erdem_ua
I don't know what result such an problem. Mine "Last visit was: 19 Mar 2015, 04:45" which looks proper. I will purge all open sessions, might help for your account.
Okey, converted to http for a while.

But definitely will converted back to https soon, both of them

Re: SamyGO Goes to Digital Ocean Host
Posted: Fri Mar 20, 2015 10:22 am
by zoelechat
erdem_ua wrote:I don't know what result such an problem. Mine "Last visit was: 19 Mar 2015, 04:45" which looks proper. I will purge all open sessions, might help for your account.
Just to notice it's obviously not fully related to forum upgrade. Since the day I registered on forum, value was updated only and exactly once a day, now it's every 3-4 days. Nevermind
erdem_ua wrote:Okey, converted to http for a while.

But definitely will converted back to https soon, both of them

As expected: No more warnings in browsers then... Btw, I've absolutely nothing against full https, as long as certificate is valid
As you plan to "purge" stuff, there's another thing I noticed: for some users (not only me, check juuso or sectroyer for example) there's a difference between number of posts displayed in user profile and real number. e.g. in my profile "Total posts:
2959" and if I 'search user's post' it tells "Search found
3009 matches" (which is real number).
I know the error can come from copying posts then deleting original ones, but not only it seems, as difference is slowly but surely growing

Re: SamyGO Goes to Digital Ocean Host
Posted: Fri Mar 20, 2015 9:08 pm
by erdem_ua
Now, I synchronized user post counts at forum. But it doesn't help on your post statistics. Might be it's just a search issue of phpBB.
Okay, what next? Your request looks endless.

Re: SamyGO Goes to Digital Ocean Host
Posted: Fri Mar 20, 2015 9:30 pm
by zoelechat
phpBB is easy to blame
Nah, actually these "requests" were mostly long time observations, I just took opportunity of forum renewal (=this topic) to state them. No more for now

Re: SamyGO Goes to Digital Ocean Host
Posted: Sun Mar 22, 2015 10:43 am
by sectroyer
I have recently noticed that when I open some thread I scroll down and then back up to hit "Unread posts". This version adds it also at the bottom:
Code: Select all
// ==UserScript==
// @name SamyGO Unread
// @namespace http://forum.samygo.tv/
// @include http://forum.samygo.tv/*
// ==/UserScript==
elements= document.getElementsByClassName("action-bar");
elements2= document.getElementsByClassName("breadcrumbs");
elements3= document.getElementsByClassName("jumpbox-return");
if(elements.length)
{
var actionBar=elements[0];
//alert(actionBar);
var unread=document.createElement("a");
unread.href="http://forum.samygo.tv/search.php?search_id=unreadposts";
unread.innerHTML="Unread posts";
unread.style.marginLeft="25px";
unread.style.marginBottom="10px";
actionBar.appendChild(unread);
if(elements3.length)
{
var jumpbox=elements3[0];
jumpbox.appendChild(unread);
}
}
if(elements2.length)
{
//alert(elements2[0].innerHTML);
var crumbsBar=elements2[0];
var newcrumb=document.createElement("span");
newcrumb.className="crumb";
newcrumb.style.marginLeft="25px";
var unread=document.createElement("a");
unread.href="http://forum.samygo.tv/search.php?search_id=unreadposts";
unread.innerHTML="Unread posts";
unread.dataNavbarReference="index";
newcrumb.appendChild(unread);
crumbsBar.appendChild(newcrumb);
}