Difference between revisions of "Template:Catgraph"
From FollowTheScore
Line 103: | Line 103: | ||
==== {{{name}}} ==== | ==== {{{name}}} ==== | ||
|}} | |}} | ||
− | {#wgraph:name=Catgraph|wgl|svg| | + | {{#wgraph:name=Catgraph|wgl|svg| |
− | { | + | {{Wgraph defaults}} |
− | {#dpl: | + | {{#dpl: |
|debug=1 | |debug=1 | ||
|{{#ifeq:{{{namespace1|}}}|all||{{#if:{{{namespace1|}}}|{{#ifeq:{{{namespace1|}}}|main|namespace=|namespace={{{namespace1|}}}}}}}}} | |{{#ifeq:{{{namespace1|}}}|all||{{#if:{{{namespace1|}}}|{{#ifeq:{{{namespace1|}}}|main|namespace=|namespace={{{namespace1|}}}}}}}}} | ||
Line 111: | Line 111: | ||
|{{#ifeq:{{{uses1|}}}|?||{{#if:{{{uses1|}}}|uses=Template:{{{uses1|}}}}}}} | |{{#ifeq:{{{uses1|}}}|?||{{#if:{{{uses1|}}}|uses=Template:{{{uses1|}}}}}}} | ||
|titlematch={{{titlematch1|}}} | |titlematch={{{titlematch1|}}} | ||
− | |linksto={#dpl: | + | |linksto={{#dpl: |
|debug=1 | |debug=1 | ||
|{{#ifeq:{{{namespace2|}}}|all||{{#if:{{{namespace2|}}}|{{#ifeq:{{{namespace2|}}}|main|namespace=|namespace={{{namespace2|}}}}}}}}} | |{{#ifeq:{{{namespace2|}}}|all||{{#if:{{{namespace2|}}}|{{#ifeq:{{{namespace2|}}}|main|namespace=|namespace={{{namespace2|}}}}}}}}} | ||
Line 118: | Line 118: | ||
|titlematch={{{titlematch2|}}} | |titlematch={{{titlematch2|}}} | ||
|format=,%PAGE%¦,,\n | |format=,%PAGE%¦,,\n | ||
− | } | + | }} |
|addcategories={{{catlinks|}}} | |addcategories={{{catlinks|}}} | ||
|format=, edge "%PAGE%" to "%PAGESEL%" {type '%NAMESPACE%'}\n node "%PAGE%" {type '%CATNAMES%,%NAMESPACE%' href "%PAGE%" },\n, | |format=, edge "%PAGE%" to "%PAGESEL%" {type '%NAMESPACE%'}\n node "%PAGE%" {type '%CATNAMES%,%NAMESPACE%' href "%PAGE%" },\n, | ||
− | } | + | }} |
− | layout={{{layout|}}} | + | layout={{{layout|dfs}}} |
{{{userparm|}}} | {{{userparm|}}} | ||
− | } | + | }} |
}} | }} |
Revision as of 18:33, 19 August 2012
As an example try and select 'DPL Manual' in both category boxes ...
or select namespace 'main' and 'category', use algorithm 'forcedir' and add "attraction=200" as a manual parameter.
{{#form: name= demo |action=/dpldemo/index.php|
{{#input: name= title |type= hidden | value = Special:Call/Catgraph }}
select | from | to |
namespace | {{#input: name= namespace1 |type= select | value = |
|
{{#input: name= namespace2 |type= select | value = |
|
category | {{#input: name= category1 | value = |type= select
| *?
|
{{#input: name= category2 | value = |type= select
| *?
|
uses | {{#input: name= uses1 | value = |type= select
| *?
|
{{#input: name= uses2 | value = |type= select
| *?
|
title like | {{#input: name= titlematch1 | value = }} | {{#input: name= titlematch2 | value = }} |
links from | {{#input: name= linksfrom1 | value = }} | {{#input: name= linksfrom2 | value = }} |
links to | {{#input: name= linksto1 | value = }} | {{#input: name= linksto2 | value = }} |
show: namespace {{#input: name= shownamespace
|type= select | value = |
- yes
- no
}}graph {{#input: name= graph
|type= select | value = |
- svg
- png
- wgl
- gdl
}}catlinks {{#input: name= catlinks
|type= select | value = |
- no
- yes
}}{{#input: type = submit | value = create graph }}
reset list layout
layout {{#input: name= layout
|type= select | value = |
- normal
- forcedir
- dfs
- minbackward
- maxdepth
- mindepth
- maxdegree
- maxindegree
- maxoutdegree
- mindegree
- minindegree
- minoutdegree
- tree
}}userparm {{#input: name= userparm | size=80 | value = }}}}