write a reply

I don't understand jcink html templates. Talk to me like I'm

aliasFrosty
pronouns*shrugs*
177written posts
«Fr¤§t¥»earned bits
offlinecurrently
«Fr¤§t¥»
Full Member
«Fr¤§t¥» Avatar
On my Devil May Cry shtick again
Alright... So, I've been getting into jcink skinning as you can tell by my gallery page. There's just one thing that stands in my way defiantly. The bleep bleep, bleeping html templates. I don't understand them. at all.

Do they just work like webpages, kinda sorta in the sense that like I can just make a thing in html and it'll do the thing all over the board once I mess with the css? How do I go about utilizing grid and the little <!--|thingies|-->? I've scoured the internet for some sort of guide that isn't from the jcink wiki and came up with bubkis, or if I did find something it was dated and not very helpful.

What I need is a bit of time 1 on 1 with someone who knows way more than me and is patient enough to walk me through what the hell I'm supposed to do with them. Or at least some basic explanations and open to some questions.

Halp please. I cry.
phantom of the black parade
pronounsshe / her pronouns
4,383written posts
Kuroyaearned bits
offlinecurrently
Kuroya
Part of the Furniture
Kuroya Avatar
what do you want to know? my height, hobbies, quirks, the color of my underwear?
honestly, real talk? when i'm skinning, i do the entire design in html on codepen and then just replace the values i need to replace with what's in the jcink html templates for anything that's in the webpages (and the page will be divided out into what works in what areas + what it corresponds to) and what's in the global variables for anything in the board wrappers.

if you do webpages that you want to be able to use in the board wrappers (like for affiliates), you have to turn them on and enable include keys for board wrappers, then you pull off the <% BLEH %> key in the general webpages thingie (which you set via the include key input).

custom profile fields can be used in the wrappers and any html templates that give you the option to when going through that section (see the member list for examples). you figure out which one is which now by going to acp > users and groups > custom profile fields and it's the template variable.

<% SUBACCOUNTS %> is one of a few missing global variables - it's the account switcher drop down. i honestly don't remember the rest. i know i typically slowly yeet out a lot of the stuff from the wrapper when i'm ready (the entire logo and skin selector classes go, the <% SHOUTBOX %> gets yeeted immediately, and i pull the navigation out into its own bar typically since that's your "board name > category name > subboard name" list tree thing).

if you wanna cheat on a login / logout button. <script>if('<!-- |g_id| -->' == '2') { document.write("<a href='index.php?act=Login&CODE=00' title='login'>login</a>") } else { document.write("<a href='index.php?act=Login&CODE=03&key=<!-- |auth_key| -->' title='logout'>logout</a>") }</script>

you can code stuff to show/hide based on the <!--g_id--> in the html and then doing css stuff for like. group-1 class vs group-2 class, as an easy hack for different color profiles and such. actually, almost any of the <!-- SOMETHING --> fields, you can actually use to manipulate stuff via if/else statements or css class stuff


i'm half-asleep so i'm not sure how coherent i am or how useful i am actually being but. honestly, like i said, i'd recommend just code the look you want in a live view program like codepen and then copy-paste it into the wrappers and html templates and slowly go through the code and switch out each test variable to the actual needed variable from the wiki or the acp.

aliasFrosty
pronouns*shrugs*
177written posts
«Fr¤§t¥»earned bits
offlinecurrently
«Fr¤§t¥»
Full Member
«Fr¤§t¥» Avatar
On my Devil May Cry shtick again
Kuroya Avatar
honestly, real talk? when i'm skinning, i do the entire design in html on codepen and then just replace the values i need to replace with what's in the jcink html templates for anything that's in the webpages (and the page will be divided out into what works in what areas + what it corresponds to) and what's in the global variables for anything in the board wrappers.

if you do webpages that you want to be able to use in the board wrappers (like for affiliates), you have to turn them on and enable include keys for board wrappers, then you pull off the <% BLEH %> key in the general webpages thingie (which you set via the include key input).

custom profile fields can be used in the wrappers and any html templates that give you the option to when going through that section (see the member list for examples). you figure out which one is which now by going to acp > users and groups > custom profile fields and it's the template variable.

<% SUBACCOUNTS %> is one of a few missing global variables - it's the account switcher drop down. i honestly don't remember the rest. i know i typically slowly yeet out a lot of the stuff from the wrapper when i'm ready (the entire logo and skin selector classes go, the <% SHOUTBOX %> gets yeeted immediately, and i pull the navigation out into its own bar typically since that's your "board name > category name > subboard name" list tree thing).

if you wanna cheat on a login / logout button. <script>if('<!-- |g_id| -->' == '2') { document.write("<a href='index.php?act=Login&CODE=00' title='login'>login</a>") } else { document.write("<a href='index.php?act=Login&CODE=03&key=<!-- |auth_key| -->' title='logout'>logout</a>") }</script>

you can code stuff to show/hide based on the <!--g_id--> in the html and then doing css stuff for like. group-1 class vs group-2 class, as an easy hack for different color profiles and such. actually, almost any of the <!-- SOMETHING --> fields, you can actually use to manipulate stuff via if/else statements or css class stuff


i'm half-asleep so i'm not sure how coherent i am or how useful i am actually being but. honestly, like i said, i'd recommend just code the look you want in a live view program like codepen and then copy-paste it into the wrappers and html templates and slowly go through the code and switch out each test variable to the actual needed variable from the wiki or the acp.


So I literally don't have to give a damn about anything other than the <!--|thingies|--> and <% whatsits %>? Everything else I can just code myself in code pen and then insert those things where they need to go? Okay, so then the way boards on forums are set up, layouts and looks, etc, is that all just css then?
sdkvnklweanl;
aliastanzaku, tanz, tan-tan, egao, protag, chapel, tbotc
pronounsshe/her
1,647written posts
offlinecurrently
co-dependency bros?
Part of the Furniture
co-dependency bros? Avatar
maybe wallace being my fav was foreshadowing
Html Templates are the templates for sections that make up the forum. It’s making its appearance from scratch. The < - -> are variables that display the value of that item in the html. For example < — posts —> will displays posts where the post variable is allowed (so it will work in post rows but not in forum rows).

For grids, are you referring to its column appearance or something else?

Edit: yes it’s all css and html.
last edit on Dec 10, 2023 7:47:30 GMT by co-dependency bros?


【 POKEMON EVOLUTION: TERRORS 】
(latest update: 8/28 wall of update)
aliasFrosty
pronouns*shrugs*
177written posts
«Fr¤§t¥»earned bits
offlinecurrently
«Fr¤§t¥»
Full Member
«Fr¤§t¥» Avatar
On my Devil May Cry shtick again
co-dependency bros? Avatar
Html Templates are the templates for sections that make up the forum. It’s making its appearance from scratch. The < - -> are variables that display the value of that item in the html. For example < — posts —> will displays posts where the post variable is allowed (so it will work in post rows but not in forum rows).

For grids, are you referring to its column appearance or something else?

Edit: yes it’s all css and html.

Grids like; this stuff, like CSS grids, and then designing the boards to fit in those grids, whether through side by side, or other weird set ups. I want my rp boards to be four tall boxes side by side of one another among other board designs for different categories. pardon the crude example but like....


-------Getting Started cat------

[ Guidebook ] [  claims + ]
[ announcements] [ shop ]

 -------extras cat------
       [        x        ]
       [ x ] [ x ] [ x ]

-------roleplay cat------
      |    | |   | |   | |    |
      | x | | x | | x | | x |
      |    | |    | |   | |    |

-------OOC cat------

      [ x ] [ x ] [ x ]
 


I'm assuming I would use css grid in this instance and then just fuvs around with it.
last edit on Dec 10, 2023 8:51:53 GMT by «Fr¤§t¥»
sdkvnklweanl;
aliastanzaku, tanz, tan-tan, egao, protag, chapel, tbotc
pronounsshe/her
1,647written posts
offlinecurrently
co-dependency bros?
Part of the Furniture
co-dependency bros? Avatar
maybe wallace being my fav was foreshadowing
Sections like forum rows have header templates. They wrap around them like parent classes, which is where you want to put html like grids be, as it affects every element. For forum rows, it's under category headers.

The reason it doesn't work on forum rows is because forum rows is style for each forum row. So it's necessary to apply it onto the parent instead.

<div class="tableborder">
<div class="forumrow-background category-headers-<!-- |cat_id| -->"> // added this category id to make each category section unique. this allows me to add specific images for them if i want to. eg category-headers-1 would target the category with ID 1, etc
<div class="maintitle">
<div class="maintitle-name"><a href="http://.jcink.net/index.php?c=<!-- |cat_id| -->"> // manually adding category url. imo it's better than using the variable with the link already included. it's neater to format in your css
<span><!-- |cat_name| --></span></a> // category name without the url since we're already doing that above
</div> </div>
<div class="categoryheaders2"> // this is where i have my grid added. though of course, it depends on your code where you want it, as long as it wraps the forum rows
<% FORUM_ROWS %> // display the forum rows
</div>
</div>
</div>

I would recommend adding a cat id (as well as forum id when you get to forum rows) to be able to specifically target boards as needed. Like in your example, there are categories that have different column layouts, so you'll need to be able to target that specific category those boards are under.
last edit on Dec 10, 2023 9:20:58 GMT by co-dependency bros?


【 POKEMON EVOLUTION: TERRORS 】
(latest update: 8/28 wall of update)
352written posts
vonearned bits
offlinecurrently
von
Senior Member
von Avatar
«Fr¤§t¥» Avatar
co-dependency bros? Avatar
Html Templates are the templates for sections that make up the forum. It’s making its appearance from scratch. The < - -> are variables that display the value of that item in the html. For example < — posts —> will displays posts where the post variable is allowed (so it will work in post rows but not in forum rows).

For grids, are you referring to its column appearance or something else?

Edit: yes it’s all css and html.
Grids like; this stuff, like CSS grids, and then designing the boards to fit in those grids, whether through side by side, or other weird set ups. I want my rp boards to be four tall boxes side by side of one another among other board designs for different categories. pardon the crude example but like....


-------Getting Started cat------

[ Guidebook ] [  claims + ]
[ announcements] [ shop ]

 -------extras cat------
       [        x        ]
       [ x ] [ x ] [ x ]

-------roleplay cat------
      |    | |   | |   | |    |
      | x | | x | | x | | x |
      |    | |    | |   | |    |

-------OOC cat------

      [ x ] [ x ] [ x ]
 


I'm assuming I would use css grid in this instance and then just fuvs around with it.
you need some work arounds for this one. The way that the HTML templates work for REPEATING COMPONENTS (e.g. Forum Rows) is that it "LOOPS" ur codes into several codes hence you can code all forum rows in one HTML.

to achieve what you want, you need to either make the forum-rows or category unique via classnaming through variables
phantom of the black parade
pronounsshe / her pronouns
4,383written posts
Kuroyaearned bits
offlinecurrently
Kuroya
Part of the Furniture
Kuroya Avatar
what do you want to know? my height, hobbies, quirks, the color of my underwear?
«Fr¤§t¥» Avatar
So I literally don't have to give a damn about anything other than the <!--|thingies|--> and <% whatsits %>? Everything else I can just code myself in code pen and then insert those things where they need to go? Okay, so then the way boards on forums are set up, layouts and looks, etc, is that all just css then?


i passed out almost immediately after replying last night asdfjkl;

to answer the question, yes and no.

for the heavy lifting? yes, you're largely just coding the html + css elements for about 95% of the visuals, so you can literally design the lion's share of your basic site layout (background/navbars, headers/footers/sidebars, etc) via the board wrappers; the category/board lists + board stats area, subboard/thread lists, the thread/post/miniprofile layout, the profile layout, and the member list via the html templates, and any additional webpages via the webpages. all the css gets chucked in the stylesheets, largely at the end, and you just replace your placeholders with the <!-- |ELEMENT| --> things to call up, say, the poster's name or group id number.

but that being said? there are certain elements of the skin that it's easier to leave alone (like the wrapper + inner-wrapper classes) and others that you can only get at via either editing the css in the stylesheets after inspecting the element (like the pagination) and/or using an indirect workaround such as the macros (like for your "locked/closed/pinned" buttons or if you wanna use the post icons as "warning tags" or the like) or extensive javascript coding (like the recent topics clip). because of that, i pretty highly recommend actually going through the html templates wiki page slowly to figure out 1) which html template corresponds to which area and 2) what options you actually have to tap in different html templates (like the post layout will not pull a parent account id, if you use it for a pm link, but a miniprofile layout will).

(which, as an aside. <!-- |ELEMENT| --> seems to correspond to smaller and/or less complex "fields" to call, like a profile number or avatar url, while <% ELEMENT %> seems to correspond to larger and/or more complex coding elements, like the entire shoutbox or a different html template. so, for example, while you won't need to use, say, <!-- |cat_id| --> for a category layout to work, if you don't add the <% FORUM_ROWS %> to the category header template, you'll not actually get any functioning boards, just the very top category header/footer.)





jumping down to the different board layouts for different boards/categories... i think there's been more than a few times that's been asked, so i'll just link to this thread here since it's functionally the same question and has the same answer (and i think i also linked to other times that the question has been asked as well and i remember leap explained it really well one time, i just do not remember where whoops-)

but also yes von is right for. the way the html templates would work, you'd be putting in every single custom board html into the html layout and then having to individually target it via the css so. for example, if you have 3 different basic html layouts for boards, every time a single board is being loaded, it's having to load all 3 of those layouts and just not display one, so. if you have a lot of boards on + a lot of layouts, you can potentially start making lower-end computers/phones chug a bit to load your index. so. something to keep in mind please, for the rpers who can't always afford powerful specs on their hardware.

aliasFrosty
pronouns*shrugs*
177written posts
«Fr¤§t¥»earned bits
offlinecurrently
«Fr¤§t¥»
Full Member
«Fr¤§t¥» Avatar
On my Devil May Cry shtick again
Just to get a feel for it. I read over all the links and stuff provided. Gonna eventually give that a shot next weekend or whenever I'm off work. But I did experimented a little bit with the board statistic/info center area just to get a feel and use 's advice of simply coding everything in code pen and then porting over. Also asked for advice from other coders I know. Did ya'll know that apparently you can use style tags in the html templates and it'll work just fine?

Anyways, this is what I've been able to do so far. Needs some tweaking for sure.





phantom of the black parade
pronounsshe / her pronouns
4,383written posts
Kuroyaearned bits
offlinecurrently
Kuroya
Part of the Furniture
Kuroya Avatar
what do you want to know? my height, hobbies, quirks, the color of my underwear?
«Fr¤§t¥» Avatar
Did ya'll know that apparently you can use style tags in the html templates and it'll work just fine?


yeah, i knew that, but you honestly don't really want to be doing it all that much.

part of the reason why is that if you're using the same class somewhere else in a different template that might be on a different page, imo, you're not gonna be able to (in other words, if your board template stylings are in the category layouts, you'll have unstyled subboards since there's no categories inside a board for it to pull from).

it's also got the same thing going on about load times where, because the site is loading the entire template for each instance of that template in a list, you'd be loading the board css for every single board on your index or the post/mini-profile css for every single post inside a thread.

but there's also the side element of it just being. general clutter tbeh. putting the css in the template itself is a lot messier to work with for later editing purposes than it is to have that separation between wrapper/webpage/html template and stylesheet, especially if you're not the original coder and are just editing someone else's skin.

so yeah like. i've done it a couple of times, when things were being funky and i needed to do some really weird workarounds (looking at you, javascript functions), but i try to avoid it whenever i can for those reasons



edit: i'll also direct you vaguely towards fizzyelf and jcodes for a lot of scripts to start looking through, like the recent topics snag, as well as the general advice of "if you want to pull anything off cttw, like nicole's customizable code box, i'd do it now, before the contents get yoinked since when cttw fully closes, all the codes on it will be 100% inaccessible unless you already have them elsewhere"
last edit on Dec 11, 2023 11:55:46 GMT by Kuroya

sdkvnklweanl;
aliastanzaku, tanz, tan-tan, egao, protag, chapel, tbotc
pronounsshe/her
1,647written posts
offlinecurrently
co-dependency bros?
Part of the Furniture
co-dependency bros? Avatar
maybe wallace being my fav was foreshadowing
«Fr¤§t¥» Avatar
But I did experimented a little bit with the board statistic/info center area just to get a feel and use 's advice of simply coding everything in code pen and then porting over


this is 100% the right way to go. either you do your design by drawing or photoshop first, or do it in an offline environment or in a scratch pad website...

yet i 100% still only do mine over in jcink directly lmao. to be fair, i do work with a lot of scripts and the sense of progress helps me keep pushing on. jcink demands some workaround too, like as a fair warning - it can't run ascii. so if you're trying to use a font icon resource and using its ascii from the css, it's not going to happen.


【 POKEMON EVOLUTION: TERRORS 】
(latest update: 8/28 wall of update)
aliasFrosty
pronouns*shrugs*
177written posts
«Fr¤§t¥»earned bits
offlinecurrently
«Fr¤§t¥»
Full Member
«Fr¤§t¥» Avatar
On my Devil May Cry shtick again
So I kind of sorta figured it out? Sorta, I followed links and found a thing and followed it and came up with these. I have no idea why the first board in story mode is doing what it's doing. If someone could lend a hand I'd throw them a DM with a link xD


link to imgur folder

Edit: I fixed it. weirdest work around. but I fixed it.
last edit on Dec 13, 2023 7:15:41 GMT by «Fr¤§t¥»