Jump to content

Character Bio Dropdowns Issue


ThriftStoreTeeth
 Share

Recommended Posts

Hey, so some of my members have brought up an interesting quirk when it comes to creating/editing characters. We've got a dropdown under the Biography tab, and people have pointed out that when they save and come back to the page, whatever they picked for the dropdown is reset to blank. It doesn't happen with the grouping dropdowns, only the one that I set up for the bios. Is there something I can add/edit into the code somewhere to make sure it remembers the selections? I've been looking around on Google for the last hour or so, and I'm not finding anything that mentions the issue happening specifically with dynamically-generated dropdowns so I'm not really sure what I can/should edit to fix it.

 

Also, we had a really weird situation earlier today where someone registered and then logged in. They got the "Welcome back darling" message, but the user nav didn't kick over to the logged in version and the 'last seen' date didn't update to show that they'd logged in. We tried resetting resetting passwords, and deleting and having them remake the account, but neither seemed to work until I went into the admin panel and pre-registered an account for them with a different username. My two members before them registered just fine though, so I'm not sure what's up with that or if there's anything to fix/if its just a weird glitch.

Candide: An original dystopian RPG

Link to comment
Share on other sites

Basically it should be working. If it is not, then there's something messing with the system being able to tell the option stored and the option for the field are the same. So make sure there are no apostrophes or other special characters and such.

The only other thing to do is fiddle with this comparison operator for $page->edit->fields[$field->key] == $opt

                                                      foreach($field->options as $opt)
                                                      {
                                                            echo '
                                                            <option',(!empty($page->edit->fields[$field->key]) && $page->edit->fields[$field->key] == $opt ? ' selected' : ''),'>',$opt,'</option>';
                                                      }

in characters.template.php until it works.

 

Secondly, what username did they use?

nusignature.png nusignature.png

I am the darkness, always watching, always listening, ALWAYS THERE.
(If you're interested in Plain of Ice, message me, it's private. Bleach site, non-canon.)

Link to comment
Share on other sites

@Arceus Would a space before some of the options do that? I just went back to double check, and noticed all but the first option had a space before it. Probably cause I just added the list separated by commas and habitually added spaces after each comma, not thinking anything of it.

 

Flip. Nothing outwardly wonky with it, so that's why I was confused.

Candide: An original dystopian RPG

Link to comment
Share on other sites

It might, yes. Tbh I haven't played with it extensively.

 

Huh. Well, if it output any errors, definitely send me those. Otherwise, I have no idea unless it was a browser issue.

nusignature.png nusignature.png

I am the darkness, always watching, always listening, ALWAYS THERE.
(If you're interested in Plain of Ice, message me, it's private. Bleach site, non-canon.)

Link to comment
Share on other sites

@Arceus No worries, yeah. I took them out and did a quick test and it seemed to work. Hopefully it stays that way!

 

He didn't say that there was any error message on his end, so I'm guessing you mean backend. Where abouts would I go to find that?

Candide: An original dystopian RPG

Link to comment
Share on other sites

The error log in cPanel. c: If there's nothing there, doesn't really mean anything, necessarily, just rules out a few kinds of backend errors.

Also you don't have to @ me with every post. It actually sets off my anxiety so I'd appreciate if you didn't c: I sit and watch threads just fine without it.

nusignature.png nusignature.png

I am the darkness, always watching, always listening, ALWAYS THERE.
(If you're interested in Plain of Ice, message me, it's private. Bleach site, non-canon.)

Link to comment
Share on other sites

@Arceus ...I'm dense sometimes, sorry! I don't see anything since I accidentally broke the character creation template the other day trying to do something.

Candide: An original dystopian RPG

Link to comment
Share on other sites

Well, if it happens again let me know. c:

  • Thank you 1

nusignature.png nusignature.png

I am the darkness, always watching, always listening, ALWAYS THERE.
(If you're interested in Plain of Ice, message me, it's private. Bleach site, non-canon.)

Link to comment
Share on other sites

@Arceus Sorry to badger you again, and no rush on this at all. I'm just curious about a couple things.

 

Is there a way to stop the sanitizer filtering out <details> and <summary>? My FAQ page is getting a little long. I can replicate the effect in jQuery if need be, but using the tags instead of script would be neater/less to load.

 

Is there something more specific than just nth-child/nth-of-type that I can use to target buttons in the text editor? The first person to use 10pt hot pink comic sans is getting yeeted into the sun, so its for their own safety. I need something more specific than just nth-child because I've also got HTML enabled for admins but nobody else, and unless I'm misunderstanding something about how the editor works that'll screw up the toolbar for admins. If its not possible, where is the init script hiding so I can enact the nuclear option?

Candide: An original dystopian RPG

Link to comment
Share on other sites

Both of these things you'll need to get into Erebos for. Not really comfortable with that, but, fine, so the first part you'll need to add those tags to the list of tags that Erebos' HTML sanitiser will not filter out. It's called html_sanitize().

 

The second one, it doesn't use a classing for it whatsofuckingever, quite frankly I don't know why but I didn't make the damn thing, so you'll have to rely on nth-child CSS, or edit the initialiser in Erebos ( tinymce() and tinymce_drafts() ). Since the initialisers for Erebos will affect EVERYONE ON YOUR SITE NOT JUST MOBILE USERS, so like you can take buttons out of there but they will be gone, for everyone, you may have better luck dicking around in the TinyMCE scripting because that is not Vesta, that is TinyMCE. I cannot help you, I am not a script person.

nusignature.png nusignature.png

I am the darkness, always watching, always listening, ALWAYS THERE.
(If you're interested in Plain of Ice, message me, it's private. Bleach site, non-canon.)

Link to comment
Share on other sites

@Arceus Yeah, that was a little nerve wracking, but I made sure I had a backup on standby in case I broke something and don't plan on messing with the gods ever again! I totally get why you don't really like people getting in there, but thank you for helping!

 

As an aside, I did have a look through both the TinyMCE site and StackOverflow before I asked to see if there was anything I could do with CSS, but everything just kept saying get into the init script. I did come across some stuff saying that WordPress has done some custom class stuff with the version of TinyMCE they use, so it is possible, but I have no idea where to even begin with something like that. Getting a basic if/else statement going is about the extent of my scripting expertise.

Candide: An original dystopian RPG

Link to comment
Share on other sites

@Arceus Hey, so uhm. Not sure if this is a bug or there's something I can do about it, but the "Allow Edit After Acceptance" option for character bios doesn't do anything. Like, I can switch it off, but my members can still go in and edit the section. Flipping the switch is writing the change to the database (checked that cause I was thinking it might've been the same quirk as the reordering thing), but it doesn't matter if _editable is a 1 or a 0, people can still edit the field after their character's been accepted.

 

Its not a huge deal, but I figured I should check either way.

Edited by ThriftStoreTeeth

Candide: An original dystopian RPG

Link to comment
Share on other sites

Most likely it's not checking for editability on front-end... ah, I see why.

Get into characters.template.php, find this:

if($page->type == 'npc' && empty($field->npc))

Replace it with this:

if(($page->type == 'npc' && empty($field->npc)) || ($page->mode = 'edit' && !$field->editable))

 

nusignature.png nusignature.png

I am the darkness, always watching, always listening, ALWAYS THERE.
(If you're interested in Plain of Ice, message me, it's private. Bleach site, non-canon.)

Link to comment
Share on other sites

@Arceus Awesome! Thank you!

Out of curiosity, is there plans for an option for people to un-mark their characters as ready to play? Like where the character goes back to how they were before they were approved. Or an option to do this from the admin panel?

Candide: An original dystopian RPG

Link to comment
Share on other sites

At some point. Assuming I don't forget.

  • Cheers 1

nusignature.png nusignature.png

I am the darkness, always watching, always listening, ALWAYS THERE.
(If you're interested in Plain of Ice, message me, it's private. Bleach site, non-canon.)

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use, Guidelines and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.