Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5

Shoutbox design doesn't fit the style

#1
Hy Admins, after the Shoutbox doesn't quite fit the style, I tried to change that:

Open the theme template "index" and replace:
{$dvz_shoutbox}

with:
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
<tr>
<td class="trow1">{$dvz_shoutbox}</td>
</tr>
</table>
<br />


Attached Files Image(s)
   


 
[Image: autism4all.png]
[x] <= Drive in nail here for new display!
Reply
#2
Awesome, will add with the smiles as soon as I have some time to add Smile

Reply
#3
Updated. Tested on dark theme, don't know if light has the same functionality, but it was a template mod in any case so I'm assuming it's alright..
Also, your snippet didn't include a <thead> so I had to add that. Note that we have [code] tags on the forum. Makes things easier to read by keeping indexing, monospacing, etc. so next time you post a sample, it'll be a lot easier to read.

I want to get rid of the blue bar now that's in the shoutbox table, so I guess the only decent way to do that would be to throw it all into the new thead. Gonna involve a bit of javascript, but will probably be bearable. DVZ doesn't minify everything.
Reply
#4
WOW !!! Looks great !


 
[Image: autism4all.png]
[x] <= Drive in nail here for new display!
Reply
#5
Great work @tc4me and @Lain. Looks fantastic. Big Grin

Reply
#6
Sorry that I always do work for you :-(, I find such small things make so much. But the first look has to throw you over .. everyone who sees the page ... a look and WOW!


 
[Image: autism4all.png]
[x] <= Drive in nail here for new display!
Reply
#7
Haha thank you for the help! We're always trying to make a good first impression around here. Little things make a difference. Smile

Reply
#8
Gonna be poking at it more for the next half hour or so. Gonna try and remove the bluebar and have the whole section easily collapsable (and maintain the archive link)
Might break, who knows. But no bug reports needed during the next hour or whatever, I'll have it done well before then.
Reply
#9
(April 13th, 2020 at 9:13 PM)Lain Wrote: Gonna be poking at it more for the next half hour or so. Gonna try and remove the bluebar and have the whole section easily collapsable (and maintain the archive link)
Might break, who knows. But no bug reports needed during the next hour or whatever, I'll have it done well before then.
Thank you for doing this, unfortunately I cannot help you there


 
[Image: autism4all.png]
[x] <= Drive in nail here for new display!
Reply
#10
Got it done way faster than expected. Didn't really have to change any JS anywhere, just played with ID names til it worked.
No more blue-bar. <thead> has the archive link in it and the collapse icon works as intended.
Reply
#11
Very nice work Lain. Thank you.

Reply
#12
(April 13th, 2020 at 9:28 PM)Lain Wrote: Got it done way faster than expected. Didn't really have to change any JS anywhere, just played with ID names til it worked.
No more blue-bar. <thead> has the archive link in it and the collapse icon works as intended.
 Great, have to show me how you did it :-) Rolleyes


 
[Image: autism4all.png]
[x] <= Drive in nail here for new display!
Reply
#13
(April 13th, 2020 at 10:06 PM)tc4me Wrote:
(April 13th, 2020 at 9:28 PM)Lain Wrote: Got it done way faster than expected. Didn't really have to change any JS anywhere, just played with ID names til it worked.
No more blue-bar. <thead> has the archive link in it and the collapse icon works as intended.
 Great, have to show me how you did it :-) Rolleyes

Didn't do anything backend, so you can just rightclick > inspect element, then compare to what you have on your site and see what changed.
In short:
Quote:To <tbody> added an id cat_shoutbox_e
To collapse button, changed id to cat_shoutbox_img
Commented out the blue-bar.
Copied the Archive link (wrapped in <p>) to <thead> after the collapse image
Changed the styling to make it fit a little better.
Reply
#14
(April 13th, 2020 at 10:18 PM)Lain Wrote:
(April 13th, 2020 at 10:06 PM)tc4me Wrote:
(April 13th, 2020 at 9:28 PM)Lain Wrote: Got it done way faster than expected. Didn't really have to change any JS anywhere, just played with ID names til it worked.
No more blue-bar. <thead> has the archive link in it and the collapse icon works as intended.
 Great, have to show me how you did it :-) Rolleyes

Didn't do anything backend, so you can just rightclick > inspect element, then compare to what you have on your site and see what changed.
In short:
Quote:To <tbody> added an id cat_shoutbox_e
To collapse button, changed id to cat_shoutbox_img
Commented out the blue-bar.
Copied the Archive link (wrapped in <p>) to <thead> after the collapse image
Changed the styling to make it fit a little better.

aha, yes, of course, and the earth is flat --- I have no idea heeeeelllllppp 
Finna Finna Finna


 
[Image: autism4all.png]
[x] <= Drive in nail here for new display!
Reply
#15
I have now managed to fold in / out many attempts with the tpl and css which I was not familiar with but simply tried a lot and it also works well with the thickness of the inner lines and curves .... etc

PHP Code:
#shoutbox .panel {border-left: solid 1px rgba(0,0,0,0.1); }
#shoutbox .panel {border-right: solid 1px rgba(0,0,0,0.1); }
#shoutbox .panel {border-bottom: solid 1px rgba(0,0,0,0.1); }

#shoutbox .window {border-radius: 0px 0px 5px 5px; border: solid 1px rgba(0,0,0,0.05); overflow-y: scroll; } 


Attached Files Image(s)
       


 
[Image: autism4all.png]
[x] <= Drive in nail here for new display!
Reply
#16
(April 16th, 2020 at 8:53 AM)tc4me Wrote: I have now managed to fold in / out many attempts with the tpl and css which I was not familiar with but simply tried a lot and it also works well with the thickness of the inner lines and curves .... etc

PHP Code:
#shoutbox .panel {border-left: solid 1px rgba(0,0,0,0.1); }
#shoutbox .panel {border-right: solid 1px rgba(0,0,0,0.1); }
#shoutbox .panel {border-bottom: solid 1px rgba(0,0,0,0.1); }

#shoutbox .window {border-radius: 0px 0px 5px 5px; border: solid 1px rgba(0,0,0,0.05); overflow-y: scroll; } 

IMO the easiest way to learn any sort of programming is to just keep trying things to slowly figure out how they work on your own.
Good that you managed to end up with something you're satisfied with.
Reply
#17
(April 16th, 2020 at 5:56 PM)Lain Wrote:
(April 16th, 2020 at 8:53 AM)tc4me Wrote: I have now managed to fold in / out many attempts with the tpl and css which I was not familiar with but simply tried a lot and it also works well with the thickness of the inner lines and curves .... etc

PHP Code:
#shoutbox .panel {border-left: solid 1px rgba(0,0,0,0.1); }
#shoutbox .panel {border-right: solid 1px rgba(0,0,0,0.1); }
#shoutbox .panel {border-bottom: solid 1px rgba(0,0,0,0.1); }

#shoutbox .window {border-radius: 0px 0px 5px 5px; border: solid 1px rgba(0,0,0,0.05); overflow-y: scroll; } 

IMO the easiest way to learn any sort of programming is to just keep trying things to slowly figure out how they work on your own.
Good that you managed to end up with something you're satisfied with.

Thanks yes I improved it, but now I know white works with css :-)

PHP Code:
#shoutbox .panel {border-bottom: solid 1px rgba(0,0,0,0.1); [color=#111111][size=small][font=Tahoma, Verdana, Arial, sans-serif]border-right: solid 1px rgba(0,0,0,0.1);  ......[/font][/size][/color] } 
  

And thanks for your help  Big Grin


 
[Image: autism4all.png]
[x] <= Drive in nail here for new display!
Reply
#18
Just a quick note, the last element in a CSS block like that doesn't need a ; after it, since the brackets close anyway.
I'm glad you noticed the possible improvement. Might be a small change, but each line there repeats "#shoutbox .panel {}" which is 19 bytes. So 3 * 19 is 57.
When you combine them altogether, you only specify the element once, so your website only needs to load those 19 bytes.
But when you do them separately like you did initially, you load 38 more bytes than needed, and although it doesn't seem like a lot, that traffic builds up over time. If you access the web page three times a day for a month, you use 90 * 38, or 3.5KB more data than if you write it differently.

It might sound small still, but little things like that are what people overlook when writing code, and if you combine mishaps like that, you can end up with a much more unoptimized webpage that not only loads slower, but causes more network strain on your server and the user.



If you're bored in quarantine, you can get Codecademy set up to teach yourself and your kids the basics of web development with their HTML/CSS program.
It's not the most intensive, but it's guided pretty well and you learn how to make some of your own projects. Not to mention, HTML and CSS are very easy to learn, even for kids.
Then, if you or the kids are still interested, you can go deeper with Javascript or any other languages offered on the site.
You'd definitely benefit from knowing it at a higher level, especially since you run your own website, even though MyBB is advertised as 'no coding experience required' lol

I used to hate Codecademy because I felt it never got deep enough, but they currently offer 90 days premium to students (after you upload an unofficial transcript or something) and they've gotten much better over time, now that I'm giving them another shot. Lots more features of languages are covered and they even have a course for C++ now, for the big kids like me lol.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Smileys on klick shoutbox tc4me 6 3,955 April 19th, 2020 at 2:57 PM
Last Post: tc4me



Users browsing this thread: 3 Guest(s)

Dark/Light Theme Selector

Contact Us | Makestation | Return to Top | Lite (Archive) Mode | RSS Syndication 
Proudly powered by MyBB 1.8, © 2002-2024
Forum design by Makestation Team © 2013-2024