+ Reply to Thread
Page 1 of 2
1 2 LastLast
Results 1 to 10 of 13

Thread: Adding Text to Mediawiki for Beginners

Share/Bookmark
  1. #1
    Junior Member ghans_12 is an unknown quantity at this point
    Join Date
    Jun 2010
    Posts
    10
    Rep Power
    1

    Default Adding Text to Mediawiki for Beginners

    Hi I am new to Mediawiki and still learning lot of things daily. After almost 2 weeks I was able to finally get it working.
    Now, I have started to write text in wiki and I noticed that it is heavily using HTML tags also. Will it make sense that I use some kind of html code generator software OR web-based code generator. So that I can copy all the generated code from software to mediawiki?

    I would like to know, how you all are using formatting option in mediawiki? Do you remember all those syntax's ?

    Thanks
    MediaWiki 1.15.1
    PHP 5.3.2-1ubuntu4.2 (apache2handler)
    MySQL 5.1.41-3ubuntu12.1
    Ubuntu Server 10.04

  2. #2
    Super Moderator Skizzerz is a jewel in the rough Skizzerz is a jewel in the rough Skizzerz is a jewel in the rough Skizzerz's Avatar
    Join Date
    Dec 2007
    Location
    Texas
    Posts
    2,507
    Rep Power
    7

    Default

    you can install the FCKeditor extension -- it will give you a WYSIWYG (What You See Is What You Get) editor, much like Microsoft Word.

    Otherwise, you cannot use any of the other tools out there because MediaWiki's wiki markup is NOT HTML, it just uses some HTML tags with strict input validation. There are wiki markup help pages on www.mediawiki.org (and perhaps en.wikibooks.org has a module on it too) and I believe there is a book or two about MediaWiki geared towards beginners.

    The majority of advanced MediaWiki users have learned the wiki markup syntax and just use it raw, and you should consider learning it at some point yourself even if you do install FCKeditor, as there are things that can only be done using raw markup.
    --Skizzerz (MediaWiki | StrategyWiki)

    How am I helping? Rate this post by clicking the icon below!

    Private messages are for private information. I will ignore any support requests in private messages.

    NEVER EDIT CORE FILES! Revert any core modifications you make before asking for help here. I will not give support for modified versions of MediaWiki (but I will yell at you)

  3. #3
    Senior Member gregra is on a distinguished road gregra's Avatar
    Join Date
    Jun 2009
    Posts
    228
    Rep Power
    2

    Default

    You should also consider installing wikED - a WYSIWYM (what you see is what you mean) gadget that helps you a lot with your wikitext editing
    --Greg
    If you appreciate my help, please rate this post by clicking the star icon in the left side below

  4. #4
    Member Burkhard is an unknown quantity at this point
    Join Date
    Mar 2010
    Location
    near Frankfurt, Germany.
    Posts
    66
    Rep Power
    1

    Default

    I am using WikED and I can recommend it just for the syntax highlighting. Only runs under FF though.

    Something else to consider is adding user help information to the article creation/editing pages. Anything that MW displays is either content or system messages (=contents of the "Mediawiki" namespace). As an administrator, you can edit system messages (and those changes even survive version upgrades).

    I have hijacked the "copyrightwarning2" message on my intranet wiki to display edit help links below the edit window. The screenshot is german but I guess you can get the gist. The links lead to internal pages or www.mediawiki.org pages. Of course, you right-click them to show in a new tab or window.

    That said, skizzers is of course right. Over time, you learn the syntax as well as the structure of www.mediawiki.org to help you along if there is something you don't know yet, and so on.



    mwedithelp..jpg

  5. #5
    Super Moderator BradLee is an unknown quantity at this point BradLee's Avatar
    Join Date
    Apr 2009
    Posts
    269
    Rep Power
    2

    Default

    This MW Cheatsheet is also helpful for beginners.
    The mediawiki syntax was a little strange at first, but you get the hang of it eventually.
    Smileypedia now open. Click below to visit:

  6. #6
    Junior Member ghans_12 is an unknown quantity at this point
    Join Date
    Jun 2010
    Posts
    10
    Rep Power
    1

    Default

    Thanks all for the reply. I am trying to install FCKeditor extension and I am facing some trouble with this. can some one please look into this.
    Settings in my LocalSeettings.php file

    # This file is used for FCKeditor
    require_once("$IP/extensions/FCKeditor/FCKeditor.php");
    $wgUseAjax = 'true';

    $wgShowExceptionDetails = true;


    Here is the error message that I am seeing
    Detected bug in an extension! Hook FCKeditor_MediaWiki:: onCustomEditor failed to return a value; should return true to continue hook processing or false to abort.
    Backtrace:
    #0 /usr/share/mediawiki/includes/Wiki.php(502): wfRunHooks('CustomEditor', Array)
    #1 /usr/share/mediawiki/includes/Wiki.php(63): MediaWiki->performAction(Object(OutputPage), Object(Article), Object(Title), Object(User), Object(WebRequest))
    #2 /usr/share/mediawiki/index.php(116): MediaWiki->initialize(Object(Title), Object(Article), Object(OutputPage), Object(User), Object(WebRequest))
    #3 {main}


    ------------Steps that I took to install FCKeditor extension


    Copied the FCKeditor folder after unzipping to to /var/lib/mediawiki/extensions/FCKeditor



    Please look into this and let me know what needs to be done.
    Last edited by Skizzerz; June 11th, 2010 at 17:15. Reason: add space to suppress smiley display
    MediaWiki 1.15.1
    PHP 5.3.2-1ubuntu4.2 (apache2handler)
    MySQL 5.1.41-3ubuntu12.1
    Ubuntu Server 10.04

  7. #7
    Super Moderator Skizzerz is a jewel in the rough Skizzerz is a jewel in the rough Skizzerz is a jewel in the rough Skizzerz's Avatar
    Join Date
    Dec 2007
    Location
    Texas
    Posts
    2,507
    Rep Power
    7

    Default

    Make sure you downloaded the correct version of FCKeditor for your version of MediaWiki. You should've downloaded the 1.15.x version. If that still is causing issues, find the function it references in the FCKeditor php file and add return true; to the end of that function.

    If that still doesn't work, I blame the fact that you are using an ubuntu package install of mediawiki instead of the official source from www.mediawiki.org, since they could have modified the core code or something.
    --Skizzerz (MediaWiki | StrategyWiki)

    How am I helping? Rate this post by clicking the icon below!

    Private messages are for private information. I will ignore any support requests in private messages.

    NEVER EDIT CORE FILES! Revert any core modifications you make before asking for help here. I will not give support for modified versions of MediaWiki (but I will yell at you)

  8. #8
    Junior Member ghans_12 is an unknown quantity at this point
    Join Date
    Jun 2010
    Posts
    10
    Rep Power
    1

    Default

    I am not sure how to do find that function. You will have to give me step-by-step directions. Sorry about that. I am still learning and new to wiki and programming.

    Thanks
    MediaWiki 1.15.1
    PHP 5.3.2-1ubuntu4.2 (apache2handler)
    MySQL 5.1.41-3ubuntu12.1
    Ubuntu Server 10.04

  9. #9
    Super Moderator Skizzerz is a jewel in the rough Skizzerz is a jewel in the rough Skizzerz is a jewel in the rough Skizzerz's Avatar
    Join Date
    Dec 2007
    Location
    Texas
    Posts
    2,507
    Rep Power
    7

    Default

    First, you will need to SSH into your server. Once there, you will have a file in your /path/to/wiki/extensions/FCKeditor directory called FCKeditor.body.php. Open it using a text editor such as nano (the directions below are for nano, so you should use that if you aren't familiar with another command line text editor such as vim or emacs). You can open a file using nano by typing "nano FCKeditor.body.php" into the command line.

    Once there, hit Ctrl+W. This will open up a find dialog at the bottom of the screen. Type "public function onCustomEditor" (without quotes) into that dialog and hit enter. That will take you to the function that is breaking. If you scroll down a bit with the arrow keys, you'll see a "}" character that is lined up with the "p" in "public". Highlight that character with your cursor and hit enter to create a new line above it. In that new line, add "return false;" (without quotes, don't forget the semicolon). Hit Ctrl+O to save, and then Ctrl+X to exit nano.

    After that, reload your wiki and that error message should go away.
    --Skizzerz (MediaWiki | StrategyWiki)

    How am I helping? Rate this post by clicking the icon below!

    Private messages are for private information. I will ignore any support requests in private messages.

    NEVER EDIT CORE FILES! Revert any core modifications you make before asking for help here. I will not give support for modified versions of MediaWiki (but I will yell at you)

  10. #10
    Junior Member ghans_12 is an unknown quantity at this point
    Join Date
    Jun 2010
    Posts
    10
    Rep Power
    1

    Default

    I think tht is already mentioned. I have copied the code from that file for your reference.


    public function onCustomEditor(&$article, &$user) {
    global $wgRequest, $mediaWiki;

    $action = $mediaWiki->getVal('Action');

    $internal = $wgRequest->getVal( 'internaledit' );
    $external = $wgRequest->getVal( 'externaledit' );
    $section = $wgRequest->getVal( 'section' );
    $oldid = $wgRequest->getVal( 'oldid' );
    if( !$mediaWiki->getVal( 'UseExternalEditor' ) || $action=='submit' || $internal ||
    $section || $oldid || ( !$user->getOption( 'externaleditor' ) && !$external ) ) {
    $editor = new FCKeditorEditPage( $article );
    $editor->submit();
    } elseif( $mediaWiki->getVal( 'UseExternalEditor' ) && ( $external || $user->getOption( 'externaleditor' ) ) ) {
    $mode = $wgRequest->getVal( 'mode' );
    $extedit = new ExternalEdit( $article, $mode );
    $extedit->edit();
    }

    return false;
    }

    public function onEditPageBeforePreviewText(&$editPage, $previewOnOpen) {
    global $wgUser, $wgRequest;

    if ($wgUser->getOption( 'showtoolbar' ) && !$wgUser->getOption( 'riched_disable' ) && !$previewOnOpen ) {
    $this->oldTextBox1 = $editPage->textbox1;
    $editPage->importFormData( $wgRequest );
    }

    return true;
    }

    public function onEditPagePreviewTextEnd(&$editPage, $previewOnOpen) {



    Thanks for helping me
    MediaWiki 1.15.1
    PHP 5.3.2-1ubuntu4.2 (apache2handler)
    MySQL 5.1.41-3ubuntu12.1
    Ubuntu Server 10.04

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Similar Threads

  1. Adding Text Box
    By JasonCacti in forum MediaWiki General Discussion
    Replies: 1
    Last Post: November 10th, 2008, 23:54
  2. Adding AD users to MediaWiki
    By sdlyr8 in forum MediaWiki General Discussion
    Replies: 0
    Last Post: July 8th, 2008, 18:38
  3. Adding content to MediaWIki
    By golfer24 in forum MediaWiki General Discussion
    Replies: 3
    Last Post: March 17th, 2007, 13:30
  4. adding autolink to mediawiki
    By baambooli in forum Customizing MediaWiki
    Replies: 2
    Last Post: January 25th, 2007, 18:49
  5. adding autolink to mediawiki
    By baambooli in forum Customizing MediaWiki
    Replies: 0
    Last Post: January 25th, 2007, 09:15

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts