Comments (10)
It seems that the "file upload" functionality was intended to to attachments, not attach wiki pages?
SemanticComments/specials/Comment/CE_CommentParserFunctions.php
Lines 285 to 310 in 9aee449
Anyway, no upload dialog is shown.
from semanticcomments.
When I open the Comment directly (Comment:[...]
) then the link works as expected, but when the comment is displayed elsewhere it fails just as you described.
from semanticcomments.
I narrowed it down to arraymapce
SemanticComments/specials/Comment/CE_CommentParserFunctions.php
Lines 445 to 485 in 9aee449
which is a copy(?) of PageForms'
arraymap
which also has a arraymaptemplate
https://github.com/wikimedia/mediawiki-extensions-PageForms/blob/d495d9f1603230cc928dcf69effa9b69e566745b/includes/PF_ParserFunctions.php#L435-L477
.
See also https://www.mediawiki.org/wiki/Extension:Page_Forms/Page_Forms_and_templates
from semanticcomments.
Ok, I think I know whats going on: when linking to a file description page you would use [[:File:somefile.jpg]]
instead of [[File:somefile.jpg]]
(Which would display the file directly). But then again if the files doesn't exist this doesn't link to the file upload page but to the dialog of creating a new page.
from semanticcomments.
I tried
{{#arraymapce:{{{10|}}}|,|x|{{#ifexist: x|[[:x]]|[x]}}| }}
instead of
{{#arraymapce:{{{10|}}}|,|x|[[:x]]|[x]| }}
within Template:CommentResult
, which doesn't seem to work (Because of arraymapce, I guess).
{{#ifexist:{{{10|}}}|[[:{{{10|}}}]]|[[{{{10|}}}]]}}
works without arraymapce
, but only for one attachment and not multiple.
from semanticcomments.
One solution would be to implement arraymaptemplate
https://www.mediawiki.org/wiki/Extension:Page_Forms/Page_Forms_and_templates#arraymaptemplate for SC and use the ifexists in arraymaptemplate
.
from semanticcomments.
Ok, I found a way to make it work:
- Install Extension Page Forms.
- Create a template:
Template:AttachedArticle
:{{#ifexist:{{{1|}}}|[[:{{{1|}}}]]|[[{{{1|}}}]]}}
- Change
Template:CommentResult
attached articles to:{{#arraymaptemplate:{{{10|}}}|AttachedArticle|,| }}
from semanticcomments.
Install Extension Page Forms.
Are you proposing to make PF a hard dependency for SemanticComments in order to support this feature? Not sure I like the idea. Can you disable that part and only enable it in case PF is available?
from semanticcomments.
@mwjames No, I wouldn't want that. Maybe do as you said or try to copy that function.
from semanticcomments.
This extension was abandoned. See #25 for further details and an alternative.
from semanticcomments.
Related Issues (15)
- Fluff i18n system HOT 2
- Testing with travis on multiple versions HOT 1
- Showing wrong login status when used in templates HOT 1
- Fix how special page is loaded HOT 1
- Release 2.0.0 HOT 6
- Merge old PRs HOT 10
- Cancel-button missing HOT 10
- Officially abandon Semantic Comments? HOT 3
- Retire SemanticComments repository
- Remove "CE_Initialize.php"?
- Move icons into CSS HOT 1
- Don't hardcode property names! HOT 2
- Avoid arbitrary Store::updateData requests HOT 1
- Add license HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from semanticcomments.