Extension talk:AddPersonalUrls

Jump to navigation Jump to search

About this board

4 previous topics, relating to issues fixed in version 0.4. Previous discussion was archived at Extension talk:AddPersonalUrls/Archive 1 on 2016-10-25.

Alzi24 (talkcontribs)

Hi there. Currently the extension suggests the following setting:

	'addpersonalurls-userpages'
	=> 'Special:PrefixIndex?prefix=$username&namespace=2'

If you have a user "user" and another user "user-test", then the first user will see all pages of both users. I suggest to change the setting to

	'addpersonalurls-userpages'
	=> 'Special:PrefixIndex?prefix=$username/&namespace=2'
RV1971 (talkcontribs)

Thanks for the suggestion. I have incorporated it into the git master branch.

Reply to "User pages - proposal"
Alzi24 (talkcontribs)

When using the modern skin, the additional links do not show up at all.

RV1971 (talkcontribs)

I created the extension for the Vector skin, I didn't test other skins. Probably the code can easily be improved to work on other skins as well. feel free to contribute.

Alzi24 (talkcontribs)

I would like to apologize. Of course the additional links are there; don't know what went wrong yesterday. Maybe I looked at a very wrong place.

Reply to "Modern skin"

override of $wgAddPersonalUrlsTable not as expected

3
Alzi24 (talkcontribs)

Hi there ...

I want to override the settings by

wfLoadExtension( 'AddPersonalUrls' );
$wgAddPersonalUrlsTable = array(
        'addpersonalurls-userpages' => 'Special:PrefixIndex?prefix=$username&namespace=2',
        'addpersonalurls-favorites' => 'Special:Mypage/Favoriten',
        'addpersonalurls-sandbox' => 'Special:Mypage/Spielwiese',
        'addpersonalurls-notes' => 'Special:Mypage/Notizen'
);

but the "Home" link is still being shown.

RV1971 (talkcontribs)

This is because $wgAddPersonalUrlsTable does not replace the settings in extension.json but is merged into them. This is the normal way configuration works now in MediaWiki. I just corrected the extension documentation which was outdated in this regard.

Thanks for attracting my attention to the fact that this requires a mechanism to deactivate predefined items. To solve this, I have just created version 1.2.1 (and merged it into the branches for MW 1.30, 1.31 and 1.32). With this, you can override as follows:

wfLoadExtension( 'AddPersonalUrls' );
$wgAddPersonalUrlsTable = array(
        'addpersonalurls-home' => NULL,
        'addpersonalurls-userpages' => 'Special:PrefixIndex?prefix=$username&namespace=2',
        'addpersonalurls-favorites' => 'Special:Mypage/Favoriten',
        'addpersonalurls-sandbox' => 'Special:Mypage/Spielwiese',
        'addpersonalurls-notes' => 'Special:Mypage/Notizen'
);
Alzi24 (talkcontribs)

Hi RV1971! That fits perfectly well ...! Thanks a lot & happy Christmas, A.

Reply to "override of $wgAddPersonalUrlsTable not as expected"
Alzi24 (talkcontribs)

Hi there! The documentation says: "When a personal page does not exist, the URL opens the page for editing, and the content of the system messages ID-preload and addpersonalurls-preload is preloaded."

It doesn't work as expected. In the message table de.json I changed the messagetext of "addpersonalurl-xxx" to german, e.g.

    "addpersonalurls-favorites": "Favoriten",
    "addpersonalurls-favorites-preload": "Du kannst diese Seite zum Speichern deiner Favoriten nutzen.",

The page opens as Benutzer:yyy/Favoriten", which is what I want, but now it uses the translated word to search for the preload-text. The extension should better search by ID.

Workaround: Add new messages like "addpersonalurls-favoriten-preload", "addpersonalurls-spielwiese-preload" (= sandbox) and so on.

RV1971 (talkcontribs)

Actually the documentation is correct saying "This will also work for any URLs you add, provided that ID is equal to addpersonalurls-subpage_title_in_lowercase". I understand this is unsatisfactory in your case but I'm afraid I don't see an immediate solution. The problem is that the preload hook does not know the link that was used to arrive there, it only has the subpage name. It would be necessary to find the system message whose value is the subpage name and use its message ID to construct the ID of the preload message. I'm unsure whether there is a satisfactory way to do that.

Alzi24 (talkcontribs)

I see; this means changing the name of the page is like adding another URL. Well, my workaround might not be very stylish but it'll work for me.

Reply to "preloaded text missing"
Alzi24 (talkcontribs)

When using the monobook skin, the small icons before "my pages", "favorites" and so on are missing.

RV1971 (talkcontribs)

I created the extension for the Vector skin, I didn't test other skins. Probably the code can easily be improved to work on other skins as well. feel free to contribute.

Reply to "Monobook skin"

fatal error when trying to add a new user page

2
MHSluka (talkcontribs)

When trying to add add a new user page by clicking on the username, I get the following error:

AH01071: Got error 'PHP message: PHP Fatal error:  Call to a member function exists() on a non-object in …/mediawiki/extensions/AddPersonalUrls/AddPersonalUrls.body.php on line 107\n'

I am using MediaWiki 1.29.2 with PHP 5.5.14 with Suhosin 0.9.38.

RV1971 (talkcontribs)

This should be solved since version 1.1.1.

Reply to "fatal error when trying to add a new user page"
There are no older topics