Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   Future Improvements (https://forums.graalonline.com/forums/forumdisplay.php?f=10)
-   -   Avatars (https://forums.graalonline.com/forums/showthread.php?t=84152)

Darlene159 08-30-2009 04:37 AM

Quote:

Originally Posted by DustyPorViva (Post 1519638)
-_- It's not 1995 anymore. Almost every other forums have these sort of things, and you don't see them crashing and burning. Added, animated avatars can slow down forums considerably... but why not just use a file limit like it does now? A color-filled non-animated avatar can be larger in file than a simple, 4-framed avatar. You know, when it really matters(for those on dial-up), ALL avatars and sigs slow down the forums considerably. To the point I had to disable them anyways.

Do avatars at all make a forum better? What about sigs? What about the Green Theme?

You know what else didn't help the forums? The Projects section; Blogs really haven't added much, either. Neither have Social Groups. Oh ya, the Calender doesn't add jack-squat either.

Let's get rid of it all!

Give it a rest. The avatars, as is now, is fine. :\

DustyPorViva 08-30-2009 04:39 AM

Quote:

Originally Posted by Darlene159 (Post 1519646)
Give it a rest. The avatars, as is now, is fine. :\

Why should I give it a rest? There are pages and threads asking for small, simple changes to avatars. What makes you think it's fine? It's a simple thing, why so against it?

Darlene159 08-30-2009 05:20 AM

Quote:

Originally Posted by DustyPorViva (Post 1519647)
Why should I give it a rest? There are pages and threads asking for small, simple changes to avatars. What makes you think it's fine? It's a simple thing, why so against it?

I'm not against it, apart from aminated avatars, but apparently Stefan doesn't want it done. I dont see the big deal, especially to get angry about.

kia345 08-30-2009 05:23 AM

It's a big deal because practically every other forum on the internet uses them except Graal. It's a big deal because lots of successful games and communities take advice, suggestions, and requests from their players, while Graal just floats off in its own direction.

MysticX2X 08-30-2009 05:28 AM

Pojo, my insides are dying of excitement to see your animated avatar every time I see your posts.

Hiro 08-30-2009 05:34 AM

Quote:

Originally Posted by Darlene159 (Post 1519658)
I'm not against it, apart from aminated avatars, but apparently Stefan doesn't want it done. I dont see the big deal, especially to get angry about.

it symbolically tells us that stefan doesn't care about what us users think

Inverness 08-30-2009 05:37 AM

Stefan's concern is how larger avatars would affect the loading time of pages. I believe this is negligible considering the prevalence of broadband. Images are also cached on the computer so avatars would only be downloaded once anyways. And it is also possible, as Dusty said, to configure a maximum avatar file size that allows either a large image or a smaller animated image.

kia345 08-30-2009 05:37 AM

Quote:

Originally Posted by MysticX2X (Post 1519662)
Pojo, my insides are dying of excitement to see your animated avatar every time I see your posts.

I don't even think I'd use one, but it's the fact that we don't have the option and we don't get listened to

DustyPorViva 08-30-2009 05:49 AM

Quote:

Originally Posted by Darlene159 (Post 1519658)
I'm not against it, apart from aminated avatars, but apparently Stefan doesn't want it done. I dont see the big deal, especially to get angry about.

It's not anger, it's frustration. It's not a big deal, and that's why it's so frustrating. Small things are dismissed even with large support.

Like I said, I can create a 100x100 non-animated avatar that could probably be larger in size than most avatars. That's why there is a file-size limit in the first place.

BigBear3 08-30-2009 06:35 AM

If people like Frieza or Sam could have tiny little animated avatars that don't limit our access why can't we? It's just like everybody has been saying this entire time, just keep a limit.

I have animated avatar's on every other forums I have ever been a part of. You think I'd be against animated avatars, possibly having one of the worst computers on the forums, but it's imbecilic to never even consider it an option and just put it aside when it's being supported by such a large party.

Crono 08-30-2009 01:09 PM

Quote:

Originally Posted by Darlene159 (Post 1519658)
I dont see the big deal, especially to get angry about.

Because it's, once again, a prime example of cyberjoueurs completely ignoring it's playerbase.

Loriel 08-30-2009 03:09 PM

Here is a greasemonkey script that implements like half the pavatar spec by following people's profile homepage links and checking for pavatar links and replacing the graal forum avatar with the pavatar found there.

Future improvements include limiting the size and dimensions as described in the pavatar spec or possibly being gimmicky and supporting svg, feel free to get on that.

Edit: Now limiting maximum dimensions, customisable at the end of the script.

NPC Code:
// ==UserScript==
// @name gforum-pavatars
// @namespace http://ilfirin.org/
// @description Follow homepage links and check for pavatars for every post
// @include http://forums.graalonline.com/forums/showthread.php?*
// @include http://forums.graal2001.com/forums/showthread.php?*
// @include http://forums.graalgraalonline.com/forums/showpost.php?*
// @include http://forums.graal2001.com/forums/showpost.php?*
// ==/UserScript==

function getUserId(postId) {
var reps = document.evaluate(
'//span[starts-with(@id, "repdisplay_' + postId + '_")]',
document, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null)
for (var i = 0; i < reps.snapshotLength; ++i) {
var id = reps.snapshotItem(i).getAttribute('id')
var index = id.lastIndexOf('_')
if (index == -1) continue
return id.substr(index+1)
}
}

function getLink(td) {
var link = td.firstChild
if (!link || link.tagName != 'A') return
var textNode = link.firstChild
if (!textNode) return
var text = textNode.nodeValue
if (!text
|| text.substr(0, 6) != "Visit "
|| text.substr(text.length - 12) != "'s homepage!") return

return link.getAttribute('href')
}

function sanify(link) {
// what happened to find_first_of?
if (link.indexOf('?') != -1) return
if (link.indexOf('@') != -1) return
if (link.indexOf('forums.graal') != -1) return
if (link.substr(0, 7) != 'http://') return
return link
}

function getPavatar(resp) {
var r = /X-Pavatar:\s+([^\r\n]+)/i.exec(resp.responseHeaders)
if (r) return r[1]
var doc = new DOMParser().parseFromString(resp.responseText, 'text/xml')
//// xpath does not appear to work here?
//var links = doc.evaluate(
// '/html/head/link[@rel="pavatar"]',
// doc, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null)
//for (var i = 0; i < links.snapshotLength; ++i) {
// var link = links.snapshotItem(i)
var links = doc.getElementsByTagName('link')
for (var i = 0; i < links.length; ++i) {
var link = links[i]
if (link.getAttribute('rel') != 'pavatar') continue
var href = link.getAttribute('href')
if (href) return href
}
}

function addClass(elem, className) {
// elem.classList.add("customAvatar") -- only FF 3.6 and up
var oldClassList = elem.getAttribute('class')
if (!oldClassList)
elem.setAttribute('class', className)
else
elem.setAttribute('class', oldClassList + ' ' + className)
}

function setPavatar(userId, pavatar) {
var avs = document.evaluate(
'//img[starts-with(@src, "image.php?u=' + userId + '&")]',
document, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null)
for (var i = 0; i < avs.snapshotLength; ++i) {
var av = avs.snapshotItem(i)
av.setAttribute('src', pavatar)
av.removeAttribute('width')
av.removeAttribute('height')
addClass(av, 'customAvatar')
}
}

function combine(base, href) {
if (href.substr(0, 1) == '/') {
var i = base.indexOf('/', 8)
if (i == -1)
return base + href
else
return base.substr(0, i) + href
} else if (href.substr(0, 7) == 'http://') {
return href
} else {
return base + '/' + href
}
}

function onLoadCallback(link, userId) {
return function(resp) {
if (resp.status != 200) return
var pavatar = getPavatar(resp)
if (pavatar)
setPavatar(userId, combine(link, pavatar))
}
}

function checkAvatar(link, userId) {
link = sanify(link)
if (!link) return
GM_xmlhttpRequest({
'method': 'GET',
'url': link,
'headers': {'Accept': 'text/html,application/xhtml+xml'},
'onload': onLoadCallback(link, userId)
})
}

var handledUsers = {}

var tds = document.evaluate(
'//td[@class="vbmenu_option"]',
document, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null)

for (var i = 0; i < tds.snapshotLength; ++i) {
var td = tds.snapshotItem(i)
var link = getLink(td)
if (!link) continue
var node
for (node = td.parentNode;
node && node.tagName != 'TABLE';
node = node.parentNode)
;
var postIdLabel = node.parentNode.getAttribute('id')
var postId = postIdLabel.substring(9, postIdLabel.length - 5)
var userId = getUserId(postId)
if (!userId || handledUsers[userId]) continue
handledUsers[userId] = true
checkAvatar(link, userId)
}

var style = document.createElement('style')
style.setAttribute('type', 'text/css')
style.appendChild(document.createTextNode(' \
.customAvatar { \
max-width: 192px ! important; \
max-height: 272px ! important; \
} \
'))
document.getElementsByTagName('head')[0].appendChild(style)




If there is a link somewhere in there, Skyld approved of it.

Loriel 08-30-2009 03:18 PM

1 Attachment(s)
Here is a screenshot of it in action.

Attachment 49263

BigBear3 09-01-2009 08:11 PM

Quote:

Originally Posted by Loriel (Post 1519754)
Here is a screenshot of it in action.

Attachment 49263

Next.. the world.

Liberated 09-03-2009 04:47 PM

how to apply that script?

Inverness 09-03-2009 04:51 PM

Quote:

Originally Posted by Liberated (Post 1520850)
how to apply that script?

You need the Greasemonkey plugin for Firefox.


All times are GMT +2. The time now is 11:54 AM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.