Advertising (This ad goes away for registered users. You can Login or Register)

New Homebrew plugin on the forum

wololo
Site Admin
Posts: 3621
Joined: Wed Oct 15, 2008 12:42 am
Location: Japan

New Homebrew plugin on the forum

Post by wololo »

Today I added a plugin to the forum. This plugin detects the names of some homebrews in your posts, and adds a popup with a description of the homebrew, as well as a link to its download page on our database. You will recognize these automated links with their purple/blue background.

For example if you type "Wagic", the script should detect it in your post, and if you move your mouse over it, it will give you some information.

Image

I made it with performance in mind, therefore it has a few limitations:
- If the page is big, the links will take some time to appear. This is to avoid the script taking too much resources on your machines.
- The script is limited to 500 homebrews for now. In order to help people discover new content, the homebrews are a mix of the most succesful homebrews and homebrews that are not getting enough attention.

You can help make this functionality better!

Broken link? New version? A homebrew should get a popup?
You can add homebrews to our database by following the instructions here: viewtopic.php?f=2&t=9380
As we add more homebrews and download links, the plugin will become more and more useful
And keep voting for your favorite homebrews on /Downloads. It's simple (1 click to rate, no login required), and it will help the plugin choose the most important homebrews!

Add this plugin to your own forum/website!
I made this plugin so that it can be used on your own site if you are interested. To add the plugin to your forum, just add the following lines just before the closing "body" tag of your website:

Code: Select all

<script type="text/javascript" src="http://wololo.net/talk/hblist.js"></script>
<script type="text/javascript" src="http://wololo.net/talk/downloads.js"></script>
This will add the script to your entire page. If you want to fine-tune where the script runs, you can define the global variable w_classes, which will then apply the plugin only on divs of the matching classes. For example, a good value for a phpBB forum is:

Code: Select all

<script type="text/javascript">var w_classes="content,signature";</script>
<script type="text/javascript" src="http://wololo.net/talk/hblist.js"></script>
<script type="text/javascript" src="http://wololo.net/talk/downloads.js"></script>
This will apply the plugin only to posts and signatures, and not to other parts of the site.

alternatively, you can download hblist.js and downloads.js on your own servers if you prefer. Note however that the file hblist.js gets updated regularly with a more accurate list of homebrews. You can also create your own list of homebrews to replace hblist.js (the format is straightforward: string to match, and id of the download page, as long as it matches an entry on /Downloads) if you want

I've tested this plugin a lot on various browsers, but please let me know if you run into problems.
What do you think?
Advertising
If you need US PSN Codes, this technique is what I recommend.

Looking for guest bloggers and news hunters here at wololo.net, PM me!
ramiro1398
Posts: 116
Joined: Sat Feb 26, 2011 3:12 am

Re: New Homebrew plugin on the forum

Post by ramiro1398 »

pretty cool! 8-)
Advertising
waratte
Posts: 1320
Joined: Wed Oct 20, 2010 12:03 am

Re: New Homebrew plugin on the forum

Post by waratte »

This is pretty nice, I've noticed that today and I had no idea what that was. It surprised me a bit. :)

There are three things I've noticed about this new plugin is that if you make the text a "URL" first, the plugin won't make the text become a link.

Having at least one wide-latin character in the text will also do the same. The text won't be made into a link by the plugin.

The last one being that it seems to capitalize the text if it does become a link by the plugin. :???:
TiPi
Retired Mod
Posts: 740
Joined: Tue Sep 28, 2010 5:32 am
Contact:

Re: New Homebrew plugin on the forum

Post by TiPi »

Very nice! :D
Problems or questions? Feel free to contact me.
-My Blog-
ViP3R
Posts: 615
Joined: Fri Dec 31, 2010 8:55 am
Location: Flash0:/Philippines
Contact:

Re: New Homebrew plugin on the forum

Post by ViP3R »

This is cool :) thanks
Goodbye, Captain John "Soap" Mactavish
And Goodbye, Joe Frazier - thanks for encouraging me to have my own PSP
me7i
Banned
Posts: 205
Joined: Thu Oct 13, 2011 9:38 am

Re: New Homebrew plugin on the forum

Post by me7i »

Just my personal opinion but this is anoying, its like more ads
Helix GeNeReToR
Posts: 224
Joined: Tue Aug 16, 2011 10:58 am
Location: India

Re: New Homebrew plugin on the forum

Post by Helix GeNeReToR »

Cool :lol: :lol: :lol:
My Gadget Info
iPhone 5S - iOS 7.1
Sony Xperia L (Rooted :) )
Dell Inspiron 15z 5523
PSP 3004 (4g)- 6.60 PRO C fix3

Image
wololo
Site Admin
Posts: 3621
Joined: Wed Oct 15, 2008 12:42 am
Location: Japan

Re: New Homebrew plugin on the forum

Post by wololo »

me7i wrote:Just my personal opinion but this is anoying, its like more ads
Err, I was expecting some comments about the plugin being slow, or not showing enough information, but I must admit I wasn't expecting that type of comment :shock: The fact that it uses an interface similar to some ads mechanisms shouldn't misguide you. Those are not commercial links, they are links that are here to help (reminder: the homebrews are free and created by people like you and me, from communities like this one). People are constantly looking for homebrews and end up on these forums looking for download links, now people who mention some homebrews don't even have to look for a download link, it will be found instantly, along with a screenshot and a description.

Can you give details about why you find this annoying? Does it distract you from reading?
I guess mid-term I can probably add an option in the user panel for people to deactivate it, but I'd like to understand why you find that annoying "like ads". Is it the functionality itself (the fact that it gets the homebrew information from my server), or the way it is implemented (the popup thing)?
waratte wrote: There are three things I've noticed about this new plugin is that if you make the text a "URL" first, the plugin won't make the text become a link.
Right, this is intentional, I'm not messing up with other people's links, this just highlights "pure" text.

waratte wrote: Having at least one wide-latin character in the text will also do the same. The text won't be made into a link by the plugin.
Ah, that's very possible, do you have an example?
The last one being that it seems to capitalize the text if it does become a link by the plugin. :???:
Right. I'll see what I can do for this one
If you need US PSN Codes, this technique is what I recommend.

Looking for guest bloggers and news hunters here at wololo.net, PM me!
waratte
Posts: 1320
Joined: Wed Oct 20, 2010 12:03 am

Re: New Homebrew plugin on the forum

Post by waratte »

Here's an example...

Normal text, the plugin makes it a link:

Wagic

Mixed text, the "W" (The only wide-latin char in the text) causes the plugin to not make the text a link:

Wagic

Wide-latin, the text isn't made into a link:

Wagic
wololo
Site Admin
Posts: 3621
Joined: Wed Oct 15, 2008 12:42 am
Location: Japan

Re: New Homebrew plugin on the forum

Post by wololo »

Ok, thanks for the example, I think I won't fix that. I could probably do some clever encoding detection, but that would make the plugin slow on everybody's computer.
If you need US PSN Codes, this technique is what I recommend.

Looking for guest bloggers and news hunters here at wololo.net, PM me!
Locked

Return to “Announcements”