View Full Version : Show Thread Enhancements - Wikipedia reference-link BBCode
Patria
06-20-2006, 10:00 PM
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
06-21-2006, 11:03 AM
thanks alot, very handy, works in vb3.5.4 too :)
Gizmo5h1t3
06-21-2006, 03:27 PM
works a treat...clicked install
Patria
06-21-2006, 04:21 PM
Maybe I add a yellow popup layer, that show the first part of the wikipedia article, in future. ;)
projectego
06-21-2006, 05:07 PM
Nice idea. :)
Patria
06-22-2006, 05:29 PM
https://vborg.vbsupport.ru/external/2006/06/3.png
The first 500 chars of the wiki article. :cool:
Neal-UK
06-23-2006, 06:46 AM
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
06-23-2006, 08:46 AM
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
06-23-2006, 04:48 PM
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
07-05-2006, 09:54 AM
Excellent, but I have modified it for my dark skin.
example post (http://iamwi.de/forums/showthread.php?t=1)
cheesegrits
07-18-2006, 09:55 PM
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
07-21-2006, 12:46 AM
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
07-22-2006, 04:46 PM
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
08-24-2006, 08:26 AM
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
08-30-2006, 04:37 PM
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
08-31-2006, 04:04 PM
If you press Editor Mode (in advanced mode) something is wrong.Can you check it ?
Thanks
Patria
09-05-2006, 11:44 PM
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-10-2006, 01:16 PM
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
10-12-2006, 11:34 PM
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
10-13-2006, 02:25 AM
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
10-13-2006, 11:38 PM
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
10-14-2006, 05:01 AM
@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
10-14-2006, 07:57 PM
@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
10-26-2006, 10:32 AM
*bump*
Patria
10-26-2006, 05:33 PM
*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
12-05-2006, 09:53 AM
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
12-31-2006, 04:38 AM
Looks like a Firefox issue. I visited your page some minutes ago and it worked well. :)
djbaxter
01-01-2007, 08:52 PM
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
03-02-2007, 09:26 PM
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-02-2007, 11:35 PM
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-03-2007, 12:57 AM
very cool!
Thanks for the info.
BadgerDog
04-09-2007, 05:21 PM
Very nice.... thank you ... :)
A pop up kind of "balloon" thing would be a nice option....
Regards,
Badger
Patria
04-16-2007, 09:56 PM
A pop up kind of "balloon" thing would be a nice option....I wait for a sane interface from wikipedia.
Muellmann
04-19-2007, 12:25 AM
This seems not to be valid html and it wasn't working at me.
djbaxter
04-19-2007, 01:58 AM
It works fine for me. Check for typos.
newrkv
02-27-2008, 12:19 AM
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
03-25-2008, 06:17 PM
Hi!
great Mod, installed.
Thanx
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.