Not logged in
Talk
Contributions
Create account
Log in
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Page
Discussion
Edit
View history
Editing
Selectricity/Custom widgets plan
From WikiDotMako
Jump to:
navigation
,
search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
The widget works off 6 basic images: <br> 1. Top Bar <br> 2. Corner Image <br> 3. Default Image for when Candidates don't have their own images <br> 4. Background Type 1, which goes behind each 1/2 of the candidates and their descriptions <br> 5. Background Type 2, goes behind the remaining candidates <br> 6. Bottom Bar <br> Mako suggested having the user upload just one zip file, with all the images named properly. The other option, which I'm considering is having the files uploaded separatel (I don't know how to deal with zip files...) Are there any advantages to one method over the other? I guess uploading just one zip file is easier for the user, but then things would have to be named very specifically, wouldn't they? My current idea is to add two columns to the Pictures database: 1. election_id, which would act as a link to elections model via belongs_to 2. type, which would perform a function similar to the type column in the elections table <br> 6 types: 'top', 'icon', 'image', 'bg1', 'bg2', 'bottom' Then, from when creating widget in the view, have the code run a few checks. <br> if @election.top <br> <img src=url_for @election.icon> <br> else <br> <img src="images/embed_header_icon"> <br> Any suggestions? [[Category:Selectricity]]
Summary:
Please note that all contributions to WikiDotMako are considered to be released under the Attribution-Share Alike 3.0 Unported (see
WikiDotMako:Copyrights
for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource.
Do not submit copyrighted work without permission!
To protect the wiki against automated edit spam, we kindly ask you to solve the following CAPTCHA:
Cancel
Editing help
(opens in new window)
Tools
What links here
Related changes
Special pages
Page information