SamyGO Goes to Digital Ocean Host

This is general talk area for things that NOT RELATED WITH TV! Instead, about internal works like web site, forum, wiki, or talking, etc...

zoelechat
SamyGO Moderator
Posts: 8615
Joined: Fri Apr 12, 2013 7:32 pm
Location: France

Re: SamyGO Goes to Digital Ocean Host

Post by zoelechat »

Here's a VERY better version with EVERYTHING above and below (and EVERYWHERE, not random) :lol:
Clipboard01.jpg

Code: Select all

// ==UserScript==
// @name      SamyGO Quicklinks Ultimate      
// @namespace http://forum.samygo.tv/
// @include   http://forum.samygo.tv/*
// @grant none
// ==/UserScript==

var divs = document.querySelector('.dropdown-contents').getElementsByTagName('a');
var actionBar = document.querySelector('.dropdown-container');
for (var i = 0; i <= 4; i++)
{
  var newElement = document.createElement('a');
  newElement.href = divs[i].href;
  newElement.innerHTML = divs[i].innerHTML;
  newElement.style = 'font-size: 95%; padding-left: 0px;';
  actionBar.appendChild(newElement);
  if (i < 4)
    actionBar.appendChild(document.createTextNode(' ? '));
}
$('.responsive-menu-link').hide();
if (document.getElementsByClassName('mark-read') [0])
  $('.action-bar').hide();
document.querySelector('.icon-faq').attributes.class.value += ' rightside';
$('.icon-faq').insertAfter($('.icon-delete-cookies'));
$('.copyright').hide();
if (document.getElementsByClassName('icon-mcp') [0])
{
  document.querySelector('.icon-mcp').attributes.class.value += ' rightside';
  $('.icon-mcp').insertAfter($('.icon-notification'));
}
$('#nav-main').clone().insertBefore('#nav-footer');
$("#nav-footer").attr("class","linklist navlinks");
You do not have the required permissions to view the files attached to this post.
I do NOT receive any PM. Please use forum.
sectroyer
Official SamyGO Developer
Posts: 6305
Joined: Wed May 04, 2011 5:10 pm

Re: SamyGO Goes to Digital Ocean Host

Post by sectroyer »

It wasn't working for me but I have fixed it and now it's 100% jQuery free :D

Code: Select all

// ==UserScript==
// @name      SamyGO Quicklinks Ultimate      
// @namespace http://forum.samygo.tv/
// @include   http://forum.samygo.tv/*
// @grant none
// ==/UserScript==
//create function, it expects 2 values.
function insertAfter(targetElement, newElement) {
    //target is what you want it to go after. Look for this elements parent.
    var parent = targetElement.parentNode;

    //if the parents lastchild is the targetElement...
    if(parent.lastchild == targetElement) {
        //add the newElement after the target element.
        parent.appendChild(newElement);
        } else {
        // else the target has siblings, insert the new element between the target and it's next sibling.
        parent.insertBefore(newElement, targetElement.nextSibling);
        }
}
var divs = document.querySelector('.dropdown-contents').getElementsByTagName('a');
var actionBar = document.querySelector('.dropdown-container');
for (var i = 0; i <= 4; i++)
{
  var newElement = document.createElement('a');
  newElement.href = divs[i].href;
  newElement.innerHTML = divs[i].innerHTML;
//  newElement.style = 'font-size: 95%; padding-left: 0px;';
  newElement.style.fontSize="95%";
  newElement.style.paddingLeft="0px";

  actionBar.appendChild(newElement);
  if (i < 4)
    actionBar.appendChild(document.createTextNode(' ? '));
}
document.querySelector('.responsive-menu-link').style.display="none";
if (document.getElementsByClassName('mark-read') [0])
  document.querySelector('.action-bar').style.display="none";
document.querySelector('.icon-faq').attributes.class.value += ' rightside';
//document.querySelector('.icon-faq').insertAfter(document.querySelector('.icon-delete-cookies'));
insertAfter(document.querySelector('.icon-delete-cookies'),document.querySelector('.icon-faq'));
document.querySelector('.copyright').style.display="none";
if (document.getElementsByClassName('icon-mcp') [0])
{
  document.querySelector('.icon-mcp').attributes.class.value += ' rightside';
//  document.querySelector('.icon-mcp').insertAfter(document.querySelector('.icon-notification'));
  insertAfter(document.querySelector('.icon-notification'),document.querySelector('.icon-mcp'));
}
//document.querySelector('#nav-main').clone().insertBefore('#nav-footer');
//document.querySelector('#nav-main').cloneNode(true).insertBefore(document.querySelector('#nav-footer'));
var footerNavBar=document.querySelector('#page-footer > .navbar');
footerNavBar.insertBefore(document.querySelector('#nav-main').cloneNode(true), footerNavBar.firstChild);
//document.querySelector("#nav-footer").attr("class","linklist navlinks");
//alert(document.querySelector('#nav-main').cloneNode(true).innerHTML);
document.querySelector("#nav-footer").className="linklist navlinks";
I do NOT support "latest fw" at ALL. If you have one you should block updates on router and wait for it to STOP being "latest":)
If you want me to help you please paste FULL log(s) to "spoiler"/"code" bbcodes or provide link(s) to pasted file(s) on https://pastebin.com Otherwise "NO HELP"!!!
If you want root DISABLE internet access to your device!!!!
DO NOT EVER INSTALL FIRMWARE UPGRADE !!!!
zoelechat
SamyGO Moderator
Posts: 8615
Joined: Fri Apr 12, 2013 7:32 pm
Location: France

Re: SamyGO Goes to Digital Ocean Host

Post by zoelechat »

I don't see any difference in result here, but nice :)
Thanks for your collaboration ;)
I do NOT receive any PM. Please use forum.
User avatar
juusso
SamyGO Moderator
Posts: 10129
Joined: Sun Mar 07, 2010 6:20 pm

Re: SamyGO Goes to Digital Ocean Host

Post by juusso »

Some of forum members (to be honest, three...), have additional MCP like top bar menu, ACP (administrator control panel). Based on latest sectroyers script, i added some lines to move it to the right as well:

Code: Select all

// ==UserScript==
// @name      SamyGO Quicklinks Ultimate     
// @namespace http://forum.samygo.tv/
// @include   http://forum.samygo.tv/*
// @grant none
// ==/UserScript==
//create function, it expects 2 values.
function insertAfter(targetElement, newElement) {
    //target is what you want it to go after. Look for this elements parent.
    var parent = targetElement.parentNode;

    //if the parents lastchild is the targetElement...
    if(parent.lastchild == targetElement) {
        //add the newElement after the target element.
        parent.appendChild(newElement);
        } else {
        // else the target has siblings, insert the new element between the target and it's next sibling.
        parent.insertBefore(newElement, targetElement.nextSibling);
        }
}
var divs = document.querySelector('.dropdown-contents').getElementsByTagName('a');
var actionBar = document.querySelector('.dropdown-container');
for (var i = 0; i <= 4; i++)
{
  var newElement = document.createElement('a');
  newElement.href = divs[i].href;
  newElement.innerHTML = divs[i].innerHTML;
//  newElement.style = 'font-size: 95%; padding-left: 0px;';
  newElement.style.fontSize="95%";
  newElement.style.paddingLeft="0px";

  actionBar.appendChild(newElement);
  if (i < 4)
    actionBar.appendChild(document.createTextNode(' ? '));
}
document.querySelector('.responsive-menu-link').style.display="none";
if (document.getElementsByClassName('mark-read') [0])
  document.querySelector('.action-bar').style.display="none";
document.querySelector('.icon-faq').attributes.class.value += ' rightside';
//document.querySelector('.icon-faq').insertAfter(document.querySelector('.icon-delete-cookies'));
insertAfter(document.querySelector('.icon-delete-cookies'),document.querySelector('.icon-faq'));
document.querySelector('.copyright').style.display="none";
//move ACP to the right
if (document.getElementsByClassName('icon-acp') [0])
{
  document.querySelector('.icon-acp').attributes.class.value += ' rightside';
//  document.querySelector('.icon-acp').insertAfter(document.querySelector('.icon-notification'));
  insertAfter(document.querySelector('.icon-notification'),document.querySelector('.icon-acp'));
}
if (document.getElementsByClassName('icon-mcp') [0])
{
  document.querySelector('.icon-mcp').attributes.class.value += ' rightside';
//  document.querySelector('.icon-mcp').insertAfter(document.querySelector('.icon-notification'));
  insertAfter(document.querySelector('.icon-notification'),document.querySelector('.icon-mcp'));
}
//document.querySelector('#nav-main').clone().insertBefore('#nav-footer');
//document.querySelector('#nav-main').cloneNode(true).insertBefore(document.querySelector('#nav-footer'));
var footerNavBar=document.querySelector('#page-footer > .navbar');
footerNavBar.insertBefore(document.querySelector('#nav-main').cloneNode(true), footerNavBar.firstChild);
//document.querySelector("#nav-footer").attr("class","linklist navlinks");
//alert(document.querySelector('#nav-main').cloneNode(true).innerHTML);
document.querySelector("#nav-footer").className="linklist navlinks";
:)
LE40B653T5W,UE40D6750,UE65Q8C
Have questions? Read SamyGO Wiki, Search on forum first!
FFB (v0.8), FFB for CI+ . Get root on: C series, D series, E series, F series, H series. rooting K series, exeDSP/exeTV patches[C/D/E/F/H]

DO NOT EVER INSTALL FIRMWARE UPGRADE
sectroyer
Official SamyGO Developer
Posts: 6305
Joined: Wed May 04, 2011 5:10 pm

Re: SamyGO Goes to Digital Ocean Host

Post by sectroyer »

There was one more place where I did miss "Unread posts". Now it's finally possible:

Code: Select all

elements4=document.getElementsByClassName("submit-buttons");
if(elements4.length)
{
  var buttonsBar=elements4[0];
//  alert(buttonsBar);
  var unreadButton = document.createElement("input");
  unreadButton.type="button";
  unreadButton.value="Unread posts";
  unreadButton.className="button2";
  unreadButton.addEventListener("click", function (){
  document.location='http://forum.samygo.tv/search.php?search_id=unreadposts';});
  buttonsBar.appendChild(unreadButton);

}
Have fun :)
I do NOT support "latest fw" at ALL. If you have one you should block updates on router and wait for it to STOP being "latest":)
If you want me to help you please paste FULL log(s) to "spoiler"/"code" bbcodes or provide link(s) to pasted file(s) on https://pastebin.com Otherwise "NO HELP"!!!
If you want root DISABLE internet access to your device!!!!
DO NOT EVER INSTALL FIRMWARE UPGRADE !!!!
User avatar
erdem_ua
SamyGO Admin
Posts: 3125
Joined: Thu Oct 01, 2009 6:02 am
Location: Istanbul, Turkey
Contact:

Re: SamyGO Goes to Digital Ocean Host

Post by erdem_ua »

Today we moved back to Frankfurt. :)
To new Digital Ocean servers.
Our new IP is: 46.101.161.175
Janice87
Posts: 1
Joined: Tue May 10, 2016 7:15 am

Re: SamyGO Goes to Digital Ocean Host

Post by Janice87 »

erdem_ua wrote:Hello all,
We have some issues with Edis.at host. There are many lost packet on their internal system. So I decide to move another host.

At this Thursday (12/03/2015), SamyGO servers probably be move to Cdn reviews cloud host's Amsterdam 2 servers which is faster, cheaper and issue free network connection.

With this move, we also made software upgrade to server. Our forum will be upgrade to phpBB v3.1.3.
Also apache server will be upgraded to 2.4. This will be give speed bump to whole site.

There will be no blackout due move. But old forum will be disabled and you can not post but just read.
Also DNS system will require some hours to sync up with new servers IP.
Regards

Edit: Well, somehow edis.at suspended our old server, due this, we are offline for a while.
Now moving old server to new one. Forum and wiki already moved.
Remaining files will be in place couple of hours...

Edit2: All files are moved to new server. Enjoy!

Hi Erdem,
Have you move out to the above mentioned cloud host?
Is it working good or not?
Please reply soon I'm also thinking to move out to other cloud host.
Thanks in advance.
User avatar
erdem_ua
SamyGO Admin
Posts: 3125
Joined: Thu Oct 01, 2009 6:02 am
Location: Istanbul, Turkey
Contact:

Re: SamyGO Goes to Digital Ocean Hostworking good or not? Please reply soon I'm also thinking to move o

Post by erdem_ua »

Hi Janice87,
I am really happy with Digital Ocean host.
Might be not the best but It's one of the bests.
You can move in without too much thinking.
If you will, please click the my referral link

Post Reply

Return to “General”