Jump to content

All Activity

This stream auto-updates     

  1. Yesterday
  2. I am wanting to do a few things. 1.Is it possible to have a plain style login page? Something with very little sidebar links. I am aiming for a private wiki where I don't want to have links to what is going on in the login page. 2. Can you have a customized sidebar per category with a category landing page? For example, I have a "Sites" category. I want a sidebar with links that shows up under the site categroy only. Then if I have a "servers" category I have a customized sidebar for the servers category. Any pointers?
  3. Last week
  4. spiros

    mysql_real_escape_string(): Access denied

    Thank you so much. That gave me: Line 234 is where the snippet provided starts ($dbw - >insert...): function Lookup_addLookup ($url, $name, $group) { $dbw = wfGetDB(DB_MASTER); $dbw->insert( 'lookups', [ 'lu_name' => $name, 'lu_url' => $url, 'lu_group' => $group, 'lu_order' => 1, 'lu_group_order' => $groupOrder ] ); Lookup_reOrderGroups(); return true; }
  5. Skizzerz

    mysql_real_escape_string(): Access denied

    It'd look like $dbw->insert( 'lookups', [ 'lu_name' => $name, 'lu_url' => $url, 'lu_group' => $group, 'lu_order' => 1, 'lu_group_order' => $groupOrder ] );
  6. spiros

    mysql_real_escape_string(): Access denied

    Right, thanks to both of you. How should that snippet be edited so that it is compatible with the most recent php versions? Pardon my ignorance.
  7. Earlier
  8. Skizzerz

    mysql_real_escape_string(): Access denied

    Never use the raw query() function, use the insert() wrapper instead which properly escapes everything, handles db prefixes, etc. for you. (or the select() wrapper for SELECT queries, or the update() wrapper for UPDATE queries, etc.)
  9. HSRobinson

    mysql_real_escape_string(): Access denied

    See http://php.net/manual/en/mysqli.real-escape-string.php You must add the mysqli_connect link object.
  10. I tried to Enter something in a legacy Extension and I got: Warning: mysql_real_escape_string(): Access denied for user ''@'localhost' (using password: NO) Then I changed all instances to mysqli_real_escape_string And retried. At that point I got: mysqli_real_escape_string() expects exactly 2 parameters, 1 given on line 235 Here is the function: function Lookup_addLookup ($url, $name, $group) { $dbw = wfGetDB(DB_MASTER); $groupOrder = Lookup_getGroupOrder($group); $dbw->query ("INSERT INTO ".Lookup_prefix()."lookups (lu_name, lu_url, lu_group, lu_order, lu_group_order) VALUES ('".mysqli_real_escape_string($name)."', '".mysqli_real_escape_string($url)."', '".mysqli_real_escape_string($group)."', 1, $groupOrder)"); Lookup_reOrderGroups(); return true; }
  11. spiros

    Change results snippet layout

    Thank you! I added that in Common.css and the output I get is the attached. Instead of the desired which is like https://imgur.com/bGrtm1H
  12. Skizzerz

    Change results snippet layout

    .mw-search-result-data { display: none; } .mw-search-result { display: flex; flex-direction: row; box-sizing: border-box; } .mw-search-result-heading { border: 1px solid black; padding: 0.5rem; width: 25%; } .searchresult { border: 1px solid black; padding: 0.5rem; width: 75%; } You may find the above to be useful as a starting point. This is still missing a couple of things, such as sizing on mobile screens (you'll need to add some @media queries to break on screen size and provide relevant CSS for smaller devices -- the flexbox layout will let you easily collapse it back into multiple rows with the heading on one row and the result underneath rather than side-by-side)
  13. Currently the snippet is like this (MW 1.31) compos com-pŏs: (conp-), pŏtis, adj. potis, I having the mastery, control, or power over a thing, master of, partaking of, possessing, participating or sharing 6 KB (891 words) - 12:19, 15 August 2017 How could it be changed in a two column table format (applying a style to the list items) and get rid of the date/size info line? compos com-pŏs: (conp-), pŏtis, adj. potis, I having the mastery, control, or power over a thing, master of, partaking of, possessing, participating or sharing I have tried some css changes, got rid of the unwanted metadata bit (size/date), but when page is resized, some text from the right "column" moves to the left one. .mw-search-results li { columns: 2; border-bottom: 1px dotted #555; padding: 5px 0; } .mw-search-result-data { display: none; } .mw-search-results { /* max-width: 38em; */ } Above, quoted only the part of the css I edited. For example this is what I want to be maintained in different screen sizes: https://imgur.com/bGrtm1H but when it gets smaller; this is what I get now with some screen sizes/changes of zoom https://imgur.com/YQAzMNH
  14. Skizzerz

    MediaWiki 1.32 Now Available

    MediaWiki 1.32 has been officially released. Below is a highlight of some of the release notes; you can view the full list here. Changes A new "Interface administrators" group was added, which has the ability to edit sitewide CSS/JS and the CSS/JS of other users. By default, no other group (not even "Administrators") has this capability anymore. We recommend that you do not grant this group to all of your existing administrators, instead only granting it to those who will be responsible for maintaining CSS/JS pages on the wiki. This increases your site's security in the event that an administrator account is compromised. The old editing toolbar has been removed (see image below if you aren't sure what toolbar this is). Use an extension such as WikiEditor, which is bundled with the tarball release, instead to provide an editing toolbar. If your wiki has customizations to add additional buttons to this toolbar, work on a migration plan to add them to the WikiEditor toolbar instead. (Image from Wikimedia Commons) The MediaWiki API (api.php) is now unconditionally enabled and can no longer be disabled. A cookie can now be set when an IP user is blocked to track that user if they move to a new IP address. This feature is disabled by default but can be enabled by setting $wgCookieSetOnIpBlock = true; in your LocalSettings.php. The on-wiki external image whitelist (MediaWiki:External image whitelist) is now disabled by default. If you were making use of this feature, set $wgEnableImageWhitelist = true; in your LocalSettings.php. This feature allowed for allowing embedding of external images ("hotlinking") from domains that wiki administrators specifically allow. Hotlinked images do not feature any controls such as resizing or adding captions, and leak your visitor's IP addresses to the external source. Furthermore, there is no guarantee that the image will remain available in the future, or that it will not be changed to something else. As such, we recommend that you always upload images locally if possible and do not use this feature. The Watchlist will now show 7 days of changes by default, up from 3. Upgrading When upgrading MediaWiki versions, it is always important to take a backup of both your files as well as your database, as upgrades cannot be "rolled back" once performed. It is recommended to unpack the new files into a new, empty directory and then move over needed files (LocalSettings.php, images, extensions, skins) rather than unpacking the new files directly over the old ones. Unpacking over the old ones could cause files that were removed in 1.32 to remain in your directory tree, which could cause PHP errors down the line or cause security issues as those files will no longer be updated. The database changes in this release could take a while to run on large wikis.
  15. legoktm

    setting up Mediawiki on local system

    You should use exactly what the documentation says. The path is what is *inside* the container, not on your filesystem: - ./LocalSettings.php:/var/www/html/LocalSettings.php
  16. Skizzerz

    Restrict image size?

    Unfortunately, what you seek is likely not possible by using [[Image:]] tags to embed images in pages. If you don't specify a width in the tag itself, MediaWiki defaults to 300px. You can change this default, but it will always be in px instead of percentages. An extension would be needed to change this for [[Image:]] tags, or you could directly embed the images by putting the full url of the image bare into the page (no link syntax around it) ($wgAllowExternalImages, $wgAllowExternalImagesFrom, or $wgEnableImageWhitelist) and then wrap that in a span/div which sets the width.
  17. I have stack.yml file as following: # MediaWiki with MariaDB # # Access via "http://localhost:8080" # (or "http://$(docker-machine ip):8080" if using docker-machine) version: '3' services: mediawiki: image: mediawiki restart: always ports: - 8080:80 links: - database volumes: - /Users/paperless/Technology/mediawiki # After initial setup, download LocalSettings.php to the same directory as # this yaml and uncomment the following line and use compose to restart # the mediawiki service - ./LocalSettings.php:/Users/paperless/Technology/mediawiki/ database: image: mariadb restart: always ports: - 3306:3306 environment: # @see https://phabricator.wikimedia.org/source/mediawiki/browse/master/includes/DefaultSettings.php MYSQL_DATABASE: my_wiki MYSQL_USER: wikiuser MYSQL_PASSWORD: example MYSQL_RANDOM_ROOT_PASSWORD: 'yes' Start command: docker-compose -f stack.yml up Then I try to access the url: localhost:8080 and it connects successfully. And finally download the LocalSettings.php file I put the file in the same directory as stack.yml file and then uncomment the line: ./LocalSettings.php:/Users/paperless/Technology/mediawiki/ Now when I try to start the server I get following error: ERROR: for mediawiki_mediawiki_1 Cannot start service mediawiki: OCI runtime create failed: container_linux.go:348: starting container process caused "process_linux.go:402: container init caused \"rootfs_linux.go:58: mounting \\\"/Users/paperless/Technology/mediawiki/LocalSettings.php\\\" to rootfs \\\"/var/lib/docker/overlay2/373a9bf779dd1706c36c29d74abc1ff893d298433f9baec8b0e02bde4e3a7ab1/merged\\\" at \\\"/var/lib/docker/overlay2/373a9bf779dd1706c36c29d74abc1ff893d298433f9baec8b0e02bde4e3a7ab1/merged/Users/paperless/Technology/mediawiki/LocalSettings.php\\\" caused \\\"not a directory\\\"\"": unknown: Are you trying to mount a directory onto a file (or vice-versa)? Check if the specified host path exists and is the expected type Then I changed ./LocalSettings.php:/Users/paperless/Technology/mediawiki/ to ./LocalSettings.php:/Users/paperless/Technology/mediawiki/LocalSettings.php Now the container starts and am able to access UI at 8080. But it says not able to detect LocalSettings.php. So I restart all installation again. And same issue. Also, in the ui, it says to place the LocalSettings.php in the same directory of index.php. Where is the location of index.php on system? We have to put LocalSettings.php in stack.yml dir? which I know. or where index.php I am not able to find this file. I copied the file from here https://hub.docker.com/_/mediawiki/and modified only the volume directory to actual dir/Users/paperless/Technology/mediawiki
  18. garyaitken

    Restrict image size?

    I think I've already looked at those examples, but I may have missed something. Those examples show the use of absolute pixel widths, as in [[Image:screenshot1.jpg|600px]]. I need to be able to use a percent, something like [[Image:screenshot1.jpg|60%]], or something similar. The fixed pixel size means a large image won't expand past the fixed pixel size for larger screens; I want it to be able to expand up to some % of the available space. In this particular case, it might be sufficient if I could use the CSS "vw" (viewport width) expression, but that doesn't work either. What I want is for this to work with a % or better, a means of saying "clamp the image width to a max of the space left after the TOC": {{Manual:TOC}} [[Image:Freecad-interface-01.jpg]|60%] If I use "600px" in place of "60%", it works, downsizing the image to fit in the available space. But as explained in the original post, that clamps the image size on larger screens.
  19. HSRobinson

    Restrict image size?

    See https://www.mediawiki.org/wiki/Help:Images#Size_and_frame
  20. garyaitken

    Restrict image size?

    It is possible to restrict the maximum size of an image as follows: [[Image:screenshot1.jpg|600px]] We have a TOC appearing on the right and we want even large images to appear to its left, rather than below. I was hoping one could write: [[Image:screenshot1.jpg|60%]] but that doesn't work. I next tried to enclose the whole thing in a span: {{Manual:TOC}} <span style="color:red">red</span> <!-- works --> <span style="width: 600px;"> <! doesn't work; idea would be to use max-width: 60% --> [[Image:screenshot1.jpg]] </span>
  21. Use the built-in watchlist feature that @HSRobinson linked above to have your owners notified on pages that they are responsible for. For moderation of changes before they go "live" to the majority of users, the FlaggedRevs extension lets edits still be made but marked by default as "unchecked" -- a reviewer would then need to look over the edit and mark it as good before the revision is fully accepted as default. There is no feature in the extension to restrict that ability to certain people on a per-page basis (although that would be easily achievable via a custom extension that hooks into FlaggedRevs), either someone can review every page or they can't, but you can enforce with internal policies that owners should review only their own pages. Alternatively, you can make use of the discussion pages. Have non-owners suggest edits on the discussion page instead of making them directly, and then the suggested contents can be discussed with the owner until they approve the changes and edit the article itself to incorporate them.
  22. Hello, thanks, but unfortunately this won't work for me - directly in the Moderation extension author discourages of this use, this scenario is listed as non-recommended use, the reasons why it is so are quite understandable for me and I fully agree with them. And the ArticleProtection does not define any person that is approving the changes - there is only an owner which can grant edit rights, but the editor can edit and publish everything without any validation, moreover this extension is a beta with long time without any updates.
  23. You can use one of these: https://www.mediawiki.org/wiki/Extension:Moderation https://www.mediawiki.org/wiki/Extension:ArticleProtection for moderation/protection. A user can "watch" a page and thus be notified via email of any changes: https://www.mediawiki.org/wiki/Help:Watching_pages and if they want to "watch" an entire category, you could use this: https://www.mediawiki.org/wiki/Extension:CategoryWatch
  24. Hello, I would like to use a Wiki for an internal documentation, but I am missing any kind of responsibility for the correctness of information that is present in the Wiki. As the planned documentation will be quite big, there will be several people which should be responsible for some parts of the documentation. But I would like to keep the possibility of "public" edits as someone can have better idea how to document some specific part of it. However there must still be some person, who is responsible that the overall information is valid and correct. Is there any possibility how to set up some page owner, I mean some kind of manager or moderator of that page? It should be some person that is responsible for that page (or set of pages), it is informed about any change and it is responsible that the information on that page is correct. Very nice would be if the updated part of the page is visible to public and only marked as unconfirmed (e.g. the paragraph will contain some css attribute) until this page owner confirms it.
  25. Jack Phoenix

    Problem with infobox (CSS?)

    Your site appears to be serving a white page on the specified URL (and the root domain serves a Fedora test page indicating that the server is successfully running Apache), so I can't comment on your specific case, but as a general rule: yes, it's CSS. As for what rules you need and where they are located depends on a few things. Most wikis will have the infobox CSS rules in the on-wiki page called MediaWiki:Common.css for CSS rules placed there will be applied to all skins. For the Swedish Wikipedia, that page can be found at https://sv.wikipedia.org/wiki/MediaWiki:Common.css although it seems to lack the styles we're looking for. Another possible place for the rules to be is the skin-specific MediaWiki:<skinname>.css wiki page; as of now (late 2018) the skin used by default on all Wikimedia sites (Wikipedia, Wiktionary, Wikiquotes, MediaWiki.org, etc.) is called "Vector", so maybe we'll find the styles on MediaWiki:Vector.css: https://sv.wikipedia.org/wiki/MediaWiki:Vector.css ...nope, that's empty too, dang. Wikipedia and other Wikimedia Foundation operated wikis (the aforementioned Wiktionary & friends) are somewhat special in that many of them implement infobox CSS via the Gadgets extension. This does not mean that you would need to install the Gadgets extension to get infobox CSS working! It just means that there are a few more places where the CSS rules in question could be located. The Special:Gadgets page (https://sv.wikipedia.org/wiki/Special:Finesser on the Swedish Wikipedia) lists all the MediaWiki:*.css and MediaWiki:*.js pages used by each gadget. It is probably a bit easier to go through that filtered list than to manually browse Special:AllPages/MediaWiki:, though that certainly remains an option as well. tl,dr: On the Swedish Wikipedia (and other WMF sites), templates' CSS is served via the TemplateStyles extension. The page you're looking for is located at https://sv.wikipedia.org/wiki/Mall:Faktamall/styles.css and you can find this by viewing the https://sv.wikipedia.org/wiki/Mall:Faktamall_biografi template page in edit mode, where you'll find a collapsed-by-default listing of templates used on that page (titled "Mallar som används på den här sidan:" in Swedish).
  26. According to the MediaWiki.org manual page for generateSitemaps.php, the script has an option named --urlpath (which you should apparently use almost always with the --server option), which allows setting an absolute URL and seems to have been specifically implemented to support Google's requirements for sitemaps.
  27. fanatikvoice

    Extension:Translate - cant translate page

    I download Translate for Bundle. I not download from extension page Translate. No errros log and dispalay error on site. Extension work, no work is good.
  28. Skizzerz

    Extension:Translate - cant translate page

    Can you try upgrading your version of Translate? The latest version of the language bundle (2018.10) is compatible with MediaWiki 1.31 and I see that there were a few bug fixes for the Translate extension; it is possible that your issue was already fixed. The best way to update the extensions is as follows: Download the latest bundle. Archive the existing versions you have of those extensions in your extensions folder. A decent way to do this on a temporary basis is to rename the directories. For example, rename the "Translate" directory in your extensions directory to "Translate-old". Upload the bundle to your server and extract it into the extensions directory. This will create a brand-new "Translate" directory, among others. The reason why you should rename or delete the old version first is because there are sometimes issues with extracting the new version on top of the old version -- if a file was deleted between the old and new version, the old file will remain in-place and could cause issues with functionality or expose security risks. By renaming or deleting the old version first, you avoid these issues. Run the update.php maintenance script to perform any relevant database updates, or use the web installer to update if you don't have SSH access. You should always run the updater after updating MediaWiki or any extensions. After doing that, try it again. If it still doesn't work, check your error logs to see if anything is showing up there (and configure PHP to log errors if it isn't currently doing that).
  1. Load more activity
  • Newsletter

    Want to keep up to date with all our latest news and information?

    Sign Up
×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.