PDA

View Full Version : Using ALT characters in profile fields?


Checkmate MK8
03-07-2014, 12:51 AM
In vB4.2.2, how can I set one of the particular profile fields to accept ALT characters? Currently, when a user enters an ALT character, it defaults to the numerical reference to the character.

In other words, what should be showing as ★ is showing as "&9733" in the profile field upon clicking "save".

Thanks,
CheckM8

ForceHSS
03-07-2014, 01:02 AM
Is this a default field or custom. Some screenshots would help explain

Checkmate MK8
03-07-2014, 01:45 AM
It is the Clan Tag profile field which is custom.

ForceHSS
03-07-2014, 01:52 AM
Without more info we can't help.
The code being used
A place where you got the code from ie plugin, template change etc etc.
screenshots and link to site with temp login

Checkmate MK8
03-07-2014, 02:02 AM
I added the Clan Tag profile via this mod.

https://vborg.vbsupport.ru/showthread.php?t=273551

tbworld
03-07-2014, 02:09 AM
@ForceHSS is right, you need to make it a bit easier for us to help you. Always error on the side of too much information. If you want us to spend 10-20 minutes helping you, then you need to spend more then 30 seconds typing out a one-liner. Anyway, I think you get the point. Try again and we will try to help. :)

Checkmate MK8
03-07-2014, 02:13 AM
What else can I tell you that would lead you in the right direction, LOL? All I did was add a single custom profile field per the simple instructions in the link above. It's not rocket science.

tbworld
03-07-2014, 02:25 AM
It is more of a science then you understand. Custom profile fields are processed differently, depending where they are being used. Sorry, I could not be of assistance.

Checkmate MK8
03-07-2014, 02:32 AM
I did the following:


Go to AdminCP --> User Profile Fields --> Add New User Profile Field

for profile field type select Single-Line Text Box

Title= Clan Tag
Profile Field Category= (Uncategorized)
Max length of allowed user input= 4
Field Required= Yes, at registration and profile updating
Field Editable by User= Yes
Private Field= No
Field Searchable on Members List= Yes
Show on Members List= Yes

Now Go To postbit_legacy And Find:
HTML Code:
<vb:else />


{vb:raw post.musername}


right above it add: (Replace Red XX with the profile feild number)
Code:
<vb:if condition="$post['fieldXX']">
<font color="red" size="4"><B>{vb:rawphrase fieldXX}[{vb:raw post.fieldXX}]</B></font></vb:if>

ozzy47
03-07-2014, 02:40 AM
I believe the HTML, is already parsed, so just use the star character (copy & past it), not the alt code.

Checkmate MK8
03-07-2014, 02:42 AM
I tried that and it looks correct until you save it and then it reverts to the numerical code.

ozzy47
03-07-2014, 02:46 AM
Try it while viewing your profile in the About Me tab, there should be a pencil icon next to the filed to edit it.

ForceHSS
03-07-2014, 02:49 AM
And did you change (Replace Red XX with the profile field number) in the code.

Checkmate MK8
03-07-2014, 02:49 AM
I tried that also.

I copy/pasted this - ★

When I clicked Update, it turned to this - ★

--------------- Added 1394164228 at 1394164228 ---------------

And did you change (Replace Red XX with the profile field number) in the code

Yes, the clan tag shows up fine on the forum, members just can't use ALT characters.

ozzy47
03-07-2014, 02:50 AM
Strange, doing it that way it works on the vBulletin default profile fields.

ForceHSS
03-07-2014, 02:53 AM
Pm me will have a look at it for you

--------------- Added 1394165802 at 1394165802 ---------------

tested this on my test site works as it should

--------------- Added 1394166617 at 1394166617 ---------------

https://vborg.vbsupport.ru/showpost.php?p=2485604&postcount=17

Simon Lloyd
03-07-2014, 05:29 AM
Does this happen if you try to apply the same in all browsers?

Also what font sets is your forum set to use?

Checkmate MK8
03-07-2014, 02:17 PM
Does this happen if you try to apply the same in all browsers?

Also what font sets is your forum set to use?

So far it happens in Chrome, Safari and Firefox.

Here is my editor_contents.css file.

body,
body.content {
font: {vb:stylevar content_msg_font};
color: {vb:stylevar editor_text_color};
background:{vb:stylevar editor_background};
margin:0px;
padding:8px;
}

body.forum {
font: {vb:stylevar postbit_font};
}

html {
/* #3658: [IE6] Editor document has horizontal scrollbar on long lines
To prevent this misbehavior, we show the scrollbar always */
_overflow-y: scroll;
cursor:text;
}

img:-moz-broken {
-moz-force-broken-image-icon : 1;
width : 24px;
height : 24px;
}

img, input, textarea {
cursor: default;
}

img.previewthumb {
max-width:{vb:stylevar attachment_image_thumbnail_max};
max-height:{vb:stylevar attachment_image_thumbnail_max};
height:auto !important;
width:auto !important;
margin:1px;
}

img.previewthumb:hover {
opacity:.5;
-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=50 )";
filter: alpha(opacity=50);
cursor: pointer;
}

img.size_thumbnail {
max-height:{vb:stylevar attachment_image_thumbnail_max};
max-width:{vb:stylevar attachment_image_thumbnail_max};
}

img.size_medium {
max-height:{vb:stylevar attachment_image_medium_max};
max-width:{vb:stylevar attachment_image_medium_max};
}

img.size_large {
max-height:{vb:stylevar attachment_image_large_max};
max-width:{vb:stylevar attachment_image_large_max};
}

img.size_fullsize {
max-width:100%;
max-height:100%;
overflow:hidden;
}

img.align_left {
float:left; /* dont use stylevar for this */
margin: 1em;
margin-left: 0;
}

img.align_center {
margin: 0 auto;
display:block;
}

img.align_right {
float:right; /* dont use stylevar for this */
margin: 1em;
margin-right: 0;
}

/* Table tag */
table {
width: auto;
}
table.wysiwyg_dashes {
border-collapse: collapse;
}

th.wysiwyg_dashes_th,
td.wysiwyg_dashes_td {
border: {vb:stylevar editor_wysiwyg_table_border};
padding: 3px;
}

th.cms_table_grid_th,
th.wysiwyg_cms_table_grid_th,
td.cms_table_grid_td,
td.wysiwyg_cms_table_grid_td {
border: {vb:stylevar bbcode_table_border};
}

table.cms_table_outer_border,
table.wysiwyg_cms_table_outer_border {
border-collapse: collapse;
border: {vb:stylevar bbcode_table_border};
}

th.cms_table_th,
th.cms_table_outer_border_th,
td.cms_table_td,
td.cms_table_outer_border_td {
border:none;
}

/* paragraph tag */
p {
margin: 0px;
padding: 0px;
}

/* preview break tag */
hr.previewbreak {
background-color:red !important;
border:medium none !important;
color:red !important;
height:6px !important;
}

/* pagebreak tag */
h3.wysiwyg_pagebreak {
border: 1px dashed #cccccc;
border-top: 3px double black;
padding: 4px;
}

ol.upper-roman > li {
list-style:upper-roman outside;
}

ol.lower-roman > li {
list-style:lower-roman outside;
}

ol.upper-alpha > li {
list-style:upper-alpha outside;
}

ol.lower-alpha > li {
list-style:lower-alpha outside;
}

ul, ol, dl {
margin: 0 40px;
padding: 0;
}

Checkmate MK8
03-27-2014, 04:47 AM
Bump. Any ideas how to correct this issue?