classdiagram not work anymore

75 views
Skip to first unread message

Bernard Bass

unread,
May 3, 2020, 11:01:00 AM5/3/20
to yuml

Yuml classdiagram not work anymore


classdiagram
<classdiagram>
 [Utilisateur]+1->*[Commande]
 [Commande]++1-items >*[Liste des éléments]
 [Commande]-0..1>[Méthode de Paiement]
 </classdiagram>
NO WORK

usecase
<usecase>
 [User]-(Login)
 [User]-(Logout) 
 (Login)<(Reminder) 
 (Login)>(Captcha)
 </usecase>

WORK

From : https://wiki.visionduweb.fr/index.php?title=Gerer_et_installer_des_extensions_avec_MediaWiki#Installer_yUML_sur_Mediawiki



PHP source code for Mediawiki : https://wiki.visionduweb.fr/index.php?title=Code_PHP_pour_Mediawiki_yUML


<?php // Author: Sindri Traustason http://sindri.info //Avoid unstubbing $wgParser on setHook() too early on modern (1.12+) MW versions, as per r35980 if ( defined( 'MW_SUPPORTS_PARSERFIRSTCALLINIT' ) ) { $wgHooks['ParserFirstCallInit'][] = 'efYUMLInit'; } else { // Otherwise do things the old fashioned way $wgExtensionFunctions[] = 'efYUMLInit'; } function efYUMLInit() { global $wgParser; $wgParser->setHook( 'classdiagram', 'efClassdiagramRender' ); $wgParser->setHook( 'usecase', 'efUsecaseRender' ); return true; } function yUMLRenderDiagram( $input, $args, $diagramType ) { $type = ""; if(!empty($args["type"])){ $type = "/".$args["type"]; } $scale = ""; if(!empty($args["scale"])){ $scale=";scale:".$args["scale"]; } $yumldir = ""; if(!empty($args["dir"])){ $yumldir=";dir:".$args["dir"]; } $uml_code = preg_replace( array("/\n/", "/,,/"), array(", ", "," ), trim($input)); // L'adresse de l'image est affichée avec https:// $output = "<img src=\"https://yUML.me/diagram".$type.$scale.$yumldir."/".$diagramType."/"; return $output.htmlspecialchars( $uml_code )."\"/>"; } function efClassdiagramRender( $input, $args, $parser ) { return yUMLRenderDiagram( $input, $args, "class" ); } function efUsecaseRender( $input, $args, $parser ) { return yUMLRenderDiagram( $input, $args, "usecase" ); } ?>


Last version for PHP Source :
Dernière modification proposée par Zer00CooL : https://github.com/ZerooCool/yuml-mediawiki/blob/master/yUML/yUML.php

Bernard Bass

unread,
May 3, 2020, 1:28:00 PM5/3/20
to yuml

Please, can you help for fixe that ?

My old code :
classdiagram
<classdiagram>
 [Utilisateur]+1->*[Commande]
 [Commande]++1-items >*[Liste des éléments]
 [Commande]-0..1>[Méthode de Paiement]
 </classdiagram>

NO WORK :(

Then i use https://yuml.me/diagram/scruffy/class/draw
I test my syntaxe, and change the syntaxe for this new syntaxe :

<classdiagram> [Utilisateur]1 Commandes *>[Commande] [Commande]1 *>[Produits] [Commande]1 *>[Méthode de Paiement] [Méthode de Paiement]1 1>[Paiement] </classdiagram>

NO WORK WITH <classdiagram>

Bernard Bass

unread,
May 3, 2020, 1:32:53 PM5/3/20
to yuml
And the same for this ;'(

 <classdiagram>
 [note: Installer un paquet .deb{bg:green}]
 [note: Installer un paquet .rpm{bg:orange}]

 [Linux]->[Archlinux]
 [Linux]->[Gentoo]
 [Linux]->[Debian{bg:green}]
 [Linux]->[Red Hat{bg:orange}]
 [Linux]->[Slackware]
 [Linux]->[Suse{bg:orange}]

 [Archlinux]->[Manjaro]
 [Debian{bg:green}]->[Kali Linux{bg:green}]
 [Debian{bg:green}]->[Knoppix{bg:green}]
 [Debian{bg:green}]->[Raspbian{bg:green}]
 [Debian{bg:green}]->[Skolelinux{bg:green}]
 [Debian{bg:green}]->[Ubuntu{bg:green}]
 [Red Hat{bg:orange}]->[Fedora{bg:orange}]
 [Red Hat{bg:orange}]->[RHEL{bg:orange}]
 [Suse{bg:orange}]->[SLES{bg:orange}]
 [Suse{bg:orange}]->[openSuse{bg:orange}]

 [Ubuntu{bg:green}]->[Mint{bg:green}]
 [Red Hat{bg:orange}]->[CentOS{bg:orange}]
 </classdiagram>

Bernard Bass

unread,
May 3, 2020, 6:33:32 PM5/3/20
to yuml

Tobin Harris

unread,
May 4, 2020, 4:03:30 PM5/4/20
to yuml
This was a trailing space issue I need to fix.

Quick fix here by deleting spaces at start of each line.


Which is the priority to fix in your opinion?

T

Tobin Harris

unread,
May 4, 2020, 4:16:20 PM5/4/20
to yuml
UPDATE. yUML copes with these spaces ok now, let me know how you get on.

Will look at the other issues also.

Tobin Harris

unread,
May 4, 2020, 4:29:12 PM5/4/20
to yuml
Really sorry for breaking those diagrams. 

Hmm, is this of any use to you?


[Utilisateur]++1->*[Commande]
[Commande]++1-items*>[Liste des éléments]
[Commande]-0..1>[Méthode de Paiement]


There's a few issues.

1. "items >*[Liste]" - I need to figure out how to treat the association label and multiplicity as separate. Doable, just might need a little time.

Bernard Bass

unread,
May 4, 2020, 5:23:58 PM5/4/20
to yuml
Good evening, good morning !

Thank you, you assured! Super fast for correction!

Almost all of the diagrams now work, except one, for scuffy.
This image link, not work : https://yuml.me/diagram/scruffy;scale:125/class/[Utilisateur]+1-%3E*[Commande],%20%20[Commande]++1-items%20%3E*[Liste%20des%20%C3%A9l%C3%A9ments],%20%20[Commande]-0..1%3E[M%C3%A9thode%20de%20Paiement]

Can you also see for update too ?

Here, you can see for test in live : https://wiki.visionduweb.fr/index.php?title=Gerer_et_installer_des_extensions_avec_MediaWiki#classdiagram_type.3D.22scruffy.22_scale.3D.22125.22

My Mediawiki code :

<classdiagram type="scruffy" scale="125">
 [Utilisateur]+1->*[Commande]
 [Commande]++1-items >*[Liste des éléments]
 [Commande]-0..1>[Méthode de Paiement]
 </classdiagram>

Bernard Bass

unread,
May 4, 2020, 5:39:41 PM5/4/20
to yuml

yuml.png

If I can allow myself to give my opinion, regarding the credit that has been added, at the bottom of the image?

I find it very intrusive, and, in particular, in the form of text thus placed, it does not necessarily adapt to all designs.

In my particular case, on my type of screen configuration, you see that the text is aligned at the bottom right, but, of course, will not be aligned at the center of the screen, or, on the right of the screen.

So, I think that which leaves having to 'undergo' a credit, it should be made more pleasant, and, bring a little something extra?

So, I would better see the credit be placed at the bottom left, in a small colored frame, but, can I also add a "UML" credit?

The best would still be to be able to add either the credit, if desired, and, as desired.
So, I could modify the message "Made in UML with the Yuml extension for Mediawiki".


Bernard Bass

unread,
May 5, 2020, 11:09:39 PM5/5/20
to yuml
@Tobin Harris

Can you up for scuffy ?

Tobin Harris

unread,
May 6, 2020, 3:44:50 AM5/6/20
to yuml
Hi 

Ok, all sorted!


Thanks

Tobin

Tobin Harris

unread,
May 6, 2020, 3:47:06 AM5/6/20
to yuml
Hi

Thanks for the note on this. 

I agree it looks a bit ugly there. Let me take a look at it.

Subscribers don't see the yUML text. That said, the API needs more work for subscribers so that might not sort it.

Do all Mediawiki requests originate from the same domain? I could use the referrer to potentially add something to the diagram.

Tobin

Bernard Bass

unread,
May 6, 2020, 11:38:10 AM5/6/20
to yuml
@Tobin Harris

To answer you, yes, in my context, which presents the examples that can be made with YUML and the extension for mediawiki, I mainly use the following domain name:

wiki.visionduweb.fr
I set up a mirror that points to the same content to circumvent certain censorship:
mediawiki.visionduweb.fr

Possibly, there is the site of the author of the extension, but, it no longer seems to work on it: http://wiki.sindri.info/wiki/YUML_MediaWiki_Extension

Is it possible to modify this credit information by myself, in the php code that I use, so as not to have to do the work on your side?
The extension PHP code: https://wiki.visionduweb.fr/index.php?title=Code_PHP_pour_Mediawiki_yUML

One last question, I would have liked to know if I presented all the types of bubbles that can be displayed, on my wiki, or are there still other presentation models that I do not know and use ?

https://wiki.visionduweb.fr/index.php?title=Gerer_et_installer_des_extensions_avec_MediaWiki#Installer_yUML_sur_Mediawiki
Reply all
Reply to author
Forward
0 new messages