Support Rules and Guidelines
Before you post your support topic, please remember to:
  • Read the support forum rules.
  • Check the wiki and use search to see if your problem can be answered there first.
  • Link your board please, and make sure that the problem on your board is visible to guests or provide a test account.
  • Do not post Board Wrappers and CSS unless requested. With a board link, this is not necessary.
  • Be as descriptive as you can and use as many details as possible when describing your problem.
  • Please briefly mark any links to forums that may not be work-safe.
This will help ensure your support issue will be attended to in a quick and efficient manner.

  ClosedNew TopicNew Poll

 template defaults [SOLVED]
hi! i'm in the process of switching an old skin over from CFS to html templates, and i was wondering if there's a way to convert the following part of the CFS script, or an alternative method that might achieve the same results:


config: {
       dateDefault: 'mmm dd, 0:00 AM',
       titleDefault: 'here',
       authorDefault: 'here',

more specifically, i'm looking to customize what displays in place of the topic title, author, and date if a forum is empty, rather than having blank fields/dashes.

that can be done by using javascript. let me verify first, do you want to have a default value for the "-- in: -- by" section? one more question, are you using the default template or are you making a custom one?

This post has been edited by mrslucky: Jun 11 2018, 05:18 AM

Attached 1 File(s)
Attached Image
hi! bless, that’s exactly what i’m trying to achieve. to answer your second question, i’m making a custom one.

thanks so much!
alright, since you're now making a custom template for forum row section, I've guessed that you have the variable <!-- |last_poster| -->, <!-- |last_topic| -->, and <!-- |last_post| --> on your template. all of this variable is the variables necessary to modify the blank fields/dashes.

<!-- |last_poster| --> stands for the "By:" section, <!-- |last_topic| --> stands for the "In: --" section, and the <!-- |last_post| --> stands for the "----" one.

now, replace your <!-- |last_poster| --> variable in your forum row template with
<script>if("<!-- |last_poster| -->" == ' ') { document.write("default author here"); } else { document.write("<!-- |last_poster| -->"); }</script>

replace your <!-- |last_topic| --> variable with
<script>if("<!-- |last_topic| -->" == '--') { document.write("default topic here"); } else { document.write("<!-- |last_topic| -->"); }</script>

and at last, replace your <!-- |last_post| --> variable with
<script>if("<!-- |last_post| -->" == '----') { document.write("default date here"); } else { document.write("<!-- |last_post| -->"); }</script>

that should do it, but I don't know if there are any syntax errors or something so if it doesn't work let me know

This post has been edited by mrslucky: Jun 11 2018, 10:46 PM
amazing, this seems to be working perfectly! thank you so much!
This topic has been solved. If you need anymore help please post a new thread. Thanks for choosing Jcink services.

email: :: blog: John C.
0 User(s) are reading this topic (0 Guests and 0 Anonymous Users)
0 Members:
Share this topic:
« Next Oldest | General Support | Next Newest »

Options ClosedNew TopicNew Poll