Elwiki:Editor Community: Difference between revisions
Line 52: | Line 52: | ||
Now, no matter what village, their corresponding theme color are set to variable '''Color''', then what you need to do is to pass '''''<nowiki>{{#var:Color}}</nowiki>''''' to the template with Color Settings (such as '''''Section'''''). And, if you what to change color, just change the '''''switch''''' part, and you do not need to change the '''''<nowiki>{{{Village|}}}</nowiki>''''' parameters in every page. | Now, no matter what village, their corresponding theme color are set to variable '''Color''', then what you need to do is to pass '''''<nowiki>{{#var:Color}}</nowiki>''''' to the template with Color Settings (such as '''''Section'''''). And, if you what to change color, just change the '''''switch''''' part, and you do not need to change the '''''<nowiki>{{{Village|}}}</nowiki>''''' parameters in every page. | ||
'''Thank you if anyone can notice this.''' | '''Thank you if anyone can notice this.''' | ||
'''-[[User:boxsnake|boxsnake]] | '''-[[User:boxsnake|boxsnake]]''' '''''([[User_talk:Boxsnake|Talk]])''''' | ||
}} | }} |
Revision as of 20:40, 25 July 2014
Any topics regarding editing elwiki goes in here.
Side Bar and Slow Loading
I'm sure most of you have noticed this by now, but sometimes loading pages when logged in can be painfully slow. Also when submitting pages take ages to load.
This is because of how badly optimized the Sidebar is currently.
As you can see there are hundreds of switch statements for every line and there is a reason for that. The way Sidebar is handled is that it cannot all be on the same line.
For Example:
- Characters
- Elsword
- Raven
Would work. However this would not:
- Characters **Elsword **Raven
Why is this so important? Because switch statements has to be handled on one line and cannot be separated into many. See here for more info (http://www.mediawiki.org/wiki/Manual:Interface/Sidebar#Parser_functions_in_sidebar)
As a result, everytime a page is loaded or saved, all these lines need to be ran each time and therefore can cause slowdowns. The reason why its fast for people not logged in is because it is cached.
If anyone has any ideas on how we can fix this, please let us know. Thanks!
- Kenny
Variable and Loop Parser Functions (Extensions) Requirement
variable and loop functions requirement |
---|
I think Variable and Loop parser functions should be added to elwiki. Sometimes, loop and variable define makes benefits when making templates.
For Example:
{{#switch: {{{Village|}}} | 1={{#vardefine:Color|green}} | 2={{#vardefine:Color|red}} ... | 7={{#vardefine:Color|orange}} }} Now, no matter what village, their corresponding theme color are set to variable Color, then what you need to do is to pass {{#var:Color}} to the template with Color Settings (such as Section). And, if you what to change color, just change the switch part, and you do not need to change the {{{Village|}}} parameters in every page. Thank you if anyone can notice this. -boxsnake (Talk) |