Attention:

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.
This will help ensure your support issue will be attended to in a quick and efficient manner.

Pages: (2) 1 2  ( Go to first unread post ) ClosedNew TopicNew Poll

 CFS HTML Templates Migration problem [SOLVED]
#
Hello there,

I am currently trying to migrate the CFS of my board into HTML templates. I have followed every steps mentioned in the guide about this, but I feel like stuck in figuring out what is going on with the functions copied. I think I am missing something really basic here, but I would like to ask for your help.

On the front page, everything looks fine (or at least I haven't noticed any problems). In the sub-forum sections however, my function copied from the .init parts shows like the board does not recognize them as a function. Please take a look at it here: http://fadetogrey.jcink.net/index.php?showforum=20

Let me know if you need further information, I am not really sure what else to share in order to help. And please excuse me if this has been discussed before!

Thank you so much!
Maylice
PM
#
It looks like you have a little more complex cfs than average because you're using .output. The system will not recognize that.

Could you paste your topic row template here? I will try to fix it w/o that conditional.

signature
email: admin@jcink.com :: blog: John C.
#
Thank you for your prompt reply!
Here it is:

CODE
<div class="topic-row <!-- |type| -->-topic">
  function() {
var output = "<center><div id='CTOPICS'><table width='100%'><tr><td style='padding-right:15px;'><!-- |mod_checkbox| --></td><td><div class='ctone'>{%marker} <!-- |topic| --></div><div class='cttwo'><!-- |topic_desc| --><font class='ctthree'>";
if(this.vals["<!-- |pages| -->"])
{ output += "<!-- |pages| -->"; }
output += "</font></div></td><td><div class='ctfour'><b>Témát indította:</b> <!-- |starter| --><br><b>Utolsó hozzászóló:</b> <!-- |last_topic_url| --> - <!-- |last_post| --></div></td><td><div class='ctfive'><!-- |replies| --> válasz<br><!-- |views| --> megtekintés</div></td></tr></table></div></center>";
return output; }
</div>
PM
#
Ok, please try replacing that with this:

CODE
<div class="topic-row <!-- |type| -->-topic">
<center><div id='CTOPICS'><table width='100%'><tr><td style='padding-right:15px;'><!-- |mod_checkbox| --></td><td><div class='ctone'>{%marker} <!-- |topic| --></div><div class='cttwo'><!-- |topic_desc| --><font class='ctthree'><!-- |pages| --></font></div></td><td><div class='ctfour'><b>Témát indította:</b> <!-- |starter| --><br><b>Utolsó hozzászóló:</b> <!-- |last_topic_url| --> - <!-- |last_post| --></div></td><td><div class='ctfive'><!-- |replies| --> válasz<br><!-- |views| --> megtekintés</div></td></tr></table></div></center>
</div>


And tell me what happens.

signature
email: admin@jcink.com :: blog: John C.
#
Done it, {%marker} is still there before the forum title, and the user name does not show up in last post by section.

EDIT: Actually, it wasn't there with the previous code either.

This post has been edited by Maylice: Oct 13 2016, 10:42 AM
PM
#
Try removing {%marker} and replace it with <!-- |posticon| --> and see if that fixes the issue. If that works, then we'll go from there.

signature
email: admin@jcink.com :: blog: John C.
#
That worked! http://files.b1.jcink.com/html/emoticons/smile.gif

In the meantime, I've also found out, that there is the same problem with my profile. I know I still have to replace the fields as suggested in the guide, that is understandable, but in the right bottom corner, the online function fails again. Here is the code for the main profile template:

CODE
 <div id="new-profile">
   function() {
var output = "<center><div id='CPROFILE'><table cellpadding='0' cellspacing='0'><tr><td class='two'><div class='one'><!-- |avatar| --></div></td><td style='width:10px;'></td><td style='width:586px; height:420px; background-color:#5c948e;' class='<!-- |group| -->-bold'><div style='width:506px; height:90px; padding:0px 40px 20px; background-color:#0f2529; color:#5c948e; font-family:roboto; font-size:30px; font-weight:700; display:table-cell; vertical-align:bottom; text-align:right; letter-spacing:-2px; text-transform:uppercase; text-shadow:1px 1px #111;' class='<!-- |group| -->-border'><!-- |name| --></div><div class='seven'><table cellpadding='0' cellspacing='0'><tr><td class='nine'><div style='height:1px;'></div><div class='ten'><b>Faj:</b> <!-- |group| --></div><div style='height:2px;'></div><div class='ten'><b>Kor:</b> {%field#3} év</div><div style='height:2px;'></div><div class='ten'><b>Nem:</b> {%field#2}</div><div style='height:2px;'></div><div class='ten'><b>Specializáció:</b> {%field#4}</div><div style='height:2px;'></div><div class='ten'><b>Regisztráció:</b> <!-- |joined| --></div><div style='height:2px;'></div><div class='ten'><b>Utoljára online:</b> <!-- |last_activity| --></div><div style='height:1px;'></div></td><td style='width:10px;'></td><td class='six'><div class='five'><img src='{%field#7}'></div></td></tr></table><table cellpadding='0' cellspacing='0'><tr><td class='twelve'><table cellpadding='0' cellspacing='0'><tr><td class='eleven'><a href='{%field#8}'><b><i class='fa fa-child' title='Előtörténet'></i></b></a></td><td style='width:4px;'></td><td class='eleven'><a href='{%field#9}'><b><i class='fa fa-eye' title='Karakter kinézete'></i></b></a></td><td style='width:4px;'></td><td style='width:4px;'></td><td class='eleven'><a href='{%field#10}'><b><i class='fa fa-book' title='Játékvezető'></i></b></a></td><td style='width:4px;'></td><td style='width:4px;'></td><td class='eleven'><a href='{%field#11}'><b><i class='fa fa-users' title='Karakter Kapcsolatok'></i></b></a></td><td style='width:4px;'></td><td style='width:4px;'></td><td class='eleven'><a href='{%field#12}'><b><i class='fa fa-star' title='Képességek'></i></b></a></td><td style='width:4px;'></td><td class='eleven'><a href='/index.php?act=Msg&CODE=04&MID=<!-- |id| -->'><b><i class='fa fa-envelope' title='Privát üzenet küldése'></i></b></a></td><td style='width:4px;'></td><td style='width:4px;'></td><td class='eleven'><a href='/index.php?act=Search&CODE=getalluser&mid=<!-- |id| -->'><b><i class='fa fa-line-chart' title='mind a <!-- |posts| --> hozzászólás megtekintése'></i></b></a></td><td style='width:23px;'></td></tr></table><table cellpadding='0' cellspacing='0'><tr><b>IC Hozzászólás:</b> <!-- |posts| --><br /><b>Utolsó hozzászólás:</b>  <!-- |last_post| --> <br /></tr></table><td class='eight'><b>{%field#1}</b><br><!-- |status| --> ";
if(this.vals["{%activity}"])
{ output += "{%activity}"; }
else { output += "- rejtőzködik a Szürkék elől)"; }
output += "<br></td></tr></table></div></td></tr></table></div></center>";
return output; }
 </div>


This post has been edited by Maylice: Oct 13 2016, 10:53 AM
PM
#
The guide is not working for you because you have a more unique CFS code setup where instead of using straight "html:" you're utilizing the CFS output conditional. This isn't a bad thing, but we did not account for that in the guide yet (and haven't run into it actually until now) so I will be updating the guide with a note on it today. Sorry about that!

Right now, looking at the topic listing linked, things seem to look fine for me, is there anything else with the topics not working as it should?

signature
email: admin@jcink.com :: blog: John C.
#
There is one other thing by the way. You have the advertisement in the footer. This isn't permitted, you will need to put the advertisement back within the header area.

signature
email: admin@jcink.com :: blog: John C.
#
Oh, I understand now. Thank you for your help in this, I am looking forward to the updated guide!

The only thing not working with it is last post by missing the user name. Please check this section:
"Témát indította: Lester
Utolsó hozzászóló: - 30th June 2016 - 07:26 PM"

The user name should be represented right after "Utolsó hozzászóló:".

I am so sorry for violating the rules, I was not aware. :< Could you lend me a hand in what part should I reposition and where to exactly? Please, excuse me for this inconvenience.
PM
#
Do you have the original code from your CFS? I want to see something. Please paste it here if you do (the topics code, before conversion.)

signature
email: admin@jcink.com :: blog: John C.
#
You mean the one made by the original template owner without my modifications, or the one before I've started migrating it?
If the previous, I am afraid, not. There was a hard reset on my PC and lost my stored data.
Sadly, the original skin has been removed by the creator (I'm still allowed to use it fortunately), so I am not able to look it up either. http://files.b1.jcink.com/html/emoticons/sad.gif

The code I saved before migrating:
CODE
customTopics.init({
page: "<!-- |input_act| -->",
html: function() {
var output = "<center><div id='CTOPICS'><table width='100%'><tr><td style='padding-right:15px;'>{%checkbox}</td><td><div class='ctone'>{%marker} {%title}</div><div class='cttwo'>{%description}<font class='ctthree'>";
if(this.vals["{%pagination}"])
{ output += "{%pagination}"; }
output += "</font></div></td><td><div class='ctfour'><b>Témát indította:</b> {%starter}<br><b>Utolsó hozzászóló:</b> {%author} - {%date}</div></td><td><div class='ctfive'>{%replies} válasz<br>{%views} megtekintés</div></td></tr></table></div></center>";
return output; }
});


This post has been edited by Maylice: Oct 13 2016, 11:55 AM
PM
#
Ok, thank you, I see what went wrong with that now.

In your current topic row template, find:

<!-- |last_topic_url| -->

Replace that with:

<!-- |last_poster| -->

And the last poster should appear.

signature
email: admin@jcink.com :: blog: John C.
#
That worked, thank you!
PM
#
Ok now let's work on the profile.

Try pasting this for your profile:

CODE
<center><div id='CPROFILE'><table cellpadding='0' cellspacing='0'><tr><td class='two'><div class='one'><!-- |avatar| --></div></td><td style='width:10px;'></td><td style='width:586px; height:420px; background-color:#5c948e;' class='<!-- |group| -->-bold'><div style='width:506px; height:90px; padding:0px 40px 20px; background-color:#0f2529; color:#5c948e; font-family:roboto; font-size:30px; font-weight:700; display:table-cell; vertical-align:bottom; text-align:right; letter-spacing:-2px; text-transform:uppercase; text-shadow:1px 1px #111;' class='<!-- |group| -->-border'><!-- |name| --></div><div class='seven'><table cellpadding='0' cellspacing='0'><tr><td class='nine'><div style='height:1px;'></div><div class='ten'><b>Faj:</b> <!-- |group| --></div><div style='height:2px;'></div><div class='ten'><b>Kor:</b> {%field#3} év</div><div style='height:2px;'></div><div class='ten'><b>Nem:</b> {%field#2}</div><div style='height:2px;'></div><div class='ten'><b>Specializáció:</b> {%field#4}</div><div style='height:2px;'></div><div class='ten'><b>Regisztráció:</b> <!-- |joined| --></div><div style='height:2px;'></div><div class='ten'><b>Utoljára online:</b> <!-- |last_activity| --></div><div style='height:1px;'></div></td><td style='width:10px;'></td><td class='six'><div class='five'><img src='{%field#7}'></div></td></tr></table><table cellpadding='0' cellspacing='0'><tr><td class='twelve'><table cellpadding='0' cellspacing='0'><tr><td class='eleven'><a href='{%field#8}'><b><i class='fa fa-child' title='Előtörténet'></i></b></a></td><td style='width:4px;'></td><td class='eleven'><a href='{%field#9}'><b><i class='fa fa-eye' title='Karakter kinézete'></i></b></a></td><td style='width:4px;'></td><td style='width:4px;'></td><td class='eleven'><a href='{%field#10}'><b><i class='fa fa-book' title='Játékvezető'></i></b></a></td><td style='width:4px;'></td><td style='width:4px;'></td><td class='eleven'><a href='{%field#11}'><b><i class='fa fa-users' title='Karakter Kapcsolatok'></i></b></a></td><td style='width:4px;'></td><td style='width:4px;'></td><td class='eleven'><a href='{%field#12}'><b><i class='fa fa-star' title='Képességek'></i></b></a></td><td style='width:4px;'></td><td class='eleven'><a href='/index.php?act=Msg&CODE=04&MID=<!-- |id| -->'><b><i class='fa fa-envelope' title='Privát üzenet küldése'></i></b></a></td><td style='width:4px;'></td><td style='width:4px;'></td><td class='eleven'><a href='/index.php?act=Search&CODE=getalluser&mid=<!-- |id| -->'><b><i class='fa fa-line-chart' title='mind a <!-- |posts| --> hozzászólás megtekintése'></i></b></a></td><td style='width:23px;'></td></tr></table><table cellpadding='0' cellspacing='0'><tr><b>IC Hozzászólás:</b> <!-- |posts| --><br /><b>Utolsó hozzászólás:</b>  <!-- |last_post| --> <br /></tr></table><td class='eight'><b>{%field#1}</b><br><!-- |status| --><br></td></tr></table></div></td></tr></table></div></center>


All of the standard fields should now work. You will need to reassign the field#'s however to match the ones displayed in the Admin CP under custom profile fields. Is that clear?

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

OptionsPages: (2) 1 2  ClosedNew TopicNew Poll