Printable Version of Topic
Click here to view this topic in its original format
Jcink.com Forums > General Support > Can't PM via profile


Posted by: Carmilla Jan 7 2017, 05:26 PM
I tried to PM a member on my forum through their profile, but when I clicked the message icon, I got an error message. Hovering over the link, this is what shows up:

CODE
http://fota.jcink.net/%3Ca%20href=%22/?act=Msg&CODE=04&MID=1%22%20id=%22profile-pm%22%3ESend%20Message%3C/a%3E



I'm not sure how to fix this? It's a custom profile.

Posted by: John Jan 8 2017, 06:50 PM
board link please? this looks like a case of a broken tag.

Posted by: Carmilla Jan 8 2017, 07:06 PM
John http://fota.jcink.net/index.php.

Posted by: John Jan 8 2017, 09:21 PM
You're using CFS which isn't supported here, but I can tell you what's happening.

<a class='pm' title='PM' href='{%pm}'>

Will not work in CFS. This is because {%pm} itself is a hyperlink. That's why this is breaking.

Please follow our conversion guide and convert your profile over to the HTML Template system, and then this will be easily solved once that is completed. You only need to use the <!-- |pm| --> variable in our HTML Templates and this will work exactly as you want.

http://jcink.com/main/wiki/jfh-converting-cfs-html-templates

Posted by: Carmilla Jan 10 2017, 08:46 PM
I think I might have converted it correctly, but it's still doing something weird:

http://prntscr.com/du2sok

And on the bottom of the home page:

[url=http://prntscr.com/du2tw8]

Even though it should look like the rest. And the board stats go all weird. But if I delete all of the CFS stuff from the wrappers, then everything else is stripped.

Posted by: John Jan 10 2017, 08:55 PM
Ah, I only wanted you to convert your profile only at the moment for the purposes of this support thread. I'm not seeing anything wrong with the screenshot of the profile you provided other than the fields not showing up, but that is expected.

http://jcink.com/main/wiki/jfh-converting-cfs-html-templates#customprofile.init

QUOTE
NOTE ON CUSTOM PROFILE FIELDS: Although most of your profile will transfer, the fields do not. You will need to reassign the field_# variables to match the ones exactly as shown in the Admin CP. Use the syntax described here to handle the fields.

Posted by: Carmilla Jan 10 2017, 09:30 PM
John

At the top it says:
customProfile.init({ html: "

and at the bottom:
" });

Do I just delete that from the template?

Also, I fixed the fields not showing up, but now they're blank even though they've been filled out.

**Edit:

Since I changed the fields, I only just noticed that the tracker, plotter, and want ad buttons are missing from the profile.

Posted by: John Jan 10 2017, 09:39 PM
Syntax is a bit off.

http://jcink.com/main/wiki/jfh-html-templates#custom_fields

<!-- |field#1| --> should be <!-- |field_1| -->

These are provided for you to copy and paste from the admin cp.

Posted by: Carmilla Jan 10 2017, 09:47 PM
The age field seems to have switched with the gif field, and the plotter, tracker, and want ad buttons are still gone.

Posted by: Carmilla Jan 12 2017, 02:48 AM
Update

On top of those aforementioned buttons being gone, I just noticed this:

http://prntscr.com/dul9x0

Posted by: John Jan 12 2017, 06:34 PM
Post the contents of your HTML templates for that section.

Posted by: Carmilla Jan 12 2017, 06:43 PM
This is the main profile template:

CODE
<div class='profile'><div class='userName <!-- |group| -->'><!-- |name| --></div><div class='icons'><a class='pm' title='PM' href='<!-- |pm| -->'><i class='fa fa-comments' aria-hidden='true'></i></a><a class='plotter' title='Plotter' href='<!-- |field_5| --><i class='fa fa-book' aria-hidden='true'></i></a><a class='tracker' title='Tracker' href='<!-- |field_4| --><i class='fa fa-tasks' aria-hidden='true'></i></a><a class='wantAd' title='Want Ad' href='<!-- |field_7| --><i class='fa fa-search' aria-hidden='true'></i></a></div><div class='userGroup'><!-- |group| --></div><div class='profile-left'><div class='profAvatar'><!-- |avatar| --></div></div><div class='profile-right'><div class='points'><div class='profTitle <!-- |group| -->'>Points</div><!-- |points| --></div><div class='birthplace'><div class='profTitle <!-- |group| -->'>Place of Birth</div><!-- |field_3| --></div><div class='parents'><div class='profTitle <!-- |group| -->'>Tale</div><!-- |field_6| --></div><div class='age'><div class='profTitle <!-- |group| -->'>Age</div><!-- |field_1| --></div><div class='adjective'><div class='profTitle <!-- |group| -->'>Adjective</div><!-- |field_2| --></div><div class='posts'><div class='profTitle <!-- |group| -->'>Posts</div><!-- |posts| --></div><div class='joined'><div class='profTitle <!-- |group| -->'>Joined</div><!-- |joined| --></div></div></div>

Posted by: John Jan 12 2017, 06:48 PM
To fix the fields that don't match, start swapping the fields. You should be able to see what field_#'s go where by just viewing the fields in the Admin CP. They are simply mismatched in your template itself.

As for the plotter. This:

<a class='plotter' title='Plotter' href='<!-- |field_5| --><i class='fa fa-book' aria-hidden='true'></i></a>

Needs replaced with this:

<a class='plotter' title='Plotter' href='<!-- |field_5| -->'><i class='fa fa-book' aria-hidden='true'></i></a>

The part in bold is what broke it. Your HTML <a> tag was missing its closure there.

Posted by: Carmilla Jan 12 2017, 07:28 PM
Thanks John, I think everything's back to normal now http://files.b1.jcink.com/html/emoticons/smile.gif

'
Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)