PDA

View Full Version : Parse BBCode in Custom Profile Fields


ImportPassion
12-20-2005, 10:00 PM
Why? Cause I think this should be the norm and others in this thread seem to want it. https://vborg.vbsupport.ru/showthread.php?t=101248

Be nice to also have WYSIWYG on the textareas, but that's another hack.

There are 2 versions of this.
The first one, product-parse_bbcode_in_profile_1.1.xml, is for anyone that does not have the MySpace style profile template hack installed. You can find that hack here https://vborg.vbsupport.ru/showthread.php?t=101248

The second, product-myspace_style_profile_version.xml, is for users that are using that template hack.

INSTALLATION:
Install the Product and that's it. Will install 1 new plugin. I tested as best I can, but see what happens. Can't provide 100% support, but I will see what I can do.

For non-MySpace profile template users, some options:
--------------------------------------------------------------------------
Optionally remove some code.
https://vborg.vbsupport.ru/showpost.php?p=856284&postcount=18
--------------------------------------------------------------------------
If you only want certain fields, put this code for EACH fieldx u want parsed in member_customfields hook location.
https://vborg.vbsupport.ru/showpost.php?p=856285&postcount=19

--------------------------------------------------------------------------

If you did this code change for 1.01, u can now remove it as it is not needed for 1.1.
v.1.01 Code Change

in admincp/profilefield.php find

// #################### PRE-CACHE TEMPLATES AND DATA ######################

add above that

define('THIS_SCRIPT', 'profile_admin');

end 1.01 code change

################################################## ##
Non-MySpace template hack
v.1.00 - Original Release
v.1.01 - Update to fix some weird issue in admincp when going to profile field manager.
v.1.1 - re-written - totally works. :o

MySpace Template hack version:
1.0 - Original release.

Kihon Kata
12-21-2005, 06:13 PM
w00t! im first. pee pee now

ImportPassion
12-21-2005, 06:17 PM
seems there is a small bug when u go to the profile fields manager. Looking into it.

ImportPassion
12-21-2005, 08:35 PM
Updated the XML and added a code change, for now. Will try to get away from that in next release.

msimplay
12-21-2005, 11:16 PM
Be nice to also have WYSIWYG on the textareas, but that's another hack.

Can you make this too ? :D

ImportPassion
12-22-2005, 04:13 AM
ya, i may look into it.

Kihon Kata
12-22-2005, 05:21 AM
w00t! im first. pee pee now

This is strange. I installed it and used things like [ b] and [ /b], but then when I 'rededit' the usercp, it sets them to <b> and </b>

What is thatall about?

msimplay
12-22-2005, 10:58 AM
Yeah i'm getting the same too the bbcode is not getting converted back to bbcode instead its being left as html

Kihon Kata
12-23-2005, 12:52 AM
Yeah i'm getting the same too the bbcode is not getting converted back to bbcode instead its being left as html

Bump? Is someone going to fix the problem?

ImportPassion
12-24-2005, 03:21 AM
sorry. was building new puter and had no access.

anyway, I will check it out.

Kihon Kata
12-24-2005, 03:24 AM
sorry. was building new puter and had no access.

anyway, I will check it out.

Yes please :)

Wordplay
12-24-2005, 10:45 AM
uninstalled it because of that bug.

is there anyway to whip up a background bbcode?

Lizard King
12-24-2005, 11:08 AM
If anyone needs this for custom profile fields just add a plugin with the following content :
hook location : member_complete
if ($userinfo['field2'])
{
if (!is_object($bbcode_parser))
{
require_once(DIR . '/includes/class_bbcode.php');
$bbcode_parser =& new vB_BbCodeParser($vbulletin, fetch_tag_list());
}
$userinfo['field2'] = $bbcode_parser->parse($userinfo['field2'],0, true);
}

Change field2 to suit your needs.

Kihon Kata
12-24-2005, 02:12 PM
If anyone needs this for custom profile fields just add a plugin with the following content :
hook location : member_complete
if ($userinfo['field2'])
{
if (!is_object($bbcode_parser))
{
require_once(DIR . '/includes/class_bbcode.php');
$bbcode_parser =& new vB_BbCodeParser($vbulletin, fetch_tag_list());
}
$userinfo['field2'] = $bbcode_parser->parse($userinfo['field2'],0, true);
}

Change field2 to suit your needs.

Lizardking:

I modded my profile field #1 and it didn't work:

Is this correct?

https://vborg.vbsupport.ru/

ImportPassion
12-24-2005, 04:20 PM
you have to add a plugin for each field. thats kinda nasty if you have like 20+

ImportPassion
12-24-2005, 05:12 PM
Ok, I updated the Plugin. It is all rewritten and in a different hook location.

Kihon Kata
12-24-2005, 05:15 PM
you have to add a plugin for each field. thats kinda nasty if you have like 20+

But what if I only want it to work for ONE field?

ImportPassion
12-24-2005, 05:16 PM
i u want to, u can remove this section from the plugin as it seems it is not necessary. But won't hurt or slow down if you keep it in there.


if (!is_object($bbcode_parser))
{
require_once(DIR . '/includes/class_bbcode.php');
$bbcode_parser =& new vB_BbCodeParser($vbulletin, fetch_tag_list());
}

ImportPassion
12-24-2005, 05:18 PM
But what if I only want it to work for ONE field?

try this

if($profilefieldname == "field1")
{
$profilefield['value'] = $bbcode_parser->parse($userinfo["$profilefieldname"],0, true);
}

in the same hook location

ImportPassion
12-24-2005, 05:26 PM
@TonysDesigns: I updated the code above

Kihon Kata
12-24-2005, 07:48 PM
@TonysDesigns: I updated the code above

Well first of all, I updated the product to 1.1 and that didn't work for me.

I mean, [ b ]testing....[ /b ](spaces removed) is bbcode right? If so, it's not working for me

Also do I add this hook also?

if($profilefieldname == "field1")
{
$profilefield['value'] = $bbcode_parser->parse($userinfo["$profilefieldname"],0, true);
}

I tried with and without the hook added. Can you help me to get this to work?

PS: You need to update the <version>1.0</version> to <version>1.1</version> in the XML.

Lizard King
12-24-2005, 11:50 PM
Lizardking:

I modded my profile field #1 and it didn't work:

Is this correct?

http://www.makeuptalk.com/images/temp/bbcode.gif
Yes it is true. Can you paste your html code so let me check that.

you have to add a plugin for each field. thats kinda nasty if you have like 20+

You can add multiple field names in same plugin :) But yes your code is also another solution

ImportPassion
12-25-2005, 02:36 AM
Well first of all, I updated the product to 1.1 and that didn't work for me.

I mean, [ b ]testing....[ /b ](spaces removed) is bbcode right? If so, it's not working for me

Also do I add this hook also?



I tried with and without the hook added. Can you help me to get this to work?

PS: You need to update the <version>1.0</version> to <version>1.1</version> in the XML.

I fixed the version. thx.

ok, so, if u ONLY want the ONE field, then edit the plugin remove the existing code and paste the new code I posted for you above. I did not try the one I made for you, but it should work. But I know the Product I created is working fine.

EDIT: Make sure you replce "field1" with the appropriate field number you are using. I believe it was field2.

Kihon Kata
12-25-2005, 02:48 AM
I fixed the version. thx.

ok, so, if u ONLY want the ONE field, then edit the plugin remove the existing code and paste the new code I posted for you above. I did not try the one I made for you, but it should work. But I know the Product I created is working fine.

EDIT: Make sure you replce "field1" with the appropriate field number you are using. I believe it was field2.

so if I just add the product and do NO other modification, it will allow bbcode in all fields?

Would it make a dirfference if I have added this mod here? https://vborg.vbsupport.ru/showthread.php?t=101248

Cuz I did.

ImportPassion
12-25-2005, 02:54 AM
so if I just add the product and do NO other modification, it will allow bbcode in all fields?

Correct

Would it make a dirfference if I have added this mod here? https://vborg.vbsupport.ru/showthread.php?t=101248

Cuz I did.

No difference at all since that is not a code mode, just template mod.

Kihon Kata
12-25-2005, 02:55 AM
Yes it is true. Can you paste your html code so let me check that.

You can add multiple field names in same plugin :) But yes your code is also another solution

Lizard, which HTML code? To you mean the HTML in the member profile template?

Kihon Kata
12-25-2005, 03:00 AM
$stylevar[htmldoctype]
<html dir="$stylevar[textdirection]" lang="$stylevar[languagecode]">
<head>
$headinclude
<title>Makeuptalk.com, makeup, beauty, beauty reviews, skin care, eyemakeup, eye makeup, hair care, and heath and fitness, talk and gossip for women - $vbphrase[view_profile]: $userinfo[username]
</head>
<body>
$header
$navbar

<!-- BIG USER TITLE -->
<table border="0" width="100%" cellspacing="3" cellpadding="2">
<tr>
<td>"$userinfo[usertitle]"

</td>
</tr>
</table>
<!-- /BIG USER TITLE -->
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<table width="100%" border="0" cellspacing="5" cellpadding="0">
<tr>
<td width="75%" align="left" valign="top">
<table width="100%" border="0" cellspacing="5" cellpadding="5">
<tr>
<td align="left" valign="top">

<!-- START USER AVATAR -->
<if condition="$show['avatar']">
<img src="$userinfo[avatarurl]" $userinfo[avatarsize] alt="" border="1" style="border:1px solid black $stylevar[tborder_bgcolor]; border-top:none" />
<!-- END USER AVATAR -->

<!-- Rank -->
<if condition="$userinfo['rank']">$userinfo[rank]

<!-- /Rank -->

<!-- USER TITLE -->
<div align="left" class="smallfont">$userinfo[usertitle]

<a target="_blank" href="friends.php?$session[sessionurl]u=$post[userid]">$post[username]'s Friends
<!-- /USER TITLE -->
</td>
<td width="100%" align="left" valign="top">
<!-- USER INFORMATION -->
<div style="font-size:18pt">$userinfo[musername] $userinfo[onlinestatus]

<!-- mood hack display start -->
<if condition="$userinfo[field26] != ''">Current Mood: images/mood/$userinfo%5Bfield26%5D.gif

<!-- mood hack display end -->

<div class="smallfont">
<b>$vbphrase[join_date]: $userinfo[datejoined]
<br />
<b>Hometown: $userinfo[field2]
<br />
<b>Country: $userinfo[field7]
<br />
<if condition="$show['age']">$vbphrase[age]: $userinfo[age]


<b>$vbphrase[total_posts]: $userinfo[posts] ($vbphrase[x_posts_per_day])

<if condition="$show['lastactivity']">
<div>Last Online At: $userinfo[lastactivitydate]
<span class="time">$userinfo[lastactivitytime]
</if>
</div>
</if>

<span class="smallfont" align="$stylevar[left]">
<if condition="$show['lastactivity']">
<div>$userinfo[action] $userinfo[where] - $vbphrase[offline]

<b>Contact: Send Private Message (%22private.php?$session%5Bsessionurl%5Ddo=newpm&u=$userinfo%5Buserid%5D%22)

</td>
</tr>
</table>
<div>
<!-- USER EXTRA PROFILE FIELD INFORMATION MODIFY THIS CODE -->

<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="left" valign="top">

<!-- About ME Row -->
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="1" width="100%" align="center">
<td class="thead">About Me:
</tr>
<tr>
<td class="alt1" bgcolor="#FFFFFF">$userinfo[field1]
</tr>
<!-- / About Me row -->

<br />

<!-- Occupation Row -->
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<td class="thead">Occupation:
</tr>
<tr>
<td class="alt1" bgcolor="#FFFFFF">$userinfo[field4]
</tr>
<!-- / Occupation row -->

<br />

<!-- Type of Car I drive Row -->
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<td class="thead">Type of Car I Drive:
</tr>
<tr>
<td class="alt1" bgcolor="#FFFFFF">$userinfo[field19]
</tr>
<!-- / Type of Car I Drive row -->

<br />

<!-- My Interests Row -->
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<td class="thead">My Interests:
</tr>
<tr>
<td class="alt1" bgcolor="#FFFFFF">$userinfo[field3]
</tr>
<!-- / My ineterests row -->

<br />

<!-- Favorite Music Row -->
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<td class="thead">My Favorite Music:
</tr>
<tr>
<td class="alt1" bgcolor="#FFFFFF">$userinfo[field21]
</tr>
<!-- / Favorite Music row -->

<br />

<!-- Favorite Movies Row -->
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<td class="thead">My Favorite Movies:
</tr>
<tr>
<td class="alt1" bgcolor="#FFFFFF">$userinfo[field20]
</tr>
<!-- / Favorite Movies row -->

<br />

<!-- Favorite Books Row -->
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<td class="thead">My Favorite Books:
</tr>
<tr>
<td class="alt1" bgcolor="#FFFFFF">$userinfo[field22]
</tr>
<!-- / Favorite Books row -->

<br />

<!-- Favorite Video Row -->
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<td class="thead">Favorite Video:
</tr>
<tr>
<td class="alt1" bgcolor="#FFFFFF">
</tr>
<!-- / Favorite Video row -->

<br />

<!-- Favorite MU Brands Row -->
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<td class="thead">My Favorite Makeup Brands:
</tr>
<tr>
<td class="alt1" bgcolor="#FFFFFF">$userinfo[field25]
</tr>
<!-- / Favorite MU Brands row -->

<br />

<!-- BEAUTY prod wishlist row -->
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
<td class="thead">My Beauty Product Wishlist:
</tr>
<tr>
<td class="alt1" bgcolor="#FFFFFF">$userinfo[field5]
</tr>
</table>
<!-- / BEAUTY prod wishlist -->

<br />

<!-- Intersting Facts row -->
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
<td class="thead">One Interesting Fact About Me:
</tr>
<tr>
<td class="alt1" bgcolor="#FFFFFF">$userinfo[field24]
</tr>
</table>
<!-- / Interesting Facts -->

<br />

<!-- signature row -->
<if condition="$show['signature']">
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
<td class="thead">$userinfo[username]'s $vbphrase[signature]
</tr>
<tr>
<td class="alt1" bgcolor="#FFFFFF" title="$vbphrase[signature]">$userinfo[signature]
</tr>
</table>
<!-- / signature row -->
<br />
</if>

</tr>
</table>

</td>

<!------ Start Profile Pic ------>
<td align="center" valign="top">
<if condition="$show['profilepic']">
<img src="$userinfo[profilepicurl]" $userinfo[profilepicsize] alt="This is $userinfo[username]! I Love MUT!!"
border="1" style="border="1" style="border:1px solid black" /> <else /> http://www.makeuptalk.com/forums/images_pb/misc/no_pic.jpg
</if>
<!------ /Profile Pic ------>

<table>
<!------ Start Notepad table ------>
<if condition="$hasnotepad">
<table border="1" cellpadding="3" cellspacing="0" style="border-collapse: collapse" width="90%" bordercolor="#C0C0C0">
<tr>
<td style="text-align:center;background-color:#FFFFFF" onmouseover="this.style.backgroundColor='#B7DBFF'" onmouseout="this.style.backgroundColor='#FFFFFF'">$userinfo[username]'s Notepad (http://$userinfo%5Busername%5D.makeuptalk.com)
</td>
</tr>
</table>
<!------ /Notepad table ------>
</if>
<table>

<!------ Start Reviews table ------>
<table border="1" cellpadding="3" cellspacing="0" style="border-collapse: collapse" width="90%" bordercolor="#C0C0C0">
<tr>
<td align="center" bgcolor="#FFFFFF" onMouseOver="this.style.backgroundColor='#B7DBFF'" onMouseOut="this.style.backgroundColor='#FFFFFF'" onClick="location.href='/reviews/showReviews.php?fromMyIndex=1&usernm=$userinfo[username]'" >$userinfo[username]'s Reviews (/reviews/showReviews.php?fromMyIndex=1&usernm=$userinfo%5Busername%5D)($totalreviews) (/reviews/showReviews.php?fromMyIndex=1&usernm=$userinfo%5Busername%5D)
</td>
</table>
<!------ /Reviews table ------>

<table>

<!------ Start Swaps table ------>
<table border="1" cellpadding="3" cellspacing="0" style="border-collapse: collapse" width="90%" bordercolor="#C0C0C0">
<tr>
<font face="Verdana" size="1">
<a target="_blank" href="/swap/showSwaps.php?fromMyIndex=1&usernm=$userinfo[username]">$userinfo[username]'s Swaps: ($totalswaps) (/swap/showSwaps.php?fromMyIndex=1&usernm=$userinfo%5Busername%5D)
</td>
</table>
<!------ /swaps table ------>

<table>

<!------ Start images table ------>
<table border="1" cellpadding="3" cellspacing="0" style="border-collapse: collapse" width="90%" bordercolor="#C0C0C0">
<tr>
<font face="Verdana" size="1">
<a target="_blank" href="/forums/gallery/browseimages.php?do=member&imageuser=$userinfo[userid]" title="View My Gallery">$userinfo[username]'s Gallery Images
</td>
</table>
<!------ /images table ------>

<table>

<!------ Start wishlist table ------>
<table border="1" cellpadding="3" cellspacing="0" style="border-collapse: collapse" width="90%" bordercolor="#C0C0C0">
<tr>
<font face="Verdana" size="1">
<a href="/swap/newestWishlist.php?usernm=$userinfo[username]" target="_blank">$userinfo[username]'s Wishlist:
<a href="/swap/newestWishlist.php?usernm=$userinfo[username]"target="_blank">($totalwishlist)
</font>
</td>
</table>
<!------ /wishlist table ------>

<table>

<!------ Start swap Notepad table ------>
<table border="1" cellpadding="3" cellspacing="0" style="border-collapse: collapse" width="90%" bordercolor="#C0C0C0">
<tr>
<font face="Verdana" size="1">
<a target="_blank" href="../swap/showEditor.php?usernm=$userinfo[username]">$userinfo[username]'s Swap Notepad
</font>
</td>
</table>
<!------ /swap notepad table ------>

<table>

<!------ Start swap rating table ------>
<table border="1" cellpadding="3" cellspacing="0" style="border-collapse: collapse" width="90%" bordercolor="#C0C0C0">
<tr>
<font face="Verdana" size="1">$userinfo[username]'s Feedback (traderratings.php?$session%5Bsessionurl%5Du=$user info%5Buserid%5D) ($userinfo[ratetradetotal])
</td>
</table>
<!------ /swap rating table ------>

<table>

<!------ Start completed swaps table ------>
<table border="1" cellpadding="3" cellspacing="0" style="border-collapse: collapse" width="90%" bordercolor="#C0C0C0">
<tr>
<font face="Verdana" size="1">Leave Feedback for $userinfo[username] (traderratings.php?$session%5Bsessionurl%5Du=$user info%5Buserid%5D&do=feedbacknew)
</font>
</td>
</table>
<!------ /completed swaps table ------>

<table>

<!------ Show Attachments table ------>
<table border="1" cellpadding="3" cellspacing="0" style="border-collapse: collapse" width="90%" bordercolor="#C0C0C0">
<tr>
<font face="Verdana" size="1">
<a href="profile.php?$session[sessionurl]do=editattachments&u=$post[userid]&showthumbs=1">View $userinfo[username]'s Attachments
</font>
</td>
</table>
<!------ /attachments table ------>
</div>

<table>

<!------ Start Buddy Lists ------>
<table border="1" width="90%" bordercolor="#C0C0C0" style="border-collapse: collapse">
<td align="center"> $stylevar%5Bimgdir_misc%5D/addFriendIcon.gif
<a href="profile.php?$session[sessionurl]do=addlist&userlist=buddy&u=$userinfo[userid]">Add
to Buddies</a> Remove
from Buddies</a> (%22profile.php?$session%5Bsessionurl%5Ddo=removel ist&userlist=buddy&u=$userinfo%5Buserid%5D%22)

<td> (%22profile.php?$session%5Bsessionurl%5Ddo=removel ist&userlist=buddy&u=$userinfo%5Buserid%5D%22) $stylevar%5Bimgdir_misc%5D/blockuser.gif
<a href="profile.php?$session[sessionurl]do=addlist&userlist=ignore&u=$userinfo[userid]">Add
to Ignore</a> (%22profile.php?$session%5Bsessionurl%5Ddo=removel ist&userlist=buddy&u=$userinfo%5Buserid%5D%22)Remove from Ignore (%22profile.php?$session%5Bsessionurl%5Ddo=removel ist&userlist=ignore&u=$userinfo%5Buserid%5D%22)

</tr>
</table>
<!------ /Buddy Lists ------>

<table>

<!----- Start Last5 threads ----->
<table border="1" width="90%" bordercolor="#C0C0C0" style="border-collapse: collapse">
<tr>

<if condition="$numthread">
<tr class="tcat">
<td align="center">
$userinfo[username]'s Last $maxthread Threads</font>
</td>
</tr>
$threadlist
</if>
</div>
</td>
</table>
</center>
<!----- /Last5 threads ----->

</td>
</tr>
<tr>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="center" valign="top" class"alt2">
<fieldset class="fieldset">
<legend>Posting Information
<table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0">
<if condition="$vboptions['profilelastpost']">
<tr>
<td>Most Recent Post:
$userinfo[lastposttitle] (%22$userinfo%5Blastposturl%5D%22)

$userinfo[lastpostdate] <span class="time">$userinfo[lastposttime]
</td>
</tr>
</if>
<tr>
<td>$vbphrase[find_all_posts_by_x] (%22search.php?$session%5Bsessionurl%5Ddo=finduser&u=$userinfo%5Buserid%5D%22)
</tr>
<tr>
<td>$vbphrase[find_all_threads_started_by_x] (%22search.php?$session%5Bsessionurl%5Ddo=process&showposts=0&starteronly=1&exactname=1&searchuser=$userinfo%5Burlusername%5D%22)

</tr>
</table>
</fieldset>
</td>

<td align="center" valign="top" class"alt2">
<fieldset class="fieldset">
<legend>Contact Information
<table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0">
<if condition="!$show['contactlinks']">
<tr>
<td>$vbphrase[x_has_no_contact_info]
</tr>
</if>
<tr>
<td> $vbphrase[home_page]:

<a href="$userinfo[homepage]" target="_blank" dir="ltr">$userinfo[homepage]
MySpace URL:
$userinfo[field18] ($userinfo%5Bfield18%5D)
</td>
</tr>
</if>
<tr>
<td> $vbphrase[email]:
$vbphrase[send_message_via_email_to_x] (%22sendmessage.php?$session%5Bsessionurl%5Ddo=mai lmember&u=$userinfo%5Buserid%5D%22)
</td>
</tr>
</if>
<tr>
<td> $vbphrase[private_message]:
$vbphrase[send_private_message_to_x] (%22private.php?$session%5Bsessionurl%5Ddo=newpm&u=$userinfo%5Buserid%5D%22)
</td>
</tr>
</if>
</fieldset>
</td>
<td align="center" valign="top" class"alt2">
<fieldset class="fieldset">
<legend>$vbphrase[instant_messaging]
<table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0">
<if condition="$show['textimicons']">
<tr>
<td>$vbphrase[icq]
<td>
<td>$userinfo[icq]
</tr>
</if>
<tr>
<td>$vbphrase[aim]
<td>
<td>$userinfo[aim]
</tr>
</if>
<tr>
<td>$vbphrase[msn]
<td>
<td>$userinfo[msn]
</tr>
</if>
<tr>
<td>$vbphrase[yahoo]
<td>
<td>$userinfo[yahoo]
</tr>
</if>
<tr>
<td>$userinfo[icqicon]
<td>$userinfo[icq] (%22#%22)
</tr>
</if>
<tr>
<td>$userinfo[aimicon]
<td>$userinfo[aim] (%22#%22)
</tr>
</if>
<tr>
<td>$userinfo[msnicon]
<td>$userinfo[msn] (%22#%22)
</tr>
</if>
<tr>
<td>$userinfo[yahooicon]
<td>$userinfo[yahoo] (%22#%22)
</tr>
</if>
</table>
</fieldset>
</if>

</div>
</tr>
</table>
</tr>
</table>

<table width="100%" background="http://www.makeuptalk.com/forums/images/boxbackground.jpg">
<tr>
<td width="33%" align="center">
<div class="fieldset">
<div style="padding:$stylevar[formspacer]px"> $vbphrase[referrals]:
<b>$referrals
</div>
<td width="33%" align="center">
<div class="fieldset">
<div style="padding:$stylevar[formspacer]px">
<if condition="$show['profileviewsother']">$vbphrase[profile_views] (#)$vbphrase[profile_views]: $userinfo[profileviews]
</div>
</div>
</if>

</if>
</td>
<td width="33%" align="center">
<div class="fieldset">
<div style="padding:$stylevar[formspacer]px"> $vbphrase[user_notes]:
<if condition="$show['usernoteview']"> $usernote[total]
[<a href="usernote.php?$session[sessionurl]u=$userinfo[userid]">$vbphrase[view]]
</if> [$vbphrase[post_user_note] (usernote.php?$session%5Bsessionurl%5Ddo=newnote&u=$userinfo%5Buserid%5D)]
</if>

($vbphrase[last_note]: $usernote[lastpostdate] <span class="time">$usernote[lastposttime])
</if>
</div>
</if>
</tr>
</table>

<if condition="$profileimagebits">
<table align="center" border="0" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" class="tborder" width="100%">
<tr>
<td class="tcat" colspan="$vba_options[gallery_columns]">$userinfo[username]'s Latest Gallery Submissions (/forums/gallery/browseimages.php?do=member&imageuser=$userinfo%5Buserid%5D)
</td>
</tr>
<tr>$profileimagebits
</table>
<br />
</if>
<br />
<!-- comments part -->

<table cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
<td class="thead">Comments for $userinfo[username]
<td class="thead">Leave $userinfo[username] A Comment
</tr>
<tr>
<td valign="top" class="alt1">
<table cellpadding="3" cellspace="0" border="0" width="100%">
$commentbits
</table>
</td>
<td class="alt1" align="center">
<if condition="$bbuserinfo[userid]">
<form action="member.php" enctype="multipart/form-data" method="POST" name="vbform">
<input type="hidden" name="do" value="addcomment" />
<input type="hidden" name="userid" value="$bbuserinfo[userid]" />
<input type="hidden" name="profileid" value="$userinfo[userid]" />
<textarea class="bginput" name="comment" rows="5" cols="40" tabindex="1" />
<br />
<input type="submit" class="button" name="sbutton" value="Leave Comment" />
</form>
<else />
<div class="smallfont">You need to be a registered member to leave comments for $userinfo[username].
</if>
</td>
</tr>
</table>
<!-- comments part -->
<br />

$buddyoutputsystem

<br />

<if condition="can_moderate()">
<div align="center" class="smallfont">Moderation Control: $vbphrase[user_options] (moderator.php?$session%5Bsessionurl%5Ddo=useropti ons&u=$userinfo%5Buserid%5D)
</if>

$FRIENDSFOES

</td>
</tr>
</table>
$footer
</body>
</html>

Lizard King
12-25-2005, 03:28 AM
It is strange did you add for each field as i mentioned ? Because it is working for mine.

Kihon Kata
12-25-2005, 03:37 AM
Correct



No difference at all since that is not a code mode, just template mod.

7th: all I have installed is this product and when I add bbcode, it doesn't work. :/
I tried to add [ b ] testing [ /b ] and no workie

Lizard: Not yet, I am trying to get it to work like it's supposed to first. Should I?

Lizard King
12-25-2005, 03:45 AM
Lizard: Not yet, I am trying to get it to work like it's supposed to first. Should I?
Yes you need to add for each field. Check this one which i have in profile (http://www.ayyas.com/member.php?u=4)
if ($userinfo['field2'])
{
if (!is_object($bbcode_parser))
{
require_once(DIR . '/includes/class_bbcode.php');
$bbcode_parser =& new vB_BbCodeParser($vbulletin, fetch_tag_list());
}
$userinfo['field2'] = $bbcode_parser->parse($userinfo['field2'],0, true);
}
if ($userinfo['field25'])
{
if (!is_object($bbcode_parser))
{
require_once(DIR . '/includes/class_bbcode.php');
$bbcode_parser =& new vB_BbCodeParser($vbulletin, fetch_tag_list());
}
$userinfo['field25'] = $bbcode_parser->parse($userinfo['field25'],0, true);
}
if ($userinfo['field22'])
{
if (!is_object($bbcode_parser))
{
require_once(DIR . '/includes/class_bbcode.php');
$bbcode_parser =& new vB_BbCodeParser($vbulletin, fetch_tag_list());
}
$userinfo['field22'] = $bbcode_parser->parse($userinfo['field22'],0, true);
}
if ($userinfo['field21'])
{
if (!is_object($bbcode_parser))
{
require_once(DIR . '/includes/class_bbcode.php');
$bbcode_parser =& new vB_BbCodeParser($vbulletin, fetch_tag_list());
}
$userinfo['field21'] = $bbcode_parser->parse($userinfo['field21'],0, true);
}
if ($userinfo['field20'])
{
if (!is_object($bbcode_parser))
{
require_once(DIR . '/includes/class_bbcode.php');
$bbcode_parser =& new vB_BbCodeParser($vbulletin, fetch_tag_list());
}
$userinfo['field20'] = $bbcode_parser->parse($userinfo['field20'],0, true);
}
if ($userinfo['field24'])
{
if (!is_object($bbcode_parser))
{
require_once(DIR . '/includes/class_bbcode.php');
$bbcode_parser =& new vB_BbCodeParser($vbulletin, fetch_tag_list());
}
$userinfo['field24'] = $bbcode_parser->parse($userinfo['field24'],0, true);
}
if ($userinfo['field6'])
{
if (!is_object($bbcode_parser))
{
require_once(DIR . '/includes/class_bbcode.php');
$bbcode_parser =& new vB_BbCodeParser($vbulletin, fetch_tag_list());
}
$userinfo['field6'] = $bbcode_parser->parse($userinfo['field6'],0, true);
}
if ($userinfo['field7'])
{
if (!is_object($bbcode_parser))
{
require_once(DIR . '/includes/class_bbcode.php');
$bbcode_parser =& new vB_BbCodeParser($vbulletin, fetch_tag_list());
}
$userinfo['field7'] = $bbcode_parser->parse($userinfo['field7'],0, true);
}
if ($userinfo['field8'])
{
if (!is_object($bbcode_parser))
{
require_once(DIR . '/includes/class_bbcode.php');
$bbcode_parser =& new vB_BbCodeParser($vbulletin, fetch_tag_list());
}
$userinfo['field8'] = $bbcode_parser->parse($userinfo['field8'],0, true);
}
if ($userinfo['field10'])
{
if (!is_object($bbcode_parser))
{
require_once(DIR . '/includes/class_bbcode.php');
$bbcode_parser =& new vB_BbCodeParser($vbulletin, fetch_tag_list());
}
$userinfo['field10'] = $bbcode_parser->parse($userinfo['field10'],0, true);
}
if ($userinfo['field11'])
{
if (!is_object($bbcode_parser))
{
require_once(DIR . '/includes/class_bbcode.php');
$bbcode_parser =& new vB_BbCodeParser($vbulletin, fetch_tag_list());
}
$userinfo['field11'] = $bbcode_parser->parse($userinfo['field11'],0, true);
}
if ($userinfo['field12'])
{
if (!is_object($bbcode_parser))
{
require_once(DIR . '/includes/class_bbcode.php');
$bbcode_parser =& new vB_BbCodeParser($vbulletin, fetch_tag_list());
}
$userinfo['field12'] = $bbcode_parser->parse($userinfo['field12'],0, true);
}
if ($userinfo['field13'])
{
if (!is_object($bbcode_parser))
{
require_once(DIR . '/includes/class_bbcode.php');
$bbcode_parser =& new vB_BbCodeParser($vbulletin, fetch_tag_list());
}
$userinfo['field13'] = $bbcode_parser->parse($userinfo['field13'],0, true);
}
if ($userinfo['field14'])
{
if (!is_object($bbcode_parser))
{
require_once(DIR . '/includes/class_bbcode.php');
$bbcode_parser =& new vB_BbCodeParser($vbulletin, fetch_tag_list());
}
$userinfo['field14'] = $bbcode_parser->parse($userinfo['field14'],0, true);
}
if ($userinfo['field16'])
{
if (!is_object($bbcode_parser))
{
require_once(DIR . '/includes/class_bbcode.php');
$bbcode_parser =& new vB_BbCodeParser($vbulletin, fetch_tag_list());
}
$userinfo['field16'] = $bbcode_parser->parse($userinfo['field16'],0, true);
}
if ($userinfo['field17'])
{
if (!is_object($bbcode_parser))
{
require_once(DIR . '/includes/class_bbcode.php');
$bbcode_parser =& new vB_BbCodeParser($vbulletin, fetch_tag_list());
}
$userinfo['field17'] = $bbcode_parser->parse($userinfo['field17'],0, true);
}
if ($userinfo['field19'])
{
if (!is_object($bbcode_parser))
{
require_once(DIR . '/includes/class_bbcode.php');
$bbcode_parser =& new vB_BbCodeParser($vbulletin, fetch_tag_list());
}
$userinfo['field19'] = $bbcode_parser->parse($userinfo['field19'],0, true);
}

As you can see you have to add the same parser for each field.

Kihon Kata
12-25-2005, 03:48 AM
Yes you need to add for each field. Check this one which i have in profile (http://www.ayyas.com/member.php?u=4)
if ($userinfo['field2'])
{
if (!is_object($bbcode_parser))
{
require_once(DIR . '/includes/class_bbcode.php');
$bbcode_parser =& new vB_BbCodeParser($vbulletin, fetch_tag_list());
}
$userinfo['field2'] = $bbcode_parser->parse($userinfo['field2'],0, true);
}
if ($userinfo['field25'])
{
if (!is_object($bbcode_parser))
{
require_once(DIR . '/includes/class_bbcode.php');
$bbcode_parser =& new vB_BbCodeParser($vbulletin, fetch_tag_list());
}
$userinfo['field25'] = $bbcode_parser->parse($userinfo['field25'],0, true);
}
if ($userinfo['field22'])
{
if (!is_object($bbcode_parser))
{
require_once(DIR . '/includes/class_bbcode.php');
$bbcode_parser =& new vB_BbCodeParser($vbulletin, fetch_tag_list());
}
$userinfo['field22'] = $bbcode_parser->parse($userinfo['field22'],0, true);
}
if ($userinfo['field21'])
{
if (!is_object($bbcode_parser))
{
require_once(DIR . '/includes/class_bbcode.php');
$bbcode_parser =& new vB_BbCodeParser($vbulletin, fetch_tag_list());
}
$userinfo['field21'] = $bbcode_parser->parse($userinfo['field21'],0, true);
}
if ($userinfo['field20'])
{
if (!is_object($bbcode_parser))
{
require_once(DIR . '/includes/class_bbcode.php');
$bbcode_parser =& new vB_BbCodeParser($vbulletin, fetch_tag_list());
}
$userinfo['field20'] = $bbcode_parser->parse($userinfo['field20'],0, true);
}
if ($userinfo['field24'])
{
if (!is_object($bbcode_parser))
{
require_once(DIR . '/includes/class_bbcode.php');
$bbcode_parser =& new vB_BbCodeParser($vbulletin, fetch_tag_list());
}
$userinfo['field24'] = $bbcode_parser->parse($userinfo['field24'],0, true);
}
if ($userinfo['field6'])
{
if (!is_object($bbcode_parser))
{
require_once(DIR . '/includes/class_bbcode.php');
$bbcode_parser =& new vB_BbCodeParser($vbulletin, fetch_tag_list());
}
$userinfo['field6'] = $bbcode_parser->parse($userinfo['field6'],0, true);
}
if ($userinfo['field7'])
{
if (!is_object($bbcode_parser))
{
require_once(DIR . '/includes/class_bbcode.php');
$bbcode_parser =& new vB_BbCodeParser($vbulletin, fetch_tag_list());
}
$userinfo['field7'] = $bbcode_parser->parse($userinfo['field7'],0, true);
}
if ($userinfo['field8'])
{
if (!is_object($bbcode_parser))
{
require_once(DIR . '/includes/class_bbcode.php');
$bbcode_parser =& new vB_BbCodeParser($vbulletin, fetch_tag_list());
}
$userinfo['field8'] = $bbcode_parser->parse($userinfo['field8'],0, true);
}
if ($userinfo['field10'])
{
if (!is_object($bbcode_parser))
{
require_once(DIR . '/includes/class_bbcode.php');
$bbcode_parser =& new vB_BbCodeParser($vbulletin, fetch_tag_list());
}
$userinfo['field10'] = $bbcode_parser->parse($userinfo['field10'],0, true);
}
if ($userinfo['field11'])
{
if (!is_object($bbcode_parser))
{
require_once(DIR . '/includes/class_bbcode.php');
$bbcode_parser =& new vB_BbCodeParser($vbulletin, fetch_tag_list());
}
$userinfo['field11'] = $bbcode_parser->parse($userinfo['field11'],0, true);
}
if ($userinfo['field12'])
{
if (!is_object($bbcode_parser))
{
require_once(DIR . '/includes/class_bbcode.php');
$bbcode_parser =& new vB_BbCodeParser($vbulletin, fetch_tag_list());
}
$userinfo['field12'] = $bbcode_parser->parse($userinfo['field12'],0, true);
}
if ($userinfo['field13'])
{
if (!is_object($bbcode_parser))
{
require_once(DIR . '/includes/class_bbcode.php');
$bbcode_parser =& new vB_BbCodeParser($vbulletin, fetch_tag_list());
}
$userinfo['field13'] = $bbcode_parser->parse($userinfo['field13'],0, true);
}
if ($userinfo['field14'])
{
if (!is_object($bbcode_parser))
{
require_once(DIR . '/includes/class_bbcode.php');
$bbcode_parser =& new vB_BbCodeParser($vbulletin, fetch_tag_list());
}
$userinfo['field14'] = $bbcode_parser->parse($userinfo['field14'],0, true);
}
if ($userinfo['field16'])
{
if (!is_object($bbcode_parser))
{
require_once(DIR . '/includes/class_bbcode.php');
$bbcode_parser =& new vB_BbCodeParser($vbulletin, fetch_tag_list());
}
$userinfo['field16'] = $bbcode_parser->parse($userinfo['field16'],0, true);
}
if ($userinfo['field17'])
{
if (!is_object($bbcode_parser))
{
require_once(DIR . '/includes/class_bbcode.php');
$bbcode_parser =& new vB_BbCodeParser($vbulletin, fetch_tag_list());
}
$userinfo['field17'] = $bbcode_parser->parse($userinfo['field17'],0, true);
}
if ($userinfo['field19'])
{
if (!is_object($bbcode_parser))
{
require_once(DIR . '/includes/class_bbcode.php');
$bbcode_parser =& new vB_BbCodeParser($vbulletin, fetch_tag_list());
}
$userinfo['field19'] = $bbcode_parser->parse($userinfo['field19'],0, true);
}

As you can see you have to add the same parser for each field.

Ohhh ok, let me try that.

Exitilus
12-25-2005, 08:38 PM
Ok I'm a bit confused. I was looking for this. Well I installed the plugin ... But it doesn't work :wataf .. looked through and I don't see any other configuration or setup needed to get this working. So am I missing something?

ImportPassion
12-25-2005, 11:22 PM
well, it's a product, not just a plugin. although it adds the plugin, and yes, that is all that is needed since all it is is one line of code. Ignore all the stuff from Lizard, my thread got jacked. It does work as it is working on mine. Make sure the hook location is member_customfields.

I registered on your forum and went and edited my profile and then looked at my profile, but it says I don't have permission. Also, all your debug code is showing.

EDIT: Do you have any other plugins using the same hook location? member_customfields

ImportPassion
12-25-2005, 11:24 PM
Just an FYI for Lizard and Tony, u don't need to put this line for each one...


if (!is_object($bbcode_parser))
{
require_once(DIR . '/includes/class_bbcode.php');
$bbcode_parser =& new vB_BbCodeParser($vbulletin, fetch_tag_list());
}


it's a huge waste. Put it once at the top and that's it, done. if you even need it at all, cause my Product doesn't.

Exitilus
12-25-2005, 11:28 PM
well, it's a product, not just a plugin. although it adds the plugin, and yes, that is all that is needed since all it is is one line of code. Ignore all the stuff from Lizard, my thread got jacked. It does work as it is working on mine. Make sure the hook location is member_customfields.

I registered on your forum and went and edited my profile and then looked at my profile, but it says I don't have permission. Also, all your debug code is showing.

I verified it is member_customfields.

I also went through and activated your account :) most likely the access denied thing :)

ImportPassion
12-25-2005, 11:31 PM
I verified it is member_customfields.

I also went through and activated your account :) most likely the access denied thing :)

I edited my message above, but do you have any other plugins using the same hook location?

ImportPassion
12-25-2005, 11:33 PM
would u mind giving me admin access to check it out? I went as far as to remove mine and install the one here and it still works for me.

Exitilus
12-25-2005, 11:41 PM
We have a plugin thing that puts all the plugins / products together. Just looked through a couple times and I don't see anything using that specific field

Boofo
12-25-2005, 11:47 PM
Will this work on 3.5 RC 3?

ImportPassion
12-25-2005, 11:50 PM
no idea, won't hurt to try as long as that hook location exists. But surely no one is still using an RC release?

ImportPassion
12-25-2005, 11:55 PM
i just tried it on my other forum 3.5.1 and it worked again no problem.

Exitilus
12-25-2005, 11:58 PM
Hrmm Odd ... I dunno why it won't work :|

Maybe try re-adding it?

ImportPassion
12-26-2005, 12:15 AM
uninstall first. take a screen of the plugin page if u can so i can see it.

MissKalunji
12-26-2005, 02:41 AM
can someone show me what this does?

thanks

Lizard King
12-26-2005, 02:53 AM
can someone show me what this does?

thanks

It allows you to use bbcode in custom user profiles.

MissKalunji
12-26-2005, 03:24 AM
It allows you to use bbcode in custom user profiles.

can i see a demo?

Lizard King
12-26-2005, 03:58 AM
can i see a demo?

i dont use this hack but check in http://www.ayyas.com/member.php?u=4 there are bbcodes inside custom profile fields. this hack makes the same thing.

MissKalunji
12-26-2005, 04:11 AM
i dont use this hack but check in http://www.ayyas.com/member.php?u=4 there are bbcodes inside custom profile fields. this hack makes the same thing.

:-/ ok thx

evenmonkeys
12-27-2005, 12:57 AM
It doesn't seem to be working for me. Are there settings I need to adjust?

ImportPassion
12-27-2005, 02:50 AM
if u r using the Myspace Style Profile template hack, then it doesn't work since the vars are being spit out differently. I am working on that now.

evenmonkeys
12-27-2005, 02:58 AM
Ohhhh. I just modified the template. I didn't upload plug-ins or anything. It's all just template changes. I assume that's still different. Also... is it possible to allow for certain fields to be parsed and certain fields not to be parsed? Like... add an option to "Add New Field" and have it say "Allow" or "Not Allow"... Just a suggestion.

ImportPassion
12-27-2005, 02:59 AM
maybe at some point, just want to get it working with that template mod first.

Kihon Kata
12-27-2005, 03:48 AM
maybe at some point, just want to get it working with that template mod first.

Yes you have. I wanted to popin and PERSONALLY thank you very much for doing this AND taking the time to fix my site with over 225,000 posts.

Thanks again for taking the time Derek!

KBV
12-28-2005, 08:58 AM
Great mod. Anyone have any idea why it turns < and > into &lt; and &gt;

MissKalunji
12-28-2005, 10:13 AM
You know what woudl be cool..........having the bbcode bar (like in threads) to show also not everyone knows the bbcodes by heart

EricaJoy
12-28-2005, 11:18 AM
You know what woudl be cool..........having the bbcode bar (like in threads) to show also not everyone knows the bbcodes by heartor maybe a link to bring up a pop up box with the bbcode info in it?

MissKalunji
12-28-2005, 12:50 PM
or maybe a link to bring up a pop up box with the bbcode info in it?

yeah would be good too

99SIVTEC
12-28-2005, 06:35 PM
I can't for the life of me get this to work. Tried adding the code manually, tried the code posted earlier in the thread, and tried the plugins. I have nothing else around the hook location, and no other plugins using that hook location.

Exitilus
12-28-2005, 07:06 PM
Aww that explains why it wasn't working with me. I have that updated profile thing installed :) I will keep a very close eye on this! i'm really hoping to see this working soon!!!

Exitilus
12-28-2005, 07:20 PM
haha nm noticed my e-mail and when i checked the thread it has been updated. I will give it a try! :)

Exitilus
12-28-2005, 07:26 PM
Works beautiful!

Annie^.^
12-30-2005, 05:34 PM
Great Job!!

wolfstream
12-30-2005, 11:24 PM
Only problem I see with this (so far):
This is parsing the fields just dandy in the profile itself, but when it comes to postbit, I see:

Location: color=blueWaterloo, IA/color

instead of

Location: Waterloo, IA


Any idea what I'm missing there? (yes, I deliberately took the tags out of the first color bit to prevent it from showing up as an actual color.

Sychev_S
12-31-2005, 01:08 AM
or maybe a link to bring up a pop up box with the bbcode info in it?
:squareeyed: that would be awesome

msimplay
01-01-2006, 12:05 PM
hmm problem again quotes are turning from " to &quot;

ImportPassion
01-01-2006, 01:32 PM
ya, i posted about that on vb.com, but no reply. not sure why that is happening.

Oreamnos
01-04-2006, 12:20 AM
First of all, i installed the plugin and it worked beautifully on 3.5.2.

i have 2 questions:

What can I change so that it automatically turns any URL into a link? I don't want users to have to use BBCode.
Any luck with the quotes issue?


Thanks!

eric

MissKalunji
01-16-2006, 12:26 AM
Okay how can i exclude a field?

example i want all the field to have bbcode but the css field....

how can i do that?

ImportPassion
01-16-2006, 02:40 AM
u could do something like this


if ($profilefieldname != 'field2') {
$profilefield['value'] = $bbcode_parser->parse($userinfo["$profilefieldname"],0, true);
}

replace field2 with ur css field #

not tested, but give it a shot.

MThornback
01-16-2006, 03:29 AM
Would you be willing to change this so that it parses signatures? Namely Admin Signatures.... :) my attempts at it are failig miserably and angering my includes folder :p

ImportPassion
01-16-2006, 03:34 AM
Would you be willing to change this so that it parses signatures? Namely Admin Signatures.... :) my attempts at it are failig miserably and angering my includes folder :p

I don't get it? Sigs already get parsed when you use bbcode in them. I believe it may be an option you have to turn on tho.

MThornback
01-16-2006, 03:43 AM
I don't get it? Sigs already get parsed when you use bbcode in them. I believe it may be an option you have to turn on tho.

Not what I meant, sorry threw you a curve :p

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

This hack parsed certian BB like: $bbuserinfo[username] : Username of the visitor

Its never been ported...and judging by your code, it looks like a stones throw from what would be needed to port it....I was just wondering if you'd modify your code to make it similar to what we had available to 3.0.7?

trackpads
01-17-2006, 10:31 PM
Is there any way to make this work for fields in the postbit?

Thanks!

Detomah
01-30-2006, 07:35 AM
I don't think I am doing anything wrong, the code works fine and I now have bbcode working fine in my profile fields, so that's a good start...

However...

Is it just me or do [ quote] [ code] [ html] type tags muck the tables up for anyone else?

If it's not just me, would there be any way to make it so that only certain bbcodes function in profile fields?

cartooner
01-31-2006, 02:36 PM
I'm using this hack from on MEMBERINFO template..from HR3rdGen.

and this is the template..


$stylevar[htmldoctype]
<html dir="$stylevar[textdirection]" lang="$stylevar[languagecode]">
<head>
$headinclude
<title>$vboptions[bbtitle] - $vbphrase[view_profile]: $userinfo[username]</title>
</head>
<body>
$header
$navbar


<!-- main info - avatar, profilepic etc. -->
<table border="0" width="100%" align="center" cellspacing="0" cellpadding="0">
<tr>
<td width="64%" valign="top">
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr bgcolor="#919EBA">
<td class="tcat" colspan="4" valign="top"> <b>Profile page
for: <b>$userinfo[musername], $userinfo[usertitle] $userinfo[onlinestatus]
</b></b></td>
</tr>
<tr> <if condition="$show['avatar']">
<td class="panelsurround" width="15%">
<div align="center"><img src="$userinfo[avatarurl]" border="0" style="border:1px solid $stylevar[tborder_bgcolor]; border-top:none"
/></div>
</td>
<else />
<td>&nbsp;</td>
</if>

<td class="panelsurround" width="42%" valign="top">
<p><b>Gender:</b> $userinfo[field7]<br>
<b>Age: </b>$userinfo[age]<b></b> <br>
<b>Orientation: </b>$userinfo[field13]<br>
<b>Astrology:</b> $userinfo[field6]</p>
</td>
<td class="panelsurround" width="42%" valign="top">
<b>Member Since:</b> $userinfo[datejoined]<br>
<b>Location:</b> $userinfo[field2]<br>
<b>Referrals:</b> $referrals<br>
<b>Reputation:</b> $userinfo[reputationdisplay]</td>
</tr>
</table>
<br>
<table align="center" border="0" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" class="tborder" width="100%">
<tr valign="top">
<td class="tcat"> Bio:</td>
</tr>
<tr valign="top">
<td class="panelsurround">
<p>$userinfo[field1]</p>
</td>
</tr>
</table>
<br>

<table align="center" border="0" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" class="tborder" width="100%">
<tr valign="top">
<td class="tcat" bgcolor="#919EBA">Favorite Music:</td>
</tr>
<tr valign="top">
<td class="panelsurround">
<p>$userinfo[field5]</p>
</td>

</tr>
</table>
<br>
<table align="center" border="0" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" class="tborder" width="100%">
<tr valign="top">
<td class="tcat" bgcolor="#919EBA">Favorite Movies:</td>

</tr>
<tr valign="top">
<td class="panelsurround">
<p>$userinfo[field6]</p>
</td>

</tr>
</table>
<br>
<table align="center" border="0" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" class="tborder" width="60%">
<tr valign="top">
<td class="tcat" bgcolor="#919EBA">About Me:</td>
</tr>
<tr valign="top">
<td class="panelsurround"> $userinfo[field7]</td>
</tr>
</table>
</td>
<td valign="top">&nbsp;</td>
<td width="34%" valign="top">

<table align="center" border="0" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" class="tborder" width="100%">
<tr>
<td class="tcat">My Favorite Links:</td>
</tr>
<tr>
<td class="panelsurround">
<p>$userinfo[field11]</p>
</td>
</tr>
<tr>
<td class="tcat">Forum Stats:</td>
</tr>
<tr>
<td class="panelsurround">$vbphrase[total_posts]: <strong>$userinfo[posts]</strong>
(<phrase 1="$postsperday">$vbphrase[x_posts_per_day]</phrase>)<br>
<a href="search.php?$session[sessionurl]do=finduser&amp;u=$userinfo[userid]" rel="nofollow"><phrase 1="$userinfo[username]">$vbphrase[find_all_posts_by_x]</phrase></a><br>
<a href="search.php?$session[sessionurl]do=process&amp;showposts=0&amp;starteronly=1&amp;exactname=1&amp;s earchuser=$userinfo[urlusername]" rel="nofollow"><phrase 1="$userinfo[username]">$vbphrase[find_all_threads_started_by_x]</phrase></a><br>
<if condition="$show['lastactivity']">
<div>$vbphrase[last_activity]: $userinfo[lastactivitydate] <span class="time">$userinfo[lastactivitytime]</span>&nbsp;</div>
</if> <if condition="$show['currentlocation']">
<div>$userinfo[action] $userinfo[where]<if condition="$show['detailedtime']">
- <else /> @ </if> $userinfo[time]&nbsp;</div>
</if></td>
</tr>
<tr>
<td class="tcat">My contact info:</td>
</tr>
<tr>
<td class="panelsurround"><if condition="$show['addbuddylist']"> <a href="profile.php?$session[sessionurl]do=addlist&amp;userlist=buddy&amp;u=$userinfo[userid]"><phrase 1="$userinfo[username]">$vbphrase[add_x_to_buddy_list]</phrase></a><else />
<a href="profile.php?$session[sessionurl]do=removelist&amp;userlist=buddy&amp;u=$userinfo[userid]"><phrase 1="$userinfo[username]">$vbphrase[remove_x_from_your_buddylist]</phrase></a>

</if><br><if condition="$show['addignorelist']"> <a href="profile.php?$session[sessionurl]do=addlist&amp;userlist=ignore&amp;u=$userinfo[userid]"><phrase 1="$userinfo[username]">$vbphrase[add_x_to_ignore_list]</phrase></a>
<else /> <a href="profile.php?$session[sessionurl]do=removelist&amp;userlist=ignore&amp;u=$userinfo[userid]"><phrase 1="$userinfo[username]">$vbphrase[remove_x_from_your_ignorelist]</phrase></a>
</if><br>
<a href="private.php?$session[sessionurl]do=newpm&amp;u=$userinfo[userid]" rel="nofollow"><phrase 1="$userinfo[username]">$vbphrase[send_private_message_to_x]</phrase></a><br>
<a href="sendmessage.php?$session[sessionurl]do=mailmember&amp;u=$userinfo[userid]" rel="nofollow"><phrase 1="$userinfo[username]">$vbphrase[send_message_via_email_to_x]</phrase></a></td>
</tr>
<tr>
<td class="panelsurround">
<table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0">
<if condition="$show['textimicons']"> <if condition="$userinfo['showicq']">
<tr>
<td>$vbphrase[icq]
<td>
<td>$userinfo[icq]</td>
</tr>
</if> <if condition="$userinfo['showaim']">
<tr>
<td>$vbphrase[aim]
<td>
<td>$userinfo[aim]</td>
</tr>
</if> <if condition="$userinfo['showmsn']">
<tr>
<td>$vbphrase[msn]
<td>
<td>$userinfo[msn]</td>
</tr>
</if> <if condition="$userinfo['showyahoo']">
<tr>
<td>$vbphrase[yahoo]
<td>
<td>$userinfo[yahoo]</td>
</tr>
</if> <else /> <if condition="$userinfo['showicq']">
<tr>
<td>$userinfo[icqicon]</td>
<td><a href="#" dir="ltr" onClick="imwindow('icq', '$userinfo[userid]', 500, 450); return false;">$userinfo[icq]</a></td>
</tr>
</if> <if condition="$userinfo['showaim']">
<tr>
<td>$userinfo[aimicon]</td>
<td><a href="#" dir="ltr" onClick="imwindow('aim', '$userinfo[userid]', 400, 200); return false;">$userinfo[aim]</a></td>
</tr>
</if> <if condition="$userinfo['showmsn']">
<tr>
<td>$userinfo[msnicon]</td>
<td><a href="#" dir="ltr" onClick="imwindow('msn', '$userinfo[userid]', 400, 200); return false;">$userinfo[msn]</a></td>
</tr>
</if> <if condition="$userinfo['showyahoo']">
<tr>
<td>$userinfo[yahooicon]</td>
<td><a href="#" dir="ltr" onClick="imwindow('yahoo', '$userinfo[userid]', 400, 200); return false;">$userinfo[yahoo]</a></td>
</tr>
</if> </if>
</table>
</td>
</tr>
<tr>
<td class="tcat">My Groups:</td>
</tr>
<tr>
<td class="panelsurround">
<table cellpadding="0" cellspacing="$stylevar[formspacer]px" border="0">
<tr> <if condition="$show['membergroups']">
<td></td>
<else />
<td><strong><phrase 1="$userinfo[username]">$vbphrase[x_is_not_a_member_of_any_public_groups]</phrase></strong></td>
</if> </tr>
$membergroupbits
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
<if condition="$profileimagebits">
<br><table align="center" border="0" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" class="tborder" width="100%">
<tr>
<td class="tcat" colspan="5"><a href="/gallery/browseimages.php?do=member&amp;imageuser=$userinfo[userid]" title="View My Gallery">$userinfo[username]'s Latest Gallery Submissions</a>
</td>
</tr>
<tr>$profileimagebits</tr>
</table>
<br />
</if>
$footer
</body>
</html>

I'm new to this, so if I sound dumb please forgive me. I've learned quite a bit though running my Forum.
All I need to know right now is a more detailed instructions to install this plug-in. Do I upload to my includes/xml folder??

I'm using *default* style to work with this, and so far I have everything set for Profile Page improvements except this.

ImportPassion
01-31-2006, 02:58 PM
you should prolly read the End User section here...

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

cartooner
01-31-2006, 03:57 PM
you should prolly read the End User section here...

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


OK..I read it..

End-Users
Go to ACP / Plugin System / Manage Products.
Click Add/Import Product, select the product XML File for the Hack you want to install.
If you are upgrading an existing Hack, make sure that Allow Overwrite is set to Yes

This How-To is (C) 2005 by KirbyDE and you are not allowed to redistribute it in any way without my explicit consent.

..when I go to download product my space style version.xml It opens the file.
so what do I do, copy paste the code into notepad and save.

I'm sorry for asking questions that might seem so stupid...

jluerken
03-29-2006, 10:49 AM
I edited the ABOUT ME text on my page after installing this product but BBCodes or Line Breaks are not working for me.

Any idea?

Aitsukai
04-14-2006, 04:11 AM
How would I get it to parse [img] tags as well?

shadowdancer36
04-19-2006, 08:45 PM
Sorry I'm a newbie here. What does this hack do again? Any screen shots? I'm thinking it allows u to use the editor to enter page changes, but I might be wrong.

wichall
06-11-2006, 04:02 PM
How do i parse the bbcode in the box that this hack: https://vborg.vbsupport.ru/showthread.php?t=98282& gives you

lilfields
06-12-2006, 08:19 PM
I am parsing BB code correctly within the profile, but not within posts (side location field)...as I have a BB URL in the location field linked to vBgooglemap locations

How would I go about making it parse and not just showing the code? I'm not sure if I made this clear enough to understand but I'll post a screenie if needed.

futuredood
06-23-2006, 11:28 AM
this is very strange, i had installed this properly and everything was working good.. and then all of the sudden it stopped working. nothing is more frustrating then when something is working and stops for no reason =(.

i originally installed this hack, deactivated it, and installed this code so that only one field was working (which worked fine):


if ($userinfo['field23'])
{
if (!is_object($bbcode_parser))
{
require_once(DIR . '/includes/class_bbcode.php');
$bbcode_parser =& new vB_BbCodeParser($vbulletin, fetch_tag_list());
}
$userinfo['field23'] = $bbcode_parser->parse($userinfo['field23'],0, true);
}



Then, I had made one change to my memberinfo template, and then it stopped working. I un-do'ed the change, resubmitted it, and it still didn't work.

I've also tried allowing bbcode throughout my memberinfo, but still to no avail.

Please advise..

futuredood
06-25-2006, 05:08 AM
turns out that if you turn of vb sigs, some things act up.. just to note

marksyzm
12-30-2006, 10:26 AM
How would I get it to parse [img] tags as well?

Where you see:

parse($userinfo['field23'],0, true

Change the '0' to a '1'

BlackxRam
03-09-2007, 09:37 AM
This mod doesnt seem to work if you have a custom Profile Page. I reverted my template to default, and this mod worked... I added my custom Profile Page setup that was created originally on a vb 3.5 forum and updated and the mod doesnt work. Just thought this might help people having trouble.

Allan
03-09-2007, 09:53 AM
This hack work with vB 3.6.x ?

keth
03-11-2007, 11:59 AM
This hack work with vB 3.6.x ?

It works with my vB 3.6.5, so yes. I'd apply some changes, though:

hmm problem again quotes are turning from " to &quot;

ya, i posted about that on vb.com, but no reply. not sure why that is happening.

HTML tags are removed from profile fields by default, so you should allow them while parsing the bbcode, otherwise it gets the double htmlspecialchars-treatment which means that " is turned into &quot; and that &quot; is then turned into &amp;quot;.
Also you'd have to use do_parse() instead of parse() (I don't know if it's the same with vB 3.5, I'm using 3.6):


$profilefield['value'] = $bbcode_parser->do_parse($userinfo["$profilefieldname"], true, true);

Chicago_VLNU_4s
03-11-2007, 10:36 PM
so will this mod take care of the quotes = (&quot), & = (&amp) and the many more parsing errors found with the myspace profiles... because I use the alternative parsing method as ppl are posting in here.

***
Edit: Now that I look above, it seems that this one doesn't fix it either :/

gen.Scorpio
03-20-2007, 01:04 PM
Dear keth, im getting crazy!
https://vborg.vbsupport.ru/showthread.php?t=142592
(i moved the post to an area that seems more "correct" than this)

RCWong
08-13-2007, 03:33 AM
If anyone has a problem this might help them. I fixed upon a bit the code that gen.Scorpio posted. Everything seems to work. From what he posted, when he saw a post of someone with the field filled, it didnt parse the bb code they had in their post. But as I tested it out the fixed up code, everything seems to be fine, no errors. If anyone can improve upon it, go right ahead. Tested on 3.6.8. All you need to do is change the field8 to whatever field you set.

Here is the code.
if ($userinfo['field8'])
{
if (!is_object($bbcode_parser))
{
require_once(DIR . '/includes/class_bbcode.php');
$bbcode_parser =& new vB_BbCodeParser($vbulletin, fetch_tag_list());
}
$profilefield[value] = $bbcode_parser->do_parse($profilefield[value],true, true);
}Pretty much, all I did was change the last bit of code from $userinfo['field5'] to $profilefield[value] and ($userinfo['field5',true, true); to ($profilefield[value],true, true);.

Detomah
11-22-2007, 09:21 PM
In case anyone has been having problems with the other fixes and versions of this...

I've got 3.6.8 installed and the profile pages are pretty heavily customised and none of the above fixes worked properly for me, so in the end I tinkered around with the various bits until I came up with this one which works perfectly for me, so I thought i'd share it in case it could be of use to anyone else:

Just replace the entire contents of the product file with this code, changing the 3 instances of field5 for which ever field you want to parse bbcode in and then do the normal install.


<?xml version="1.0" encoding="ISO-8859-1"?>

<product productid="myspace_style_profile" active="1">
<title>Parse BBCode in Custom Profile Fields</title>
<description>Give your users the full effect by letting them use BB Code in their profile.</description>
<version>1.1</version>
<codes>
</codes>
<templates>
</templates>
<plugins>
<plugin active="1">
<title>Parse BBCode for Custom Profile Fields</title>
<hookname>member_customfields</hookname>
<phpcode><![CDATA[if ($userinfo['field5']) {
require_once(DIR . '/includes/class_bbcode.php');

$parser =& new vB_BbCodeParser($vbulletin, fetch_tag_list());
$userinfo['field5'] = $parser->do_parse($userinfo['field5'], true, true, true, true, false, false);
};]]></phpcode>
</plugin>
</plugins>
<phrases>
</phrases>
<options>
</options>
</product>

Boofo
04-29-2008, 05:01 AM
What do we do if we want to do more than one profile filed?

Detomah
05-02-2008, 10:47 AM
Gah, I had this working perfectly before updating from 3.6.8 to 3.7 Gold a couple of days ago, now it's stopped working at all.

Anybody have any idea what bits in the code have changed that would mean this doesn't work any more? I dearly need this to work again.

I've tried the CES parser permissions hack which is out there, but that is way too much for what I need and stops more working for me than is practical.

If any pro coders out there have any ideas on this one please help me out, i'm well and trully stuck.

Cerbero1000
05-16-2008, 04:34 PM
Is there a way to have it on vbulletin 3.7?
I think that will be more attractive for members to have images or slideshow in their details...
Thanks

resident1
05-30-2008, 06:36 PM
I need this mod to work too! any coders out there know how to put the WYSIWYG editor and BBCODE into profile fields?

BlackxRam
06-01-2008, 06:56 PM
anyone who can get this working?