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: Alt Body Preview 4.0

Description: As you mouse over the subjects on the postlist page, the tool tip will pop up and show you the list of the first 100 characters of the post.
This also has support for expanded view.

Working Under: UBB.Threads 6.5

Mod Status: Beta

Any pre-requisites: 6.5

Author(s): JoshPet & photopost

Date: 07/03/04

Credits: photopost for the original

Files Altered: postlist.php, postlist.tmpl

New Files: none

Database Altered: none

Info/Instructions: Version 3.0 updates instructions for UBB.Threads 6.4
Version 4.0 updates instructions for UBB.Threads 6.5


Disclaimer: Please backup every file that you intend to modify.
If the modification modifies the database, it's a good idea to backup your database before doing so.

Note: If you modify your UBB.Threads code, you may be giving up your right for "official" support from Infopop.If you need official support, you'll need to restore unmodified files.
Attachments
116316-AltBodyPreview4.0.txt (0 Bytes, 157 downloads)

Last edited by JoshPet; 03/01/2005 10:16 PM.
Sponsored Links
Joined: Jun 2002
Posts: 670
Code Monkey
Code Monkey
Offline
Joined: Jun 2002
Posts: 670
So, so sweet

Joined: Aug 2000
Posts: 1,609
Addict
Addict
Offline
Joined: Aug 2000
Posts: 1,609
I noticed that this can conflict with the "Old Post Jump Method" mod. If you have that installed, and you wish to add this one, you might want to do what I did...

Instead of following the directions for postlist.tmpl, do this...

Find:
Code
 <br />{$postrow[$i]['oldjump']} <br />{$postrow[$i]['Subject']} <br /></a> <br />


and replace with:
Code
 <br /><span title="{$postrow[$i]['body']}"> <br />{$postrow[$i]['oldjump']} <br />{$postrow[$i]['Subject']} <br /></a> <br /></span> <br />

Joined: Feb 2002
Posts: 2,286
Veteran
Veteran
Joined: Feb 2002
Posts: 2,286
This has changed in 6.5 final

The instructions say....

###
### Open postlist.tmpl
###

##
## Find this:
##

<a href="{$config['phpurl']}/$mode.php{$var_start}Cat{$var_eq}$Cat{$var_sep}Number{$var_eq}{$postrow[$i]['Number']}{$var_sep}an{$var_eq}{$postrow[$i]['announce']}{$var_sep}page{$var_eq}$page{$postrow[$i]['jumper']}#{$postrow[$i]['Number']}">
{$postrow[$i]['Subject']}


#
# Change to this:
#

<a href="{$config['phpurl']}/$mode.php{$var_start}Cat{$var_eq}$Cat{$var_sep}Number{$var_eq}{$postrow[$i]['Number']}{$var_sep}an{$var_eq}{$postrow[$i]['announce']}{$var_sep}page{$var_eq}$page{$postrow[$i]['jumper']}#{$postrow[$i]['Number']}" title="{$postrow[$i]['body']}">
{$postrow[$i]['Subject']}

It should be

##
##Find
##

<a href="{$config['phpurl']}/$mode.php{$var_start}Cat{$var_eq}$Cat{$var_sep}Number{$var_eq}{$postrow[$i]['Number']}{$var_sep}an{$var_eq}{$postrow[$i]['announce']}{$var_sep}page{$var_eq}$page{$postrow[$i]['goto']}">
{$postrow[$i]['Subject']}

###
###change to
###

<a href="{$config['phpurl']}/$mode.php{$var_start}Cat{$var_eq}$Cat{$var_sep}Number{$var_eq}{$postrow[$i]['Number']}{$var_sep}an{$var_eq}{$postrow[$i]['announce']}{$var_sep}page{$var_eq}$page{$postrow[$i]['goto']}" title="{$postrow[$i]['body']}">
{$postrow[$i]['Subject']}

(I think )


Fans Focus - Focusing on Fans of Sport

(Okay - mainly football (the British variety wink at the moment - but expanding all the time....)
Joined: Nov 2000
Posts: 1,271
Kahuna
Kahuna
Joined: Nov 2000
Posts: 1,271
meh

tried this twice, but can't get it to work. i'm not getting an error message, so i left it in there, but... i'm not getting anythin to happen, either

i'm assuming it conflicts with some other hack i have in postlist.php

Sponsored Links
Joined: Feb 2002
Posts: 2,286
Veteran
Veteran
Joined: Feb 2002
Posts: 2,286
Works fine here - just make sure you alter the bit in postlist.tmpl that I have posted above the version in the mod is different.

I have installed it twice now, and both times it worked first time - so maybe you have missed a bit out.


Fans Focus - Focusing on Fans of Sport

(Okay - mainly football (the British variety wink at the moment - but expanding all the time....)
Joined: Nov 2000
Posts: 1,271
Kahuna
Kahuna
Joined: Nov 2000
Posts: 1,271
well, here's somethin else that seems to be different (either cuz i've already modded my php file, or because the final version is different).

##
## Find this:
##
$postrow[$z]['lastposter'] = "";
$postrow[$z]['announce'] = "0";
if ($Sticky == '2') {


is actually this:

$postrow[$z]['lastposter'] = "";
$postrow[$z]['specialicon'] = "blank.gif";
$postrow[$z]['announce'] = "0";
if ($Sticky == '2') {

Joined: Nov 2000
Posts: 1,271
Kahuna
Kahuna
Joined: Nov 2000
Posts: 1,271
whatever the case, i made mine:

$postrow[$z]['lastposter'] = "";
$postrow[$z]['specialicon'] = "blank.gif";
$postrow[$z]['body'] = $Body;
$postrow[$z]['announce'] = "0";
if ($Sticky == '2') {


that seemed to be the only difference between my code and those in the instructions (other than the template code, which you addressed above).

however, i still have nothin to show for it. no errors, but no alt tag.

its gotta be some other conflict buried somewhere

Joined: Sep 2002
Posts: 151
Member
Member
Offline
Joined: Sep 2002
Posts: 151
Nice mod!

Does it have any effect on server load? Will it slow down a busy board?

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
No, it doesn't add any queries, just grabs extra info during the queries it already does.

Sponsored Links
Joined: Sep 2002
Posts: 151
Member
Member
Offline
Joined: Sep 2002
Posts: 151
Great!

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
Instructions work fine for 6.5.1.


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
isaac
isaac
California
Posts: 1,157
Joined: July 2001
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 20221218)