• GoDaddy Community
  • Websites + Marketing | Website Builders
  • Websites + Marketing | Website Builders

    cancel
    Showing results for 
    Show  only  | Search instead for 
    Did you mean: 

    MediaWiki, Infoboxs and LUA

    Hey everyone.

     

    I have been trying for some time to set up a wiki page that shares the same functionality as Wikipedia.  I keep hitting a wall when it comes to getting Infoboxes to work.  Seems that no webhost supports LUA which is necessary to run Scribunto and ultimately place infoboxes on the wiki pages.  

     

    I've learned that installing LUA is possible using a cloud server but I have no idea where to start with that - do I install the mediawiki app first and go under it to install LUA, or do I need to manually install everything starting with a linux base?

     

    I really don't understand enough about this stuff.

     

    Thanks.

    26 REPLIES 26
    Moderator
    Moderator

    Re: MediaWiki, Infoboxs and LUA

    Hi @LegacyGamers,

    Welcome to our forums. I'm not an expert in regards to your issue but hopefully, one of our other community members can chime in and help you out. 

    KayJay - GoDaddy | Community Moderator
    24/7 support available at x.co/247support

    Re: MediaWiki, Infoboxs and LUA

    Hi,

     

    I'm in the same boat. I first tried a manual install, thinking I had to pay a monthly fee for the GoDaddy app version. But I ran into a Lua problem after having installed Scribunto. Now I'm trying it this way, hoping for a more managed approach.

     

    Any insight would be helpful.

    Helper I

    Re: MediaWiki, Infoboxs and LUA

    Have any of you guys figured it out?  After a long, hard road, I finally figured out how to do it!  If you still need help, please let me know!  I keep trying to post the fix but the form messes up when I do...

     

    Helper I

    Re: MediaWiki, Infoboxs and LUA

    I'm going to try and post this again.  Apparently the binaries packaged with Scribunto do not work correctly, nor do the downloadable ones.  I think the problem, really, is that we have to make them executable and PuTTY, the recommended SSH program can't do it in Shell.  

     

    I didn't accept the general consensus that it can only be done on the Cloud server.  Like the path to Perl, I'm sure it had to be there.  I was able to ask "whereis lua" in Shell and found three results.  A directory which didn't have anything useful in it, a file I couldn't extract and one that "isn't a directory".  The last one seemed promising, and turns out it's our plan's path to Lua!

     

    Install the Scribunto and ParcerFunctions extension and Export and Upload a page with all the templates.  You should then have all the Modules you need.  I had to also upload the Code Editor, TitleBlacklist and Cite extensions, but the trick was changing the LocalSettings.php file's Scribunto's StandAlone Lua path.  I changed it to the second entry I had found, '/opt/lua/bin/lua' and now my infoboxes and navboxes work great!  I'm going to have to change them a little though, because it uses up my server resources to the point that I now have no choice but to upgrade.  But everything works now!

     

     

    Helper I

    Re: MediaWiki, Infoboxs and LUA

    Can you share the full path of /opt/lua/bin/lua   

     

    Here is my current path, what do I replace with the above path?  Your help would be greatly appreciated!

     

    /home/resaleconcepts/public_html/artglass/glassipedia/extensions/Scribunto/engines/LuaStandalone/binaries/lua5_1_5_linux_64_generic/lua

    Helper I

    Re: MediaWiki, Infoboxs and LUA

    Hi Kevin!  That path is actually the full path to LUA.  Here's that section from my LocalSettings.php page:

     

    require_once "$IP/extensions/Scribunto/Scribunto.php";
    $wgScribuntoDefaultEngine = 'luastandalone';
    $wgScribuntoEngineConf['luastandalone']['luaPath'] = '/opt/lua/bin/lua';

    Hope that helps!  Please let me know if you have any problems!

    Helper I

    Re: MediaWiki, Infoboxs and LUA

    Thanks so much for your help!  I actually tried that earlier, when I change to that path, I get a page isn't working screen that says

     

    www.resalemakeover.com is currently unable to handle this request.

    HTTP ERROR 500
     
    any other path i get either a break at signal 11 or 126.  once i got a 2 but a memory adjustment didnt' help. Any ideas on this?
     
    wfLoadExtension( 'ParserFunctions' );
    wfLoadExtension( 'Cite' );
    wfLoadExtension( 'CiteThisPage' );
    wfLoadExtension( 'TitleBlacklist' );
    wfLoadExtension( 'WikiEditor' );
    wfLoadExtension( 'SyntaxHighlight_GeSHi' );

    $wgPFEnableStringFunctions = true;
    $wgDefaultUserOptions['usebetatoolbar'] = 1;
    $wgDefaultUserOptions['usebetatoolbar-cgd'] = 1;
    $wgDefaultUserOptions['wikieditor-preview'] = 1;
    $wgDefaultUserOptions['wikieditor-publish'] = 1;
    require_once "$IP/extensions/Scribunto/Scribunto.php";
    $wgScribuntoDefaultEngine = 'luastandalone';
    $wgScribuntoEngineConf['luastandalone']['luaPath'] = '/opt/lua/bin/lua';
    $wgScribuntoUseGeSHi = true;
    $wgUseInstantCommons = true;
    Helper I

    Re: MediaWiki, Infoboxs and LUA

    Hi Kevin!  Great job so far.  Yes, I experienced all of those errors (and many more!) and they are not fun!  Especially when you can't find anything online.  My journey was trial and error.  But you're definitely on the right track and I'll help you any way I can.  Your coding looks good but on the Scribunto require_once line I noticed I forgot to compensate for your directory structure.  Change that line to the following and let me know what happens!

     

    require_once "$IP/artglass/glassipedia/extensions/Scribunto/Scribunto.php";
    Helper I

    Re: MediaWiki, Infoboxs and LUA

    I'm checking out your wiki now.  Good job.  You're definitely on the right track.  The

    Cite error: Invalid <references> tag; parameter "group" is allowed only.
    Use <references />, or <references group="..." />" 

    error is an easy fix.  Rather than linking you to a long explanation to my findings, I just went ahead, created an account, and fixed the code.  The problem was in the coding on the Reflist template.  Your references sections now work!  (You might have to do a "dry refresh" on each page, ie, clicking edit and then clicking save without editing anything - it'll force a refresh on the page.  You can update the entire site by running the update script in Shell/SSH.)

    Helper I

    Re: MediaWiki, Infoboxs and LUA

    Thank you SO MUCH! This is super helpful.

     

    So, I'm still getting the

     

     Lua error: Internal error: The interpreter has terminated with signal "11".Lua error: Internal error: The interpreter has terminated with signal "11".

     

    as the code stands from before we started talking. When I put in the 

     

    $wgScribuntoEngineConf['luastandalone']['luaPath'] = '/opt/lua/bin/lua';

     

    I get the 500 error when I try to load the page http://resalemakeover.com/artglass/glassipedia

     

    So I've found options for that breaks at signal 126, 11, 2 and now the 500 error.  any ideas?

     

    I went ahead and put back in the lua path /opt/lua/bin/lua; so you can see what it is doing.

     

    require_once "$IP/skins/Vector/Vector.php";

    wfLoadExtension( 'ParserFunctions' );
    wfLoadExtension( 'Cite' );
    wfLoadExtension( 'CiteThisPage' );
    wfLoadExtension( 'TitleBlacklist' );
    wfLoadExtension( 'WikiEditor' );
    wfLoadExtension( 'SyntaxHighlight_GeSHi' );

     


    $wgDefaultUserOptions['usebetatoolbar'] = 1;
    $wgDefaultUserOptions['usebetatoolbar-cgd'] = 1;
    $wgDefaultUserOptions['wikieditor-preview'] = 1;
    $wgDefaultUserOptions['wikieditor-publish'] = 1;


    require_once "$IP/artglass/glassipedia/extensions/Scribunto/Scribunto.php";
    $wgScribuntoDefaultEngine = 'luastandalone';

    $wgScribuntoEngineConf['luastandalone']['luaPath'] = '/opt/lua/bin/lua';


    $wgScribuntoUseGeSHi = true;


    $wgUseInstantCommons = true;

     

    Also, when I added the full path $IP/artglass/glassipedia/extensions/Scribunto/Scribunto.php on the require once line, it also gives me a 500 error. When change it to $IP/extensions/Scribunto/Scribunto.php path the wiki works, it just still gets the break at signal 11. I don't know if there is some relationship between these 2 issues. 

     

    Kevin

    Helper I

    Re: MediaWiki, Infoboxs and LUA

    I think I'm getting closer with:

     


    require_once "$IP/extensions/Scribunto/Scribunto.php";
    $wgScribuntoDefaultEngine = 'luastandalone';

    $wgScribuntoEngineConf['luastandalone']['luaPath'] = '/opt/lua/bin/lua';

    $wgScribuntoEngineConf['luastandalone']['memoryLimit'] = 209715200; # bytes
    $wgMaxShellMemory = 204800; # in KB

    $wgScribuntoUseGeSHi = true;


    $wgUseInstantCommons = true;

     

    added the memory limits and now the front page and special pages are working perfectly, but when I go to a page I get a 500 error. 

    Helper I

    Re: MediaWiki, Infoboxs and LUA

    I backed all the way out to basic localsettings without scribunto so I can work on content. let me know what I can try next. You have been a great help!

     

    Helper I

    Re: MediaWiki, Infoboxs and LUA

    There's a problem with the Syntax Highlighter.  Keep the $wgScribuntoEngineConf['luastandalone']['luaPath'] = '/opt/lua/bin/lua'; script.  It'll give you an error 500.  This can be fixed by changing $wgScribuntoUseGeSHi = true; to false.

     

    I didn't think about it at the time.  That's why mine's set to false.  I also have the following setting denoted.

     

    $wgMaxShellFileSize = "524288"; // Kilobytes
    $wgMaxShellMemory = "1048576"; // Kilobytes
    $wgMaxShellTime = 75; // seconds

     

    Let me know if this helps!  Again, great job!

    Helper I

    Re: MediaWiki, Infoboxs and LUA

    Also, I noticed right now that certain pages are saying things like {{#invoke:Infobox}], {{#invoke:Check for unknown parameters}}, etc.  These items will not work until you also copy over the "Module" to be invoked.  Infobox in the former, Check for unknown parameters in the latter.  These are LUA modules.  They can be found here:  https://en.wikipedia.org/wiki/Module:Infobox and here:  https://en.wikipedia.org/wiki/Module:Check_for_unknown_parameters .  If you see any more {{#invoke:}} tags, it means nothing's being invoked and so you must download the module listed immediately after invoke:  Hope everything works great for you!

    Helper I

    Re: MediaWiki, Infoboxs and LUA

    Holy Moly!! I think that may have gotten it! Amazing... I was almost to the point of giving up.

    What is your wiki, I'd like to look at it if you don't mind just to see a good example.

     

    Helper I

    Re: MediaWiki, Infoboxs and LUA

    I am so happy you got it! In fact, before I read your message I had just got finished checking out your wiki again. Imagine my surprise when I saw your infoboxes and navboxes working! Super cool! To get them to look like Wikipedia's you now have to style them with CSS. Copy everything from https://en.wikipedia.org/wiki/MediaWiki:Common.css to your page, http://www.resalemakeover.com/artglass/glassipedia/MediaWiki:Common.css.

    My wiki? You can find it at http://www.TRUMPipedia.com. In fact I just hit 184,500 registered users earlier today! I have a smaller one I'm working on for another site, but as of right now, TRUMPipedia is keeping me pretty busy. You can also find me on Wikia as "Adamantoise" and on Wikipedia as "BTTFVGO".

    If you have anymore questions, and I'm sure you will, PLEASE let me know! Again, great job!
    Helper I

    Re: MediaWiki, Infoboxs and LUA

    One more thing and I'll quit bugging you. 

     

    I think I've pulled in everything, but my infoboxes aren't displaying correctly.

    see http://resalemakeover.com/artglass/glassipedia/Fenton_Art_Glass_Company

     

    I think I'm close if I can get those displaying properly.

     


     


     

    Helper I

    Re: MediaWiki, Infoboxs and LUA

    The answer to this is found in my reply above. But you got it. They started working (and looking!) great as soon as you imported Common.css. There are other minor things, like if you use coordinates you must copy the contents of https://en.wikipedia.org/wiki/MediaWiki:Monobook.css as it contains minor fixes. You'll also need to up the upload limit and add extensions to your supported extensions list if you want to be able to upload .svg, .tiff, .mp3, .webm, etc. files. The hard part's over! Now it's about fun stuff like adding site notifications, multiple language options, chat, etc., etc.! There's a lot to do but I'll be here if you have any questions. Congratulations and good luck!!
    Helper I

    Re: MediaWiki, Infoboxs and LUA

    More observations:

    On the Tiffany & Co. page, notice the content and infobox blend together. This is an HTML rendering issue. Adding the following to LocalSettings.php will solve that problem:

    $wgRawHtml = true;
    $wgUseTidy = true;
    $wgUseAjax = true;

    Looking over my LocalSettings.php page, here are some notes on the basics that might help.

    To enable uploads: (make the 'images' directory writable - CHMOD 777) and then add the following to LocalSettings.php:

    $wgEnableUploads = true;
    $wgUseImageMagick = true;
    $wgImageMagickConvertCommand = "/usr/bin/convert";

    ImageMagick allows the server to create thumbnails.

     

    To change the type of files you allow to be uploaded, change $wgFileExtensions by adding the extensions to wish to allow:

    $wgFileExtensions = array( 'png', 'gif', 'jpg', 'jpeg', 'doc',
    'xls', 'mpp', 'pdf', 'ppt', 'tiff', 'bmp', 'docx', 'xlsx',
    'pptx', 'ps', 'odt', 'ods', 'odp', 'odg', 'svg', 'webm'
    );
    $wgFileExtensions[] = 'svg';
    $wgAllowTitlesInSVG = true;
    $wgSVGConverter = 'ImageMagick';

    To enable embedded videos, install the "EmbedVideo" extension and add the following:

    wfLoadExtension( 'EmbedVideo' );
    $wgEmbedVideoAddFileExtensions = true;
    $wgEmbedVideoEnableVideoHandler = true;
    $wgEmbedVideoEnableAudioHandler = true;

    To eliminate template loops and 'too many expensive parser call' errors, add the following:

    $wgExpensiveParserFunctionLimit = '500';
    $wgAllowSlowParserFunctions = true;
    $wgMaxTemplateDepth = '80';

    To create longer articles, add:

    $wgMaxArticleSize = '2147483647';

    ...and images:

    $wgUploadSizeWarning = 2147483647;
    $wgMaxUploadSize = 2147483647;
    $wgMaxImageArea = 10e7; // 100MP
    $wgMaxAnimatedGifArea = 10e7; // 100MP

    To allow .tiff uploads, add the PagedTiffHandler extension and the following to LocalSettings.php:

    $wgTiffUseTiffinfo = true;
    $wgTiffMaxMetaSize = 1048576;

    To enable notifications and VisualEditor, you'll have to install the 'Echo' and 'VisualEditor' extensions, respecively, but those extensions require more detailed installation instructions. I'll answer any question you have about those assuming you ever decide to use them.

     

    There are so many other things you can do. For a list of everything I have installed on my own wiki, check out http://www.trumpipedia.com/Special:Version. You can view your own list (or any MediaWiki wiki's list) by going to the page Special:Version.

    For example, http://resalemakeover.com/artglass/glassipedia/Special:Version and https://en.wikipedia.org/wiki/Special:Version

     

    Another thing about getting file uploads to work. You will have to create the page (if you don't have one already) called "php.ini" in the /artglass/glassipedia directory. In it, add the following:

    file_uploads = On
    php_value upload_max_filesize 50M
    php_value post_max_size 50M
    memory_limit 512M;
    php_flag register_globals off
    session.use_trans_sid off

    ...to enable 50 Mb uploads, memory limit usages, and global variables - ie when you link your wiki to all other wikis in the network via CentralAuth (which I, personally, don't use hence the reason it's turned off).

     

    Then create the page ".htaccess" in the same directory. You'll need to enable hidden files in order to see it. Add

    SetEnv MAGICK_THREAD_LIMIT 1

    to help with the ImageMagick thumbnailing process and

    <Files php.ini>
    order allow,deny
    deny from all
    </Files>

    to keep people from being able to view your "php.ini" file.

     

    There are SO MANY things I could tell you. Honestly, I could write a novel about my findings. But those are the basics and are things that should be done. Everything else is just icing on the cake. I'm so happy I was able to help and if you have ANY more questions or concerns, please let me know!!

    Helper I

    Re: MediaWiki, Infoboxs and LUA

    One more thing, Templates must be in the Templates namespace in order for them to work.  You can view all of the pages on your wiki by going to

    http://resalemakeover.com/artglass/glassipedia/Special:AllPages 

     

    The following templates are in your (Main) namespace.  There they do nothing but confuse visitors who click "Random Page" in the left sidebar and find one of these instead of some cool article on glassware and glassmaking.  Most of them are already in your Template namespace because they were placed there when you imported a page they were included on.  You should move them if they don't exist and delete them if they do.  To move a page, click "More" in the link bar to the left of the search bar.  Select "Move" and from the dropdown box change (Main) to Template.

    Ambox
    Catalog lookup link
    Category handler
    Citation needed
    Cite book
    Cite web
    Colbegin
    Colend
    Column-count
    Commons
    Commons category
    Convert
    Delink
    Div col
    Div col end
    Error-small
    Fix
    Fix/category
    ISBN
    Main
    Main other
    Navbox
    Reflist
    See-also
    See also
    Tl
    Trim
    Yesno
    Yesno-no

     

    Helper I

    Re: MediaWiki, Infoboxs and LUA

    Wow! Thanks so much for all the tips! I'm really enjoying learning to build the wikis. Would still be about 10 steps back if I hadn't found your help. Thanks Again. I'll go move them now.

     

    BTW, I absolutely love the TRUMPipedia! Super fun wiki. I'll let you know when I have another quesiton. i'm interested in how much you customized the trump site. it looks very good. I usually build sites with WordPress, so this has been a fun change. I like the informational aspect of this platform. I am anxious to start buildiign templates. I am using a wiki to record start to record personal Bible notes and I think it will be a good resource as it grows. resalemakeover.com/bible  I am going to start cusomising the glass pages that I've imported. I've already started on a few. what are the expectations and ethical obligations of sharing for wikipedia or other wikis?

     

     

    Helper I

    Re: MediaWiki, Infoboxs and LUA

    Thanks Kevin!  I'm having fun over on Glassipedia, also!  Is it GlassIpedia or GlassOpedia?  The site logo image contains an O but everything else contains an I... so I was curious!  Other than that I am super happy I could help and will be happy to answer any question you have, as long as I can!

     

    Great job on the bible wiki, too.  The internet needs one of those!  

     

    Most all of Wikipedia's content can be freely distributed as long as you attribute the Creative Commons Attribution Share-Alike license (CC-BY-SA) although, unless otherwise indicated, it the content is used under the terms of the GNU Free Documentation License.  You already have InstantCommons enabled, so all of your images are already licensed.  You can add a copyright to the footer by setting $wgRightsPage and $wgRightsUrl, and adapting the sitewide copyright notice located at MediaWiki:Copyright.  For more, check out Wikipedia's page on reusing their content:  https://en.wikipedia.org/wiki/Wikipedia:Reusing_Wikipedia_content

     

    PS, I started out building TRUMPipedia as a static site, like I use over on http://www.nottfo.com before switching to Wordpress.  After not being able to customize it to my liking I built the wiki.  But it wasn't fun.  I originally wanted to make one for NOTTFO but couldn't figure it out for nothing!  I gave up.  I built TRUMPipedia a few years later, and wanted it to be a wiki but I couldn't figure it out then, either!  That's why I build the static site, then moved it to Wordpress.  I wasn't satistied and wanted to do everything I could to get it to work.  I researched and researched, mostly just to find that many people wanting wikis gave up on GoDaddy, assuming it lacked the capabilities to get the wikis up and running.  I did find one guy who said he did it once but he could never provide any specifics.  I refused to give up and kept trying different things, going back, rereading pages and doing additional research.  I finally got it and it was like the weight of the world was lifted off my shoulders.  I've tried to learn everything I can about the MediaWiki software.  It's phemonenal what it's able to do!  Like I said, if you have any more questions, please let me know!

    Helper I

    Re: MediaWiki, Infoboxs and LUA

    Wow! Just saw these suggestions and implemented them. This opens up a whole new world! Thanks a ton. I am very interested in visual editor. Do you use it and does it function well. I think I'll code just a bit to get a feel fro the workings of the platform and then add it soon.

     

     

    Helper I

    Re: MediaWiki, Infoboxs and LUA

    It is Glass(i)pedia. I started with glassopedia, but changed. I forgot the change the logo. i updated it now. Thanks for catching that!

     

     

    Helper I

    Re: MediaWiki, Infoboxs and LUA

    How have you managed to get 186K users on Trumpipedia????  That's amazing!

    Helper I

    Re: MediaWiki, Infoboxs and LUA

    Just got your messages!  I do indeed have Visual Editor installed.  I couldn't install Parsoid/Node.js on the basic hosting plan so I used the recommended Heroku 3rd party invoke.  I plan on doing installing Parsoid on the server itself, seeing I now have the business plan and can do more advanced stuff on the site, so that should make it quicker.  I'll let you know what it goes.  

     

    (*I think a lot of my problems was that when I first installed everything I hadn't learned that adding 

    chmod +x filename

    then 

    ./filename

    in command prompt makes the file ready to use {it turns green and there's an asterisk beside it - so I might be able to get the standalone version of LUA to work after all!}*)

     

    Right now I'm trying to upgrade the site but am straightening out PHP errors caused by upgrading but I will straighten them out!  So if you visit now there'll be some inherent errors but those'll be gone over the next few days.  As far as viewership, you can get users.  I'm in a lot of groups, social media and otherwise.  I've pushed it on Facebook and Twitter and have put a lot of attention towards metatags and SEO related info.  I've also pushed it on various message forums (like WP when I used WordPress, and here).  It takes a little bit of patience but if you really want to make it the best, you'll do whatever it takes!  I've learned more about the wiki software over the last two years than you can believe.  I'm fascinated by it!  You know they even have books on it?  I'll try to answer any question you have, as long as I can.  You've already mastered the basics.  Just with what you have done I'm proud of you.  It took some time to get where you are now, so I know that you'll do good in the future.  You have my drive and tenacity.  You'll make your wikis as awesome as you can - I know it!  Keep up the good work!!