Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases

Reply
 
Thread Tools
Details »»

Version: 1.00, by JJR512 JJR512 is offline
Developer Last Online: Jun 2006 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 02-10-2002 Last Update: Never Installs: 13
 
No support by the author.

This is a small hack that I wrote several months ago. Originally it was only a template mod, then turned into a hack but remained in the template mods forum at vbulletin.com, so it never made it over here.

Basically, all it does is show both a custom title, selected by the user, and the user's standard title (Junior Member, Member, Moderator, etc.) in posts. It uses a custom profile field that you create through the admin cp to store the custom title.

As I said, it's an older hack by me, and was originally tested on 2.0.3. It still works for me on 2.2.2, though.

Show Your Support

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

Comments
  #12  
Old 02-13-2002, 03:59 AM
JJR512's Avatar
JJR512 JJR512 is offline
 
Join Date: Oct 2001
Location: Glen Burnie, MD, USA
Posts: 710
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Jakeman, in this hack, you DO add the custom profile field through the admin cp.

What the file modification does it prevents a blank line from showing up on the thread page if a user has not put in a custom title. It's just a simple little routine that checks for a value in $post[fieldX], and if there is one, it assigns the value of $post[fieldX] to $extratitle, and $extratitle is formatted to include a line break. If there is no value in $post[fieldX], a blank string is assigned to $extratitle. When you put $extratitle in the postbit template, you do NOT put a linebreak between it and the next line (which is the standard title); that way, if it's blank, there will be no empty line, but if it's not blank, the variable includes a line break to keep the flow right.

In other words, it's done strictly for appearance.

As I said, originally, this was just a template modification that I pointed out at vbulletin.com. Someone asked me how to surpress the blank line that would show up for users with no custom title, and that's how it evolved into a file modification hack.

Reply With Quote
  #13  
Old 02-13-2002, 04:01 AM
Jakeman's Avatar
Jakeman Jakeman is offline
 
Join Date: Nov 2001
Posts: 273
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

glowing isn't compatible accross all browsers and platforms so nya!

and glowing does work with custom fields, i just tested it.

meh, if it was me i would put a statement in my phpinclude instead of editing php files, but that's me, either way works for the spacing thingy. i hate editing php files, i will take templates over file mods any day, even if it adds more overhead to every page
Reply With Quote
  #14  
Old 02-13-2002, 04:08 AM
JJR512's Avatar
JJR512 JJR512 is offline
 
Join Date: Oct 2001
Location: Glen Burnie, MD, USA
Posts: 710
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It's my understanding that if a browser does not support glowing, the plain text will still be seen. And as I just said, the main point of it being a hack is not to support glowing; that's just a neat side-effect that was possible, and I showed how to do it. As I just said, the MAIN purpose to this being a hack is so that a blank line does not show up in between the user name and standard title if there is no custom title.

What I mean is this. If this was NOT a hack, a user with no custom title would look like this in the author info area of a message:
User1

Registered

While a user WITH a custom title would look like this:
User2
Super-Cool Dude
Registered


It's the blank line for User1 in below his name and above his title ("Registered") that someone asked me to make not show up. That's why I had to turn it into a hack, so that now, User1 looks like this:
User1
Registered

While User2 continues to look exactly the same.
Reply With Quote
  #15  
Old 02-13-2002, 04:09 AM
JJR512's Avatar
JJR512 JJR512 is offline
 
Join Date: Oct 2001
Location: Glen Burnie, MD, USA
Posts: 710
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

What kind of statement would you put in your phpinclude template?
Reply With Quote
  #16  
Old 02-13-2002, 05:23 AM
Jakeman's Avatar
Jakeman Jakeman is offline
 
Join Date: Nov 2001
Posts: 273
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

sorry, i'm being a bit of a troll.

erm, you can put php code in your phpinclude template. you should be able to set up the condition in there, right?
Reply With Quote
  #17  
Old 02-13-2002, 07:52 AM
KuraFire's Avatar
KuraFire KuraFire is offline
 
Join Date: Oct 2001
Location: inside vB3's .php
Posts: 1,245
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by Jakeman
and glowing does work with custom fields, i just tested it.
I'd like to know how your Edit Profile page looks like if you've got an HTML glow in it. With me, it f*cked up the layout of the page... (due to the "-sign in glow codes)
Reply With Quote
  #18  
Old 02-13-2002, 06:24 PM
JJR512's Avatar
JJR512 JJR512 is offline
 
Join Date: Oct 2001
Location: Glen Burnie, MD, USA
Posts: 710
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by Jakeman
sorry, i'm being a bit of a troll.

erm, you can put php code in your phpinclude template. you should be able to set up the condition in there, right?
Yeah, but there's a reason why vBulletin is made up of a bunch of separate files, rather than all the code being in the phpinclude template.
Reply With Quote
  #19  
Old 02-13-2002, 10:51 PM
Jakeman's Avatar
Jakeman Jakeman is offline
 
Join Date: Nov 2001
Posts: 273
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by JJR512

Yeah, but there's a reason why vBulletin is made up of a bunch of separate files, rather than all the code being in the phpinclude template.
Quote:
Originally posted by Jakeman
i will take templates over file mods any day, even if it adds more overhead to every page
Reply With Quote
  #20  
Old 02-14-2002, 01:25 AM
JJR512's Avatar
JJR512 JJR512 is offline
 
Join Date: Oct 2001
Location: Glen Burnie, MD, USA
Posts: 710
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Of course I remember typing my quote, and I already read your quote...so what's the point? Nothing new to add?
Reply With Quote
  #21  
Old 02-14-2002, 03:40 AM
Jakeman's Avatar
Jakeman Jakeman is offline
 
Join Date: Nov 2001
Posts: 273
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by JJR512
Of course I remember typing my quote, and I already read your quote...so what's the point? Nothing new to add?
ugh, nOOb.
Reply With Quote
Reply

Thread Tools

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 01:23 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.07937 seconds
  • Memory Usage 2,302KB
  • Queries Executed 25 (?)
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
  • (5)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
  • (3)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_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