vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   vB3 Pets (https://vborg.vbsupport.ru/showthread.php?t=61008)

C.Birch 02-02-2004 07:21 PM

how about a place you can send your pet to be looked after? incase you go on hoilday dont fprget doing this will cost you so much money thats if your adding some type of money system that will let you buy things for the pet.

AutomatikStudio 02-02-2004 07:25 PM

Quote:

Originally Posted by C.Birch
how about a place you can send your pet to be looked after? incase you go on hoilday dont fprget doing this will cost you so much money thats if your adding some type of money system that will let you buy things for the pet.

On thing we are still debating is where to add a money system or wait until a store comes hack comes out and then integrate it with that...but good idea about having to take your bet to be looked at..."pet sitting"

Cyricx 02-02-2004 07:47 PM

There's a store hack out called Yoshy, can you add the "money system" for it? :)

Cyricx

AutomatikStudio 02-02-2004 07:48 PM

Quote:

Originally Posted by Cyricx
There's a store hack out called Yoshy, can you add the "money system" for it? :)

Yoshy's store hack is still in Beta stage...we wouldn't use it until it goes Gold.

GamerzWorld 02-02-2004 07:53 PM

Btw the catepillar wasnt working. It was spelt different in images folder than what it was coded to. Anyway nice hack. More pets would be good. And if you could animate :) So they move. Also if you dont get 5 make the pets look ill and start to loose hp

C.Birch 02-02-2004 08:07 PM

i personaly think the money system sould be its own thing not a addon for a stores hack due to the fact theres a number of them being made and not everyone would want to install a set hack to get a other hack fully working.

AutomatikStudio 02-02-2004 08:09 PM

Quote:

Originally Posted by GamerzWorld
Btw the catepillar wasnt working. It was spelt different in images folder than what it was coded to. Anyway nice hack. More pets would be good. And if you could animate :) So they move. Also if you dont get 5 make the pets look ill and start to loose hp

Thanks for pointing out the spelling error...the ZIP folder has been updated w/ the correct spelling of the code. And we are planning on having animated pets!

AutomatikStudio 02-02-2004 08:30 PM

Quote:

Originally Posted by C.Birch
i personaly think the money system sould be its own thing not a addon for a stores hack due to the fact theres a number of them being made and not everyone would want to install a set hack to get a other hack fully working.

Well what about people who end up installing the store hack? Then there would be 2 money systems for somebody who has the Pets and Store hacks installed...

C.Birch 02-02-2004 08:50 PM

erm thats true also, not a easy one this, not when theres going end up with like 3 store hacks going by number of people making them.

I guess it will go back just how much time you want to put in to the hack. one the best ways would to having a picking in the settings from pet shop store, and then other stores so people could use a store system made in to this hack or if they already got a stores hack use that but that at a guess would mean alot of coding.

AutomatikStudio 02-02-2004 08:54 PM

One thought we had was to possibly let the amount of money you have be determined by the health of your pet.

Sadie Frost 02-02-2004 09:03 PM

Quote:

Originally Posted by AutomatikStudio
One thought we had was to possibly let the amount of money you have be determined by the health of your pet.

Added this and my members are already clamoring for Pokemon-esque battles lol :D

TheComputerGuy 02-02-2004 09:30 PM

My users are wanting to spam this one thread to keep their pets healthy :(

But they do love the pets and would love a place for the pokemon type battle thing.

Hialls 02-03-2004 01:10 PM

Quote:

Originally Posted by digitalSite
hmm..I put the "bars" and the "pets" folder inside /forums/images/ directory...
I do see the Pet info to fill out, i enter some info, and then press Save. Then i posted a test post to see if I see the pet graphic...but my post is just as if I didn't install the pet hack. SO I don't see the pet graphic or other info that is supposed to be in the post...I think it should show in the post, by my username or something..i don't see it there :(

This is my postbit template where i put that $vb3petsthreadbit variable:
Code:

<div>
$vbphrase[posts]: $post[posts]
        $vb3petsthreadbit
<if condition="$show['reputation']">$post[reputationdisplay]</if>
                                        </div>


Thats correctly inputted are you sure you added all the code???

trinitym 02-03-2004 05:14 PM

Quote:

Originally Posted by digitalSite
hmm..I put the "bars" and the "pets" folder inside /forums/images/ directory...
I do see the Pet info to fill out, i enter some info, and then press Save. Then i posted a test post to see if I see the pet graphic...but my post is just as if I didn't install the pet hack. SO I don't see the pet graphic or other info that is supposed to be in the post...I think it should show in the post, by my username or something..i don't see it there :(

This is my postbit template where i put that $vb3petsthreadbit variable:
Code:

<div>
$vbphrase[posts]: $post[posts]
        $vb3petsthreadbit
<if condition="$show['reputation']">$post[reputationdisplay]</if>
                                        </div>


Did you actually create the new $vb3petsthreadbit template? And if you have several styles [vbulletin themes], you might have to add the variable to each of them and/or to the parent styles. If you're using postbit_legacy, might want to check that you've added it to that postbit template instead of the original.

fasteddie 02-03-2004 08:11 PM

pretty neat hack, but the correct spelling is caterpillar
:P

AutomatikStudio 02-03-2004 08:55 PM

Quote:

Originally Posted by fasteddie
pretty neat hack, but the correct spelling is caterpillar
:P

Arghhhh...I think I'll fix that for v2.0 ;)

alzibub 02-03-2004 09:48 PM

Loved this hack on VB2 - and so glad it is ported to VB3 !!!

Installed no issues - thanks for another quality hack !

Can wait for the future upgrades planned... good luck..

Alone Wolf 02-04-2004 03:53 PM

I think while waiting for RPG battle for vbb 3.0.0, this mods is better!

msimplay 02-05-2004 02:17 AM

i want to add this hack now but i'm wondering will there be easy upgrade instructions from version 1.0
because i'm holding off thinking wait for 2.0 but i'd like to use it now

AutomatikStudio 02-05-2004 02:20 AM

Quote:

Originally Posted by msimplay
i want to add this hack now but i'm wondering will there be easy upgrade instructions from version 1.0
because i'm holding off thinking wait for 2.0 but i'd like to use it now

We will include instructions on how to upgrade which shouldn't be hard to follow. And it could be a few weeks to a month before we release 2.0

msimplay 02-05-2004 02:34 AM

Quote:

Originally Posted by AutomatikStudio
We will include instructions on how to upgrade which shouldn't be hard to follow. And it could be a few weeks to a month before we release 2.0

thanks :)
great install looking forward to 2.0 with the great features outlined

Martin 02-05-2004 06:35 AM

has anyone modified this to restrict pets to certain usergroups?

If someone has already done that, sharing the nods would be nice. It would save me duplicating effort. I'm not planning to install until vB3 comes out final.

TomokiG 02-05-2004 06:45 AM

Restriction is very easy to do by modifying the template "modifyprofile":
Change from
Code:

<option value="255" <if condition="$bbuserinfo[pettype] == 255">selected</if>>Adminpet</option>
... to ...
Code:

<if condition="$bbuserinfo['usergroupid'] == 6"><option value="255" <if condition="$bbuserinfo[pettype] == 255">selected</if>>Adminpet</option></if>
In that case only the admins have access to that pet... You can also use Logical OR for adding other Groups...

?TomokiG?

Topdog 02-07-2004 07:03 PM

Great addon. Ive altered it slightly to include options for colours and different types of pet. I'd be great if they could grow / evolve at certain levels. If you want an idea of what the pet tables look like within the new vb3 postbit you can check my forum here: http://www.ragol.co.uk/forums/

jackyhow 02-08-2004 09:52 AM

very good job!!!!

Hialls 02-08-2004 09:06 PM

Well me and AutomatikStudio are well into Vb3 Pets v2.00. The store system seems to be the majoy new addition. We are also thinking of having a flash option :P. So pets can react to what you do to them. I should beable to give you all some screen shot to druel over soon :D

Hiall - peace out

msimplay 02-08-2004 09:24 PM

Quote:

Originally Posted by Hialls
Well me and AutomatikStudio are well into Vb3 Pets v2.00. The store system seems to be the majoy new addition. We are also thinking of having a flash option :P. So pets can react to what you do to them. I should beable to give you all some screen shot to druel over soon :D

Hiall - peace out

definitely looking forward to this

SloppyGoat 02-08-2004 11:34 PM

Although I probably wouldn't use this hack, for fear that people would post senseless spam just to keep their critters happy, I think it's a great hack! LOL I'm sure it's alot of fun. ;)

Dras 02-09-2004 12:11 AM

Umm will there be a battle system placed in later versions? This would be nice lol.

AutomatikStudio 02-09-2004 01:54 AM

Quote:

Originally Posted by Dras
Umm will there be a battle system placed in later versions? This would be nice lol.

The plan (as of now) is to have the battle system in place for this next upcoming version (v2.0)...hopefully later this week we'll be releasing screenshots and a list of features for v2...rock.

Dras 02-09-2004 02:33 AM

Sweet!

tomp 02-09-2004 01:24 PM

great mod, ill wait till vb3 gold to install it

Natch 02-09-2004 01:45 PM

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 :)

msimplay 02-09-2004 06:56 PM

can someone tell me how all the levels and stat are worked out in this hack
user of mine is asking and i dont have a clue :o
i

Kerr 02-11-2004 04:34 PM

Trying to get this to work on on RC4. I dont see any reason why it cant. I am at the very beginning and need to know if I cant find this bit of code
PHP Code:

  $show['messageicon'] = iif($post['iconpath'], truefalse); 

in my functions_showthread.php what do I look for? Here is my functions_showthread.php

PHP Code:

<?php
/*======================================================================*\
|| #################################################################### ||
|| # vBulletin 3.0.0 Release Candidate 4 - Licence Number 17505142
|| # ---------------------------------------------------------------- # ||
|| # Copyright ?2000?2004 Jelsoft Enterprises Ltd. All Rights Reserved. ||
|| # This file may not be redistributed in whole or significant part. # ||
|| # ---------------- VBULLETIN IS NOT FREE SOFTWARE ---------------- # ||
|| # [url]http://www.vbulletin.com[/url] | [url]http://www.vbulletin.com/license.html[/url] # ||
|| #################################################################### ||
\*======================================================================*/

error_reporting(E_ALL & ~E_NOTICE);

require_once(
'./includes/functions_bbcodeparse.php');

// ###################### Start getreputationimage #######################
function fetch_reputation_image(&$post)
{
    global 
$vboptions$stylevar$vbphrase;

    if (!
$vboptions['reputationenable'])
    {
        return 
true;
    }

    
$reputation_value $post['reputation'];
    if (
$post['reputation'] < AND $post['reputation'] >=-100)
    {
        
$reputationgif 'balance';
        
$reputation_value = ($post['reputation'] * -1);
    }
    else if (
$post['reputation'] < -100)
    {
        
$reputationgif 'neg';
        
$reputationhighgif 'highneg';
        
$reputation_value = ($post['reputation'] * -1);
    }
    else if (
$post['reputation'] == 0)
    {
        
$reputationgif 'balance';
    }
    else
    {
        
$reputationgif 'pos';
        
$reputationhighgif 'highpos';
    }

    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'] == 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;

    
$show['hasimicons'] = false;

    
$userinfo['icq'] = intval($userinfo['icq']);
    if (!empty(
$userinfo['icq']) AND ($vboptions['showimicons'] OR $ignore_off_setting))
    {
        eval(
'$userinfo[\'icqicon\'] = "' fetch_template('im_icq') . '";');
        
$userinfo['showicq'] = true;
        
$show['hasimicons'] = true;
    }
    else
    {
        
$userinfo['icqicon'] = '';
        
$userinfo['showicq'] = false;
    }

    if (
$userinfo['aim'] != '' AND ($vboptions['showimicons'] OR $ignore_off_setting))
    {
        eval(
'$userinfo[\'aimicon\'] = "' fetch_template('im_aim') . '";');
        
$userinfo['showaim'] = true;
        
$show['hasimicons'] = true;
    }
    else
    {
        
$userinfo['aimicon'] = '';
        
$userinfo['showaim'] = false;
    }

    if (
$userinfo['yahoo'] != '' AND ($vboptions['showimicons'] OR $ignore_off_setting))
    {
        eval(
'$userinfo[\'yahooicon\'] = "' fetch_template('im_yahoo') . '";');
        
$userinfo['showyahoo'] = true;
        
$show['hasimicons'] = true;
    }
    else
    {
        
$userinfo['yahooicon'] = '';
        
$userinfo['showyahoo'] = false;
    }

    if (
$userinfo['msn'] != '' AND ($vboptions['showimicons'] OR $ignore_off_setting))
    {
        eval(
'$userinfo[\'msnicon\'] = "' fetch_template('im_msn') . '";');
        
$userinfo['showmsn'] = true;
        
$show['hasimicons'] = true;
    }
    else
    {
        
$userinfo['msnicon'] = '';
        
$userinfo['showmsn'] = false;
    }

}

// ###################### 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;

    static 
$gotrank$sigcache$sigperms$gotage$month$day$year$counter;

    
// hide users in Coventry from non-staff members
    
if ($tachyuser in_coventry($post['userid']) AND !can_moderate($thread['forumid']))
    {
        return;
    }

    
$counter ++;

    
exec_switch_bg();

    
$post array_merge($postconvert_bits_to_array($post['options'], $_USEROPTIONS));

    if (!
$vboptions['allowthreadedmode'])
    {
        
$threadedmode 0;
    }

    
// set $scrolltothis value if necessary
    
if (THIS_SCRIPT == 'showthread')
    {
        if (
$post['postid'] == $postid)
        {
            
$scrolltothis " id=\"currentPost\"";
            if (
$threadedmode == 0)
            {
                
$onload "if (is_ie || is_moz) { fetch_object('currentPost').scrollIntoView(!is_moz); }";
            }
        }
        else
        {
            
$scrolltothis '';
        }
    }

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

    
// format date/time
    
$post['postdate'] = vbdate($vboptions['dateformat'], $post['dateline'], true);
    
$post['posttime'] = vbdate($vboptions['timeformat'], $post['dateline']);

    
// 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'], 1true);

            if (
$attachment['visible'])
            {
                switch(
$attachment['attachmentextension'])
                {
                    case 
'gif':
                    case 
'jpg':
                    case 
'jpeg':
                    case 
'jpe':
                    case 
'png':
                    case 
'bmp':
                        if (!
$bbuserinfo['showimages'])
                        {
                            eval(
'$post[\'imageattachmentlinks\'] .= "' fetch_template('postbit_attachment') . '";');
                            
$show['imageattachmentlink'] = true;
                        }
                        else if (
$vboptions['attachthumbs'])
                        {
                            if (
$attachment['hasthumbnail'])
                            {
                                
$thumbcount++;
                                if (
$thumbcount >= $vboptions['attachrow'])
                                {
                                    
$thumbcount 0;
                                    
$show['br'] = true;
                                }
                                else
                                {
                                    
$show['br'] = false;
                                }
                                eval(
'$post[\'thumbnailattachments\'] .= "' fetch_template('postbit_attachmentthumbnail') . '";');
                                
$show['thumbnailattachment'] = true;
                            }
                            else if (
$attachment['forceimage'])
                            {
                                eval(
'$post[\'imageattachments\'] .= "' fetch_template('postbit_attachmentimage') . '";');
                                
$show['imageattachment'] = true;
                            }
                            else
                            {
                                eval(
'$post[\'imageattachmentlinks\'] .= "' fetch_template('postbit_attachment') . '";');
                                
$show['imageattachmentlink'] = true;
                            }
                        }
                        else if (
$vboptions['viewattachedimages'] == OR ($vboptions['viewattachedimages'] == AND $attachcount == 1))
                        {
                            eval(
'$post[\'imageattachments\'] .= "' fetch_template('postbit_attachmentimage') . '";');
                            
$show['imageattachment'] = true;
                        }
                        else
                        {
                            eval(
'$post[\'imageattachmentlinks\'] .= "' fetch_template('postbit_attachment') . '";');
                            
$show['imageattachmentlink'] = true;
                        }
                        break;
                    default:
                        eval(
'$post[\'otherattachments\'] .= "' fetch_template('postbit_attachment') . '";');
                        
$show['otherattachment'] = true;
                }
            }
            else
            {
                eval(
'$post[\'moderatedattachments\'] .= "' fetch_template('postbit_attachmentmoderated') . '";');
                
$show['moderatedattachment'] = true;
            }
        }
        if (!
$vboptions['attachthumbs'] AND !$vboptions['viewattachedimages'])
        {
            
$bbuserinfo['showimages'] = $showimagesprev;
        }
    }
    else
    {
        
$show['attachments'] = false;
    }

    
// 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($posttrue);

        
// 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]&amp;dateline=$post[avatardateline]";
                }
            }
            else
            {
                
$avatarurl '';
            }
        }
        if (empty(
$avatarurl) OR ($bbuserinfo['userid'] > 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'] / $jointime2);
        }
        
$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'])), truefalse);
        
$show['homepage'] = iif ($post['homepage'] != '' AND $post['homepage'] != 'http://'truefalse);
        
$show['pmlink'] = iif ($post['receivepm'] AND $vboptions['enablepms'], truefalse);

        
// 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'TIMENOWfalsefalse);
                
$month vbdate('n'TIMENOWfalsefalse);
                
$day vbdate('j'TIMENOWfalsefalse);
            }
            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]"];
            }
        }

        
// Check signature permission
        
if (!isset($sigperms["$post[userid]"]))
        {
            
$checkperms cache_permissions($postfalse);

            if (
$checkperms['genericpermissions'] & CANUSESIGNATURE)
            {
                
$sigperms["$post[userid]"] = true;
            }
            else
            {
                
$sigperms["$post[userid]"] = false;
            }
        }

        
// get signature
        
if ($post['showsignature'] AND $vboptions['allowsignatures'] AND trim($post['signature']) != '' AND (!$bbuserinfo['userid'] OR $bbuserinfo['showsignatures']) AND $sigperms[$post['userid']])
        {
            if (!isset(
$sigcache["$post[userid]"]))
            {
                
$parsed_postcache['skip'] = true;
                
$post['signature'] = parse_bbcode($post['signature'], 'nonforum'$vboptions['allowsmilies']);
                
$sigcache["$post[userid]"] = $post['signature'];
            }
            else
            {
                
$post['signature'] = $sigcache["$post[userid]"];
            }
        }
        else
        {
            
$post['signature'] = '';
        }
    }
    else 
// posted by a guest - set defaults for profile stuff
    
{
        
$post['rank'] = '';
        
$postsperday 0;
        
$post['displaygroupid'] = 1;
        
$post['musername'] = $post['username'] = $post['postusername'];
        
$post['musername'] = fetch_musername($post'displaygroupid''musername');
        
$post['usertitle'] = $vbphrase['guest'];
        
$post['joindate'] = '';
        
$post['posts'] = 'n/a';
        
$post['avatar'] = '';
        
$post['profile'] = '';
        
$post['email'] = '';
        
$post['useremail'] = '';
        
$post['icqicon'] = '';
        
$post['aimicon'] = '';
        
$post['yahooicon'] = '';
        
$post['msnicon'] = '';
        
$post['homepage'] = '';
        
$post['findposts'] = '';
        
$post['signature'] = '';
        
$post['reputationdisplay'] = '';
        
$onlinestatus '';
        
$onlineresult 0;
        
$show['avatar'] = false;
        
$show['reputation'] = false;
        
$show['pmlink'] = false;
        
$show['homepage'] = false;
        
$show['emaillink'] = false;
        
$show['profile'] = false;
        
$show['search'] = false;
        
$show['buddy'] = false;
    }

    
// do ip addresses
    
$post['iplogged'] = '';
    if (
$post['ip'] != '')
    {
        if (
$vboptions['logip'] == 2)
        {
            
$show['ip'] = true;
            eval(
'$post[\'iplogged\'] .= "' fetch_template('postbit_ip') . '";');
        }
        else if (
$vboptions['logip'] == AND can_moderate($thread['forumid'], 'canviewips'))
        {
            
$show['ip'] = false;
            eval(
'$post[\'iplogged\'] .= "' fetch_template('postbit_ip') . '";');
        }
    }

    
// do alternate postbit types
    
switch($alternate)
    {
        
// usernote style postbit
        
case 'usernote':
            
$post['message'] = parse_usernote_bbcode($post['pagetext'], $post['allowsmilies']);

            
$post['editlink'] = "usernote.php?$session[sessionurl]do=editnote&usernoteid=$post[usernoteid]";
            
$post['replylink'] = false;
            
$post['forwardlink'] = false;
            
$show['postcount'] = false;
            
$show['reputationlink'] = false;
            
$show['reportlink'] = false;
            break;

        
// announcement style postbit
        
case 'announcement':
            
$post['message'] = parse_bbcode($post['pagetext'], 'announcement'$post['allowsmilies']);
            
$post['editlink'] = false;
            
$post['replylink'] = false;
            
$post['forwardlink'] = false;
            
$show['postcount'] = false;
            
$show['reputationlink'] = false;
            
$show['reportlink'] = false;
            break;

        
// private message style postbit
        
case 'pm':
            
$privatemessage true;

            
$post['editlink'] = false;
            
$post['replylink'] = "private.php?$session[sessionurl]do=newpm&amp;pmid=$post[pmid]";
            
$post['forwardlink'] = "private.php?$session[sessionurl]do=newpm&amp;forward=1&amp;pmid=$post[pmid]";
            
$show['postcount'] = false;
            
$show['reputationlink'] = false;
            
$show['reportlink'] = false;
            break;

        
// showthread / showpost style Postbit
        
default:
            if (!empty(
$post['pagetext_html']))
            {
                
$parsed_postcache['skip'] = true;
                if (
$post['hasimages'])
                {
                    
$post['message'] = handle_bbcode_img($post['pagetext_html'], $forum['allowimages']);
                }
                else
                {
                    
$post['message'] = &$post['pagetext_html'];
                }
            }
            else
            {
                
$parsed_postcache['skip'] = false;
                
$post['message'] = parse_bbcode($post['pagetext'], $forum['forumid'], $post['allowsmilie']);
            }

            
// 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&amp;p=$post[postid]";
            }
            else
            {
                
$post['editlink'] = false;
            }

            if (!
$thread['isdeleted'])
            {
                
$post['replylink'] = "newreply.php?$session[sessionurl]do=newreply&amp;p=$post[postid]";
            }
            else
            {
                
$post['replylink'] = false;
            }
            
$post['forwardlink'] = false;
            
$show['reportlink'] = iif($bbuserinfo['userid'] AND $bbuserinfo['userid'] != $post['userid'], truefalse);
            
$show['postcount'] = iif($post['postcount'], truefalse);
            
$show['reputationlink'] = iif($vboptions['reputationenable'] AND $bbuserinfo['userid'] AND $post['userid'] AND !($usergroupcache["$post[usergroupid]"]['genericoptions'] & ISBANNEDGROUP), truefalse);
            break;
    }

    eval(
'$post[\'buttons\'] = "' fetch_template('postbit_buttons') . '";');

    
// do posts from ignored users
    
if ($tachyuser AND THIS_SCRIPT != 'showpost' AND THIS_SCRIPT != 'private')
    {
        
$maintemplatename 'postbit_ignore_global';
    }
    else if (
$ignore["$post[userid]"]/* AND !in_array($post['userid'], explode(' ', $bbuserinfo['buddylist']))*/)
    {
        
$maintemplatename 'postbit_ignore';
        
$show['showpostlink'] = ($alternate != 'usernote');
    }

    
$show['messageicon'] = iif($post['iconpath'], truefalse);
    eval(
'$retval = "' fetch_template($maintemplatename) . '";');
    return 
$retval;
}

// ###################### Start process_highlight_postbit #######################
function process_highlight_postbit($text$words$prepend)
{
    
$text str_replace('\"''"'$text);
    foreach (
$words AS $replaceword)
    {
        
$text preg_replace('#(?<=[\s"\]>()]|^)(' $replaceword ')(([.,:;-?!()\s"<\[]|$))#siU''<span class="highlight">\\1</span>\\2'$text);
        
//$text = preg_replace('#(?<=[^\w=])(' . $replaceword . ')(?=[^\w=])#siU', '<span class="highlight">\\1</span>', $text);
    
}

    return 
"$prepend$text";
}

/*======================================================================*\
|| ####################################################################
|| # Downloaded: 16:04, Sat Feb 7th 2004
|| # CVS: $RCSfile: functions_showthread.php,v $ - $Revision: 1.41 $
|| ####################################################################
\*======================================================================*/
?>

Any help would be appreciated greatly. My members really want this! I have an animal forum LOL so its perfect.


my site in case you need it

AutomatikStudio 02-11-2004 04:39 PM

I found it just fine in the code you posted. It's around line 687.

shadesvn 02-12-2004 04:55 AM

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 ????

AutomatikStudio 02-12-2004 04:56 AM

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.

shadesvn 02-12-2004 08:59 AM

Quote:

Originally Posted by AutomatikStudio
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 ?

Topdog 02-12-2004 10:29 AM

It runs fine on RC4


All times are GMT. The time now is 02:08 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01870 seconds
  • Memory Usage 2,225KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_code_printable
  • (2)bbcode_php_printable
  • (13)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete