Upgrades by Rayn - Page 5 - TribalWar Forums
Click Here to find great hosting deals from Branzone.com


Go Back   TribalWar Forums > TribalWar Community > General Discussion
Reload this Page Upgrades
Page 5 of 9
Thread Tools
coombz
VeteranXV
Old
81 - 07-05-2018, 22:36
Reply With Quote
I'm here for the maddbeats, gimme all those deadbeat dad beats
I'm here to flow on Chief's beats, dropping science on your white streets

We're here on Rayn's website, he's trying to keep it upright
We're here having e-fights, Fool's posting many dee-lights

You're here and this thread sucks, just a bunch of lame cucks
You're here? You're gone? We give no ****s, stay there with your s
 
coombz is online now
 
Sponsored Links
Skeletor666
Merried Man4
Old
82 - 07-06-2018, 12:39
Reply With Quote
**** balls
 
Skeletor666 is offline
 
Edofnor
VeteranXV
Old
83 - 07-07-2018, 00:01
Reply With Quote
rayn, pls give us a hard number on ur soft date for pulling the plug on tribalwar gaming news

apparently ~VIP~ members kno about these plans
 
Edofnor is online now
 
Fool
Whiny BitchX
Contributor
Old
84 - 07-07-2018, 00:46
Reply With Quote
June 15
 
Fool is online now
 
lemontw
Veteran
Old
85 - 07-07-2018, 01:38
Reply With Quote
waiting on the late beats

dems look 2 stack sheets

mueller tom arnold certainty
 
lemontw is offline
 
Goshin
VeteranXV
Contributor
Old
86 - 07-07-2018, 10:48
Reply With Quote
coombz is a dildo
 
Goshin is offline
 
lemontw
Veteran
Old
87 - 07-07-2018, 13:27
Reply With Quote
Quote:
Originally Posted by Vanster View Post
I know Rayn has a soft date on which he's going to pull the plug, but he's not shared when that will be.
Quote:
Originally Posted by Vanster View Post
I'm pretty sure Rayn said he doesn't understand the mySqL and Apache updates to keep up with this place and no longer cares. Read the threads yourself.

ICQ is long gone, the front page is over, he's maintaining the GD on bubblegum and paperclips and as said he no longer cares.
Quote:
Originally Posted by Rayn View Post
So I just did our first major upgrade in 7 years

took vb up to latest 3.X version
PHP up to 5.6 otw to 7
upgraded mysql 5 to mariadb 10

I still don't really know **** about linux or websites
so basically everything is probably ****ing broken

lmk what and I'll try to fix it
Quote:
Originally Posted by aScotiA View Post
do ppl usually update and fix things they're about to shut down? asking for a friend
Quote:
Originally Posted by Rayn View Post
yeah .. I just upgraded all our **** so we can run forever, bro. we're not going anywhere!
 
lemontw is offline
 
Validuz
VeteranXV
Contributor
Old
88 - 07-08-2018, 02:20
Reply With Quote
Quote:
Originally Posted by GreyGhost View Post
The image resizing seems broken, I even set the width to just 40 in the control panel and the images are still half again larger than a non image post.

Tried to find a Greasemonkey script but since M$ bought Github all the links are dead ...
This?

Code:
// Tribalwar_image_embedder.user.js
// Version 1.1
// 02-16-2008
// 
// Happy Valentine's Day + 2 Tribalwar
// Author: -Bane
//
// 1.1c Features:
// - If an image fails to load, the link still remains and an error message is indicated.
//
// 1.1b Features:
// - Config option to turn off smart image resizing (in case of conflicts with other image sizing scripts).
// - All config options are now preceded with TW (to hopefully disambiguate from any other scripts).
//
// 1.1a Bug fixes:
// - Changed the fake events from clicks to "complete" events
// (images with click event handlers already, such as smilies in the reply window,
// were getting "clicked" on page load).
//
// 1.1 Features:
// - Auto resizes all images to fit within the tables.
// - If an image gets resized, you can click on it to view it in its full glory (zoom in)
// - Click again to zoom out.
//
// 1.0 Features:
// - Click on image to view it (or use prefs to do it for you)
// --------------------------------------------------------------------
//
// This is a Greasemonkey user script.
//
// To install, you need Greasemonkey: http://greasemonkey.mozdev.org/
// Then restart Firefox and revisit this script.
// Under Tools, there will be a new menu item to "Install User Script".
// Accept the default configuration and install.
//
// To uninstall, go to Tools/Manage User Scripts,
// select "Tribalwar Image Embedder", and click Uninstall.
//
// --------------------------------------------------------------------
// ==UserScript==
// @name          Tribalwar Image Embedder
// @namespace     http://webspace.utexas.edu/jag2682/
// @description   v1.1c. Embeds images (either by clicking or automatically depending on preference). Auto-resizes images that are too large to fit within the post table.
// @include       http://*tribalwar.com/forums/*
// ==/UserScript==


if(!String.prototype.trim) {
	String.prototype.trim = function() {
		return this.replace(/^\s*/, "").replace(/\s*$/, "");
	}
}

var hotlinkPref = GM_getValue("hotlinkPref");
if(!hotlinkPref) {
	GM_setValue("hotlinkPref","off");
	hotlinkPref = "off";
}

var resizePref = GM_getValue("resizePref");
if(!resizePref) {
	GM_setValue("resizePref","on");
	resizePref = "on";
}

if(resizePref == "on") {
	setMaxWidth(false);
	window.addEventListener("resize", function(e) { setMaxWidth(true); }, false);
}

var links = document.links;
var imgExtensions = [".tif", ".tiff", ".png", ".bmp", ".jpeg", ".gif", ".jpg"];
for(var i = links.length - 1; i >= 0; i--) {
	var href = links[i].getAttribute("href");
	var link = links[i];
	for(var j = imgExtensions.length - 1; j >= 0; j--) {
		var ext = imgExtensions[j];
		if(href.toLowerCase().substring(href.length - ext.length) == ext) {
			link.setAttribute("title", href);
			link.setAttribute("href","javascript:void(0)");
			link.removeAttribute("target");
			link.addEventListener("click", replaceWithImage, false);
			if(hotlinkPref == "on") {
				event = document.createEvent("MouseEvents");
				event.initMouseEvent("click", false, false, window, 0, 0, 0, 0, 0, false, false, false, false, 2,  null);
				link.dispatchEvent(event);
			}
			break;	// Don't search the rest of the extensions like a retard
		}
	}
}

function replaceWithImage(e) {
	if(!e) var e = window.event;
	var obj = window.event ? e.srcElement : e.target;

	if(obj.nodeName.toLowerCase() == "img") {
		// Clicking on image-link gives image, not link.
		obj = obj.parentNode;
	}

	var img = new Image();
	img.src = obj.getAttribute("title");
	img.alt = obj.firstChild.nodeValue;
	img.border = 0;
	img.addEventListener("error", imageError, false);

	if(resizePref == "on") {
		if(!img.complete) {
			img.addEventListener("load", resizeImageCallback, false);
		} else {
			img.addEventListener("complete", resizeImageCallback, true);
			var event = document.createEvent("Events");
			event.initEvent("complete", false, false);
			img.dispatchEvent(event);
		}
	}

	var prevNode = obj.previousSibling;
	while(prevNode && prevNode.nodeType == 3 && prevNode.nodeValue.trim().length == 0) {
		prevNode = prevNode.previousSibling;
	}

	var nextNode = obj.nextSibling;
	while(nextNode && nextNode.nodeType == 3 && nextNode.nodeValue.trim().length == 0) {
		nextNode = nextNode.nextSibling;
	}

	if(prevNode && prevNode.nodeType == 3) {
		obj.parentNode.insertBefore(document.createElement("br"), obj);
	}
	obj.parentNode.insertBefore(img, obj);
	if(nextNode && nextNode.nodeType == 3) {
		obj.parentNode.insertBefore(document.createElement("br"), obj);
	}
	obj.parentNode.removeChild(obj);
}

function resizeImageCallback(event) {
	if(!event) var event = window.event;
	var img = window.event ? event.srcElement : event.target;

	if(event.type == "load") {
		img = event.currentTarget;
	}

	var width = img.width;
	var height = img.height;
	var maxWidth = parseInt(GM_getValue("maxWidth"));

	if(!img.getAttribute("defaultWidth")) {
		// Never seen image before
		img.setAttribute("defaultWidth", width);
		img.setAttribute("defaultHeight", height);
		zoomOut(img);

		if(event.type == "load" || event.type == "complete") {
			if(event.type == "complete") {
				img.removeEventListener("complete", resizeImageCallback, true);
			}
			img.addEventListener("click", resizeImageCallback, false);
		}
	} else if(event.type == "click" || event.type == "complete") {
		if(img.style.cursor == "-moz-zoom-in") {
			if(width == maxWidth) {
				// Click to zoom in
				zoomIn(img);
			} else {
				// maxWidth has changed... 
				// This "click" was actually a window resize
				zoomOut(img);
			}


			var defaultWidth = parseInt(img.getAttribute("defaultWidth"));
			if(defaultWidth < maxWidth) {
				img.style.cursor = "";
			}
		} else if(img.style.cursor == "-moz-zoom-out") {
			zoomOut(img);

			var defaultWidth = parseInt(img.getAttribute("defaultWidth"));
			if(defaultWidth < maxWidth) {
				img.style.cursor = "";
			}
		} else {
			zoomOut(img);
		}
	}
}

function setMaxWidth(calledByResize) {
	var maxWidth = document.body.clientWidth;

	var allDiv = document.getElementsByTagName("div");
	var foundPost = false;
	for(var i = allDiv.length - 1; i >= 0; i--) {
		var div = allDiv[i];
		if(nodeIsPost(div)) {
			foundPost = true;
			maxWidth = Math.min(div.offsetWidth, maxWidth);
		}
	}

	GM_setValue("maxWidth", Math.floor(maxWidth));

	var images = document.images;
	for(var i = images.length - 1; i >= 0; i--) {
		var parent = images[i];
		if(foundPost) {
			// Only run this code if we found a post. Otherwise the body is the limit.
			while(parent = parent.parentNode) {
				if(parent.nodeName.toLowerCase() == "div") {
					if(nodeIsPost(parent)) {
						break;
					}
				}
			}

			if(!parent) {
				continue;
			}
			
		}

		// Every image in the post table gets a handler
		if(!calledByResize && !images[i].complete) {
			images[i].addEventListener("load", resizeImageCallback, false);
		}

		if(!calledByResize || images[i].style.cursor != "-moz-zoom-out") {
			if(images[i].complete) {
				images[i].addEventListener("complete", resizeImageCallback, true);
				var event = document.createEvent("Events");
				event.initEvent("complete", false, false);
				images[i].dispatchEvent(event);
			}
		}
	}
}

function imageError(event) {
	if(!event) var event = window.event;
	var img = event.currentTarget;

	var link = document.createElement("a");
	link.setAttribute("href", img.src);
	link.setAttribute("target", "_blank");
	link.appendChild(document.createTextNode("[TW Embedder: Failed to load] " + img.alt));
	img.parentNode.insertBefore(link,img);
	img.parentNode.removeChild(img);
}

function zoomOut(img) {
	var defaultWidth = parseInt(img.getAttribute("defaultWidth"));
	var width = img.width;
	var height = img.height;

	var maxWidth = parseInt(GM_getValue("maxWidth"));

	if(defaultWidth > maxWidth) {
		var delta = maxWidth / width;
		img.setAttribute("width", maxWidth);
		img.setAttribute("height", Math.floor(height * delta));
		img.style.cursor = "-moz-zoom-in";
	}
}

function zoomIn(img) {
	img.setAttribute("width", img.getAttribute("defaultWidth"));
	img.setAttribute("height", img.getAttribute("defaultHeight"));
	img.style.cursor = "-moz-zoom-out";
}

function nodeIsPost(node) {
	var id = node.getAttribute("id");
	return (id && id.indexOf("post_message") >= 0);
}

GM_registerMenuCommand("TW Embedder: View image on click", function(event) {
	GM_setValue("hotlinkPref","off");
});

GM_registerMenuCommand("TW Embedder: View image automatically", function(event) {
	GM_setValue("hotlinkPref","on");
});

GM_registerMenuCommand("TW Embedder: Image Resizing (on)", function(event) {
	GM_setValue("resizePref","on");
});

GM_registerMenuCommand("TW Embedder: Image Resizing (off)", function(event) {
	GM_setValue("resizePref","off");
});
Also saved this one as well:

Code:
// Tribalwar_long_post.user.js
// Version 1.0
// 11-13-2009
// 
// == VERSION HISTORY ==
// Version 1.0:
// - Hides posts. Post height threshold is configurable.
// --------------------------------------------------------------------
//
// This is a Greasemonkey user script.
//
// To install, you need Greasemonkey: http://greasemonkey.mozdev.org/
// Then restart Firefox and revisit this script.
// Under Tools, there will be a new menu item to "Install User Script".
// Accept the default configuration and install.
//
// To uninstall, go to Tools/Manage User Scripts,
// select "Tribalwar Long Post", and click Uninstall.
//
// --------------------------------------------------------------------
// ==UserScript==
// @name          Tribalwar Long Post
// @namespace     http://webspace.utexas.edu/jag2682/
// @description   v1.0. Hides long posts in spoiler-like tags. Can configure the post height threshold in User Script Commands under the Greasemonkey menu.
// @include       http://*tribalwar.com/forums/*
// ==/UserScript==

if(!GM_getValue("twLongPostThreshold")) {
	GM_setValue("twLongPostThreshold", 2000);
}

var allDiv = document.getElementsByTagName("div");
for(var i = allDiv.length - 1; i >= 0; i--) {
	var div = allDiv[i];
	if(nodeIsPost(div)) {
		var threshold = GM_getValue("twLongPostThreshold");
		if(div.offsetHeight > threshold) {
			handleLongAssPost(div);
		}
	}
}

/**
  * Returns true iff the node has an id containing the string "post_message"
  */
function nodeIsPost(node) {
	var id = node.getAttribute("id");
	return (id && id.indexOf("post_message") >= 0);
}

function handleLongAssPost(postDiv) {
	var container = document.createElement("div");

	var preSpoiler = document.createElement("div");
	preSpoiler.setAttribute("class", "pre-spoiler");
	
	var spoilerName = document.createElement("span");
	spoilerName.style.cssFloat = "left";
	spoilerName.style.paddingTop = "2px";
	spoilerName.appendChild(document.createTextNode("Long ass post"));
	
	var showButton = document.createElement("input");
	showButton.setAttribute("class", "button");
	showButton.setAttribute("type", "button");
	showButton.setAttribute("value", "Show");
	showButton.setAttribute("onClick", "if (this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display != '') { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = '';this.innerText = ''; this.value = ' Hide '; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.value = 'Show';}");
	
	preSpoiler.appendChild(spoilerName);
	preSpoiler.appendChild(showButton);
	
	var spoilerOuterContainer = document.createElement("div");
	var spoilerInnerContainer = document.createElement("div");
	spoilerInnerContainer.setAttribute("class", "spoiler");
	spoilerInnerContainer.style.display = "none";
	
	spoilerOuterContainer.appendChild(spoilerInnerContainer);
	container.appendChild(preSpoiler);
	container.appendChild(spoilerOuterContainer);
	
	while(postDiv.firstChild) {
		var child = postDiv.firstChild;
		postDiv.removeChild(child);
		spoilerInnerContainer.appendChild(child);
	}
	
	postDiv.appendChild(container);
	
}

GM_registerMenuCommand("TW Long Post: Set threshold", function(event) {
	var threshold = prompt("Set post height threshold in pixels (current value is " + GM_getValue("twLongPostThreshold") + "):");
	threshold = parseInt(threshold, 10);
	if(!isNaN(threshold) && threshold > 0) {
		GM_setValue("twLongPostThreshold", threshold);
	}
});
 
Validuz is offline
 
FOURSTAR
VeteranXV
Old
89 - 07-08-2018, 21:45
Reply With Quote
do those still work val? asking since image resizing stopped working for me in firefox as well, but i don't think i had these installed before

almost 10 years old so idk if its worth trying anymore or not with that newer firefox being released
 
FOURSTAR is offline
 
Validuz
VeteranXV
Contributor
Old
90 - 07-09-2018, 00:44
Reply With Quote
I'm not sure tbh. Haven't used them in years.

TW has optional built-in ones now, so I'm not sure they're even needed. Well... for the image resizing one anyway.
 
Validuz is offline
 
GreyGhost
VeteranXV
Contributor
Old
91 - 07-09-2018, 01:34
Reply With Quote
Neither the built-in or Greasemonkey image scripts are working for me.
 
GreyGhost is offline
 
Edofnor
VeteranXV
Old
92 - 07-09-2018, 01:39
Reply With Quote
my **** is fine, str8 firefox no greasemonkey
 
Edofnor is online now
 
Validuz
VeteranXV
Contributor
Old
93 - 07-09-2018, 10:22
Reply With Quote
Using ProjectTriton, GreyGhost? Maybe that makes a difference.
 
Validuz is offline
 
GreyGhost
VeteranXV
Contributor
Old
94 - 07-09-2018, 12:36
Reply With Quote
Tried ProjTriton, ProjTriton Liq, TW and TW Liq.

Same result in each. It's a mystery.



edit: Tried the site in Opera and the forum resize images is working, Chrome and FF still not. weird
 
GreyGhost is offline
 
Last edited by GreyGhost; 07-09-2018 at 13:27.. Reason: different browser
Goshin
VeteranXV
Contributor
Old
95 - 07-09-2018, 16:50
Reply With Quote
WHY AM I ON 24 HOUR CLOCK MODE
**** YOU RAYN
 
Goshin is offline
 
Rayn
Tribalwar Admin
Contributor
Old
96 - 07-09-2018, 16:52
Reply With Quote
the plugin that did that is about 10 years old and I didn't copy over the scripts for it when I upgraded. I think if I reinstall the plugin it probably will work. I'll try to remember to do it later but I got like 20 minutes of sleep last night so I'll probably fall asleep first.

but i'll remember sooner or later i put it on my ****ing wunderlist
 
Rayn is offline
 
EvilNapir
Veteran4
Old
97 - 07-09-2018, 18:09
Reply With Quote
Tapatalk still throws errors as before
 
EvilNapir is offline
 
Amadeus
VeteranXV
Contributor
Old
98 - 07-09-2018, 18:27
Reply With Quote
Quote:
Originally Posted by EvilNapir View Post
Tapatalk still throws errors as before
who the **** cares lol
 
Amadeus is offline
 
EvilNapir
Veteran4
Old
99 - 07-09-2018, 18:33
Reply With Quote
Quote:
Originally Posted by Amadeus View Post
who the **** cares lol


The people using tapatalk
 
EvilNapir is offline
 
EvilNapir
Veteran4
Old
100 - 07-09-2018, 18:34
Reply With Quote
Itís the tapatalk.xml file bla bla installation error
 
EvilNapir is offline
 
Page 5 of 9
Reply


Go Back   TribalWar Forums > TribalWar Community > General Discussion
Reload this Page Upgrades

Social Website Bullshit


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


AGENT: CCBot/2.0 (https://commoncrawl.org/faq/) / Y
All times are GMT -4. The time now is 16:34.