Page 1 of 30 |
LeoNatan
☢ NFOHump Despot ☢
Posts: 73196
Location: Ramat Gan, Israel 🇮🇱
|
Posted: Thu, 4th Feb 2010 23:56 Post subject: NFOHump Custom Content [DISCONTINUED] |
|
 |
Information
I have created a script/extension that adds custom titles, fields and post voting (positive only) from an external server. The idea is, anyone who has the script sees the same custom titles and fields, and also sees what posts people have voted for. The more people use it (and have custom titles and fields set), the more populated it is (those that do not have custom titles or fields, will have what they have now, but will be able to see others').
Custom Content Registration: Link
Thanks Garus for all things server side!
Installation
Chrome: NFOHump Modding Extension
Firefox: NFOHump Modding Extension (GreaseMonkey not required).
Firefox with GreaseMonkey: NFOhump Modding Script
Important: When updating your script in GreaseMonkey, make sure to uninstall the old script.
Opera instructions:
Screenshot

|
|
Back to top |
|
 |
|
Posted: Fri, 5th Feb 2010 00:00 Post subject: |
|
 |
Great idea! Except... I don't use FF :O
|
|
Back to top |
|
 |
LeoNatan
☢ NFOHump Despot ☢
Posts: 73196
Location: Ramat Gan, Israel 🇮🇱
|
Posted: Fri, 5th Feb 2010 00:02 Post subject: |
|
 |
It can work on Chrome and other browsers that allow custom scripts, but I haven't had time to check.
|
|
Back to top |
|
 |
|
Posted: Fri, 5th Feb 2010 00:24 Post subject: |
|
 |
Could you put the map into an array and store it as a .js file, so that we can implement it ourselfs? 
|
|
Back to top |
|
 |
LeoNatan
☢ NFOHump Despot ☢
Posts: 73196
Location: Ramat Gan, Israel 🇮🇱
|
Posted: Fri, 5th Feb 2010 00:26 Post subject: |
|
 |
What do you mean? It is already separate, but the idea is if it is updated on a central place, it will update for everyone. 
|
|
Back to top |
|
 |
ixigia
[Moderator] Consigliere
Posts: 65079
Location: Italy
|
|
Back to top |
|
 |
|
Posted: Fri, 5th Feb 2010 01:14 Post subject: |
|
 |
I'm developing it for opera... And I'm sure that I'll end up being the only one using it 
|
|
Back to top |
|
 |
LeoNatan
☢ NFOHump Despot ☢
Posts: 73196
Location: Ramat Gan, Israel 🇮🇱
|
Posted: Fri, 5th Feb 2010 01:18 Post subject: |
|
 |
Hahaha, I think Mortibus uses Opera too.
Well, keep me posted, I will put it in the first post.
The GM_getData and GM_setData are used for caching; not sure what is the equivalent of that for Opera. The idea is to not stress the server every time you load a thread. So every 2 hours it loads the TXT file from the server and refreshes the custom titles. 
|
|
Back to top |
|
 |
LeoNatan
☢ NFOHump Despot ☢
Posts: 73196
Location: Ramat Gan, Israel 🇮🇱
|
Posted: Fri, 5th Feb 2010 01:19 Post subject: |
|
 |
ixigia wrote: | Awesome idea Leo! Super Mario waiting for the Chrome support  |
The difficulties I see now to port are the special GreaseMonkey functions I use that are not present in Chrome (it is supposed to have complete GM support, but...)
I am working on it. 
|
|
Back to top |
|
 |
|
Posted: Fri, 5th Feb 2010 01:24 Post subject: |
|
 |
Well you could store them in a cookie 
|
|
Back to top |
|
 |
LeoNatan
☢ NFOHump Despot ☢
Posts: 73196
Location: Ramat Gan, Israel 🇮🇱
|
Posted: Fri, 5th Feb 2010 01:27 Post subject: |
|
 |
That's the idea I have for for Chrome.
The GM_xmlhttpRequest is the problematic part. On Firefox, I couldn't get the xmlHttpRequest to work, but the one from GM worked. Maybe for Chrome it will work.
|
|
Back to top |
|
 |
|
Posted: Fri, 5th Feb 2010 01:32 Post subject: |
|
 |
Leo I have a little request. Could you store the names in the JSON format?
f.e.:
{
"iNatan":"Optimus Prime",
"PumpAction":"Ducky"
}
or I would have to use another customtitles file :'(
|
|
Back to top |
|
 |
LeoNatan
☢ NFOHump Despot ☢
Posts: 73196
Location: Ramat Gan, Israel 🇮🇱
|
Posted: Fri, 5th Feb 2010 01:33 Post subject: |
|
 |
Well, I would prefer to keep it as it is, because it produces smaller files and less bandwidth for other browsers. Can't you split it with JS like I did?
If not, then we'll do it with 2 files for now.
|
|
Back to top |
|
 |
|
Posted: Fri, 5th Feb 2010 01:36 Post subject: |
|
 |
Hmmm... I will try it again The problem is -> Greasemonkey has it's own xmlhttprequest function that loads data from each and every domain (infact this is a security problem -> fishing), but jQuery ( which I use as I am a lazy bastard) only accepts data from the domain it's executed from :'(
|
|
Back to top |
|
 |
LeoNatan
☢ NFOHump Despot ☢
Posts: 73196
Location: Ramat Gan, Israel 🇮🇱
|
Posted: Fri, 5th Feb 2010 01:39 Post subject: |
|
 |
Well, then you will probably not be able to have an external file anyway?
Have you tried the regular xmlhttprequest? This one should be available in Opera.
|
|
Back to top |
|
 |
|
Posted: Fri, 5th Feb 2010 04:12 Post subject: |
|
 |
|
|
Back to top |
|
 |
|
Posted: Fri, 5th Feb 2010 04:18 Post subject: |
|
 |
Oh and I would like to say that "userprofiles" should be a class not an id *thats not directed at you leo*
|
|
Back to top |
|
 |
LeoNatan
☢ NFOHump Despot ☢
Posts: 73196
Location: Ramat Gan, Israel 🇮🇱
|
Posted: Fri, 5th Feb 2010 04:32 Post subject: |
|
 |
Yeah, had to write a function for that one...
Good job, will put at the front post! How did you get XS to work? This is where I hit a dead end with Chrome, there is no XSS allowed at all.
BTW, did you use cookies to cache data? 
|
|
Back to top |
|
 |
|
Posted: Fri, 5th Feb 2010 04:37 Post subject: |
|
 |
Yes, I used cookies and the data comes from my evil php script that converts your innocent txt into a mean js function hehe More info on that is in the spoiler of my previous post You can take a look at the nfohump.js in the zip package and to see the result of the parsing of your file just open www.webwerkz.de/titles.php 
|
|
Back to top |
|
 |
LeoNatan
☢ NFOHump Despot ☢
Posts: 73196
Location: Ramat Gan, Israel 🇮🇱
|
Posted: Fri, 5th Feb 2010 04:39 Post subject: |
|
 |
Wait, is that host able to hold the file? Because my host gives only 1GB data, not sure if it will hold (should, but still).
BTW, if you want a custom title, tell me, I'll update 
|
|
Back to top |
|
 |
|
Posted: Fri, 5th Feb 2010 04:45 Post subject: |
|
 |
Shouldn't be a problem. Mine is doing the same what your script does so no panic, it won't produce more traffic Just that what firefox users would produce + the opera users
And if your host bitches around, I could upload it on one of my hosts
I doubt that we'll make more than >10.000.000 hits in a month Especially considering that the data will only be gathered once in 2 hours for each user. And only if he's surfing on nfohump 
|
|
Back to top |
|
 |
Horrordee
Soderator
Posts: 8867
Location: England
|
Posted: Fri, 5th Feb 2010 10:56 Post subject: |
|
 |
Interesting. Of course, I already got custom title but may have a fiddle when i get onto my main machine (running GreaseMonkey).
I can change your official Custom Title on this site, but only from a pre-defined list, and there are only about 7 options! Rinze can add more I believe.
Space for rent. Contact me for rates!
|
|
Back to top |
|
 |
|
Posted: Fri, 5th Feb 2010 11:01 Post subject: |
|
 |
Hey why didn't you made this for Stylish?
"Quantum mechanics is actually, contrary to it's reputation, unbeliveably simple, once you take the physics out."
Scott Aaronson chiv wrote: | thats true you know. newton didnt discover gravity. the apple told him about it, and then he killed it. the core was never found. | 
|
|
Back to top |
|
 |
|
|
Back to top |
|
 |
|
Posted: Fri, 5th Feb 2010 11:12 Post subject: |
|
 |
Horrordee wrote: | Interesting. Of course, I already got custom title but may have a fiddle when i get onto my main machine (running GreaseMonkey).
I can change your official Custom Title on this site, but only from a pre-defined list, and there are only about 7 options! Rinze can add more I believe. |
The user js is more powerful, it will replace your custom title if you have one 
|
|
Back to top |
|
 |
|
Posted: Fri, 5th Feb 2010 12:00 Post subject: |
|
 |
How to use this in FireFox ?? Long time ago when i used greasemonkey
Copied the script to a text file naming it *.JS but can't import it ?? Doing something wrong here
Empty again 
|
|
Back to top |
|
 |
deelix
PDIP Member
Posts: 32062
Location: Norway
|
|
Back to top |
|
 |
Horrordee
Soderator
Posts: 8867
Location: England
|
Posted: Fri, 5th Feb 2010 12:59 Post subject: |
|
 |
iNatan, could you do some other cool stuff with this?
Like make a like / dislike post button etc on each post?
Space for rent. Contact me for rates!
|
|
Back to top |
|
 |
Horrordee
Soderator
Posts: 8867
Location: England
|
Posted: Fri, 5th Feb 2010 13:01 Post subject: |
|
 |
I'm confused. How do I change my custom title then?
Space for rent. Contact me for rates!
|
|
Back to top |
|
 |
|
Posted: Fri, 5th Feb 2010 13:04 Post subject: |
|
 |
Horrordee wrote: | I'm confused. How do I change my custom title then? |
Think Leo has to edit the .txt file he uploaded http://nfohump.fileave.com/customtitles.txt
Newty182\Machine .. please
Ryzen 5 5600, ASUS ROG STRIX B550-F GAMING WIFI II, Corsair Vengeance RGB RT 32GB 3600MHz C16, MSI RTX 5070 Ti Ventus 3X OC , Corsair RMx Series RM750x. AOC AGON AG324UX - 4K 144Hz 1ms
Last edited by Newty182 on Fri, 5th Feb 2010 13:35; edited 2 times in total
|
|
Back to top |
|
 |
Page 1 of 30 |
All times are GMT + 1 Hour |