player characters on the side of the front page

Frak_Lou_Elmo
Frak_Lou_Elmo

Does anyone have any experience with making some CSS to adapt this part of the portal?:

image

I am hoping maybe someone has done this before. Almost all of y players have 2 characters. Only 1 shows up in this section. I would like them all to show up in this section, and if possible separated by a tag (I used A-Team and B-Team in my game) so it would appear something like this:



image

anyone ever done something like this before?



twitter: @Frak_Lou_Elmo

Comments

  • thaen
    thaen
    Posts: 1,076

    You're going to need more than just CSS here because there's data you want to show (the secondary Characters) that doesn't exist on the page.

    The way I would do this is using the Custom JavaScript.

    I'd look at the source of the page and copy the HTML for that section as it is now.  Then I'd modify the HTML manually to match the secondary Characters.  Then I'd use Custom JavaScript to insert the modified HTML and the heading bars you want into the page.

    If the Players change their Characters or something, then the Custom JavaScript inserted HTML would need to be updated manually to reflect that, but I would guess that won't happen very often, and would be a small change when it happens.

    Let me know if any of that doesn't make sense.

    Obsidian Portal Developer

  • Frak_Lou_Elmo
    Frak_Lou_Elmo
    Posts: 174

    It does make sense, thanks! But I think I will hold off for now as I have shelved my plans to teach myself programming language until the kids have gone off to college ;)



    twitter: @Frak_Lou_Elmo

  • thaen
    thaen
    Posts: 1,076

    Do you want me to show you how to do this (aka give you the code ...)?  : )  I think it will be pretty straight forward, and you would just need to update the HTML in the code to show the characters you want.  And I can help you do that too if that proves difficult.

    Obsidian Portal Developer

  • Frak_Lou_Elmo
    Frak_Lou_Elmo
    Posts: 174

    thanks for the offer, but I will hold off for now on this idea. the filtered character page helps already and I don't want to be toying with custom java because it would require the visitor extra steps of accepting custom java. 



    I did have another related thought on this character side panel and a question for my main campaign (https://gaximplague.obsidianportal.com/). 



    Thought: On the dashboard they are shown as a player group, with each player showing the characters they control:

    image



    could this be replicated on the front page without custom java? It would show all the characters and one thing that has irkt me since I started running players with multiple characters is that it only ever showed one character because there was one player, as opposed to all the characters.



    Question: This player has two characters and no matter which order I assign and de-assign them, I can't get the other to show as a primary. Could this be done with tags?



    image



    twitter: @Frak_Lou_Elmo

  • thaen
    thaen
    Posts: 1,076

    "because it would require the visitor extra steps of accepting custom java."

    That's helpful to know!  Can you elaborate on that?  What is your concern with that?

     

    could this be replicated on the front page without custom java?

    Sort of? I think you could use Custom CSS to hide the existing Player Characters, and then use Custom CSS to use that screenshot as a background for the empty div (you might need to play with height and such).  So it wouldn't have any "clicking" functionality, but it would look the way you're wanting.

     

    Question: This player has two characters and no matter which order I assign and de-assign them, I can't get the other to show as a primary. Could this be done with tags?

    Ack, that's annoying.  I changed it so the most recently updated Player Character that belongs to a Player will be the one that shows there (and on their Profile page on the Campaign tile).  So, if the one you want to show isn't showing, Edit and Save (no other changes needed), and that will be the PC to show.

     

    Obsidian Portal Developer

  • Frak_Lou_Elmo
    Frak_Lou_Elmo
    Posts: 174

    Showing the last character the player (or I) edited is a great fix! thanks.

    could this be replicated on the front page without custom java?

    Sort of? I think you could use Custom CSS to hide the existing Player Characters, and then use Custom CSS to use that screenshot as a background for the empty div (you might need to play with height and such).  So it wouldn't have any "clicking" functionality, but it would look the way you're wanting.

    So there is no way to pull that entire panel from the dashboard and show it on the front page without a screenshot? What prevents data that shows on the dashboard from showing on a page?

    "because it would require the visitor extra steps of accepting custom java."

    That's helpful to know!  Can you elaborate on that?  What is your concern with that?

     when putting in any custom java we get that warning at the top that explains how a visitor can activate it (favourite the campaign, find the campaignin the favourites, allow custom java). Initially this already stops any visitors how are not members of obsidian portal from experiencing the custom java, because they can't favourite.



    The is it also a matter of convincing those who are (beyond my players) that the custom java can be trusted. I know the more cautious people who know that custom java can be used to hack your computer will just shy away. I do not know exactly what I am doing, and if I knew the author of a campaign was like me, completely clueless of code, I would not trust it either. I guess I could convince my players to allow it, I haven't asked them, but its already hard enough to get them to fill in their character sheet or add lore, let alone go screw around in the backbround. Also I probably would get a serious talking to about messing with powers beyond my control by the programmer in my team lol. 



    so a combo of not (yet) knowing what I am doing, the ineffectiveness for non-members, the extra steps for members are all barriers for what I think at this moment is very little design payback (for now as my ideas using custom java are not that critical to my vision).



    maybe in the future when I really know how to do code magic and have ideas that would make it necessary, I would use it



    twitter: @Frak_Lou_Elmo

  • thaen
    thaen
    Posts: 1,076

    So there is no way to pull that entire panel from the dashboard and show it on the front page without a screenshot? What prevents data that shows on the dashboard from showing on a page?

    You can definitely do this in a fairly straight forward way with Custom JavaScript.  I'd need to play with it, but I think you could probably create a "iframe" that would load the Dashboard page within it, and then just set the offset so that the part of the page that was visible in the iframe was just that section.

    But if you don't want to use Custom JavaScript, then the issue is that the data that you want to display doesn't exist on the page.  So, it's not that it's "prevented", but rather that it just hasn't been actively added to the page.  The other thing here is that you also need the layout ... the HTML that the data is organized into.

    Someone might have a clever idea of how to put the HTML in to the Front Page text, and then shift it over to be in place with CSS.  And you could just copy that chunk of the HTML from the View Source of the Dashboard.  So, this wouldn't update automatically, but it probably wouldn't change that often, and if it did, you could just redo the copying of that HTML chunk.

     

    so a combo of not (yet) knowing what I am doing, the ineffectiveness for non-members, the extra steps for members are all barriers for what I think at this moment is very little design payback (for now as my ideas using custom java are not that critical to my vision).

    That's all really helpful feedback.  Thank you!

     

    I do not know exactly what I am doing, and if I knew the author of a campaign was like me, completely clueless of code, I would not trust it either. ... Also I probably would get a serious talking to about messing with powers beyond my control by the programmer in my team lol.

    Haha!  Okay, well, just to calm your concerns about clueless coders, for someone to use Custom JavaScript to hack another person's computer, it would have to be extremely intentional.  They would have to create popups that looked official and asked for passwords, or looked like they had redirected to Facebook or Gmail and ask for passwords, etc.  So, as long as you're not including code from someone else that you don't understand, you're not going to accidentally hack someone's computer.

    That said, it is entirely possible that you might create a loop that locks up a browser page, or uses up all the memory in the browser.  But these are easy fixes ... close the page (and possibly the browser for the memory thing).  And you can always experiment in a "Test Campaign" before applying the code to your "Real Campaign" to make sure the code doesn't do something surprising.  And I'm always happy to review code if you want to post it here.

     

    Obsidian Portal Developer

Sign In or Register to comment.

April 2024
Season of Strife

Read the feature post on the blog
Return to Obsidian Portal

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Discussions