News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Wikipedia BBCode

Started by karlbenson, August 25, 2006, 11:29:28 AM

Previous topic - Next topic

xOraclex

Quote from: karlbenson on June 01, 2007, 09:26:31 AM
yeah
its only supposed to work as either
[wiki]Portugal[/wiki]

[wiki=Portugal]Destination Portugal[/wiki]

but
[wiki=]Portugal[/wiki] should NOT work

I see what you mean.
I not an expert in this, but believe me. It works.
Honestly, try it.

casp3r

Finally got this to work on the Cityscape theme (or so I thought). The button appears in the editor so I can select a word, click the button and it adds the tags e.g.

[wiki=]Search Phrase[/wiki]

when I do a preview of the post I get

Search Phrase wiki
which is great but when I post the message I get

[wiki=]Search Phrase[/wiki]

What have I missed?

Thanks


Aviation forum & gallery
www.niaviation.co.uk

karlbenson

After the = sign you need to put a keyword,and then the phrase

[wiki=simpsons]See what wiki says about the simpsons[/wiki]

casp3r

#43
Sorry it has taken so long to get back to you.

Adding a keyword after the = makes not difference.

[wiki=simpsons]See what wiki says about the simpsons[/wiki]
shows as

See what wiki says about the simpsonswiki

when previewed but shows as

[wiki=simpsons]See what wiki says about the simpsons[/wiki]

when posted
Aviation forum & gallery
www.niaviation.co.uk

Tearstar

Quote from: tsmalmbe on March 14, 2007, 04:05:35 AM
I want to change this to point to my local mediawiki instead. What and where should I modify?

Thanks. Seems like a great mod.


I am wanting this same availability. I know that this quoted user says he did his own mod, which I cannot find with search, but could this functionality be added into your mod, or could someone point me to this users mod if he has made it available.?

AllMassive

I'm using this MOD together with your Anon-Mod.

I've the following Problem:

With Anon-Mod enabled, Wiki-Links like http://de.wikipedia.org/wiki/Johann_Pachelbel#Kanon_in_D
dont get displayed correct - it just jumps to http://de.wikipedia.org/wiki/Johann_Pachelbel
Is this a Wiki-Plugin Problem or is it caused by those dereferrer-services ?

karlbenson

its not a bug with either of the mods.

When bypassing the mods it still doesn't pass the # part when using any de-referer.

I'm presuming because that anchor bit (#text) isnt passed as part of the SERVER variables of those sites.

I don't know if there is a way around it, even then it will be for the de-referer sites to fix.

kul

Have you checked with SMF1.1.4?
I try but it does not work.
The code is not translated into a wikipedia link (still [wiki=...]fdfd[/wiki] after posting), and i cannot uninstall also (a blank page returned)

karlbenson

I tested all my mods worked with 1.1.4 the other day.

Flying Drupalist

Thanks a lot, seems easy to convert to use own site.

kul

#50
Yes, it works with 1.1.4.
The problem is with theme. It works fine when I change the theme to default, but the wikipedia link is not displayed (it is still displayed as the original code [wiki=]...[/wiki]) with my theme, Orange-lt (find it here http://custom.simplemachines.org/themes/index.php?lemma=155) (and I cannot uninstall also)

This theme does not have its own post.template.php.
Could you check this theme?
I really like this mod but don't know how to change with the theme.

Thanks a lot

Flying Drupalist

I had to install it manually, but it worked! So all's good.

kul

Could any one show me how to manually change the orangelt theme for this mod?

Thanks so much

kul

Quote from: kul on September 30, 2007, 06:05:39 AM
Yes, it works with 1.1.4.
The problem is with theme. It works fine when I change the theme to default, but the wikipedia link is not displayed (it is still displayed as the original code [wiki=]...[/wiki]) with my theme, Orange-lt (find it here http://custom.simplemachines.org/themes/index.php?lemma=155) (and I cannot uninstall also)

This theme does not have its own post.template.php.
Could you check this theme?
I really like this mod but don't know how to change with the theme.

Thanks a lot

Can anyone help?
Thanks

karlbenson


Stargater59

I can't seem to uninstall it.

I tried modifying it to go to my wiki instead of Wikipedia, but when I used it, the BBC didn't work. All it did was

[wiki]test[/wiki]

So, now when I go to uninstall it, I just get a blank white page.

When I installed it, I had two warnings. One was for the classic theme 'File Not Found'. That's because I removed the theme.

The other warning was for the Spanish language template, or something. I forget what it said. But I figured those files wouldn't matter.

Is there anything wrong in the URL?

index.php?action=packages;sa=uninstall;package=Wiki_BBCode.zip

Ch4rOon

#56
Hail ! ;)

Same thing as Stargater59 : I can't unistall it. Unistall bouton = blank page, and the mod is still installed and active.

I haven't checked the "install.xml" file yet. I think that's it because there are missing uninstall values in it.

[edit]Forced uninstall ok. There is not uninstall code line in "install.xml" so i've made it manually. It's not taking to long there's only 3 files to look at ;)

Ryukai

Hi!


Is it possible to link to multiple languages?

If I want to link to a english page by default I make [wiki]test[/wiki], but what if I also want to link to another languages ... like hxxp:fr.wikipedia.com [nonactive] ?

Does this mod allow to use one default language, and use a setting in the bbcode to link to another language, like for example [wiki=test,fr]test[/wiki] ?


Thanks in advance

karlbenson

The mod doesnt support choosing from multiple languages.
However it does support some languages and will use
fr.wikipedia.com if your using french language
en.wikipedia.com (english, british, default)
pt.wikipedia.com if your using portuguese
etc

Ryukai

#59
Hi again karlbenson,

I did some changes on the Wikipedia BBCode so that this mod allows what I've requested above.
If you are interested or anyone wants that option, you'll have to replace just a few lines:


On Subs.php

Find

array(
                'tag' => 'wiki',
                'type' => 'unparsed_equals',
                'before' => '<a href="http://'.$txt['lang'].'.wikipedia.org/wiki/$1" target="_blank" style="border-bottom:1px dashed #FF0000;text-decoration:none" class="wiki_link">',
                'after' => '</a><sup><span style="font-size:7pt;color:red;" class="wiki_sup">'.$txt['wiki'].'</span></sup>',
                'disallow_children' => array('email', 'ftp', 'url', 'iurl'),
                'disabled_before' => '',
                'disabled_after' => '$1',
            ),


Replace with

array(
                'tag' => 'wiki',
                'type' => 'unparsed_commas_content',
                'content' => '<a href="http://$3.wikipedia.org/wiki/$2" target="_blank" style="border-bottom:1px dashed #FF0000;text-decoration:none" class="wiki_link">$1</a><sup><span style="font-size:7pt;color:red;" class="wiki_sup">'.$txt['wiki'].'</span></sup>',
                'disallow_children' => array('email', 'ftp', 'url', 'iurl'),
                'disabled_content' => 'http://$3.wikipedia.org/wiki/$2',
            ),



This will still keep the bbcode [wiki]Text[/wiki] to the default language, but the [wiki=something] now have to have the language set, so it should be something like this [wiki=something,en].
This will allow users to link to terms in multiple languages on Wikipedia.

ex.
[wiki=simpsons,en]Simpsons English Wiki page[/wiki]
[wiki=simpsons,fr]Simpsons French Wiki page[/wiki]
[wiki=simpsons,pt]Simpsons Portuguese Wiki page[/wiki]
etc.


Advertisement: