UBB.Dev
Posted By: JoshPet [6.x]Title Images by Post Count1.0.txt - 08/25/2002 8:03 AM
Mod Name / Version: Title Image Based on Post Count 1.0

Description: This hack will add whatever image you'd like to the title of a user based on total post count.
It uses if statements to tag users with post counts over 5000... over 1000 etc... and assign an image
to them. You can edit the post levles and use whatever you like. You can also change the name of the image
to whatever you wish. Then upload whatever graphics you are using to your threads images directory.

Working under: UBB.threads 6.0.x, 6.1 (tested under 6.1... but should work fine under 6.0.x)

Any pre-requisites: none

Author(s): JoshPet

Credits: webwolfe for suggesting it

Files Altered: showflat.php, showthreaded.php, showprofile.php, showflat.tmpl, showthreaded.tmpl, showprofile.tmpl

Database Altered: No.

New Files: You supply whatever custom graphics that you wish.


Attached File
Wow what a great hack!

Ok I am having only a slight error.

After installing I noticed that the Profile and Threaded display pages were working great, however whenever I try to view any thread in flat the Page is coming up blank

Header, footers, powered by infopop etc.. are all present, but the post in the middle and replies are all MIA.

I have restored showflat.tmpl to original and it starts working fine so I know the trouble is isolated to this page alone.

###########################
# In showflat.tmpl
######################

#
# Find this:
#

<td class="small">
<b>{$postrow[$i]['Title']}</b>
</td>


#
# Change to this:
#

<td class="small">
<b>{$postrow[$i]['Title']}</b><br />
{$postrow[$i]['titleimage']
</td>
#####################################


Posted By: JoshPet Re: [6.x]Title Images by Post Count1.0.txt - 08/25/2002 9:07 PM
Oops.... typo in my instructions:

I said:
code:

#
# Change to this:
#
<td class="small">
<b>{$postrow[$i]['Title']}</b><br />
{$postrow[$i]['titleimage']
</td>



I'm missing the } after ['titleimage']

It should be changed to:
code:

#
# Change to this:
#
<td class="small">
<b>{$postrow[$i]['Title']}</b><br />
{$postrow[$i]['titleimage']}
</td>



I've attached corrected instructions to this post.

Attached File
Posted By: JoshPet Re: [6.x]Title Images by Post Count1.0.txt - 08/25/2002 9:49 PM
Ack....

I just couldn't get my act together with my instructions last night!

Webwolfe helped me find another missing character in my instructions.

Everywhere I use the path to the images directory, I've got:
code:
{config['images']}


and of course, it should be:
code:
{$config['images']}



I had forgotten the $ in my instructions.

So updated instructions are attached here.

Hopefully when we get to 6.1 I can come back and edit these attachments.

Attached File
Ive got it working GREAT on my ubbt6.1b1
Demo: here

You have like a 15 minute turnaround on bug reports (and on a Sunday at that!). Thanks for the speedy replies! You've made my day.

Posted By: JoshPet Re: [6.x]Title Images by Post Count1.0.txt - 08/26/2002 4:30 AM
[]Ive got it working GREAT on my ubbt6.1b1
Demo: here

You have like a 15 minute turnaround on bug reports (and on a Sunday at that!). Thanks for the speedy replies! You've made my day.




See! We'll convert ya into a UBBThreads and ThreadsDev lover yet.
© UBB.Developers