Previous Thread
Next Thread
Print Thread
Rate Thread
Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
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.
Attachments
54756-ImagesByPostCount1.0.txt (0 Bytes, 56 downloads)

Sponsored Links
Joined: Aug 2002
Posts: 51
Power User
Power User
Offline
Joined: Aug 2002
Posts: 51
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>
#####################################



Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
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.
Attachments
54774-ImagesByPostCount1.0.txt (0 Bytes, 14 downloads)

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
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.
Attachments
54777-ImagesByPostCount1.0.txt (0 Bytes, 25 downloads)

Joined: Aug 2002
Posts: 51
Power User
Power User
Offline
Joined: Aug 2002
Posts: 51
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.


Sponsored Links
Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
[]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.


Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
Posts: 70
Joined: January 2007
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20240506)