+UPDATE+
+Thanks to Link14716, your selections stay selected after your users save them in their profiles. The ZIP file has been updated with the new code. Or if you just want the code then check out THIS post.
+IF YOUR HACK HAS THE ANIMAL 'CATEPILLER' MAKE SURE YOU FIX THE SPELLING ERROR!! Silly me, I misspelled the word 'catepiller'. You need to update /includes/functions_showthread.php and the MODIFYPROFILE template from the word 'catepillar' to 'catepiller' with an E.
*Note: I no longer support this mod in any form or fashion. Please don't PM me with questions about it.
Show Your Support
This modification may not be copied, reproduced or published elsewhere without author's permission.
This could well be the replacement my memebrs neeed - they are bored by the RPG stats type hacks - I think pets could do them good Looking forward to v2
if ($reputation_value > 500)
{ // bright green bars take 200 pts not the normal 100
$reputation_value = ($reputation_value - ($reputation_value - 500)) + (($reputation_value - 500) / 2);
}
$reputationbars = intval($reputation_value / 100); // award 1 reputation bar for every 100 points
if ($reputationbars > 10)
{
$reputationbars = 10;
}
if ($post['showreputation'] == 0 AND $vboptions['reputationhide'] == 1)
{
$posneg = 'off';
$post['level'] = $vbphrase['reputation_disabled'];
eval('$post[\'reputationdisplay\'] = "' . fetch_template('postbit_reputation') . '";');
}
else
{
for ($i = 0; $i <= $reputationbars; $i++)
{
if ($i >= 5)
{
$posneg = $reputationhighgif;
}
else
{
$posneg = $reputationgif;
}
eval('$post[\'reputationdisplay\'] .= "' . fetch_template('postbit_reputation') . '";');
}
}
return true;
}
// ###################### Start doimicons #######################
function construct_im_icons(&$userinfo, $ignore_off_setting = false)
{
global $vboptions, $stylevar, $show, $vbphrase;
// ###################### Start getpostbit #######################
function construct_postbit($post, $maintemplatename = 'postbit', $alternate = '')
{
// sorts through all the stuff to return the postbit template
// user
global $bbuserinfo, $session, $ignore, $permissions, $_REQUEST;
// showthread
global $counter, $firstnew, $highlight, $postid, $forum, $replacewords, $bgclass, $altbgclass;
global $thread, $threadedmode, $tachyusers, $SHOWQUICKREPLY, $onload;
global $spacer_open, $spacer_close, $parsed_postcache;
// global options
global $vboptions, $stylevar, $vbphrase, $DB_site, $datastore, $_USEROPTIONS, $style, $show, $usergroupcache;
// do word wrap
if ($vboptions['wordwrap'])
{
$post['title'] = fetch_word_wrapped_string($post['title']);
}
$post['title'] = fetch_censored_text($post['title']);
// get attachment info
if (is_array($post['attachments']))
{
if (can_moderate($foruminfo['forumid'], 'canmoderateattachments') OR $post['userid'] == $bbuserinfo['userid'])
{
$show['modattachmentlink'] = true;
}
else
{
$show['modattachmentlink'] = false;
}
$show['attachments'] = true;
$show['moderatedattachment'] = $show['thumbnailattachment'] = $show['otherattachment'] = $show['imageattachment'] = false;
$attachcount = sizeof($post['attachments']);
$thumbcount = 0;
if (!$vboptions['attachthumbs'] AND !$vboptions['viewattachedimages'])
{
$showimagesprev = $bbuserinfo['showimages'];
$bbuserinfo['showimages'] = false;
}
foreach($post['attachments'] AS $attachmentid => $attachment)
{
if($attachment['thumbnailsize'] == $attachment['filesize'])
{ // This is an image that is already thumbnail sized..
$attachment['hasthumbnail'] = 0;
$attachment['forceimage'] = 1;
}
$attachment['filename'] = fetch_censored_text(htmlspecialchars_uni($attachment['filename']));
$attachment['attachmentextension'] = strtolower(file_extension($attachment['filename']));
$attachment['filesize'] = vb_number_format($attachment['filesize'], 1, true);
// get edited by
if ($post['edit_userid'])
{
$post['edit_date'] = vbdate($vboptions['dateformat'], $post['edit_dateline'], true);
$post['edit_time'] = vbdate($vboptions['timeformat'], $post['edit_dateline']);
$show['postedited'] = true;
}
else
{
$show['postedited'] = false;
}
// get new/old post statusicon
if ($post['dateline'] > $bbuserinfo['lastvisit'])
{
$post['statusicon'] = 'new';
$post['statustitle'] = $vbphrase['unread'];
}
else
{
$post['statusicon'] = 'old';
$post['statustitle'] = $vbphrase['old'];
}
// show default icon
if ((!$forum['allowicons'] OR $post['iconid'] == 0) AND THIS_SCRIPT != 'announcement')
{
if (!empty($vboptions['showdeficon']))
{
$post['iconpath'] = $vboptions['showdeficon'];
$post['icontitle'] = $vbphrase['default'];
}
}
// *******************************************************
// not posted by an unregistered user so get profile stuff
if ($post['userid'])
{
// get rank
if (!$gotrank[$post['userid']])
{
eval($datastore['rankphp']);
$gotrank["$post[userid]"] = $post['rank'];
}
else
{
$post['rank'] = $gotrank["$post[userid]"];
}
// get online status
fetch_online_status($post, true);
// get avatar
if ($post['avatarid'])
{
$avatarurl = $post['avatarpath'];
}
else
{
if ($post['hascustomavatar'] AND $vboptions['avatarenabled'])
{
if ($vboptions['usefileavatar'])
{
$avatarurl = "$vboptions[avatarurl]/avatar$post[userid]_$post[avatarrevision].gif";
}
else
{
$avatarurl = "image.php?$session[sessionurl]u=$post[userid]&dateline=$post[avatardateline]";
}
}
else
{
$avatarurl = '';
}
}
if (empty($avatarurl) OR ($bbuserinfo['userid'] > 0 AND !($bbuserinfo['showavatars'])))
{
$show['avatar'] = false;
}
else
{
$show['avatar'] = true;
}
// get custom title
if ($post['customtitle'] == 2)
{ // user title is not set by admin staff, so parse it.
$post['usertitle'] = htmlspecialchars_uni($post['usertitle']);
}
// get join date & posts per day
$jointime = (TIMENOW - $post['joindate']) / 86400; // Days Joined
if ($jointime < 1)
{ // User has been a member for less than one day.
$postsperday = $post['posts'];
}
else
{
$postsperday = vb_number_format($post['posts'] / $jointime, 2);
}
$post['joindate'] = vbdate($vboptions['registereddateformat'], $post['joindate']);
// format posts number
$post['posts'] = vb_number_format($post['posts']);
// assign $userinfo from $post
$userinfo = &$post;
$show['profile'] = true;
$show['search'] = true;
$show['buddy'] = true;
$show['emaillink'] = iif ($post['showemail'] AND $vboptions['displayemails'] AND (!$vboptions['secureemail'] OR ($vboptions['secureemail'] AND $vboptions['enableemail'])), true, false);
$show['homepage'] = iif ($post['homepage'] != '' AND $post['homepage'] != 'http://', true, false);
$show['pmlink'] = iif ($post['receivepm'] AND $vboptions['enablepms'], true, false);
// get reputation
if ($vboptions['reputationenable'] == 1)
{
fetch_reputation_image($post);
$show['reputation'] = true;
}
else
{
$show['reputation'] = false;
}
// IM icons
construct_im_icons($post);
// Generate Age
if ($vboptions['enableage'])
{
if (!$year)
{
$year = vbdate('Y', TIMENOW, false, false);
$month = vbdate('n', TIMENOW, false, false);
$day = vbdate('j', TIMENOW, false, false);
}
if (empty($gotage["$post[userid]"]))
{
$date = explode('-', $post['birthday']);
if ($year > $date[2] AND $date[2] != '0000')
{
$post['age'] = $year - $date[2];
if ($month < $date[0] OR ($month == $date[0] AND $day < $date[1]))
{
$post['age']--;
}
if ($post['age'] < 101)
{
$gotage["$post[userid]"] = $post['age'];
}
else
{
unset($post['age']);
}
}
}
else
{
$post['age'] = $gotage["$post[userid]"];
}
}
// highlight words from search engine ($_REQUEST[highlight])
if (is_array($replacewords) AND ($_REQUEST['postid'] == $post['postid'] OR empty($_REQUEST['postid'])) )
{
$post['message'] = preg_replace('#(^|>)([^<]+)(?=<|$)#sUe', "process_highlight_postbit('\\2', \$replacewords, '\\1')", $post['message']);
}
// hide edit button if they can't use it
$forumperms = fetch_permissions($thread['forumid']);
if (
!$thread['isdeleted'] AND (
can_moderate($thread['forumid'], 'caneditposts') OR
can_moderate($thread['forumid'], 'candeleteposts') OR
(
$thread['open'] AND
$post['userid'] == $bbuserinfo['userid'] AND
($forumperms & CANEDITPOST) AND
( $post['dateline'] >= (TIMENOW - ($vboptions['edittimelimit'] * 60)) OR
$vboptions['edittimelimit'] == 0
)
))
)
{
// can edit or delete this post, so show the link
$post['editlink'] = "editpost.php?$session[sessionurl]do=editpost&p=$post[postid]";
}
else
{
$post['editlink'] = false;
}
if (!$thread['isdeleted'])
{
$post['replylink'] = "newreply.php?$session[sessionurl]do=newreply&p=$post[postid]";
}
else
{
$post['replylink'] = false;
}
$post['forwardlink'] = false;
$show['reportlink'] = iif($bbuserinfo['userid'] AND $bbuserinfo['userid'] != $post['userid'], true, false);
$show['postcount'] = iif($post['postcount'], true, false);
$show['reputationlink'] = iif($vboptions['reputationenable'] AND $bbuserinfo['userid'] AND $post['userid'] AND !($usergroupcache["$post[usergroupid]"]['genericoptions'] & ISBANNEDGROUP), true, false);
break;
}
Is that ok if i download your zip file at the first page coz i see many codes here has changed many times !!! I'm using RC4 ... does this mod working on it ? anyone exp ????
I personally have not tested it on RC4. Although I have heard rumors that it does work on it. We won't be updated the code until we release v2.0 of this hack.
I personally have not tested it on RC4. Although I have heard rumors that it does work on it. We won't be updated the code until we release v2.0 of this hack.
this's a kool mod !!! .. i think i'll wait until the new ver 2.0 and I can i use it on VB3 G .. where's your site address mate ?