Editing
Proposals
(section)
Jump to navigation
Jump to 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!
== Popups == Lorem ipsum dolor sit amet, consectetur adipiscing elit [[Archer]], sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in [[Pikeman]] voluptate velit esse cillum dolore eu fugiat nulla pariatur [[Archer]]. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum [[Pikeman]]. [[File:Mini Portrait Pikeman (HotA).png]] * I think it is a cool idea. Can it only be used with images, or can anything be popped-up? My initial thoughts are to use this either for a TOC that is somewhere always visible on the page (maybe in the header?) or for the idea in the backlog section about giving artifact info on hover-over. Did you have a vision for how/when this popup would be used? --[[User:Legate|Legate]] ([[User talk:Legate|talk]]) 13:26, 14 August 2025 (UTC) ** Text seems to work. Can always adjust the code later to fix any issues that crop up. Keep in mind though that once the link is unhovered the other thing goes away. Not really a vision, it was just a thing I saw in another wiki and when I hovered the links in our wiki I felt sad they didn't do anything cool when hovered. β[[user_talk:imahero|imahero]] 19:25, 14 August 2025 (UTC) * If this can be used with templates, that'd be great! [[File:Hero Cosmos small.png|link=user:phasma|β Phasma]] 15:55, 14 August 2025 (UTC) ** Yes, templates should work fine with this. β[[user_talk:imahero|imahero]]{{pu|imahero|Hero Stormblessed small.gif}} 19:25, 14 August 2025 (UTC) ** I tested it and they don't work with templates, sadly - see [[:Template:Creature/Pikeman]] [[File:Hero Cosmos small.png|link=user:phasma|β Phasma]] 21:00, 14 August 2025 (UTC) ** I think it'll depend on the template content. Tables (and nested templates?) for some reason get rendered outside of the span. I could also probably just write a more generic version of the code to work with tables. Or maybe could create tables using div tags instead [https://www.dummies.com/article/technology/programming-web-design/css3/using-the-div-tag-to-create-tables-142904]. β[[user_talk:imahero|imahero]] 23:59, 14 August 2025 (UTC) * OK I think it's working now. I added a little to the [[Template:H3H4header]] to get it to work. The popupid should probably be unique per page load. So longer popupids like popupidPikemanCreatureNew might be better if you are doing many such popups on one page. Let me know if you find any bugs. β[[user_talk:imahero|imahero]] 01:59, 16 August 2025 (UTC) ** Still a bit lost about how to correctly display the [[:Template:Creature/Pikeman|Pikeman example]] (showing the CreatureNew template upon hover) but I'll have a look at it with a fresh brain tomorrow unless you can work your magic! [[File:Hero Cosmos small.png|link=user:phasma|β Phasma]] 02:34, 16 August 2025 (UTC) ** Erm, also, [[Heroes_from_other_games#Heroes_IV|this set of tables]] have vanished now... [[File:Hero Cosmos small.png|link=user:phasma|β Phasma]] 03:08, 16 August 2025 (UTC) ** Fixed the h4 table. Was missing the default of blank for the popupid in the #if statement. β[[user_talk:imahero|imahero]] 03:20, 16 August 2025 (UTC) ** Fixed the pikeman example. The popupid has to be passed all the way through. Otherwise the popup content can render outside of the enclosing span (or div). I don't know exactly why so this will just have to be done on a case by case basis depending on what works. β[[user_talk:imahero|imahero]] 03:29, 16 August 2025 (UTC) * Should I remove the old method and just keep the new JS method? The good thing about the old method is that it doesn't require a unique id because the popup content is a child element, but maybe it would be good to only have a single method to keep things consistent? β[[user_talk:imahero|imahero]] 06:53, 16 August 2025 (UTC) ** In an ideal world we wouldn't need the unique IDs but the fact the new method can easily be transcluded in text makes it wonderfully usable, perfect for things like creatures (hence why I kept trying to get the Pikeman example to work; many thanks for getting that functional) or artifacts! I'm not sure what use we'd get out of the old method, so its one upside becomes redundant if the method won't ever be used. [[File:Hero Cosmos small.png|link=user:phasma|β Phasma]] 23:20, 17 August 2025 (UTC) ** OK so I removed the old version. What I imagine we'll want to do is put all the popupables together at the bottom of pages so as not to clutter things up too much. I'm thinking of building a script to automate replacing all the old links with hoverable versions. Can you think of any edge cases or things I should look out for that might be tricky to automate? β[[user_talk:imahero|imahero]] 05:46, 18 August 2025 (UTC) * I automated creating the [[:Category:Creatures Database]]. I had to fix halfing manually. Are there any others like halfing I should be aware of? β[[user_talk:imahero|imahero]] 04:14, 21 August 2025 (UTC) ** There shouldn't be any other cases for either hoverables or the database until the Bulwark and DOR come out, and that only depends on how Yetis and Jotunn are named. Can't think of anything else for now! [[File:Hero Cosmos small.png|link=user:phasma|β Phasma]] 04:16, 21 August 2025 (UTC) * OK the script is now running. It's a bit slow because it has to check the redirect of every link. Let me know if you spot any issues! β[[user_talk:imahero|imahero]] 10:14, 21 August 2025 (UTC) ** Big uh-oh, it's removing all redirects and, in the case of single creatures, it's still using both the creature and its upgrade/downgrade ^^' [[File:Hero Cosmos small.png|link=user:phasma|β Phasma]] 13:05, 21 August 2025 (UTC) *** Rolled back all the redirect overwrites and fixed the redirect problem in the code. β[[user_talk:imahero|imahero]] 17:19, 21 August 2025 (UTC) ** I like the hover-over creature popups! I do think we need a little more work on the syntax so it doesn't require as much setup on every page. It would be great if we could figure out how to do this with no additional setup on each page! Instead of changing every link, what if we started by only changing the main Cn/An/Sn templates to also have hover-over popups? I think we should be able to do that with only editing the templates, not the pages? --[[User:Legate|Legate]] ([[User talk:Legate|talk]]) 13:39, 21 August 2025 (UTC) * BUG: When the link breaks across text lines, the popup can display partially off the page. ** I think I finally found the big bug for the popups. I had to recursively get the offsets all the way back to either the div#bodyContent or the MAIN tag. Hopefully this fixes everything. You might even be able to throw spans (with the right classes) around anything and get a working popup (up until now I couldn't understand why I had to pass the popupid all the way through but now I think it had to do with the need to recursively get all the offsets). Let me know if you find any more missing or misbehaving popups (I really think I got it right this time though so hopefully you can't find any). β[[user_talk:imahero|imahero]] 20:05, 21 August 2025 (UTC) ** That got the popups displaying well in tables for me, but they still show up partly offscreen when the link breaks across lines. --[[User:Legate|Legate]] ([[User talk:Legate|talk]]) 20:15, 21 August 2025 (UTC) *** Could you give me a page link for the breaking lines example? β[[user_talk:imahero|imahero]] 20:22, 21 August 2025 (UTC) *** The width of your browser matters, but for me, [[Dragon's Blood (campaign scenario)]] has a Hell Hounds link near the right at in the monsters table at 17, 18, 0. If you change your browser width until "Hell" is on one line and "Hounds" is on the next, then try to hover the link, you should be able to see the issue. --[[User:Legate|Legate]] ([[User talk:Legate|talk]]) 20:36, 21 August 2025 (UTC) *** Added white-space:nowrap; to the hoverable template to solve this. β[[user_talk:imahero|imahero]] 21:02, 21 August 2025 (UTC) *** Agreed. That fixed it! --[[User:Legate|Legate]] ([[User talk:Legate|talk]]) 21:19, 21 August 2025 (UTC) * Note that popups for single creatures still show their upgrade and downgrade if they have one instead of just the single creature (e.g. hovering over Sorceress shows Sea Witch and Sorceress) [[File:Hero Cosmos small.png|link=user:phasma|β Phasma]] 22:57, 21 August 2025 (UTC) ** Fixed. Let me know if you find any mistakes. β[[user_talk:imahero|imahero]] 01:28, 22 August 2025 (UTC) * So we want to do {{tl|an}} and {{tl|sn}} now? What should the popup be for these? β[[user_talk:imahero|imahero]] 01:19, 25 August 2025 (UTC) ** For {{tl|sn}}, we could either use the top half of the {{tl|Spell}} template (no probabilities) or come up with a new template that uses the condensed wording from [[List of spells]]. Depends if we care more about keeping a single source of info or having a shorter template. I can see pros/cons to both approaches. Happy to bow to Phasma's aesthetic eye on this one :) --[[User:Legate|Legate]] ([[User talk:Legate|talk]]) 19:18, 25 August 2025 (UTC) ** For {{tl|an}}, we could either use {{tl|ArtifactNewSB}} as is or make a version that doesn't display the event text. --[[User:Legate|Legate]] ([[User talk:Legate|talk]]) 19:18, 25 August 2025 (UTC) * OK I got {{tl|cnu}} to work. Let me know if you find any issues. β[[user_talk:imahero|imahero]] 03:49, 25 August 2025 (UTC) * The creature(s)/ templates use a lot of html and cause issues on large pages. If we took screenshots of all the creature(s)/ templates and used them as the popups we could afford to have many more popups. What do you think? β[[user_talk:imahero|imahero]] 21:04, 25 August 2025 (UTC) # Create [[:Category:Creature Database]] entries for all creatures (now we have hoverable text, there will be more than one use for each CreatureNew template; this keeps it all in one accessible location) #* Update all creature pages to use these templates '''when they are released''': ([[Bulwark]], [[Palace]], [[Forge]], [[Grotto]]) # Look into creating similar databases for artifacts and spells
Summary:
Please note that all contributions to Heroes 3 wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, 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!
Cancel
Editing help
(opens in new window)
This page is a member of a hidden category:
Category:Pages with broken file links
Navigation menu
Personal tools
English
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Page
Discussion
English
Views
Read
Edit
View history
More
Purge
Search
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Tools
What links here
Related changes
Special pages
Page information