Project:Support desk

Jump to navigation Jump to search

About this board

Welcome to MediaWiki.org's Support desk, where you can ask MediaWiki questions!

There are also other places where to ask :

Before you post

Post a new question

  1. To help us answer your questions, please always indicate which versions you are using (reported by your wiki's Special:Version page):
    • MediaWiki
    • PHP
    • Database
  2. Please include the URL of your wiki unless you absolutely can't. It's often a lot easier for us to identify the source of the problem if we can look for ourselves.
  3. To start a new thread, click "Start a new topic".
Previous page history was archived for backup purposes at Project:Support_desk/old on 2015-07-30.
 
123.136.115.159 (talkcontribs)

Call me 01139973136

Reply to "Open"

How to translate this Cite template to Hebrew?

14
49.230.87.239 (talkcontribs)

I have an RTL (Hebrew) 1.34.0 principally all-core MediaWiki website with Cite extension and ParserFunctions extension loaded in LocalSettings.php.

In this website I have Template:Cite with the following content, which I use to create English footnotes in English-only pages:

<includeonly>{{#if:{{{refname|}}}
| {{#tag:ref|{{{content|}}}|name={{{refname}}}}}
| {{#tag:ref|{{{content|}}}}}
}}</includeonly>

Credit for @Jonathan3 for developing this template.

Call input examples:


1) Cite with parameter calls WITHOUT English naming (by name attribute)

First check{{Cite|content=First check}}
Second check{{Cite|content=Second check}}
Third check{{Cite|content=Third check}}

<references />

2) Cite with parameter calls WITH English naming (by name attribute)

First check{{Cite|content=First check}}
Second check{{Cite|content=Second check|refname=First_name}}
Third check {{Cite|refname=First_name}}

<references />


Call output examples (appear fine in dir="rtl" modes):


1) Cite with parameter calls WITHOUT English naming

First check[1] Second check[2] Third check[3]

  1. ^ First check
  2. ^ Second check
  3. ^ Third check

2) Cite with parameter calls WITH English naming

First check Second check Third check

  1. ^ First check
  2. ^ לקפוץ מעלה אל:2.0 2.1 Second check

---

Note: Brackets appear flipped (][) in dir="ltr" modes

---

My problem

I want to use this template in an Hebrew project, that is, in an RTL && Right-align writing mode but if I write for example:

{{Cite|Content=non_messy_content}}

and my footnote happens to start with English after the first pipeline and also including Hebrew (say, as with links) than everything becomes jumbled up:

{{Cite|Content=תוכן_שהתבלגן}}

The first example shows non messy content and the second shows messy content (תוכן שהתבלגן); in the second example the "Content" part is situated wrongly.

My question

The only solution which comes to my mind to solve this problem is having an Hebrew call to the template such as

{{הערה|תוכן=תוכן_שלא_התבלגן}}

Which means Content=content which didn't go messy.

If there were ready to use RTL&&RA Hebrew (or any other RTL) <ref> tags than I wouldn't need such a Hebrew call but HTML is all English so I do need a template and an all-Hebrew one.


Hence I ask,

How to translate my template from English to Hebrew in a successful manner?

How to translate this Cite template to Hebrew?

49.230.87.239 (talkcontribs)

I give you my word of honor that this is generally and most likely the last time I will tag your profiles here with this RTL&&RA issue:

@Amire80

49.230.87.239 (talkcontribs)

I give you my word of honor that this is generally and most likely the last time I will tag your profiles here with this RTL&&RA issue:

@קיפודנחש

49.230.87.239 (talkcontribs)

I give you my word of honor that this is generally and most likely the last time I will tag your profiles here with this RTL&&RA issue

@IKhitron

Bawolff (talkcontribs)

So this is a bit harder. Some possible solutions:

  • If you switch the page language via Special:PageLanguage (After enabling $wgUseDBPageLanguage), the edit box will be the directionality of the page language. (You can see an example of this by comparing the edit box for the page named MediaWiki:Translateinterface/en and MediaWiki:Translateinterface/he )
  • The following js might help: $( function() {box = document.getElementById( 'wpTextbox1' ); if (box) box.dir = 'auto';});
  • If you don't want to specify an overall override, or are authoring a mix of directionality in one page, you can directly insert RLM (right-to-left mark), LRM (Left-to-right mark) or FSI (first-strong-isolate) characters (You would have to directly insert the character, not the entity, for it to affect the edit box. However it may also have an effect on the output, in most cases it should probably be fine, and the isolate characters are probably less likely to have a negative effect than the other characters). This is kind of hard to do, and how to do it varries by operating system. In windows, you can insert an LRM using the key combination Alt+0253. This is what it looks like if you put an LRM character before and after the hebrew part:
{{Cite|content=‎תוכן_שהתבלגן‎}}
49.230.87.239 (talkcontribs)

@Bawolff

example.com/MediaWiki:Translateinterface/en

example.com/MediaWiki:Translateinterface/he

Brought me a 404 in my own website.


---

Running the JS

$( function() {box = document.getElementById( 'wpTextbox1' ); if (box) box.dir = 'auto';});

in an edit page juxtaposed all English content left and all Hebrew content right; so I still have a problem calling {{Cite|Content=CONTENT}} in the middle of two Hebrew structures, if the content of the footnote is not solely in English.


---

About using either RLM/LRM; I don't know these

About FSI; If I understand correctly it is still experimental


---

Is there a way to tell the backend, for example

Where "הערה" put "Cite" AND where "שם" put "name"?

This way I write everything in Hebrew but the output will always be based on a preexisting English translation of the output, just one step before parsing and rendering everything else?

Bawolff (talkcontribs)

you can use redirects for alternate template names. Template parameters can have multiple names in a fallback pattern.

49.230.87.239 (talkcontribs)

@Bawolff I have read in that page and what I understood is that a redirect does with transferring a human or a bot from one webpage to another.

Perhaps you meant something like that the page

תבנית:הערה

Should contain:

#REDIRECT [[Template:Cite]]


About fallback patterns for template parameters: I want to read about it, but I don't know where exactly,

Did you mean to: Help:Templates#Exceptions to the order of evaluation

I mostly misunderstand how is it essentially different than redirections and how does a template gets directed to do the "fallback",


Kindly,

Bawolff (talkcontribs)

you can do {{{parametername|{{{alternativeparamname}}}}}}

49.230.87.239 (talkcontribs)

@Bawolff

I want to better understand that code

I went to Help:Templates and searched:

|{{{

I didn't match any data.


Please tell us the name of the concept or refer to a man page.

At least a bit more detailing would be helpful.

Bawolff (talkcontribs)
49.230.87.239 (talkcontribs)

So,

parameter תוכן has the default value of content

AND

parameter שם has the default value of refname (a name attribute)

?

49.230.87.239 (talkcontribs)

@Jonathan3 now after the English phase was dealt with in depth (and success), you might have an approach to recommend about translating the template to Hebrew.

Jonathan3 (talkcontribs)

I don't have any experience of foreign languages but will have a look next week. I'd start by changing "refname" to "name", just to simplify things in finding a translation. I just kept it as "refname" as it had been suggested by someone else. They say a camel is a horse designed by a committee. Apologies if it turns out that the distinction is necessary!

Reply to "How to translate this Cite template to Hebrew?"

What are some essential plugins/extensions you like?

4
BubbaUsesWiki (talkcontribs)

What are some of the more useful or essential plugins/extensions I should look at or consider?

I'm thinking about:

  • Extension:VisualEditor
  • Extension:WikiSEO 2.4.1

And maybe:

  • Extension:PermissionManager
  • Extension:GroupManager

Are those the most useful, essential, or up to date? Or does someone else have some favourites and must-haves?

Thanks for your input.

This post was hidden by BubbaUsesWiki (history)
BubbaUsesWiki (talkcontribs)

Thanks. That doesn't help.

Jonathan3 (talkcontribs)

I am reluctant to criticise any question as being too vague to elicit a helpful answer, but you may find it helpful to go through the list (long as it is) to see which extensions meet your undisclosed needs. I have no connection with the author of the list, who I think authored only one of the extensions listed, so your characterisation of it as "spam" when hiding my post is inaccurate.

My favourite extensions are Cargo and Page Forms, but whether they would help you would depend on your requirements.

Reply to "What are some essential plugins/extensions you like?"

Force modified link generation / How to modify $wg_Server $wgServerName

2
Gunnar.offel (talkcontribs)

I would like to modify the generated links to move the namespaces as subdomains.

Is there a option to force the kink generation to {{Namespace}}.DOMAIN.TLD/{{Article}} instead of DOMAIN.TLD/{{Namespace}}:{{Article}}?

Bawolff (talkcontribs)
Reply to "Force modified link generation / How to modify $wg_Server $wgServerName"
Hjerteblod (talkcontribs)

dear people,

after googling and reading some articles and still did not find an answer, I have to ask a question.

I only started writing a wiki for my company the day before yesterday. I've only been dealing with php since then. Yesterday I wrote a lot of articles and uploaded pictures, which worked without any problems. With File:.... jpg it showed me everything correctly. Now I wanted to continue working today and it only shows me the link of the image and when clicking "could not load image". Today I only changed something in the localsettings file to create users. I made an update yesterday and read that it crashed a patch. I don't know what that means. Can someone help me or should I show any php files?


Malyacko (talkcontribs)

I don't know either what "crashing a patch" means - if you read that somewhere it would be helpful to know where and context.

If there are problems with loading image files, then please check the "network" tab in developer tools of your browser, and check the error log of the web server software that you are using.

Hjerteblod (talkcontribs)

You are right, sorry! I can not find it, because I had so many tabs open. I understand if this are too less information, maybe I have to ask some people in my office. I want to make it by my own.


These are the errors I found in the tab:

1590759839404 Toolkit.Telemetry ERROR TelemetrySend::sendPersistedPings - failed to send ping 07be47c3-bce4-4a75-85bd-7a5b41401d1e: {"isTrusted":true} Log.jsm:723

Structured Ingestion ping failure with error: error 3 PingCentre.jsm:202

this.window.gBrowserInit is undefined

Hjerteblod (talkcontribs)

I can explain it in some other way. Yesterday, the image was shown. Today there is just the link. And when I click the link, it tells me, that the image could not found.

Malyacko (talkcontribs)

See Help:Locating broken scripts (though the first two items are not from MediaWiki, for the last one I am not sure), and, again, check your web server software error logs. You may also want to check with another browser if it's the same behavior, and name your browsers.

Bawolff (talkcontribs)

those scripts do not sound like part of mediawiki. I do not thing those errors are causing your image issue, although its possible they are causing other issues.

Check the network tab instead for network errors related to those images.

Reply to "image not found"
74.196.53.127 (talkcontribs)

trying to reset password, but I do not receive an email to reset after it says it will send one. Cannot find a way back in. What do i need to do?


Malyacko (talkcontribs)

You could start explaining what "webcore" is. And how this is related to MediaWiki.

Reply to "cannot log in to webcore"

How to edit multiple articles by the same way?

6
2A02:908:3111:7DA0:5412:338A:BD55:14F9 (talkcontribs)

Hi,

I have to wiki sites. Let's say wiki#1 and wiki#2.

I have prepared many articles at wiki#1, and now I want to export them to wiki#2.

So far I understand what to do.

But now I want not to delete the articles from wiki#1, but to leave external redirects to the same articles on wiki#2.

How can I do that?

I have hundreds of articles, I don't like to edit every single manually.

Bawolff (talkcontribs)
2A02:908:3111:7DA0:F5BA:9466:A806:79DC (talkcontribs)

Isn't there any command like

#redirect [wiki#2 $NameOfArticle]

?

Bawolff (talkcontribs)
2A02:908:3111:7DA0:580:5B55:1EF8:481E (talkcontribs)

I had another idea.

Is it possible to take many articles and edit them with the same text?

So that the written text will be saved as the content or many chosen articles at the same time.

Thanks either way.

Ciencia Al Poder (talkcontribs)

If you have command line access to the wiki, it may be easier to use the edit.php maintenance script

Reply to "How to edit multiple articles by the same way?"

How to make font smaller in specific subcontent?

7
220.121.235.23 (talkcontribs)

I want to make the font size smaller of title and content in subcontent (which start with '=='). Can anybody tell me how to do it?

220.121.235.23 (talkcontribs)

I mean, for example, in my wiki, every article has subcontent with title of 'references'.

and I want to make the title (references) and content smaller in font size in every articles.

Malyacko (talkcontribs)

Define custom CSS for specific classes or IDs: Manual:CSS

220.121.235.23 (talkcontribs)

The problem is that one subcontent doesn't have class nor id. isn't is true?

Bawolff (talkcontribs)

you can wrap the entire section in a div:

<div style="font-size: 60%">
==References==
* foo
</div>
114.203.88.149 (talkcontribs)

I know this works, but it's really troublesome to type that in every article.

isn't there any way to make it automatically when the subcontent start with specific title (like '==References=='?

AhmadF.Cheema (talkcontribs)

The easiest way would be define the CSS style rules inside a template, and use that template whenever the ==References== section is to be included. See Help:Templates.

Reply to "How to make font smaller in specific subcontent?"

LDAP Group Restrictions instructions?

2
Rosenblitt (talkcontribs)

I want to limit access to our wiki install using LDAP groups. I just got my LDAPAuthentication2 extension working. All I can find is information on how to setup the LDAP group restrictions based on the older LDAP Authentication system.

Is there a good guide out there on the newer LDAPAuthenication2 group restrictions?

I've been looking for a few hours with no real luck. Thanks in advance, loving this system!

Rosenblitt (talkcontribs)

So I didn't understand that the Group Restrictions happen as part of the LDAPAuthorization extension... @Osnard was able to help me out:

Topic:Vn8h4e56a88vtwh4

Reply to "LDAP Group Restrictions instructions?"

$wgLDAPRequiredGroups & LDAPAuthentication2???

2
Rosenblitt (talkcontribs)

I'm trying to get my LDAPAuthentication2 setup squared away. The documentation on this vs. the original LDAPAuthentication is kind of lacking. I need to setup group restrictions, and I'm trying to follow the examples on Extension:LDAP Authentication/Examples#Group configuration, but I'm pretty sure its not working because its written for the older LDAPAuthentication not v.2?

Here is what I have for my LocalSettings.php in relation to the LDAP connection. I'm trying to limit login to the group named "UBSA_Student_Staff".


//LDAP Authentication Config

$wgMinimalPasswordLength = 6;

$wgPasswordPolicy['policies']['sysop']['MinimalPasswordLength'] = 6;

$wgPasswordPolicy['policies']['Administrators']['MinimalPasswordLength'] = 6;

$wgPasswordPolicy['policies']['interface-admin']['MinimalPasswordLength'] = 6;

$wgPasswordPolicy['policies']['bureaucrat']['MinimalPasswordLength'] = 6;

wfLoadExtension( 'LDAPProvider' );

wfLoadExtension( 'PluggableAuth' );

wfLoadExtension( 'LDAPAuthentication2' );

$LDAPAuthentication2AllowLocalLogin = true;


// Create Wiki-Group 'engineering' from default user group

$wgGroupPermissions['UBSA_Pro_Staff'] = $wgGroupPermissions['sysop'];


// Private Wiki. External LDAP login. Default NS requires login.

$wgEmailConfirmToEdit = false;

$wgGroupPermissions['*']['edit'] = false;

$wgGroupPermissions['*']['read'] = false;

$wgGroupPermissions['*']['createaccount'] = false;

$wgGroupPermissions['sysop']['createaccount'] = true;

$wgGroupPermissions['*']['autocreateaccount'] = true;

$wgBlockDisablesLogin = true;


// Load LDAP Config from JSON

$ldapJsonFile = "$IP/ldap.json";

$ldapConfig = false;

if (is_file($ldapJsonFile) && is_dir("$IP/extensions/LDAPProvider")) {

  $testJson = @json_decode(file_get_contents($ldapJsonFile),true);

  if (is_array($testJson)) {

    $ldapConfig = true;

  } else {

    error_log("Found invalid JSON in file: $IP/ldap.json");

  }

}

$wikiRequestSafe  = true;


// Activate Extension

if ( $ldapConfig ) {

  wfLoadExtension( 'PluggableAuth' );

  wfLoadExtension( 'LDAPProvider' );

  wfLoadExtension( 'LDAPAuthentication2' );

  wfLoadExtension( 'LDAPAuthorization' );

  wfLoadExtension( 'LDAPUserInfo' );

  wfLoadExtension( 'LDAPGroups' );

  $LDAPProviderDomainConfigs = $ldapJsonFile;

  $wgPluggableAuth_ButtonLabel = "Log In";

  if ($wikiRequestSafe) { $LDAPAuthentication2AllowLocalLogin = true; }

}

$wgShowExceptionDetails = true;

$wgShowSQLErrors = true;

$wgShowDBErrorBacktrace = true;


//LDAP / AD Group Restrictions

$wgLDAPRequiredGroups = array( "itorg_ad_buffalo_edu"=>array("CN=UBSA_Student_Staff,OU=Groups,OU=UBSA,OU=StudentAssociation,OU=ITORGS,DC=itorg,DC=ad,DC=buffalo,DC=edu"));


I asked about this last week and it got buried so far that I couldn't find it to bump.

I would love it if someone can point me to the right documentation for the new LDAPAuth 2 group restrictions info! Thanks!


Rosenblitt (talkcontribs)

So I didn't understand that the Group Restrictions happen as part of the LDAPAuthorization extension... @Osnard was able to help me out:

Topic:Vn8h4e56a88vtwh4

Reply to "$wgLDAPRequiredGroups & LDAPAuthentication2???"