• Downloading from our site will require you to have a paid membership. Upgrade to a Premium Membership from 10$ a month today!

    Dont forget read our Rules! Also anyone caught Sharing this content will be banned. By using this site you are agreeing to our rules so read them. Saying I did not know is simply not an excuse! You have been warned.

Profile Posts with BB Codes 1.2

Admin

Well-Known Member
Staff member
Administrator
## About

As of XenForo 1.2, posts in profile pages are limited to text-only. That's unfortunate because I know for a fact that my members love using BB Codes to interact with each other on their profile pages (or share visitor messages as it was stilled called in vBulletin). To me, it just makes these pages look more interesting and interactive.

## What this add-on does

mqu8.png

obgq.png



This add-on will allow you to enable BB Codes in posts on your profile page. Depending on the settings, your users will be able to use text markups, post images or YouTube videos.

Your custom BB Codes are supported.

Smilies are back in town and can be used instead of their text representation.
clear.png


Lastly, you can enable independently BB Code settings for your users' status messages - although here I would restrict the BB Codes to basic text markup and smilies.

## Upgrade

If you are upgrading this add-on from an earlier version, make sure to notice the different path structure of this add-on. Previously, the add-on was stored in library/MobileReadProfileBbCode. This and future versions will be stored in library/MobileRead/ProfileBbCode. In other words, once you upgraded the add-on and copied its new files, you can delete the old directory library/MobileReadProfileBbCode.

## Installation

This add-on is compatible with xF 1.2 (RC1 tested). It supports functionality only available in xF 1.2 and later, including automated template modifications and event listener hinting for performance improvements.

## Install on xF 1.2

Install this add-on and configure the settings in home->options->profile & status BB code. You're ready to go!

## Install on xF 1.1

Install this add-on. Before you can configure the settings in home->options->profile & status BB code, you need to perform the following template modifications:

(notice: if you decide to uninstall this add-on, you will have to revert these templates again)

member_card
--------------

Find:

HTML:
<blockquote class="status">{xen:helper bodytext, $user.status}</blockquote>

Replace with:

HTML:
<blockquote class="status baseHtml">{xen:helper profileBbCode, $bbCodeParser, 'member_card', $user.status}</blockquote>

member_view
--------------

Find:

HTML:
<xen:if is="{$user.status}"><p class="userStatus" id="UserStatus">{xen:helper bodyText, $user.status} <xen:datetime time="$user.status_date" /></p></xen:if>

Replace with:

HTML:
<xen:if is="{$user.status}"><p class="userStatus" id="UserStatus"><span class="baseHtml">{xen:helper profileBbCode, $bbCodeParser, 'member_view', $user.status}</span> <xen:datetime time="$user.status_date" /></p></xen:if>


member_view
--------------

Find:

HTML:
<xen:if is="{$visitor.user_id} == {$user.user_id}">
    <textarea name="message" class="textCtrl StatusEditor Elastic" placeholder="{xen:phrase update_your_status}..." rows="3" cols="50" data-statusEditorCounter="#statusEditorCounter"></textarea>
<xen:else />
    <textarea name="message" class="textCtrl Elastic" placeholder="{xen:phrase write_something}..." rows="3" cols="50"></textarea>
</xen:if>

Replace with:

HTML:
<xen:if is="{$visitor.user_id} == {$user.user_id}">
    <xen:if is="{$wysiwyg}">
        {xen:raw $editorTemplate}
    <xen:else />
        <textarea name="message" class="textCtrl StatusEditor Elastic" placeholder="{xen:phrase update_your_status}..." rows="3" cols="50" data-statusEditorCounter="#statusEditorCounter"></textarea>
    </xen:if>
<xen:else />
    <xen:if is="{$wysiwyg}">
        {xen:raw $editorTemplate}
    <xen:else />
        <textarea name="message" class="textCtrl Elastic" placeholder="{xen:phrase write_something}..." rows="3" cols="50"></textarea>
    </xen:if>
</xen:if>


message_simple
-----------------


Find:

HTML:
<article><blockquote class="ugc baseHtml{xen:if $message.isIgnored, ' ignored'}">{xen:helper bodyText, $message.message}</blockquote></article>

Replace with:

HTML:
<article><blockquote class="ugc baseHtml{xen:if $message.isIgnored, ' ignored'}">{xen:helper profileBbCode, $bbCodeParser, 'message_simple', $message.message}</blockquote></article>


news_feed_item_profile_post_insert
-------------------------------------


Find:

HTML:
{xen:helper bodyText, $content.message}

Replace with:

HTML:
{xen:helper snippet, $content.message, $xenOptions.newsFeedMessageSnippetLength}


profile_post_comment
-----------------------


Find:

HTML:
<article><blockquote>{xen:helper bodytext, $comment.message}</blockquote></article>

Replace with:

HTML:
<article><blockquote class="baseHtml">{xen:helper profileBbCode, $bbCodeParser, 'profile_post_comment', $comment.message}</blockquote></article>


profile_post_edit
--------------------


Find:

HTML:
<dl class="ctrlUnit">
    <dt><label for="ctrl_message">{xen:phrase message}:</label></dt>
    <dd><textarea name="message" id="ctrl_message" class="textCtrl Elastic" rows="2">{$profilePost.message}</textarea></dd>
</dl>

Replace with:

HTML:
<dl class="ctrlUnit fullWidth surplusLabel">
    <dt><label for="ctrl_message">{xen:phrase message}:</label></dt>
    <xen:if is="{$wysiwyg}">
        <dd>{xen:raw $editorTemplate}</dd>
    <xen:else />
        <dd><textarea name="message" id="ctrl_message" class="textCtrl Elastic" rows="2">{$profilePost.message}</textarea></dd>
    </xen:if>
</dl>


FAQ

Q: When I update my status on my profile page, the status under my name doesn't show parsed BB code until I refresh the screen.

A: This is only a cosmetic issue visible to you until you refresh your screen. The updated status line is refreshed through Javascript (quick_reply_profile.js) the first time, and it would require a modification of that file.

Q: I want to migrate from vB and keep all the BB Codes in existing visitor messages. How can I do this?

A: You will need to apply a small patch to the Importer script to prevent it from stripping the BB Code:
In library/XenForo/Importer/vBulletin.php
-----------------------------------------


Find:

HTML:
'message' => $parser->render($this->_convertToUtf8($vm['pagetext'])),

Replace it with

HTML:
'message' => $this->_convertToUtf8($vm['pagetext']),
Download tuoitreit.vn_addon-mrprofilebbcode_120.zip (230.71 KB)
 

Facebook Comments

Similar threads
Thread starter Title Forum Replies Date
Admin A link to visitors profile Xenforo 0
Admin Your profile xenforo Xenforo 0
Admin Yilmaz - User Profile Menu vB5 Add-ons 0
Admin Yilmaz - COVERED PROFILE Module vB5 Add-ons 0
Admin [OzzModz] Profile Link On Member Card And Visitor Tab Xenforo 0
Admin Profile Page Banner Vbb tutorial 1
Admin Cel Display Usergroups on Member Profile or in Postbit Add-ons 0
Admin e360 User Profile Fields Permissions Add-ons 0
Admin [ozzy47] Default Profile Tab Add-ons 0
Admin Profile Statistics Add-ons 2
Admin Lấy link profile dofollow pr7 Thảo luận SEO 1
Admin Share skin YM phong cách facebook profile 2012 Style vbb 0
Admin Post areas for vbb - thống kê số bài viết trong profile Add-ons 0
Admin [vB5] User Profile Fields in the postbit templates Vbb tutorial 0
Admin Share mod rewrite profile johncms haycuc Johncms 0
Admin Simple Profile picture Effect Add-ons 0
Admin VBSEO like system in posbit and profile member Add-ons 0
K Share Đóng khung profile ẩn hiện rất gọn và đẹp Add-ons 0
chickIT Share Show ảnh Flickr Photo trong trang Profile VBB3 Add-ons 0
K Share Code đóng khung từng phần trong profile ! Mã nguồn web 0
Admin User Infractions & Post Reporting Options & User Profile Options & User Prof Vbulletin 0
Admin Hướng dẫn thêm phần bắt thành viên phải cập nhật profile cho vbb Vbulletin 7
Admin Hướng dẫn đến Visitor Messages khi vào trang profile vbb 4.x Add-ons 0
N Xin hướng dẫn tạo banner cho profile Thảo luận chung 4
Admin Share code hiện thú cưng trong profile cho johncms Johncms 0
Admin Mod đóng khung bài viết và profile cho vbb Vbulletin 0
Admin [OzzModz] New Posts Button Bottom Of Thread Xenforo 0
Admin [PB] Top Reacted Posts Xenforo 0
Admin Remaining Posts in Thread View xenforo 2 Xenforo 0
Admin Display "NEW" icon on unread posts Xenforo 0
Admin Attractive User Info Boxes for Posts Vbb tutorial 2
Admin [OzzModz] Exclude Forums From New Posts Search Add-ons 0
Admin NEW Editor Tags allow you to embed the CodeMirror code editor in posts Add-ons 0
Admin BBCode: Embed Aparat Videos in posts Vbulletin 0
Admin [ozzy47] Post New Thread Button In Posts Add-ons 1
Admin AdminCP News as Posts or PMs by BOP5 (Get your Admin CP News PMed to you!) Add-ons 0
Admin Editor BBcode Tags to embed EditArea code editor in posts Add-ons 0
Admin [DBTech] DragonByte Private Text in Posts v1 vbb 4.2.1 Add-ons 0
Admin PM User When Reaching X Posts Add-ons 0
Admin Hide Forum Posts in Activity Stream and Unread Posts Link Vbb tutorial 0
Admin CodeCanyon - Special Recent Posts PRO v2.5.2 Wordpress 0
Admin Block Censored Words in Posts by BOP5 VB4 Add-ons 0
Admin Brivium - Change Threads/Posts Owner 1.0.0 Xenforo 0
Admin Share mod down set posts cho vbb Add-ons 3
Admin Share mod chủ đề của tôi - my threads & my posts Add-ons 0
Admin How to Show WordPress Posts from a Single Category Only Wordpress 0
Admin RSS items as posts Add-ons 0
Admin Change Author And Creation Date Of Posts (Thay đổi tác giả và thời gian post bài) Add-ons 0
Admin Share How To Set Up A Usergroup And Moderate Their Threads & Posts Vbb tutorial 0
Admin FUZZY SEO Auto Linker (auto link words in posts to any URL) Add-ons 0

Similar threads

New posts New threads New resources

Back
Top