Smack Jeeves Templates Guide

Working on a new template and need help? Come here for support.

Moderator: Help Desk Team

Re: Smack Jeeves Templates Guide

Postby Zoal » December 21st, 2013, 3:14 pm

I want to add a small box on the right side of my webcomic pages that will change with the comic pages, so like, on the first comic page, it would be one character, then the next page, it would be another. and so on. how would i add the area to my page and make it do this.
I want to do a "Character's song of the week" on the side, but have nooooo clue where i would even start to do this. Can someone please show me or help explain how i would do this ( only know like super basic python programming... like extreme basics)
User avatar
Zoal
 
Posts: 1
Joined: November 16th, 2013, 3:49 pm

Re: Smack Jeeves Templates Guide

Postby trenton_dawn » December 22nd, 2013, 4:01 am

This would be extremely difficult to maintain. Basically, you'd have to have a Javascript switch statement (not sure if you know about this because Python doesn't have it) which uses one of the builtin variables unique to each page ({COMIC_URL} is probably the safest but {COMIC_TITLE} is easier and probably also works). Based on the value of that variable you would choose what content to display. The big issue with this is that you will have to manually update the template code to add a case every time you upload a new page or change a case when you rename an old page. And of course this wouldn't work for people who have scripting disabled. I'd highly recommend not going down this route.
Gaia, a fantasy comic
Ghost, an online novel — Sketchbook thread — deviantArt
Need assistance with anything? Feel free to PM me.
Seven Rain wrote:Trenton speaks words of wisdom.
User avatar
trenton_dawn
 
Posts: 2710
Joined: December 14th, 2006, 7:59 pm
Location: Auberdine, Darkshore (Alliance Territory)

Re: Smack Jeeves Templates Guide

Postby kattriella » February 17th, 2014, 4:04 am

I apologize if this has been asked or answered somewhere already, but how do you set up a custom background for a comic? Not the way the page is set up, just the picture behind it. Like, I believe the template I'm using is called "In Silence", but what if I want to use a different background image, instead of the gray flowery background? Again, sorry if I've just missed seeing the answer to this somewhere. OnO
User avatar
kattriella
 
Posts: 3
Joined: July 2nd, 2012, 1:11 pm

Re: Smack Jeeves Templates Guide

Postby eishiya » February 17th, 2014, 9:03 am

kattriella wrote:I apologize if this has been asked or answered somewhere already, but how do you set up a custom background for a comic? Not the way the page is set up, just the picture behind it. Like, I believe the template I'm using is called "In Silence", but what if I want to use a different background image, instead of the gray flowery background? Again, sorry if I've just missed seeing the answer to this somewhere. OnO

trenton_dawn's reply in this thread should be what you need.
When you want to check out previous questions, search this forum, not just the Guide thread. The Guide is not the place for specific questions, since it's meant to be a guide to how the template system works in general. That's why you're not likely to find many answers here. But the rest of the Template Development & Support forum is exactly for these kinds of questions, and though it can be a little scary to search, it has a lot of answers, and you can always make your own thread if you can't find what you need.

For reference, since the search system is a little finicky: I searched "background in silence" and the result was not far from the top. I didn't add "change" to the search because there are a lot of ways to say that (change, replace, modify, switch, etc). It's better to look at all In Silence background-related threads (which are likely to involve changing it) than risk missing some by specifying a verb.
Image
User avatar
eishiya
 
Posts: 9844
Joined: December 5th, 2009, 11:17 am

Re: Smack Jeeves Templates Guide

Postby kittycatatonic » February 28th, 2014, 3:18 pm

Okay I have the gunmetal grey template on my comic and I like everything about it except this one issue, it doesn't have the author comments on the bottom of the page or the option to have smackjeeves members or guests comment...
I know nothing about code and have no idea how to make it show that.
I have made author comments on some of them and on the site they are nowhere to be seen...I have no idea what to do. I tried to read the help guide thing but it made no sense. Help please?
User avatar
kittycatatonic
 
Posts: 1
Joined: December 16th, 2013, 10:40 pm

Re: Smack Jeeves Templates Guide

Postby kattriella » March 3rd, 2014, 11:39 pm

eishiya wrote:
kattriella wrote:I apologize if this has been asked or answered somewhere already, but how do you set up a custom background for a comic? Not the way the page is set up, just the picture behind it. Like, I believe the template I'm using is called "In Silence", but what if I want to use a different background image, instead of the gray flowery background? Again, sorry if I've just missed seeing the answer to this somewhere. OnO

trenton_dawn's reply in this thread should be what you need.
When you want to check out previous questions, search this forum, not just the Guide thread. The Guide is not the place for specific questions, since it's meant to be a guide to how the template system works in general. That's why you're not likely to find many answers here. But the rest of the Template Development & Support forum is exactly for these kinds of questions, and though it can be a little scary to search, it has a lot of answers, and you can always make your own thread if you can't find what you need.

For reference, since the search system is a little finicky: I searched "background in silence" and the result was not far from the top. I didn't add "change" to the search because there are a lot of ways to say that (change, replace, modify, switch, etc). It's better to look at all In Silence background-related threads (which are likely to involve changing it) than risk missing some by specifying a verb.


Ah, thank you! Sorry about that . . . I stumbled upon the thread by accident while doing a search on Google . . . Oppsie~ But yes, I believe that's exactly what I needed! Thank you very much!
User avatar
kattriella
 
Posts: 3
Joined: July 2nd, 2012, 1:11 pm

Re: Smack Jeeves Templates Guide

Postby CrazyaNinja » December 4th, 2015, 1:13 pm

How do I get the description of the comic off the top of the page?
User avatar
CrazyaNinja
 
Posts: 5
Joined: June 26th, 2015, 5:51 pm

Re: Smack Jeeves Templates Guide

Postby eishiya » December 4th, 2015, 3:41 pm

CrazyaNinja wrote:How do I get the description of the comic off the top of the page?

(Copy-pasted from your other thread, just in case people viewing this thread see this and have a similar issue.)
Removing it depends on which template you're using. Somewhere (probably Overall Layout), look for {SITE_DESCRIPTION} and remove it. There may be other elements around it that you may want to remove depending on your template, such as if there's a frame/border around it, or if it creates extra space, etc.
Image
User avatar
eishiya
 
Posts: 9844
Joined: December 5th, 2009, 11:17 am

Re: Smack Jeeves Templates Guide

Postby thatcrazyvixen » August 22nd, 2017, 1:59 pm

Excuse me, I was wondering how one can access/edit the stylesheet for any particular template?
Stay Determined~
User avatar
thatcrazyvixen
 
Posts: 1
Joined: April 18th, 2017, 6:37 pm

Re: Smack Jeeves Templates Guide

Postby eishiya » August 22nd, 2017, 4:33 pm

thatcrazyvixen wrote:Excuse me, I was wondering how one can access/edit the stylesheet for any particular template?

You can't edit the file directly. It's a feature I've suggested in the past, but for now, you'll have to override any rules you want. Just create a <style> element in the Overall Layout, and put in your rules in there. They will take precedence over those in the default stylesheet.

If you want to see the existing rules for reference, Ctrl+F/Cmd+F for ".css" in the Overall Template and you should find the URL of the stylesheet. You can't edit it, but at least you can see it so that you can find what rules you might want to override. That said, I recommend using your browser's developer tools for this, rather than looking through the stylesheet, as those tools are faster and let you test things on the fly.
Image
User avatar
eishiya
 
Posts: 9844
Joined: December 5th, 2009, 11:17 am

Re: Smack Jeeves Templates Guide

Postby Hisao » March 30th, 2018, 6:18 pm

I was woundering how to make my comic image smaller, even when i upload a smaller image it overlaps.
User avatar
Hisao
 
Posts: 1
Joined: September 7th, 2015, 10:06 pm

Re: Smack Jeeves Templates Guide

Postby eishiya » March 30th, 2018, 6:30 pm

If you have a specific problem, it's best to make a new thread. This guide would be more useful for people if all the posts had more general, widely-applicable questions and answers.

You can use this CSS override to auto-scale the image down to fit in your layout:
Code: Select all
#comic_area_inner img {
   max-width: 100%;
   height: auto;
}

Specifically, it auto-scales the image to fit the width of its parent container, whatever that is. Thus, it should work on most (but not all!) templates that have issues like this.

To add it, go to your Overall Layout, find </head> (note the slash), and add a style element right before it:
Code: Select all
<style>

</style>
</head>

CSS overrides go between those style tags.

If you have trouble with this code, feel free to PM me and I'll try to find the issue.
Image
User avatar
eishiya
 
Posts: 9844
Joined: December 5th, 2009, 11:17 am

Previous

Return to Template Development & Support

Who is online

Users browsing this forum: No registered users and 5 guests