Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Smilies in user titles Details »»
Smilies in user titles
Version: 1.00, by Zzed Zzed is offline
Developer Last Online: Feb 2012 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 08-27-2002 Last Update: Never Installs: 3
 
No support by the author.

This is a very simple, yet fun hack that I made on my site. It allows the user titles to have smilies in them.

Here is the thread view and the profile view of the hack:
http://www.ls1.com/forums/showthread...hreadid=110647
http://www.ls1.com/forums/member.php...fo&userid=4112

It is accomplished by adding one line of code to the following files:

forumdisplay.php
member.php
private.php
admin/functions.php

In forumdisplay.php:
Look for the following code:
PHP Code:
     if ($announcement[customtitle]==2) {
       
$announcement[usertitle] = htmlspecialchars($announcement[usertitle]);
                 } 
And replace it with the following:
PHP Code:
     if ($announcement[customtitle]==2) {
       
$announcement[usertitle] = htmlspecialchars($announcement[usertitle]);
                 }
     
$announcement[usertitle]=bbcodeparse($announcement[usertitle]); 
In member.php
Look for the following code:
PHP Code:
  eval("dooutput(\"".gettemplate("getinfo")."\");"); 
And replace it with the following:
PHP Code:
  $userinfo[usertitle]=bbcodeparse($userinfo[usertitle]);
  eval(
"dooutput(\"".gettemplate("getinfo")."\");"); 
In private.php
Look for the following code:
PHP Code:
    if ($post[customtitle]==2) {
      
$post[usertitle] = htmlspecialchars($post[usertitle]);
    } 
And replace it with the following:
PHP Code:
    if ($post[customtitle]==2) {
      
$post[usertitle] = htmlspecialchars($post[usertitle]);
    }
    
$post[usertitle]=bbcodeparse($post[usertitle]); 
In admin/functions.php
Look for the following code:
PHP Code:
                if ($post[customtitle]==2) {
                        
$post[usertitle] = htmlspecialchars($post[usertitle]);
                } 
And replace it with the following:
PHP Code:
                if ($post[customtitle]==2) {
                        
$post[usertitle] = htmlspecialchars($post[usertitle]);
                }
                
$post[usertitle]=bbcodeparse($post[usertitle]); 
Enjoy...

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 08-27-2002, 11:31 PM
Link14716's Avatar
Link14716 Link14716 is offline
 
Join Date: Jun 2002
Location: Georgia, USA
Posts: 2,519
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nice. I dunno if I'll use it right away (server problems), but nice indeed.
Reply With Quote
  #3  
Old 08-27-2002, 11:40 PM
N9ne N9ne is offline
 
Join Date: Feb 2002
Posts: 1,495
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is it possible to make it so we can use vBcode in usertitles too? And be able to, through the adminCP disable certain vBcodes from being used?
Reply With Quote
  #4  
Old 08-27-2002, 11:42 PM
Zzed's Avatar
Zzed Zzed is offline
 
Join Date: Feb 2002
Location: Glendale, CA, USA
Posts: 463
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Link14716, thank you. You are very kind.

Tha Rock, this hack will allow you to use VBcode in the title. To disable certain VBcodes would require additional coding.
Reply With Quote
  #5  
Old 08-27-2002, 11:50 PM
Lanigironu Lanigironu is offline
 
Join Date: Mar 2002
Location: Toronto, Canada
Posts: 129
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

That's pretty cool. Too bad most admins on my board seem to have an angry attitiude towards smilies. I even had to completely remove them from posts .
Reply With Quote
  #6  
Old 08-28-2002, 12:45 AM
Erwin's Avatar
Erwin Erwin is offline
 
Join Date: Jan 2002
Posts: 7,604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by Lanigironu
That's pretty cool. Too bad most admins on my board seem to have an angry attitiude towards smilies. I even had to completely remove them from posts .
You have harsh admins!
Reply With Quote
  #7  
Old 08-28-2002, 01:07 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I can't get them to show up. All I see is the code for the smile next to the name. Ok, Zzed, what am I doing wrong this time?
Reply With Quote
  #8  
Old 08-28-2002, 01:38 AM
Zzed's Avatar
Zzed Zzed is offline
 
Join Date: Feb 2002
Location: Glendale, CA, USA
Posts: 463
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by Boofo
I can't get them to show up. All I see is the code for the smile next to the name. Ok, Zzed, what am I doing wrong this time?
Hmm, which file is giving you problem?

Can you Email it/them to me at edwink@seebeyond.com?
Reply With Quote
  #9  
Old 08-28-2002, 01:56 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I guess I should learn the difference between usertitle and unsername, huh? My fault. Duhhh!!! (Sorry about that). But there is the user part that is the same. Does that count?

I have 2 additions for you, though. I have the usertitle in the memberlist and on the foumhome. So here is the code I added to those files.

In root/memberlist.php
Look for the following code:

Code:
$userinfo[datejoined]=vbdate($dateformat,$userinfo[joindate]);
And add the following AFTER it:

Code:
$userinfo[usertitle] = htmlspecialchars($userinfo[usertitle]);
$userinfo[usertitle]=bbcodeparse($userinfo[usertitle]);

In root/index.php
Look for the following code:

Code:
// get total posts
And add the following ABOVE it:

Code:
$bbuserinfo[usertitle] = htmlspecialchars($bbuserinfo[usertitle]);
$bbuserinfo[usertitle]=bbcodeparse($bbuserinfo[usertitle]);
Reply With Quote
  #10  
Old 08-28-2002, 02:02 AM
bonnmac bonnmac is offline
 
Join Date: Mar 2002
Location: United States
Posts: 132
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Without sounding to stupid.... How do you add the smilies?
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 11:00 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04779 seconds
  • Memory Usage 2,323KB
  • Queries Executed 23 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (4)bbcode_code
  • (8)bbcode_php
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete