vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=194)
-   -   Show Thread Enhancements - Wikipedia reference-link BBCode (https://vborg.vbsupport.ru/showthread.php?t=119241)

Patria 06-20-2006 09:00 PM

Wikipedia reference-link BBCode
 
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:
Code:

<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>
Example:
Code:

[wikipedia]Vbulletin[/wikipedia]
Use {option}: No
Button Image (Optional): images/misc/wikipedia.gif

--

Syntax:
Code:

[wikipedia]Keyword[/wikipedia]
Simple but useful. :)

thedvs 06-21-2006 10:03 AM

thanks alot, very handy, works in vb3.5.4 too :)

Gizmo5h1t3 06-21-2006 02:27 PM

works a treat...clicked install

Patria 06-21-2006 03:21 PM

Maybe I add a yellow popup layer, that show the first part of the wikipedia article, in future. ;)

projectego 06-21-2006 04:07 PM

Nice idea. :)

Patria 06-22-2006 04: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 05: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 07:46 AM

Quote:

Originally Posted by Neal-UK
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%...lletin<br%20/>

Did your replacement code exactly look like this
PHP Code:

<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?
PHP Code:

[wikipedia]vbulletin[/wikipedia

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

Neal-UK 06-23-2006 03: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 [wikipedia][/wikipedia] 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 08:54 AM

Excellent, but I have modified it for my dark skin.

example post

cheesegrits 07-18-2006 08:55 PM

Quote:

Originally Posted by BlackSun
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-20-2006 11:46 PM

Quote:

Originally Posted by cheesegrits
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.

Quote:

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
Ok, thanks for the suggestion. :)

cheesegrits 07-22-2006 03:46 PM

Quote:

Originally Posted by BlackSun
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 07: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 03:37 PM

Quote:

Originally Posted by rockaffe
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 03:04 PM

If you press Editor Mode (in advanced mode) something is wrong.Can you check it ?

Thanks

Patria 09-05-2006 10:44 PM

Quote:

Originally Posted by Bulent Tekcan
If you press Editor Mode (in advanced mode) something is wrong.Can you check it ?

Thanks

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

Luggruff 10-10-2006 12: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 10:34 PM

Quote:

Originally Posted by Luggruff
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 01:25 AM

Quote:

Originally Posted by Patria
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 10: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 04:01 AM

@Luggruff, silurius

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

Quote:

Originally Posted by silurius
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.

PHP Code:

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


silurius 10-14-2006 06:57 PM

Quote:

Originally Posted by Patria
@Luggruff, silurius

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

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

PHP Code:

<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 09:32 AM

*bump*

Patria 10-26-2006 04:33 PM

Quote:

Originally Posted by Luggruff
*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

Quote:

Originally Posted by silurius (Post 1096615)
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:

Code:

<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. Change the background-color from #F5F5FF to whatever best suits your forum style.

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

Code:

<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

Quote:

Originally Posted by RedGTiVR6 (Post 1194432)
Quick question. Does this mod reference Wikipedia only?

Yes.

Quote:

Originally Posted by RedGTiVR6 (Post 1194432)
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 04:21 PM

Very nice.... thank you ... :)

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

Regards,
Badger

Patria 04-16-2007 08:56 PM

Quote:

Originally Posted by BadgerDog (Post 1223444)
A pop up kind of "balloon" thing would be a nice option....

I wait for a sane interface from wikipedia.

Muellmann 04-18-2007 11:25 PM

This seems not to be valid html and it wasn't working at me.

djbaxter 04-19-2007 12: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


All times are GMT. The time now is 01:59 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.02008 seconds
  • Memory Usage 1,828KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (5)bbcode_code_printable
  • (4)bbcode_php_printable
  • (16)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (37)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete