PDA

View Full Version : BB Code Enhancements - LiveJournal user code


Free-D
01-02-2008, 10:00 PM
Everybody knows LiveJournal - the most famous blog service. I've made BBCode which inserts lj-user icon (with link to lj-user profile) and lj-user name (with link to lj-user's blog)... like <lj user> tag

So, go to AdminCP > Custom BB Codes > Add New BB Code and type

Title: LJ-user
Tag: lj
Replacement: <a href="http://livejournal.com/userinfo.bml?user={param}"><img src="images/editor/ljuser.gif" widht="17" height="17" border="0"></a><a href="http://{param}.livejournal.com/"><font size="2"><b>{param}</b></font></a>

Example: dimon-prodigy
Button Image (Optional): images/editor/ljuser.gif (in attach ;))

Also you must upload ljuser.gif to images/editor directory

All must look like

http://img89.imageshack.us/img89/6345/11388920dl2.png

http://img186.imageshack.us/img186/1449/57301785hb3.png

-----
If you want to remove underline just go to AdminCP > Styles & Templates > choose style > All style options > in Additional CSS Definitions add
.not_underline {
text-decoration: none;
} and click Save

Then all in Replacement: field replace with <a href="http://livejournal.com/userinfo.bml?user={param}"><img src="images/editor/ljuser.gif" widht="17" height="17" border="0"></a><a href="http://{param}.livejournal.com/" class="not_underline"><font size="2"><b>{param}</b></font></a>

http://img530.imageshack.us/img530/4619/78739375ef1.png


DEMO (http://svoboda.lg.ua/forum/showthread.php?t=319)

gforce75
01-03-2008, 04:38 PM
first post! woot!

ran_iu_Conan
01-03-2008, 10:13 PM
thanks for share.
i like it

FreshFroot
01-04-2008, 12:10 AM
This will be a great addon, thanks! :D

Devid_jj
01-05-2008, 06:33 AM
Not the big addition:) If you would want that the opportunity of an insert of a code was in "Quick Reply" that:
In showthread_quickreply Find:
<td><div class="imagebutton" id="{$editorid}_cmd_wrap0_quote"><img src="$stylevar[imgdir_editor]/quote.gif" width="21" height="20" alt="$vbphrase[wrap_quote_tags]" /></div></td>
and after that add
<td><img src="$stylevar[imgdir_editor]/separator.gif" width="6" height="20" alt="" /></td>
<td><div class="imagebutton" id="{$editorid}_cmd_wrap0_lj"><img src="$stylevar[imgdir_editor]/ljuser.gif" width="17" height="17" alt="" /></div></td>
And if want, can do too most with a pattern quik editing messages (postbit_quickedit)