Jump to content

Quick Variables/Selector Questions


ThriftStoreTeeth
 Share

Recommended Posts

I swear I didn't break anything this time! (Small miracle, I know lol) I'm just curious about a couple things. I'm also not looking for any code (except maybe for the second question). My HTML/CSS is much stronger than my PHP. PHP still makes me nervous, but they're mostly human-readable and I can figure out what things generally do once I'm done laughing at the if/die statements on every page. So, to the questions...

 

Say I want to add some extra styling to the personal quotes as they appear in threads, can I add a new class in or will that break something in the back end? I'm just not sure if the system searches purely for the '.$msg->poster->quote.' bit to make the quote display, or does it also need the class/ID to stay the same as well? Or would I be better off wrapping the whole dang line in a new DIV?

Like, I want to take the default:

',($msg->poster->quote ? '<div class="margin5">'.$msg->poster->quote.'</div>' : ''),'

and change it to something more like this:

',($msg->poster->quote ? '<div class="margin5 thread_quote">'.$msg->poster->quote.'</div>' : ''),'

 

Second, again for the quote, if I wanted it to display somewhere on the profile pages too. Like, say I wanted to stick it in under the .profile_name and .profile_group, could I just move those up a little to make space for the quote, and whack the '.$msg->poster->quote.' bit in underneath, or do I need to use the whole string or change 'poster' to 'member' to get it to work or something? Aka is it possible, and what parts do I gotta do to get stuff like the quote and post count in the profile page?

 

Lastly, I'm dumping some images to potentially use for locations into a thread, but I'm being lazy about it at the moment and not resizing them because I just want to stash them for later. Its resulted in the whole .wrapper stretching to accommodate the images, which is fine that I'm doing it temporarily, but if a member does it down the road, I may yeet them into orbit (its a pet peeve of mine). If I forcibly limit the max width of .wrapper to the window size (probably with vw) and force images to *not* exceed their parent in width, is that going to break anything? 

 

ETA: I know I could probably try them out, but I'm scared that things will look okay and seem to be functioning, but then I find out in a month that I broke something and don't know what I did to fix it or ask for help to fix it.

Edited by ThriftStoreTeeth
  • Cringe 1

Candide: An original dystopian RPG

Link to comment
Share on other sites

@Riseoftheg  OH. MY. GOD. YES! I first found them last night at like... 5am, and was laughing hysterically to the point where my cat got worried and came to make sure I was okay!

  • LOL 1

Candide: An original dystopian RPG

Link to comment
Share on other sites

PHP doesn't search for anything. It is its own output language. You're expecting your HTML to break because you changed a class name or put a paragraph tag in the middle of it or something, to put it in perspective. The example you want to change it to will work just fine.

 

Secondly, I believe in profiles it will be $page->member->quote.

 

And thirdly, short answer, no.

 

(Also what notes are you guys talking about? Lol I don't remember these.)

  • LOL 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 Precisely what I meant on the first one, yes! Sorry for all the questions, and thank you for the quick reply! You're still the bestest ❤️ 

  • You're Welcome 1
  • Preach it! 1

Candide: An original dystopian RPG

Link to comment
Share on other sites

5 minutes ago, Arceus said:

PHP doesn't search for anything. It is its own output language. You're expecting your HTML to break because you changed a class name or put a paragraph tag in the middle of it or something, to put it in perspective. The example you want to change it to will work just fine.

 

Secondly, I believe in profiles it will be $page->member->quote.

 

And thirdly, short answer, no.

 

(Also what notes are you guys talking about? Lol I don't remember these.)

@Arceusand I quote " Unfortunately you're stuck with this version for now because like HELL am I coming back to it anytime soon. Fuck. That. Fucking. NOISE." - frame.template.php 

  • Like 1
Link to comment
Share on other sites

That and the if/die stuff like:

if(!defined('Vesta'))
      die('No.');

Its precisely the level of sass I enjoy in things! Had to Google what they did, but knowing it now amuses the heck outta me.

Edited by ThriftStoreTeeth

Candide: An original dystopian RPG

Link to comment
Share on other sites

Ah, I see.

Though most of the if-dies are song lyrics, actually. You can tell what I was listening to the entire way. Ha.

  • Fuck Yeah! 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

Psst @Arceus  the $page->member->quote doesn't seem to work on either the member or character profiles, no matter where I stick it. No rush, of course, but any other ideas of what it might be?

Candide: An original dystopian RPG

Link to comment
Share on other sites

On character pages it's $page->character, it may not load on profiles.  I'll look when I'm awake. 

Edit: It does load on profiles, and it is $page->member->quote, so 1, are you sure there is a quote to display, and 2, what are you doing exactly?

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 That works perfectly, thank you! And no rush. I'm still getting going myself lol If its not easily doable for member profiles, its no big deal. Its just an aesthetic thing.

 

Last question, and then I promise I'll stop for a bit. I'm assuming lines like ',(!empty(WHATEVER VARIABLE) ? ' 'WHATEVER VARIABLE: ''),' if there's an input from the user, show it, otherwise leave it blank' right? I Googled it last night, but just got stuff on SEO, so I'm not sure but I'm curious lol

Candide: An original dystopian RPG

Link to comment
Share on other sites

I edited the post up there.

And yes that is what that's for. It's shorthand for:

if(!empty($var))
	echo $var;

if you were curious.

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  Re: Quotes. Not sure what I was doing wrong yesterday, but I just redid it, and its working now! Might've been a cache thing on my end cause I know I have to purge browser cache to get the CSS to show whatever I've changed.

And gotcha! I've not seen PHP shorthand before, so my brain just did a "lolwhut?" at it.

 

Thanks again! ❤️

  • You're Welcome 1

Candide: An original dystopian RPG

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.