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

Reply
 
Thread Tools
Username Decorations Details »»
Username Decorations
Version: 1.00, by AnkisethGallant AnkisethGallant is offline
Developer Last Online: Jun 2007 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 05-05-2002 Last Update: Never Installs: 15
 
No support by the author.

Username Decorations!

As requested by myself and JohnWarwick.

What does this hack do?
It allows you to change your username's font color, background color, border, and make it italicized or underlined.
It uses profile fields (discussed in the readme), so you can allow the users to do it themselves, or leave it to the admins.

What is needed for this hack?
1 File Edit
8 New Templates

How long does it take?
About 10-15 minutes, 3-8 with the Template Importer by FireFly.

Everything else is in the readme attached.

ADDITIONAL TEMPLATE EDIT NOT IN README:
Template edit - postbit template
REPLACE: $post[username]
WITH: $post[namecolor]

If you're using a store hack that replaces the $post[username] with $storeextraglow, simply edit the postbit_namecolor templates, and replace $post[username] with $storeextraglow.

Show Your Support

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

Comments
  #22  
Old 05-06-2002, 07:55 PM
AnkisethGallant's Avatar
AnkisethGallant AnkisethGallant is offline
 
Join Date: Oct 2001
Location: Las Vegas
Posts: 113
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It doesn't work?

Make sure you change the field values correctly in the Functions.php AND all the templates. The defaults are listed in the readme. It should work fine if all of that's done.

I haven't noticed that it slows down the browser at all, mine still works fine.
Reply With Quote
  #23  
Old 05-06-2002, 07:57 PM
AnkisethGallant's Avatar
AnkisethGallant AnkisethGallant is offline
 
Join Date: Oct 2001
Location: Las Vegas
Posts: 113
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

In fact, if you really want, PM me with the field IDs you want to use. I can change everything for you and then see if it works.
Reply With Quote
  #24  
Old 05-06-2002, 09:19 PM
John's Avatar
John John is offline
 
Join Date: Mar 2002
Location: Norwich, UK
Posts: 1,543
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I triple checked it, with each of the field ids two higher than in functions.php and in the templates (my IDs started at 8)
Reply With Quote
  #25  
Old 05-06-2002, 10:25 PM
AnkisethGallant's Avatar
AnkisethGallant AnkisethGallant is offline
 
Join Date: Oct 2001
Location: Las Vegas
Posts: 113
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

And you're still having a problem? Check to make sure your fields match the ones that were the defaults (i.e., the text color field is field8, et cetera). If you're still getting a problem, show me your functions.php section.
Reply With Quote
  #26  
Old 05-07-2002, 12:19 PM
AnkisethGallant's Avatar
AnkisethGallant AnkisethGallant is offline
 
Join Date: Oct 2001
Location: Las Vegas
Posts: 113
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

HERE'S THE PROBLEM PEOPLE

I knew I'd screw something up in my first hack.

Template edit - postbit template
REPLACE: $post[username]
WITH: $post[namecolor]

That should solve everything.
Reply With Quote
  #27  
Old 05-07-2002, 02:06 PM
John's Avatar
John John is offline
 
Join Date: Mar 2002
Location: Norwich, UK
Posts: 1,543
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Just spent hours removing this hack, now I've got to install it again
Reply With Quote
  #28  
Old 05-07-2002, 02:07 PM
John's Avatar
John John is offline
 
Join Date: Mar 2002
Location: Norwich, UK
Posts: 1,543
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

But thanks for the fix
Reply With Quote
  #29  
Old 05-07-2002, 06:04 PM
Dakota's Avatar
Dakota Dakota is offline
 
Join Date: Oct 2001
Posts: 102
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nice hack. I like it.
Reply With Quote
  #30  
Old 05-07-2002, 06:30 PM
bonnmac bonnmac is offline
 
Join Date: Mar 2002
Location: United States
Posts: 132
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I like the looks of it but... when applied the user name doesn't show up at all? I've used the default profile fields and edited the additional file you posted. Here's what my "functions.php" looks like. Maybe you can tell me what's wrong? I hope cause this is a really cool hack. Thanks
Code:
<?php
error_reporting(7);

// start prep shutdown function
$noshutdownfunc = 0; // #CHANGE ME IF YOU CAN'T USE register_shutdown_function
$ourtimenow = time(); // Make this available to all files

// Defined constants used for user field.
// Hope to convert all user fields into one integer.
define ("SHOWSIGNATURES", 1);
define ("SHOWAVATARS", 2);
define ("SHOWIMAGES", 4);
define ("SHOWVBCODE", 8);

unset($templatecache);

// ###################### Start getpagenav #######################
// template-based page splitting system from 3dfrontier.com :)
function getpagenav($results,$address) {
	global $perpage,$pagenumber,$pagenavpages;

	if ($results <= $perpage) {
		return "";
	}

	$totalpages = ceil($results/$perpage);

	if ($pagenumber>1) {
		$prevpage = $pagenumber-1;
		eval("\$prevlink = \"".gettemplate("pagenav_prevlink")."\";");
	}
	if ($pagenumber<$totalpages) {
		$nextpage = $pagenumber+1;
		eval("\$nextlink = \"".gettemplate("pagenav_nextlink")."\";");
	}
	while ($curpage++<$totalpages) {
		if ( ( $curpage <= $pagenumber-$pagenavpages || $curpage >= $pagenumber+$pagenavpages ) && $pagenavpages!=0 ) {
			if ($curpage==1) {
				eval("\$firstlink = \"".gettemplate("pagenav_firstlink")."\";");
			}
		    if ($curpage==$totalpages) {
				eval("\$lastlink = \"".gettemplate("pagenav_lastlink")."\";");
			}
		} else {
			if ($curpage==$pagenumber) {
				eval("\$pagenav .= \"".gettemplate("pagenav_curpage")."\";");
			} else {
				eval("\$pagenav .= \"".gettemplate("pagenav_pagelink")."\";");
			}
		}
	}
	eval("\$pagenav = \"".gettemplate("pagenav")."\";");
	return $pagenav;

}

// ###################### Start buildpostbit #######################
$firstnew = 0;
function getpostbit($post) {
// sorts through all the stuff to return the postbit template

	// user
	global $bbuserinfo,$session,$ignore,$cookietimeout;
	// showthread
	global $counter,$firstnew,$sigcache,$highlight,$postid,$forum;
	// global options
	global $showdeficon,$displayemails,$enablepms,$allowsignatures,$wordwrap,$dateformat,$timeformat,$logip,$replacewords,$postsperday,$avatarenabled,$registereddateformat,$viewattachedimages;

	$datecut = time() - $cookietimeout;

	if ($counter%2==0) {
		$post[backcolor]="{firstaltcolor}";
		$post[bgclass] = "alt1";
	} else {
		$post[backcolor]="{secondaltcolor}";
		$post[bgclass] = "alt2";
	}

	// find first new post
	if (isset($bbuserinfo[lastvisit])) {
		if ($post[dateline]>$bbuserinfo[lastvisit] and $firstnew==0) {
			$firstnew=1;
			$post[firstnewinsert]="<a name=\"newpost\"></a>";
		} else {
			$post[firstnewinsert]="";
		}
	}

	$post[postdate]=vbdate($dateformat,$post[dateline]);
	$post[posttime]=vbdate($timeformat,$post[dateline]);

	if ($wordwrap!=0) {
		$post[title]=dowordwrap($post[title]);
	}

	if ($post[attachmentid]!=0 and $post[attachmentvisible]) {
		$post[attachmentextension]=strtolower(getextension($post[filename]));
		if ($post[attachmentextension]=="gif" or $post[attachmentextension]=="jpg" or $post[attachmentextension]=="jpeg" or $post[attachmentextension]=="jpe" or $post[attachmentextension]=="png") {
			if (($viewattachedimages) and ($bbuserinfo[userid]==0 or $bbuserinfo[showimages])) {
				eval("\$post[attachment] = \"".gettemplate("postbit_attachmentimage")."\";");
			} else {
				eval("\$post[attachment] = \"".gettemplate("postbit_attachment")."\";");
			}
		} else {
			eval("\$post[attachment] = \"".gettemplate("postbit_attachment")."\";");
		}
	} else {
		$post[attachment]="";
	}
//AnkisethGallant's Username Edits

	if ($post[field6]!="" && $post[field9]=="1" && $post[field10]=="1") {
		eval("\$post[namecolor] = \"".gettemplate("postbit_nameciu")."\";");
	} elseif ($post[field6]!="" && $post[field9]=="1" && $post[field10]=="2") {
		eval("\$post[namecolor] = \"".gettemplate("postbit_nameci")."\";");
	} elseif ($post[field6]!="" && $post[field9]=="2" && $post[field10]=="2") {
		eval("\$post[namecolor] = \"".gettemplate("postbit_namec")."\";");
	} elseif ($post[field6]!="" && $post[field9]=="2" && $post[field10]=="1") {
		eval("\$post[namecolor] = \"".gettemplate("postbit_namecu")."\";");
	} elseif ($post[field6]=="" && $post[field9]=="1" && $post[field10]=="1") {
		eval("\$post[namecolor] = \"".gettemplate("postbit_nameiu")."\";");
	} elseif ($post[field6]=="" && $post[field9]=="1" && $post[field10]=="2") {
		eval("\$post[namecolor] = \"".gettemplate("postbit_namei")."\";");
	} elseif ($post[field6]=="" && $post[field9]=="2" && $post[field10]=="1") {
		eval("\$post[namecolor] = \"".gettemplate("postbit_nameu")."\";");
	} else {
		eval("\$post[namecolor] = \"".gettemplate("postbit_namenothing")."\";");
	}
	if ($post[edituserid]!=0) {
		if ($post['edituserid']!=$post['userid']) {
			$edituser=getuserinfo($post[edituserid]);
		} else {
			$edituser = $post;
		}
		$post[edittime]=vbdate($timeformat,$post[editdate]);
		$post[editdate]=vbdate($dateformat,$post[editdate]);
		eval("\$post[editedby] = \"".gettemplate("postbit_editedby")."\";");
	} else {
		$post[editedby]="";
	}
I just put up to the point of the edit I'm supposed to do for this hack. Thanks a bunch.
Reply With Quote
  #31  
Old 05-07-2002, 07:26 PM
AnkisethGallant's Avatar
AnkisethGallant AnkisethGallant is offline
 
Join Date: Oct 2001
Location: Las Vegas
Posts: 113
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

That functions.php section looks right from what I remember (I'm not at my comp). When you say you edited the file, you mean the postbit template, right?

MAKE SURE ALL your profile fields match the correct FIELD NUMBERS from what I specified in the readme. Also, make sure ALL the templates are done correctly. If you're still having problems I'll try and figure it out.
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 12:53 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.11274 seconds
  • Memory Usage 2,317KB
  • 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
  • (1)bbcode_code
  • (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
  • (4)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