How do I set og:image so it takes image from page?

You are going to gave to add some custom og:tags to the HTML markup of your page and specify the image that you want to use… Take a look at the example from the Facebook documentation – <html xmlns=”http://www.w3.org/1999/xhtml” xmlns:og=”http://ogp.me/ns#” xmlns:fb=”https://www.facebook.com/2008/fbml”> <head> <title>The Rock (1996)</title> <meta property=”og:title” content=”The Rock”/> <meta property=”og:type” content=”movie”/> <meta property=”og:url” content=”http://www.imdb.com/title/tt0117500/”/> … Read more

How to obtain a list of titles of all Wikipedia articles

The allpages API module allows you to do just that. Its limit (when you set aplimit=max) is 500, so to query all 4.5M articles, you would need about 9000 requests. But a dump is a better choice, because there are many different dumps, including all-titles-in-ns0 which, as its name suggests, contains exactly what you want … Read more

Searching Wikipedia using the API

I don’t think you can do both in one query. 1. To get the first result, use the Opensearch API. https://en.wikipedia.org/w/api.php?action=opensearch&search=zyz&limit=1&namespace=0&format=jsonfm https://en.wikipedia.org/w/api.php ?action=opensearch &search=zyz # Search query &limit=1 # Return only the first result &namespace=0 # Search only articles, ignoring Talk, Mediawiki, etc. &format=json # ‘jsonfm’ prints the JSON in HTML for debugging. This will … Read more

How do I create my own custom group in mediawiki?

You can add permissions for new groups to your LocalSettings.php file and they will automatically appear in the Special:UserRights page. For example, I wanted to disallow editing by regular users but create a “Trusted” group that was allowed to edit. The following code creates a “Trusted” group that is equal to the “user” group, except … Read more

JS: Failed to execute ‘getComputedStyle’ on ‘Window’: parameter is not of type ‘Element’

I had this same error showing. When I replaced jQuery selector with normal JavaScript, the error was fixed. var this_id = $(this).attr(‘id’); Replace: getComputedStyle( $(‘#’+this_id)[0], “”) With: getComputedStyle( document.getElementById(this_id), “”)

InnoDB: Attempted to open a previously opened tablespace

I had the same problem. I tried all the solution others has proposed, and unfortunately nothing worked. After spending hours on searching for the solution in Google I finally found this Open my.ini (my.cnf on linux-based systems and Mac) Look for [mysqld] Just below [mysqld] insert innodb_force_recovery = 1 Start MySQL Service Stop MySQL Service … Read more

Are there any tools to convert markdown to Wiki text in other formats

Try Pandoc, a universal document converter: $ pandoc –help pandoc [OPTIONS] [FILES] Input formats: docbook, haddock, html, json, latex, markdown, markdown_github, markdown_mmd, markdown_phpextra, markdown_strict, mediawiki, native, opml, rst, textile Output formats: asciidoc, beamer, context, docbook, docx, dzslides, epub, epub3, fb2, html, html5, json, latex, man, markdown, markdown_github, markdown_mmd, markdown_phpextra, markdown_strict, mediawiki, native, odt, opendocument, opml, … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)