UBB.Dev
Posted By: JoshPet Beta-[6.5-6.5.1] Alt Body Preview 4.0 - 07/04/2004 8:25 AM
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.


Attached File
116316-AltBodyPreview4.0.txt  (157 downloads)
Posted By: donJulio Re: Beta-[6.5] Alt Body Preview 4.0 - 07/04/2004 8:31 AM
So, so sweet
Posted By: AKD96 Re: Beta-[6.5] Alt Body Preview 4.0 - 07/16/2004 4:20 AM
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 />
Posted By: Ian_W Re: Beta-[6.5] Alt Body Preview 4.0 - 09/29/2004 6:48 PM
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 )
Posted By: drkknght Re: Beta-[6.5] Alt Body Preview 4.0 - 11/23/2004 9:07 AM
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
Posted By: Ian_W Re: Beta-[6.5] Alt Body Preview 4.0 - 11/24/2004 2:19 AM
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.
Posted By: drkknght Re: Beta-[6.5] Alt Body Preview 4.0 - 11/24/2004 6:03 AM
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') {
Posted By: drkknght Re: Beta-[6.5] Alt Body Preview 4.0 - 11/24/2004 6:05 AM
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
Posted By: Gregori Re: Beta-[6.5] Alt Body Preview 4.0 - 01/02/2005 1:08 PM
Nice mod!

Does it have any effect on server load? Will it slow down a busy board?
Posted By: JoshPet Re: Beta-[6.5] Alt Body Preview 4.0 - 01/03/2005 1:20 AM
No, it doesn't add any queries, just grabs extra info during the queries it already does.
Posted By: Gregori Re: Beta-[6.5] Alt Body Preview 4.0 - 01/03/2005 3:28 PM
Great!
Posted By: JoshPet Re: Beta-[6.5] Alt Body Preview 4.0 - 03/02/2005 5:17 AM
Instructions work fine for 6.5.1.
© UBB.Developers