Advertisement:

Author Topic: [WiP Mod] SMF Wiki (0.2 / April 2011)  (Read 202382 times)

Offline Özgür

  • SMF Hero
  • ******
  • Posts: 3,925
  • Gender: Male
  • Özgür | jQuery Lover
    • ozgurce on Facebook
    • @ozgurce on Twitter
    • Özgür Yalçın
Re: [WiP Mod] SMF Wiki
« Reply #40 on: February 09, 2009, 09:13:04 AM »
Yes. According to me a list of commands we can use very useful.

Etc:
== Main Area ==
content
=== Main Area Sub ==
content
== Second Area ==
...

Offline niko

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 2,003
  • Gender: Male
    • Madjoki
Re: [WiP Mod] SMF Wiki
« Reply #41 on: February 09, 2009, 10:27:21 AM »
Thanks Nibogo, again question (Sorry, I do not have a lot of information about wiki)

how do i add this page into navigation menu ?


The mod dont add that automatically , you have to modifiy the template of the wiki to add more links.

I know of Niko is working in this and all the bugs in the Wiki :)

Actually it can be modified, there's page called Template:Navigation

http://www.smfarcade.info/wiki/Template:Navigation

Sneaky, Niko. ;)

I've been trying to hunt through source files, but I haven't been successful yet. So is there any current list of "wikicode" that will work? So far I know that {{wikiversion}} produces the version of the wiki, and Page Title links to the wiki page called Page Title. Any others?

Templates:

Code: [Select]
{{InfoBox|This manual is in work in progress version}}
Will include Template:Infobox page and replace {{{1}}} with "This manual is in work in progress version"

Code: [Select]
{{InfoBox|color=blue|title=Warning!|This manual is in work in progress version}}
in addition {{{color}}} will be replaced with "blue" and {{{tilte}}} with "Warning!"

there's also if function that can be used to check whether there's parameter

Code: [Select]
{{#if:{{{title}}}|<h2>{{{title}}}</h2>}}
produces nothing if there's no "title" parameter and <h2>Warning!</h2> in case above

Code: [Select]
{{#if:{{{title}}}|<h2>{{{title}}}</h2>|no title}}
produces "no title" if there's no "title" parameter

Example of template:
Code: [Select]
[html]<div class="infobox ibcol{{#if: {{{color}}}|{{{color}}}}}">
{{#if:{{{title}}}|<h2>{{{title}}}</h2>}}
{{{1}}}
</div>[/html]

Offline danielcberman

  • Newbie
  • *
  • Posts: 7
Re: [WiP Mod] SMF Wiki
« Reply #42 on: February 09, 2009, 12:46:08 PM »
Keep up the good work! I am working a social network - library resource site would hugely benefit from a SMF wiki mod!

Looking through the mod requests over the past several years an internal wiki has been something consistently asked for, glossed over with the statement that a mod should be created but nobody seemed to follow through until now.

I wish I could offer a bounty!  :)
« Last Edit: February 09, 2009, 01:00:43 PM by danielcberman »

Offline Minare

  • Sophist Member
  • *****
  • Posts: 1,233
  • Gender: Male
  • Yapayalnız Kalmak İskelelerde !
    • Meryemce
Re: [WiP Mod] SMF Wiki
« Reply #43 on: February 09, 2009, 01:19:41 PM »
I am following the topic, great job, I hope to see this mod packaged :)
O güzel Râsulu Yesrip yolunda
Hicret coşkusuyla aramalısın
Ayrılık Anne'den Baba'dan Yâr'dan
Ezelden geçerek kavuşmalısın

http://www.meryemce.biz

Offline Eliana Tamerin

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 5,611
  • Gender: Female
Re: [WiP Mod] SMF Wiki
« Reply #44 on: February 09, 2009, 03:01:44 PM »
Oh awesome, templates are already available.

What about images? I noticed the namespace for them, but will the [[Image:ImageFileName.ext|arg|param]] produce the image with arguments and parameters yet? Or is that a WIP for the next version?

EDIT: Btw, I tested out the Template:Infobox, but when I tried to add another type, it caused a 503 error and crashed Apache on my localhost.

My code:
Code: [Select]
[html]<div style="float:right;" class="infobox ibcol{{#if: {{{color}}}|{{{color}}}}}">
{{#if:{{{title}}}|<h2>{{{title}}}</h2>}}
{{#if:{{{name}}}|{{{name}}}}}
{{{1}}}
</div>[/html]

Code: [Select]
{{InfoBox|color=red|title=Example Title|name=Example Name|Example InfoBox Box}}
And in the error log, an undefined error:
index.php?action=wiki;page=Template:Infobox;sa=edit2
8: Undefined index: type
File: /path/to/board/Sources/WikiParser.php
Line: 389

EDIT (again): It seems the error does not occur if I add something like this instead:
Code: [Select]
[html]<div style="float:right;" class="infobox ibcol{{#if: {{{color}}}|{{{color}}}}}">
{{#if:{{{title}}}|<h2>{{{title}}}</h2>}}
{{#if:{{{name}}}|{{{name}}}<br />}}
{{{1}}}
</div>[/html]

EDIT (again again): After uploading a file, the Image:Filename.ext page shows code language instead of the image:
Code: [Select]
Array ( [local_name] => 6f1ff068f1d513c5f9918b97306cd2b13d60b1f9 [mime_type] => image/png [file_ext] => png [time] => Today at 02:34:16 PM [filesize] => 413.1962890625 [width] => 420 [height] => 630 [is_image] => 1 )
« Last Edit: February 10, 2009, 02:38:37 PM by Eliana Tamerin »
Do NOT PM me for support.

SimplePortal 2.3.6 is OUT!
SimplePortal Project Manager
Download | Docs
SimplePortal: Power of Simplicity!

Offline chimere

  • Newbie
  • *
  • Posts: 1
Re: [WiP Mod] SMF Wiki
« Reply #45 on: February 12, 2009, 05:29:41 PM »
very nice work

always a pain in the a$$ to update an integrated wiki with new theme, this is simple and seamless, very accessible to wiki dummies using only bbcode

keep up your efforts, much appreciated
« Last Edit: February 12, 2009, 05:32:48 PM by chimere »

Offline niko

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 2,003
  • Gender: Male
    • Madjoki
Re: [WiP Mod] SMF Wiki
« Reply #46 on: February 13, 2009, 02:29:01 AM »
Oh awesome, templates are already available.

What about images? I noticed the namespace for them, but will the [[Image:ImageFileName.ext|arg|param]] produce the image with arguments and parameters yet? Or is that a WIP for the next version?

EDIT: Btw, I tested out the Template:Infobox, but when I tried to add another type, it caused a 503 error and crashed Apache on my localhost.

My code:
Code: [Select]
[html]<div style="float:right;" class="infobox ibcol{{#if: {{{color}}}|{{{color}}}}}">
{{#if:{{{title}}}|<h2>{{{title}}}</h2>}}
{{#if:{{{name}}}|{{{name}}}}}
{{{1}}}
</div>[/html]

Code: [Select]
{{InfoBox|color=red|title=Example Title|name=Example Name|Example InfoBox Box}}
And in the error log, an undefined error:
index.php?action=wiki;page=Template:Infobox;sa=edit2
8: Undefined index: type
File: /path/to/board/Sources/WikiParser.php
Line: 389

EDIT (again): It seems the error does not occur if I add something like this instead:
Code: [Select]
[html]<div style="float:right;" class="infobox ibcol{{#if: {{{color}}}|{{{color}}}}}">
{{#if:{{{title}}}|<h2>{{{title}}}</h2>}}
{{#if:{{{name}}}|{{{name}}}<br />}}
{{{1}}}
</div>[/html]

EDIT (again again): After uploading a file, the Image:Filename.ext page shows code language instead of the image:
Code: [Select]
Array ( [local_name] => 6f1ff068f1d513c5f9918b97306cd2b13d60b1f9 [mime_type] => image/png [file_ext] => png [time] => Today at 02:34:16 PM [filesize] => 413.1962890625 [width] => 420 [height] => 630 [is_image] => 1 )

It seems that parser has problems when multiple tags is used, regex simple doesn't work in this case, thus next version will have yet-another parser rewrite, it will be not using regex but it will loop through text, speed hopefully won't suffer much. (it might be faster even), but since it's cached it would only slowdown first load of page after edit / cache expiry.

[[Image:x]] can be used, and it does accept params.

And image(and file) pages aren't ready yet

Offline Eliana Tamerin

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 5,611
  • Gender: Female
Re: [WiP Mod] SMF Wiki
« Reply #47 on: February 13, 2009, 06:17:28 PM »
What image parameters are available so far?

I was able to use [[Image:FileName.ext|thumb|50px]] without a problem, but [[Image:FileName.ext|thumb|50px|right]] would not function. Nor would a caption, although I may not have been setting it up properly. Didn't try the alt text, as I really didn't know how to supply its parameters.
Do NOT PM me for support.

SimplePortal 2.3.6 is OUT!
SimplePortal Project Manager
Download | Docs
SimplePortal: Power of Simplicity!

Offline [SiNaN]

  • SMF Super Hero
  • *******
  • Posts: 11,524
  • Young and Foolish
    • SimplePortal
Re: [WiP Mod] SMF Wiki
« Reply #48 on: February 14, 2009, 04:06:03 AM »
I guess it was [[Image:FileName.ext|(thumb|50|50x100)|(left|right)|alt|caption]].
Former SMF Core Developer | My Mods | SimplePortal

Offline Eliana Tamerin

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 5,611
  • Gender: Female
Re: [WiP Mod] SMF Wiki
« Reply #49 on: February 14, 2009, 12:37:36 PM »
Ok, I can get it to work like this: [[Image:FileName.ext|150|left|alt text|caption text]], minus the alt text and caption text showing up. It seems that it doesn't like having both thumb and a pixel specification like MediaWiki does. But at least the image will float to the right or left and resize.

And the CSS for it needs some tweaking, but mostly the issue is with the alt and caption texts not showing up properly.
Do NOT PM me for support.

SimplePortal 2.3.6 is OUT!
SimplePortal Project Manager
Download | Docs
SimplePortal: Power of Simplicity!

Offline [SiNaN]

  • SMF Super Hero
  • *******
  • Posts: 11,524
  • Young and Foolish
    • SimplePortal
Re: [WiP Mod] SMF Wiki
« Reply #50 on: February 14, 2009, 01:22:56 PM »
Yeah, that's it.

Size can be in three types:
+ thumb (means width=180)
+ 50 (means width=50)
+ 50x100 (means width=50 height=100)

Alt text is working fine with me on rev167. From what I see, although it extracts caption from the parameters, it does not use it.
Former SMF Core Developer | My Mods | SimplePortal

Offline Eliana Tamerin

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 5,611
  • Gender: Female
Re: [WiP Mod] SMF Wiki
« Reply #51 on: February 14, 2009, 01:31:28 PM »
Oh, you're right, alt text does work. I thought it added a title field as well. There's a suggestion, make the alt text also the title text on images (for hover-text).

Captions are probably not implemented yet, then.
Do NOT PM me for support.

SimplePortal 2.3.6 is OUT!
SimplePortal Project Manager
Download | Docs
SimplePortal: Power of Simplicity!

Offline ricorico

  • Jr. Member
  • **
  • Posts: 144
Re: [WiP Mod] SMF Wiki
« Reply #52 on: April 03, 2009, 10:02:38 PM »
so is this available yet? i was about to integrate a wiki into my site via tinyportal, but id prefer something easier thats already in smf if possible.  any word?

Offline niko

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 2,003
  • Gender: Male
    • Madjoki
Re: [WiP Mod] SMF Wiki
« Reply #53 on: April 05, 2009, 05:22:13 PM »
so is this available yet? i was about to integrate a wiki into my site via tinyportal, but id prefer something easier thats already in smf if possible.  any word?

Yes, it's posted in this topic.

Offline Özgür

  • SMF Hero
  • ******
  • Posts: 3,925
  • Gender: Male
  • Özgür | jQuery Lover
    • ozgurce on Facebook
    • @ozgurce on Twitter
    • Özgür Yalçın
Re: [WiP Mod] SMF Wiki
« Reply #54 on: April 05, 2009, 05:26:12 PM »
so is this available yet? i was about to integrate a wiki into my site via tinyportal, but id prefer something easier thats already in smf if possible.  any word?

Yes, it's posted in this topic.

Niko i use standalone mod.
http://www.rockayseri.net/sozluk/Galeri/ and http://www.rockayseri.net/sozluk/Galeri not the same.
How can i do ?

Offline niko

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 2,003
  • Gender: Male
    • Madjoki
Re: [WiP Mod] SMF Wiki
« Reply #55 on: April 09, 2009, 10:16:40 AM »
April 2009 snapshot is here. Earlier wikistandalone.php will still work.

No Warranty - Make backups - Report bugs - Not recommended in live pages

so is this available yet? i was about to integrate a wiki into my site via tinyportal, but id prefer something easier thats already in smf if possible.  any word?



Yes, it's posted in this topic.

Niko i use standalone mod.
http://www.rockayseri.net/sozluk/Galeri/ and http://www.rockayseri.net/sozluk/Galeri not the same.
How can i do ?


It's not possible atm without editing code.
« Last Edit: April 09, 2009, 04:10:53 PM by Niko »

Offline Eliana Tamerin

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 5,611
  • Gender: Female
Re: [WiP Mod] SMF Wiki
« Reply #56 on: April 09, 2009, 12:39:01 PM »
Wow, took me a while to figure out what had changed.

Template:Navigation is now SMFWiki:Sidebar for anybody else going "wtf?" like I did.

Niko, I had an error crop up when I added [[Image:imagename.jpg]] to a wiki page:
Code: [Select]
Fatal error: Call to undefined method WikiPage::__debug_die() in path/to/smf/Sources/WikiParser.php on line 345
Occurs when I try to preview or view a page with a call to an [[Image:imagename.jpg]] item in it.

Also, main page says that Template:wikiversion cannot be found.
Do NOT PM me for support.

SimplePortal 2.3.6 is OUT!
SimplePortal Project Manager
Download | Docs
SimplePortal: Power of Simplicity!


Offline niko

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 2,003
  • Gender: Male
    • Madjoki
Re: [WiP Mod] SMF Wiki
« Reply #58 on: April 09, 2009, 04:10:25 PM »
Wow, took me a while to figure out what had changed.

Template:Navigation is now SMFWiki:Sidebar for anybody else going "wtf?" like I did.

Niko, I had an error crop up when I added [[Image:imagename.jpg]] to a wiki page:
Code: [Select]
Fatal error: Call to undefined method WikiPage::__debug_die() in path/to/smf/Sources/WikiParser.php on line 345
Occurs when I try to preview or view a page with a call to an [[Image:imagename.jpg]] item in it.

Also, main page says that Template:wikiversion cannot be found.

This should fix both issues. It also adds support for telling that page should not be indexed by including "__NOINDEX__" somewhere in page.

Offline Eliana Tamerin

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 5,611
  • Gender: Female
Re: [WiP Mod] SMF Wiki
« Reply #59 on: April 09, 2009, 04:55:09 PM »
Is the page you're referring to the Wiki version template, or the wiki pages in general? I get what you're saying now.

Thanks for the update, however upon install and navigation to the main page, it failed to load. Here's the error from error logs:

http://website.com/forum/index.php?action=wiki;page=Main_Page
8: Array to string conversion
File: path/to/smf/Sources/WikiParser.php
Line: 1027
« Last Edit: April 09, 2009, 04:58:56 PM by Eliana Tamerin »
Do NOT PM me for support.

SimplePortal 2.3.6 is OUT!
SimplePortal Project Manager
Download | Docs
SimplePortal: Power of Simplicity!