AgileWind
•
Autobot
Posts: 259
Likes: 6
Gender: Male
|
Post by AgileWind on Apr 17, 2015 8:36:07 GMT
Actually I don't know which section I should put this in... I had thought about putting in the proposal sub-board, but I dunno, it's still just a concept, not a proposal-level idea. I think it would be appropriate to put it in the General Discussion sub-board. But does BBCode count as art? Anyway, this is a small experiment, well, as the title say. Partly inspired by Chiro's "Area Status Thread" and Astrinal's "Fancy Code Templates". I tried to use BBCode to make a map about where the conflicts are happening, which is hard for me... I originally thought BBCode is similar to html. But then I found out it does not allow positioning property. But eventually I just somehow did it. Well, at least it shows normal on my computer. Demo: So... What do you think? p.s. It doesn't really show normally on mobile version, and I have absolutely no idea on how to solve it
|
|
AgileWind
•
Autobot
Posts: 259
Likes: 6
Gender: Male
|
Post by AgileWind on Apr 17, 2015 8:41:08 GMT
- reserved for... whatever things that I might want to add? -
|
|
Detective Ulti
•
Master Detective / 'Pun of the Year' Award Winner
Neutral
Posts: 678
Likes: 9
Gender: Male
|
Post by Detective Ulti on Apr 17, 2015 16:00:49 GMT
I like it, it looks pretty good and is a good concept too.
|
|
|
Post by Feenixfire Lockheart on Apr 18, 2015 14:29:56 GMT
Moved to suggestions and proposals.
I really love this idea. I'll bring it up with the admins.
|
|
Punch-Line
•
Avacon
Posts: 116
Likes: 10
Gender: Male
|
Post by Punch-Line on Apr 19, 2015 0:28:18 GMT
Brilliant idea Fee.
|
|
Shadowstrike
•
Roleplayer V
Posts: 810
Likes: 11
Gender: Male
|
Post by Shadowstrike on Apr 19, 2015 9:35:53 GMT
I'd say it looks very good AgileWind but out of curiosity how easy would you find updating such a thread, considering that battle locations can be created and cease in a single day quick updates could at times be rather important.
|
|
|
Post by Krovennan (Quaketread) on Apr 19, 2015 12:10:08 GMT
Would this be a worldwide thing like above that's just copy-pasted in each sub-forum? Or would we we able to narrow down the map to the area for each sub-forum? Narrowing it down means a bigger map and a lot more accuracy, especially if an area has multiple battles in close proximity.
And ofc as Shadowstrike said, keeping it updated is gonna need someone's attention. Maybe assign a Mod to keep an eye on the fights and update the maps as needed? I couldn't do it due to IRL schedule keeping me from being here al the time right now, but I'm sure someone would be able to do it.
|
|
AgileWind
•
Autobot
Posts: 259
Likes: 6
Gender: Male
|
Post by AgileWind on Apr 19, 2015 13:47:55 GMT
Thank you It's a great encouragement. Now that it was moved to the proposal section, I feel obliged to point out the map's limitations. In my opinion: Map is too smallWhen the area that needed for status update is close, the clickable signs might overlap, making it hard to click. For example, if San Francisco and Los Angeles both have something happening at the same time, their respective buttons might overlap. Potential solutions:Make supplementary continental maps for each continent, so the maps would be large enough to avoid overlapping in most cases. The maximum width for a post is now currently 672pixels. If Admins and Mods have a way to make the width larger(e.g. make the user account name invisible for that post), the map can be larger. Not compatible on mobile version of the siteWhen I tried it on mobile version, the map couldn't display as I wanted. For this, I have absolutely no idea on how to solve it Potential solutions:Currently none BBCode limitationsI used BBCode to do this map, which is not as free as html. For example, I used margin-left and margin-top to enable me to position the buttons, which is quite troublesome. The buttons position is relative to the most rightward button. To make a coordinate system, you have to minus the pixels the most rightward button and add the pixels you want so the button locates at where you want it to be. Luckily for the y-coordinate, it won't happen as long as I used float: left. But in I heard that admins can use html. So maybe if the admins use html to set it up, there could be less trouble?
I'd say it looks very good AgileWind but out of curiosity how easy would you find updating such a thread, considering that battle locations can be created and cease in a single day quick updates could at times be rather important. I wrote a small and very crude programme so I don't need to do all the calculations every time I want to produce a new map. So now, every time I make a new map, I need to enter: - url of the link
- mouseover message for each link
- latitude of the location
- longitude of the location
It wouldn't be very hard to update, I guess. It is might be a bit troublesome when there are a lot of links, as all data has to be entered again when a new map has to be produced. Of course, a file loading and saving function is added this could be overcome. The effort needed to update the map, in my opinion, would be similar to the effort of updating the area status thread suggested by Chiro. (Actually I think the map can be updated based on the Area status thread.) BTW, I can post the programme I made here. Just don't laugh at me, it is really a very crude one.
|
|
AgileWind
•
Autobot
Posts: 259
Likes: 6
Gender: Male
|
Post by AgileWind on Apr 20, 2015 14:53:51 GMT
This is the short programme I wrote in Python 3.4.3. to generate the BBCode needed. World Map with Clickable Keys Generator v0 """ World Map w/ clickable keys Generator v0 AgileWind. All rights that can be reserved are reserved. Contact: agile.winds@gmail.com """
print("World Map w/ key Generator") print("AgileWind. All rights that can be reserved are reserved.") print("Contact: agile.winds@gmail.com") print()
default_map_url = "https://lh4.googleusercontent.com/-fvIiBwBx-lo/VTC0PoExu7I/AAAAAAAAAFU/M9TwZOVFOOI/w672-h336/672x336_Equirectangular_projection_SW.png" default_map_wth = 672 default_map_hgt = 336 default_map_bdr = 0
red_conpic_url = "https://lh3.googleusercontent.com/-7o_291KCHuI/VRo4jRTYypI/AAAAAAAAAAs/RMnMn1k2oB8/w150-h139-no/conflictsignred.png" yellow_conpic_url = "https://lh5.googleusercontent.com/-7dkQyUPRDkQ/VRo4jDLUvWI/AAAAAAAAAAo/ExVghE0LFJA/w150-h139-no/conflictsignyellow.png" purple_conpic_url = "https://lh5.googleusercontent.com/-DtmYRJOymxw/VRo4jdIQ_NI/AAAAAAAAAAw/dVJVyqWDu2w/w150-h139-no/conflictsignpurple.png" default_conpic_hgt = 20 default_conpic_wth = 22
finish_input = False no_of_link = 0
tgt_list = []
code = ""
#Background Map print("Background map") print("-----------------------------------") use_default = str(input("Use default background map?(y/n) ")) if use_default.lower() == "n": print("Use new map") print() map_url = str(input("Please enter new url: ")) map_wth = int(input("Please enter the width of the new map:(in pixels) ")) map_hgt = int(input("Please enter the height of the new map:(in pixels) ")) map_bdr = int(input("Please enter the border width,i.e. non-map line border, of the new map:(in pixels) ")) else: print("Use default map") print() map_url = default_map_url map_wth = default_map_wth # actually is the picture width map_hgt = default_map_hgt # actually is the picture height map_bdr = default_map_bdr
########## code = '[div style="width:'+str(map_wth)+'px;height:'+str(map_hgt)+'px;text-align:justify;background-image:url('+str(map_url)+');max-width:100%;"]' ##########
use_d_conpic = str(input("Use default conflict picture?(y/n) ")) if use_d_conpic.lower() == "y": xplocol = str(input("Please specify default confict sign colour, red, purple or yellow.(r/p/y):")) print("If you want to change the key sign, please type 'key' in the input asking for target url.") conpic_wth = default_conpic_wth conpic_hgt = default_conpic_hgt if use_d_conpic.lower() == "n": xplocol = "url" self_key_url = str(input("Please enter new url for the picture of the key sign: "))
#Link, clickable keys url part while finish_input == False: print() print("-----------------------------------") no_of_link = no_of_link + 1 if str(no_of_link).endswith("1"): current_link_no_title = str(no_of_link)+"st" print(current_link_no_title+" Link") elif str(no_of_link).endswith("2"): current_link_no_title = str(no_of_link)+"nd" print(current_link_no_title+" Link") elif str(no_of_link).endswith("3"): current_link_no_title = str(no_of_link)+"rd" print(current_link_no_title+" Link") else: current_link_no_title = str(no_of_link)+"th" print(current_link_no_title+" Link") print("-----------------------------------") print()
tgturl = str(input("Please enter target url for the "+current_link_no_title+" link: ")) if tgturl == "key": print("Change image of the key.") print("Do you want to change the [c]olor of the default conflict picture or") image_change = str(input("do you want to change the [i]mage source? (c/i)"))
if image_change.lower() == "c": print("Change conflict sign colour") xplocol = str(input("Please specify which confict sign colour from now on(r/y/p):")) while xplocol.lower() not in ["r","p","y"]: print("You need to enter r/p/y for colour!") xplocol = str(input("Please specify which confict sign colour from now on(r/y/p): "))
if image_change.lower() == "i": print("Change key sign") xplocol = "url" self_key_url = str(input("Please enter new url for the picture of the key sign: "))
size_change = str(input("Do you want to change the size of key sign? (y/n)")) if size_change.lower() == "y": print("Change conflict sign size") conpic_wth = int(input("Please input the new width for key sign picture from now on: ")) conpic_hgt = int(input("Please input the new height for key sign picture from now on: ")) else: print("Doesn't change image saize.") print()
tgturl = str(input("Please continue and enter target url for the "+current_link_no_title+" link: ")) tgtmov = str(input("Please enter mouseover text for the "+current_link_no_title+" link: ")) if xplocol.lower() == "r": xplourl = red_conpic_url elif xplocol.lower() == "y": xplourl = yellow_conpic_url elif xplocol.lower() == "p": xplourl = purple_conpic_url elif xplocol.lower() == "url": xplourl = self_key_url
print() # clickable keys position
ema_wth = map_wth - (map_bdr*2) ema_hgt = map_hgt - (map_bdr*2)
correct_input = False
while correct_input == False: try: print('Please enter latitude in this format, [12 34 56 N],') print('while 12, 34, 56, N is the degree, minute, second, and direction') lat_input = str(input("respectively : ")) processed_lat = lat_input.split() if len(processed_lat) == 2: lat_deg = int(processed_lat[0]) lat_min = 0 lat_sec = 0 lat_dir = str(processed_lat[1]) if len(processed_lat) == 3: lat_deg = int(processed_lat[0]) lat_min = int(processed_lat[1]) lat_sec = 0 lat_dir = str(processed_lat[2]) if len(processed_lat) == 4: lat_deg = int(processed_lat[0]) lat_min = int(processed_lat[1]) lat_sec = int(processed_lat[2]) lat_dir = str(processed_lat[3]) print() print("The latitude you inputted.") print("direction: "+str(lat_dir)) print("degrees: "+str(lat_deg)) print("minutes: "+str(lat_min)) print("seconds: "+str(lat_sec)) print() carryon = str(input("[c]ontinue or [r]e-enter?(c/r) ")) if carryon.lower() == "r": correct_input = False else: correct_input = True except: print("Error occured, please input again") correct_input = False
if lat_dir.lower() == "n": lat = lat_deg+(lat_min/60)+(lat_sec/(60**2)) elif lat_dir.lower() == "s": lat = -(lat_deg+(lat_min/60)+(lat_sec/(60**2)))
print()
while correct_input == False: try: print('Please enter longtitude in this format, [65 43 21 E],') print('while 65, 43, 21, E is the degree, minute, second, and direction') lon_input = str(input("respectively : ")) processed_lon = lon_input.split() if len(processed_lon) == 2: lon_deg = int(processed_lon[0]) lon_min = 0 lon_sec = 0 lon_dir = str(processed_lon[1]) if len(processed_lon) == 3: lon_deg = int(processed_lon[0]) lon_min = int(processed_lon[1]) lon_sec = 0 lon_dir = str(processed_lon[2]) if len(processed_lon) == 4: lon_deg = int(processed_lon[0]) lon_min = int(processed_lon[1]) lon_sec = int(processed_lon[2]) lon_dir = str(processed_lon[3]) print() print("The longtitude you inputted.") print("direction: "+str(lon_dir)) print("degrees: "+str(lon_deg)) print("minutes: "+str(lon_min)) print("seconds: "+str(lon_sec)) print() carryon = str(input("[c]ontinue or [r]e-enter?(c/r) ")) if carryon.lower() == "r": correct_input = False else: correct_input = True except: print("Error occured, please input again") if lon_dir.lower() == "e": lon = lon_deg+(lon_min/60)+(lon_sec/(60**2)) elif lon_dir.lower() == "w": lon = -(lon_deg+(lon_min/60)+(lon_sec/(60**2)))
print() pic_xcor = int(((lon+180)*(ema_wth/360))-(conpic_wth/2)+map_bdr) pic_ycor = int(((-lat+90)*(ema_hgt/180))-(conpic_hgt/2)+map_bdr)
tgt_list.append([pic_xcor, pic_ycor, tgturl, tgtmov, conpic_wth, conpic_hgt, xplourl]) continue_decision = str(input("Do you have another link to input?(y/n) ")) if continue_decision.lower() == "n": finish_input = True
sorted_tgt_list = sorted(tgt_list, key=lambda satx: satx[0])
for i in range(len(sorted_tgt_list)): event = sorted_tgt_list[i] if i-1 < 0: code += '[a href="'+event[2]+'" title="'+event[3]+'"][img width="'+str(event[4])+'" src="'+event[6]+'" ' code += 'style="max-width:100%;float:left;margin-left:'+str(event[0])+'px;margin-top:'+str(event[1])+'px;" height="'+str(event[5])+'"][/a]'
else: code += '[p]' code += '[a href="'+event[2]+'" title="'+event[3]+'"][img width="'+str(event[4])+'" src="'+event[6]+'" ' prev_event = sorted_tgt_list[i-1] corrected_xcor = event[0] - prev_event[0] - (event[4]/2+prev_event[4]/2) code += 'style="max-width:100%;float:left;margin-left:'+str(int(corrected_xcor))+'px;margin-top:'+str(event[1])+'px;" height="'+str(event[5])+'"][/a]' code += '[/p]'
code = code + '[/div]'
print() print() print("Here is the code") print("--------------------------------") print(code)
Warning: I‘m new to programming and this might poorly written.
|
|