PDA

View Full Version : Show Thread Enhancements - Wikipedia reference-link BBCode


Patria
21 Jun 2006, 11:00
Wikipedia reference-link BBCode

Install instructions

1) Upload wikipedia.gif to /images/misc

2) Login into your AdminCP

3) Custom BB Codes, Add New BB Code

Title: Wikipedia reference-link

Replacement: <span style="background-color: White; border: 1px dashed Blue; padding: 3px; text-decoration: none;"><img src="images/misc/wikipedia.gif" alt="Wikipedia reference-link" align="absmiddle" border="0"><a href="http://en.wikipedia.org/wiki/{param (http://en.wikipedia.org/wiki/%7Bparam)}" target="new">{param}</a></span>
Example: Vbulletin
Use {option}: No
Button Image (Optional): images/misc/wikipedia.gif

--

Syntax: Keyword
Simple but useful. :)

thedvs
21 Jun 2006, 12:03
thanks alot, very handy, works in vb3.5.4 too :)

Gizmo5h1t3
21 Jun 2006, 16:27
works a treat...clicked install

Patria
21 Jun 2006, 17:21
Maybe I add a yellow popup layer, that show the first part of the wikipedia article, in future. ;)

projectego
21 Jun 2006, 18:07
Nice idea. :)

Patria
22 Jun 2006, 18:29
https://www.vbulletin.org/forum/external/2006/06/3.png

The first 500 chars of the wiki article. :cool:

Neal-UK
23 Jun 2006, 07:46
I just get the word as a link with the W above but when I click it it says invalid page and what not.

UPDATE: Showing this in my link: http://en.wikipedia.org/wiki/%20<br%20/>vbulletin<br%20/>

Patria
23 Jun 2006, 09:46
I just get the word as a link with the W above but when I click it it says invalid page and what not.

UPDATE: Showing this in my link: http://en.wikipedia.org/wiki/%20<br%20/>vbulletin<br%20/> Did your replacement code exactly look like this

<span style="background-color: White; border: 1px dashed Blue; padding: 3px; text-decoration: none;"><img src="images/misc/wikipedia.gif" alt="Wikipedia reference-link" align="absmiddle" border="0"><a href="http://en.wikipedia.org/wiki/{param}" target="new">{param}</a></span>

and the tag in the post like this?

vbulletin

Its currently only a link, the popup layer is a feature I work at present.

Neal-UK
23 Jun 2006, 17:48
Yes, all done exactly as the instructions stated. I'm using vb 3.6.0 Beta 3.

It was me not putting wikipedia in the Tag area when adding a new BB code. I put in by mistake and not just wikipedia, working fine now thankyou

Might be a good idea to mention that in first post as some noobs like me will probably make a mistake.

Red Matrix
05 Jul 2006, 10:54
Excellent, but I have modified it for my dark skin.

example post (http://iamwi.de/forums/showthread.php?t=1)

cheesegrits
18 Jul 2006, 22:55
Its currently only a link, the popup layer is a feature I work at present.

Any luck with the popup feature? That would make this code absolutely perfect. Useful enough as it is, but the popup feature would just rock.

Only one comment - you might want to choose a more neutral color for the default link background, which will work for either white or black based styles. I'm using Gray, which works in all my styles.

-- hugh

Patria
21 Jul 2006, 01:46
Any luck with the popup feature? That would make this code absolutely perfect. Useful enough as it is, but the popup feature would just rock.I still work on the feature. I get the infos from wikipedia and strip the HTML but at time I work on a better solution - with a additional text file or database with the keywords - that wont cause so much load for wikipedia.

Only one comment - you might want to choose a more neutral color for the default link background, which will work for either white or black based styles. I'm using Gray, which works in all my styles.

-- hughOk, thanks for the suggestion. :)

cheesegrits
22 Jul 2006, 17:46
I still work on the feature. I get the infos from wikipedia and strip the HTML but at time I work on a better solution - with a additional text file or database with the keywords - that wont cause so much load for wikipedia.


While I applaud your efforts to be a good net.citizen by caching wiki results, I'm just wondering what method you will use to make sure the cached results don't become outdated? Obviously one of the fundamental principles of wikipedia is that it is constantly changing, with anyone being able to edit the entries.

Maybe a cron job which runs thru your table once a day and refreshes the data?

On the flat file vs database, personally I would vastly prefer a database table.

If you need anyone to help with development or testing, I'd be more than happy to help out in any way I can.

-- hugh

rockaffe
24 Aug 2006, 09:26
Hi, I had a wiki installed in my site and I'll use surely this mod.
But there's a way to make it automatic, like a glossary?

Patria
30 Aug 2006, 17:37
Hi, I had a wiki installed in my site and I'll use surely this mod.
But there's a way to make it automatic, like a glossary?Not at present.

Bulent Tekcan
31 Aug 2006, 17:04
If you press Editor Mode (in advanced mode) something is wrong.Can you check it ?

Thanks

Patria
06 Sep 2006, 00:44
If you press Editor Mode (in advanced mode) something is wrong.Can you check it ?

ThanksWhats wrong? I mean ... could you provide me a more detailed description? :confused:

Luggruff
10 Oct 2006, 14:16
Is it possible to let the users select wich language they want to refer to?
Like a dropdown list or something (after you pressed the BB-code-button)

..Maybe like the smiley button in the post-editor?

Patria
13 Oct 2006, 00:34
Is it possible to let the users select wich language they want to refer to?
Like a dropdown list or something (after you pressed the BB-code-button)

..Maybe like the smiley button in the post-editor?No, but you could add a Wikipedia BBCode and Button for each language. Like [wikipedia-de], [wikipedia-en], [wikipedia-se] and so on ...

Luggruff
13 Oct 2006, 03:25
No, but you could add a Wikipedia BBCode and Button for each language. Like [wikipedia-de], [wikipedia-en], [wikipedia-se] and so on ...

if the smileybutton is possible, this would also be -_-
(I just asked since I can't figure out where the code for the smileybutton is)

And yes, I might not have made myself clear, but i did actually mean the possibility to choose (in the same way as you choose smileys from a drop-down) between different BB-codes.
Why? Because a button for each one would simply just take up too much space -_-

silurius
14 Oct 2006, 00:38
Excellent mod for referencing Wikipedia articles on a separate line! We do this all the time.

Would also love to have the flexibility to have a slightly less obvious version that looks like a standard html link (like the Wikipedia BBcode hack provided for 3.0.x). This is a minor request, though.

Second request would be for the preview popup you mentioned on the first page.

Great hack!

Patria
14 Oct 2006, 06:01
@Luggruff, silurius

I will see what I could do ... ;)

Would also love to have the flexibility to have a slightly less obvious version that looks like a standard html link...Use the Replacement code beneath and the Wikipedia links will be shown like normal links.

<a href="http://en.wikipedia.org/wiki/{param}" target="new">{param}</a>

silurius
14 Oct 2006, 20:57
@Luggruff, silurius

I will see what I could do ... ;)

Use the Replacement code beneath and the Wikipedia links will be shown like normal links.

<a href="http://en.wikipedia.org/wiki/{param}" target="new">{param}</a>Yeah, I actually realized this after posting. Lazy thinking on my part. What I would probably need to do is create two buttons, one for this and one for a subtle inline version.

Luggruff
26 Oct 2006, 11:32
*bump*

Patria
26 Oct 2006, 18:33
*bump*Yeah, yeah I didnt forgot you. :P When I have time I will modify the BBCode. If another developer likes to make modifications, he should feel free to do so.

perfphysio
05 Dec 2006, 10:53
My Wikipedia has stopped working in 3.6.4 in firefox browser 1.5.0.8

It mall formats the actual link. You can see an axample at the beginning of an existing post at http://www.physiobob.com/forum/showthread.php?t=3510

The first word was a link working perfectly until a recent upgrade. This might be a firefox issue or it might be a vbulletin issue. This is because I also have now seen that my plugin which does the same thing for adding utube plugins is also asking to install a plug to make it work!

I attach a screen shot of that as well for you interest in case it help to work out where the issue might be coming from

Patria
31 Dec 2006, 05:38
Looks like a Firefox issue. I visited your page some minutes ago and it worked well. :)

djbaxter
01 Jan 2007, 21:52
Excellent mod for referencing Wikipedia articles on a separate line! We do this all the time.

Would also love to have the flexibility to have a slightly less obvious version that looks like a standard html link (like the Wikipedia BBcode hack provided for 3.0.x). This is a minor request, though.

I like the "W" logo preceding the link but I modified it as follows to look better as an inline link:

<span style="background-color: #F5F5FF; border: 1px Blue; padding: 1px; text-decoration: none;"><img src="images/misc/wikipedia.gif" alt="Wikipedia reference-link" align="absmiddle" border="0"><a href="http://en.wikipedia.org/wiki/{param}" target="new">{param}</a></span>

See demo here (http://forum.psychlinks.ca/showpost.php?p=49999&postcount=2). Change the background-color from #F5F5FF to whatever best suits your forum style.

If you want to omit the "W", just use this:

<span style="background-color: #F5F5FF; border: 1px Blue; padding: 1px; text-decoration: none;"><a href="http://en.wikipedia.org/wiki/{param}" target="new">{param}</a></span>

Update: I've decided I prefer it as a link without the "W" image too.

RedGTiVR6
02 Mar 2007, 22:26
Quick question. Does this mod reference Wikipedia only?

If our web site has it's own wiki, would I be able to tie it into this site?

djbaxter
03 Mar 2007, 00:35
Quick question. Does this mod reference Wikipedia only?

Yes.

If our web site has it's own wiki, would I be able to tie it into this site?

If you edit the plugin to reference your wiki instead of wikipedia, sure.

You could use [wikipedia] and [wiki] to differentiate the two.

RedGTiVR6
03 Mar 2007, 01:57
very cool!

Thanks for the info.

BadgerDog
09 Apr 2007, 18:21
Very nice.... thank you ... :)

A pop up kind of "balloon" thing would be a nice option....

Regards,
Badger

Patria
16 Apr 2007, 22:56
A pop up kind of "balloon" thing would be a nice option....I wait for a sane interface from wikipedia.

Muellmann
19 Apr 2007, 01:25
This seems not to be valid html and it wasn't working at me.

djbaxter
19 Apr 2007, 02:58
It works fine for me. Check for typos.

newrkv
27 Feb 2008, 01:19
this is a great mod! i used this, but changed the wiki websit to my own, and now i can link my forums up with my wiki!

downloaded!

PEPITO69
25 Mar 2008, 19:17
Hi!
great Mod, installed.

Thanx