Silkroad Online Forums

A community forum for the free online game Silkroad Online. Discuss Silkroad Online, read up on guides, and build your character and skills.

Faq Search Members Chat  Register Profile Login

All times are UTC




Post new topic Reply to topic  [ 48 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Silkroad Forum Greasemonkey Script (Updated January 14th 08)
PostPosted: Wed Jun 20, 2007 5:35 pm 
Ex-Staff
User avatar
Offline

Joined: Sep 2006
Posts: 5245
Location:
Off Topic
Updated January 14th 08


Quote:
Greasemonkey is a Firefox extension that allows you to write scripts that alter the web pages you visit. You can use it to make a web site more readable or more usable. You can fix rendering bugs that the site owner can't be bothered to fix themselves. You can alter pages so they work better with assistive technologies that speak a web page out loud or convert it to Braille. You can even automatically retrieve data from other sites to make two sites more interconnected.

With this in mind, I decided to make a script for the forum. It started off as something that would make the job of modding for I and others easier. However as I thought it would also benefit the community at large I decided to release a version for you guys.

Features Include:
-Scrolling Navigation

Things to do:
-Add a hide/show navigation link (Work In Progress)
-Lock navigation in place horizontally (Work In Progress)
-Link to PM a mod (Possible Feature)
If anyone thinks they can help me with any of these features please PM ME

Screenshots:
Image
Image

Steps To Install:
1) Be using Firefox (http://getfirefox.com)
2) Install the Greasemonkey Extension
3) Restart Firefox
4) Click here to install the script.
5) Click here if you would like remove the old navigation.
6) Your done.

Other Scripts:
-Quick Reply Box
-Signature Remover

Any questions/comments post here. It seems to be working on all resolutions, though 1024x768 and above is recommended. If it looks strange or doesn't seem to resemble what it looks like in the screenshots above, post here with a screenshot the resolution you are running on.

Enjoy :)

_________________
Ooh, I got a sexy ex-staff title!


Last edited by StealMySoda on Sat Sep 01, 2007 3:10 am, edited 13 times in total.

Top
 Profile  
 
 Post subject:
PostPosted: Wed Jun 20, 2007 5:45 pm 
Loyal Member
User avatar
Offline

Joined: Oct 2006
Posts: 1788
Location:
Oasis
Nice work Soda.

Props to you 8)

_________________
WTF Do All Those Stats Mean??? <--- CLICK ME NOW!


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jun 20, 2007 7:18 pm 
Forum God
User avatar
Offline

Joined: Jan 2006
Posts: 9543
Location: London, United Kingdom
nice work but can you tweak it so we have the seperators stil and the top few things like links to the main site, it looks kinda weird without them

_________________
Image


I am not online much if you wish to get hold of me send me a private message with your email/discord and ill catch up with you.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jun 20, 2007 8:07 pm 
Ex-Staff
User avatar
Offline

Joined: Sep 2006
Posts: 5245
Location:
Off Topic
[SD]Master_Wong wrote:
nice work but can you tweak it so we have the seperators stil and the top few things like links to the main site, it looks kinda weird without them

Basically it doesn't fit with them in. Unless of course you had a 1600x1200 res.

The most important thing for me to include were the affiliates, so anything after that, that wasn't needed was removed. I'll see what I can do with the separators though :)

_________________
Ooh, I got a sexy ex-staff title!


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jun 21, 2007 12:02 am 
thnx soda :love:


Top
  
 
 Post subject:
PostPosted: Thu Jun 21, 2007 8:46 pm 
Elite Member
User avatar
Offline

Joined: Feb 2006
Posts: 6119
Location: A den~
Yea thats pretty sweet, I still like ur top one though :d.

I used RIP extension to completely get rid of the side area on topics though lol.
http://img485.imageshack.us/img485/5183/srfsshu9.jpg

_________________
Image


Last edited by DarkJackal on Thu Jun 21, 2007 10:22 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject:
PostPosted: Thu Jun 21, 2007 8:59 pm 
Elite Member
User avatar
Offline

Joined: Mar 2006
Posts: 6423
Location: ____
*claps*


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jun 24, 2007 8:07 am 
Ex-Staff
User avatar
Offline

Joined: May 2007
Posts: 4441
Location: Life
I just installed this. This is awesome. Now I don't have to scroll all the way up, although like Master said, it's something new - just has to take a while to get used to.
Awesome. Thanks. :)
TBH, I actually just installed FireFox, especially for this. Thought it was about time. And now when I'm typing, there's a bunch of red lines running along everywhere...


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jun 24, 2007 2:40 pm 
Ex-Staff
User avatar
Offline

Joined: Sep 2006
Posts: 5245
Location:
Off Topic
FenaCorp wrote:
I just installed this. This is awesome. Now I don't have to scroll all the way up, although like Master said, it's something new - just has to take a while to get used to.
Awesome. Thanks. :)
TBH, I actually just installed FireFox, especially for this. Thought it was about time. And now when I'm typing, there's a bunch of red lines running along everywhere...


Time to fix that spelling of yours :P

_________________
Ooh, I got a sexy ex-staff title!


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jun 24, 2007 5:34 pm 
Banned User
User avatar
Offline

Joined: Jan 2007
Posts: 6588
Location: Oo Some where i dont know!!
is it to scroll more easy on the site or I can do something more ?

_________________
mwahahahahaha !!


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jun 24, 2007 10:56 pm 
Ex-Staff
User avatar
Offline

Joined: Sep 2006
Posts: 5245
Location:
Off Topic
BlackFox wrote:
is it to scroll more easy on the site or I can do something more ?


The navigation scrolls down the page with you. Other than that, no. I'm welcome to ideas on what to add, if I think it is useful I will attempt to add it.

_________________
Ooh, I got a sexy ex-staff title!


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jun 24, 2007 11:35 pm 
Banned User
User avatar
Offline

Joined: Jan 2007
Posts: 6588
Location: Oo Some where i dont know!!
StealMySoda wrote:
BlackFox wrote:
is it to scroll more easy on the site or I can do something more ?


The navigation scrolls down the page with you. Other than that, no. I'm welcome to ideas on what to add, if I think it is useful I will attempt to add it.

Ok, I maybe find something later so you can work hard with it.. :wink:

And PS. give StealMySoda a really hard challenge :twisted:

_________________
mwahahahahaha !!


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jun 25, 2007 3:30 am 
Elite Member
User avatar
Offline

Joined: Mar 2006
Posts: 6423
Location: ____
    [Loose Though]

Contact a Mod/Admin Button.



    [/Loose Thought]


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jun 26, 2007 2:47 am 
Ex-Staff
User avatar
Offline

Joined: Sep 2006
Posts: 5245
Location:
Off Topic
[SD]draquish wrote:
    [Loose Though]

Contact a Mod/Admin Button.



    [/Loose Thought]


Loose thought indeed. Not really sure how that would work. I'll have a think. Unless theres a way of capturing which mods are browsing GD and selecting one of them and providing a link to PM them.

Good idea though :) Hopefully I can come up with some way of doing it XD

_________________
Ooh, I got a sexy ex-staff title!


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jun 28, 2007 3:10 pm 
Banned User
Offline

Joined: Mar 2007
Posts: 3806
Location: Heaven
Could you add the new private section for the SRF guild members in it?

I'd like that :)

_________________
<<banned from SRF for proof of botting. -SG>>


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jun 28, 2007 9:04 pm 
Ex-Staff
User avatar
Offline

Joined: Sep 2006
Posts: 5245
Location:
Off Topic
TwelveEleven wrote:
Could you add the new private section for the SRF guild members in it?

I'd like that :)


I might add a guide so people can add custom links. Otherwise people are stuck with links that just clutter up their Nav that they will never use.

_________________
Ooh, I got a sexy ex-staff title!


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jul 02, 2007 2:35 am 
Banned User
Offline

Joined: Mar 2007
Posts: 3806
Location: Heaven
I understand, but I was thinking more of a special version for all the srf guild members :) :P. A tut will be even better though :)

Thanks for the image shrinker, but it has a flaw.. It doesn't resize the images people quote :( Hope you can fix that :)

_________________
<<banned from SRF for proof of botting. -SG>>


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 10, 2007 7:14 am 
Banned User
User avatar
Offline

Joined: Sep 2006
Posts: 1659
Location: 5th Dimension
I don't see the necessity in this addon :?


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 10, 2007 9:20 am 
Death2U wrote:
I don't see the necessity in this addon :?

saves us from scrollin down the page all the time ;)


Top
  
 
 Post subject:
PostPosted: Tue Jul 10, 2007 1:57 pm 
Ex-Staff
User avatar
Offline

Joined: Sep 2006
Posts: 5245
Location:
Off Topic
Death2U wrote:
I don't see the necessity in this addon :?

Then don't use it? :)

_________________
Ooh, I got a sexy ex-staff title!


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jul 15, 2007 3:12 am 
Casual Member
User avatar
Offline

Joined: Jul 2007
Posts: 64
Location: Come find me
Anyway to make it show a message in the message tab?

'Messages (3)' When you have 3 messages.

_________________
Charles Caleb Colton wrote:
We hate some persons because we do not know them; and will not know them because we hate them.

Image


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jul 16, 2007 12:03 am 
Banned User
Offline

Joined: Mar 2007
Posts: 3806
Location: Heaven
Dugu wrote:
Anyway to make it show a message in the message tab?

'Messages (3)' When you have 3 messages.


That indeed would be a great addon.

_________________
<<banned from SRF for proof of botting. -SG>>


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jul 16, 2007 6:49 am 
Ex-Staff
User avatar
Offline

Joined: Sep 2006
Posts: 5245
Location:
Off Topic
TwelveEleven wrote:
Dugu wrote:
Anyway to make it show a message in the message tab?

'Messages (3)' When you have 3 messages.


That indeed would be a great addon.

With my knowledge, it is not possible. However if there are any tech gurus out there with an idea of how this can be done, I'm open to suggestions :)

_________________
Ooh, I got a sexy ex-staff title!


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jul 16, 2007 10:24 am 
Forum God
User avatar
Offline

Joined: Jan 2006
Posts: 9543
Location: London, United Kingdom
maybe add this it looks a little odd without it
Image

_________________
Image


I am not online much if you wish to get hold of me send me a private message with your email/discord and ill catch up with you.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jul 16, 2007 4:21 pm 
Ex-Staff
User avatar
Offline

Joined: Sep 2006
Posts: 5245
Location:
Off Topic
[SD]Master_Wong wrote:
maybe add this it looks a little odd without it
Image

My issue was with that, if it wasn't there 800x600 resolution wouldn't have the affiliate buttons. I'll have a look when I have some free time and see if I can make them into text links.

_________________
Ooh, I got a sexy ex-staff title!


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jul 19, 2007 4:36 pm 
Valued Member
Offline

Joined: Jul 2007
Posts: 356
Location:
Odin
Can you host the script on filefront or rapidshit or megaupload until your webhosting comes back? :3

EDIT: And the images on imageshack mebbe? :3

_________________
Image
Wii #: 4818-7153-8518-3854


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jul 21, 2007 4:00 pm 
Ex-Staff
User avatar
Offline

Joined: Sep 2006
Posts: 5245
Location:
Off Topic
feba wrote:
Can you host the script on filefront or rapidshit or megaupload until your webhosting comes back? :3

EDIT: And the images on imageshack mebbe? :3


Should be back up now :)

_________________
Ooh, I got a sexy ex-staff title!


Top
 Profile  
 
 Post subject:
PostPosted: Fri Aug 03, 2007 4:43 pm 
Banned User
User avatar
Offline

Joined: Aug 2007
Posts: 1108
Location:
Off Topic
A realy good idea, tho I can't edit the image width. :/

I can't edit the files... do you maybe know what could be wrong?

_________________
<< banned for proof of botting. -cin >>


Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 07, 2007 5:03 pm 
Site Owner
User avatar
Offline

Joined: Dec 2005
Posts: 6390
Location:
Off Topic
TwelveEleven wrote:
Dugu wrote:
Anyway to make it show a message in the message tab?

'Messages (3)' When you have 3 messages.


That indeed would be a great addon.


Thought never crossed your mind that I can code that, did it.

lol.

And half the other things.

Eh.

Too bad site discussion is more like, peoples browsers not working or wanting more mod.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Aug 26, 2007 10:41 pm 
Banned User
User avatar
Offline

Joined: Aug 2007
Posts: 1108
Location:
Off Topic
Would it be possible somehow to resize the pictures in quotes also? Or... the admin could add this simple JavaScript to resize the images without the addon...

This is the JavaScript part:
Code:
<script type="text/javascript">
// ensure vbphrase exists
if (typeof vbphrase == 'undefined')
{
    vbphrase = new Array();
}
// ensure vbphrase exists

// cookie
document.cookie = "psistats_screenwidth = " + self.screen.width;
document.cookie = "psistats_screenheight = " + self.screen.height;
document.cookie = "psistats_screendepth = " + self.screen.colorDepth;
// cookie

NcodeImageResizer.IMAGE_ID_BASE = 'ncode_imageresizer_container_';
NcodeImageResizer.WARNING_ID_BASE = 'ncode_imageresizer_warning_';

function NcodeImageResizer(id, img) {
    this.id = id;
    this.img = img;
    this.originalWidth = 0;
    this.originalHeight = 0;
    this.warning = null;
    this.warningTextNode = null;

    img.id = NcodeImageResizer.IMAGE_ID_BASE + id;
}

NcodeImageResizer.getNextId = function() {
    id = 1;
    while (document.getElementById(NcodeImageResizer.IMAGE_ID_BASE + id) != null) {
        id++;
    }
    return id;
}

NcodeImageResizer.createOn = function(img) {
    isRecovery = false;
    // if this is a recovery from QuickEdit, which only restores the HTML, not the OO structure
    if (img.id && img.id.indexOf(NcodeImageResizer.IMAGE_ID_BASE) == 0 && document.getElementById(NcodeImageResizer.WARNING_ID_BASE + img.id.substr(NcodeImageResizer.IMAGE_ID_BASE.length)) != null) {
        newid = img.id.substr(NcodeImageResizer.IMAGE_ID_BASE.length);
        resizer = new NcodeImageResizer(newid, img);
        isRecovery = true;
        resizer.restoreImage();
    } else {
        newid = NcodeImageResizer.getNextId();
        resizer = new NcodeImageResizer(id, img);
    }

    if (resizer.originalWidth == 0) resizer.originalWidth = img.width;
    if (resizer.originalHeight == 0) resizer.originalHeight = img.height;

    if ((NcodeImageResizer.MAXWIDTH > 0 && resizer.originalWidth > NcodeImageResizer.MAXWIDTH) || (NcodeImageResizer.MAXHEIGHT > 0 && resizer.originalHeight > NcodeImageResizer.MAXHEIGHT)) {
        if (isRecovery) {
            resizer.reclaimWarning(warning);
        } else {
            resizer.createWarning();
        }
        resizer.scale();
    }
}

NcodeImageResizer.prototype.restoreImage = function() {
    newimg = document.createElement('IMG');
    newimg.src = this.img.src;
    this.img.width = newimg.width;
    this.img.height = newimg.height;
}

NcodeImageResizer.prototype.reclaimWarning = function() {
    warning = document.getElementById(NcodeImageResizer.WARNING_ID_BASE + newid);

    this.warning = warning;
    this.warningTextNode = warning.firstChild.firstChild.childNodes[1].firstChild;
    this.warning.resize = this;

    this.scale();
}

NcodeImageResizer.prototype.createWarning = function() {
    mtable = document.createElement('TABLE');
    mtbody = document.createElement('TBODY');
    mtr = document.createElement('TR');
    mtd1 = document.createElement('TD');
    mtd2 = document.createElement('TD');
    mimg = document.createElement('IMG');
    mtext = document.createTextNode('');

    mimg.src = 'error.gif';
    mimg.width = 16;
    mimg.height = 16;
    mimg.alt = '';
    mimg.border = 0;

    mtd1.width = 20;
    mtd1.className = 'td1';

    mtd2.unselectable = 'on';
    mtd2.className = 'td2';

    mtable.className = 'ncode_imageresizer_warning';
    mtable.textNode = mtext;
    mtable.resize = this;
    mtable.id = NcodeImageResizer.WARNING_ID_BASE + this.id;

    mtd1.appendChild(mimg);
    mtd2.appendChild(mtext);

    mtr.appendChild(mtd1);
    mtr.appendChild(mtd2);

    mtbody.appendChild(mtr);

    mtable.appendChild(mtbody);

    this.img.parentNode.insertBefore(mtable, this.img);

    this.warning = mtable;
    this.warningTextNode = mtext;
}

NcodeImageResizer.prototype.scale = function() {
    if (NcodeImageResizer.MAXWIDTH > 0 && this.originalWidth > NcodeImageResizer.MAXWIDTH) {
        resized = true;
        this.img.width = NcodeImageResizer.MAXWIDTH;
        this.img.height = (NcodeImageResizer.MAXWIDTH / this.originalWidth) * this.originalHeight;
    }
    if (NcodeImageResizer.MAXHEIGHT > 0 && this.originalHeight > NcodeImageResizer.MAXHEIGHT) {
        resized = true;
        this.img.height = NcodeImageResizer.MAXHEIGHT;
        this.img.width = (NcodeImageResizer.MAXHEIGHT / this.originalHeight) * this.originalWidth;
    }

    this.warning.width = this.img.width;
    this.warning.onclick = function() {
        return this.resize.unScale();
    }

    if (this.img.width < 450) {
        this.warningTextNode.data = vbphrase['ncode_imageresizer_warning_small'];
    } else if (this.img.fileSize && this.img.fileSize > 0) {
        this.warningTextNode.data = vbphrase['ncode_imageresizer_warning_filesize'].replace('%1$s', this.originalWidth).replace('%2$s', this.originalHeight).replace('%3$s', Math.round(this.img.fileSize / 1024));
        //mtext.data = '<phrase 1="'+this.originalWidth+'" 2="'+this.originalHeight+'" 3="'+Math.round(this.img.fileSize/1024)+'">$vbphrase[ncode_imageresizer_warning_filesize]</phrase>';
    } else {
        this.warningTextNode.data = vbphrase['ncode_imageresizer_warning_no_filesize'].replace('%1$s', this.originalWidth).replace('%2$s', this.originalHeight);
        //mtext.data = '<phrase 1="'+this.originalWidth+'" 2="'+this.originalHeight+'">$vbphrase[ncode_imageresizer_warning_no_filesize]</phrase>';
    }

    return false;
}

NcodeImageResizer.prototype.unScale = function() {
    switch (NcodeImageResizer.MODE) {
        case 'samewindow':
            window.open(this.img.src, '_self');
            break;
        case 'newwindow':
            window.open(this.img.src, '_blank');
            break;
        case 'enlarge':
        default:
            this.img.width = this.originalWidth;
            this.img.height = this.originalHeight;
            this.img.className = 'ncode_imageresizer_original';
            if (this.warning != null) {
                this.warningTextNode.data = vbphrase['ncode_imageresizer_warning_fullsize'];
                this.warning.width = this.img.width;
                this.warning.onclick = function() {
                    return this.resize.scale()
                };
            }
            break;
    }

    return false;
}

// something
NcodeImageResizer.MODE = 'enlarge';
NcodeImageResizer.MAXWIDTH = 500;
NcodeImageResizer.MAXHEIGHT = 500;
vbphrase['ncode_imageresizer_warning_small'] = 'Click this bar to view the full image.';
vbphrase['ncode_imageresizer_warning_filesize'] = 'This image has been resized. Click this bar to view the full image. The original image is sized %1$sx%2$s and weights %3$sKB.';
vbphrase['ncode_imageresizer_warning_no_filesize'] = 'This image has been resized. Click this bar to view the full image. The original image is sized %1$sx%2$s.';
vbphrase['ncode_imageresizer_warning_fullsize'] = 'Click this bar to view the small image.';
// something
</script>

This is the style part (shouldn't be changed):
Code:
<style type="text/css">
    table.ncode_imageresizer_warning {
        background: #FFFFE1;
        color: #000000;
        border: 1px solid #CCC;
        cursor: pointer;
    }

    table.ncode_imageresizer_warning td {
        font-size: 10px;
        vertical-align: middle;
        text-decoration: none;
    }

    table.ncode_imageresizer_warning td.td1 {
        padding: 5px;
    }

    table.ncode_imageresizer_warning td.td1 {
        padding: 2px;
    }
</style>

And this is how the HTML image tag would look like (add: onload="NcodeImageResizer.createOn(this);" to the img tag):
Code:
<img src="ncode_imageresizer.jpg" alt="" onload="NcodeImageResizer.createOn(this);" border="0">


AND OF COURSE!!!1 ... The error.gif that is needed: Image (http://img337.imageshack.us/img337/9681/errormt0.gif)

_________________
<< banned for proof of botting. -cin >>


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 48 posts ]  Go to page 1, 2  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 6 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group