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
  #22  
Old 08-28-2002, 01:32 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

And? Let's have it. Please?

Quote:
Originally posted by Neo
LOL you did this the hard way
I can do it with one line of code added.
Reply With Quote
  #23  
Old 08-28-2002, 01:45 PM
Neo's Avatar
Neo Neo is offline
 
Join Date: Oct 2001
Location: Anywhere
Posts: 1,817
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

wait a min
Reply With Quote
  #24  
Old 08-28-2002, 01:52 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok, that will work if you only want it in the posts. What about the member.php? And I have the usertitle on my forumhome and use $bbuserinfo[usertitle]. And the announcements one was included in the hack, too. Is there a way to include them all in one line of code? Globally? Buddy, friend, pal o' mine?

Quote:
Originally posted by Neo
sure..

in admin/functions.php find

PHP Code:
if ($post['receivepm'] and $enablepms==1) {
    eval(
"\$post[pmlink] = \"".gettemplate("postbit_sendpm")."\";");
} else {
    
$post[pmlink] = "";

and place this below it and it should work perfectly.

PHP Code:
        $post[usertitle] = bbcodeparse($post[usertitle],0,$allowsmilies); 
Reply With Quote
  #25  
Old 08-28-2002, 01:55 PM
Neo's Avatar
Neo Neo is offline
 
Join Date: Oct 2001
Location: Anywhere
Posts: 1,817
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

yes yes.. I had it somewhere but since I my server went down I lost alot of code... he should really use the function this way...

PHP Code:
$var[usertitle] = bbcodeparse($var[usertitle],0,$allowsmilies); 
Reply With Quote
  #26  
Old 08-28-2002, 01:58 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Will that handle all of the different user titles and where should we put this, sir?

Quote:
Originally posted by Neo
yes yes.. I had it somewhere but since I my server went down I lost alot of code... he should really use the function this way...

PHP Code:
$var[usertitle] = bbcodeparse($var[usertitle],0,$allowsmilies); 
Reply With Quote
  #27  
Old 08-28-2002, 02:10 PM
Neo's Avatar
Neo Neo is offline
 
Join Date: Oct 2001
Location: Anywhere
Posts: 1,817
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

well I am saying hs used this

bbcodeparse($announcement[usertitle]);

I should be changed to the code I used.. it makes it more forum dynamic... but if I get it to work again I will post it
Reply With Quote
  #28  
Old 08-28-2002, 02:13 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

So, then there really is no way to get all of the different user title variables in one piece of code and do it globally then? It was worth a shot.
Reply With Quote
  #29  
Old 10-05-2002, 08:37 PM
welsper's Avatar
welsper welsper is offline
 
Join Date: Oct 2002
Location: The Temple
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It works in 2.2.8, if anyone is curious. (Installed!)
Reply With Quote
  #30  
Old 10-06-2002, 02:09 AM
Merjawy's Avatar
Merjawy Merjawy is offline
 
Join Date: Sep 2002
Location: USA
Posts: 505
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

this is funny, I just saw this thread tonight.. and only today one of my forum users put a smile in her title and it just did not show as a smile now thats odd that I find this..


thanks mate for the hack I am gonna do it
Reply With Quote
  #31  
Old 10-06-2002, 02:20 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 Merjawy
this is funny, I just saw this thread tonight.. and only today one of my forum users put a smile in her title and it just did not show as a smile now thats odd that I find this..


thanks mate for the hack I am gonna do it
Thank you for the kind words.
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 05:08 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.04874 seconds
  • Memory Usage 2,341KB
  • Queries Executed 27 (?)
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
  • (12)bbcode_php
  • (4)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
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)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_postinfo_query
  • fetch_postinfo
  • 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