vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Shrink Old Posts in Thread (https://vborg.vbsupport.ru/showthread.php?t=33060)

LuBi 12-13-2001 03:19 PM

Great hack, thanks!

Frank 12-13-2001 03:57 PM

[QUOTE]Originally posted by LuBi
Great hack, thanks!

LuBi 12-13-2001 04:00 PM

[QUOTE]Originally posted by Frank

Yeah fantastic hack, except I have had to disable registrations

Frank 12-13-2001 06:19 PM

Read further up the page, post 48 and 49

LuBi 12-13-2001 06:25 PM

Wow, well mine worked.. sorry guys.

bira 12-13-2001 06:40 PM

Frank,

You have an error in your SQL INSERT query syntax. But that query isn't altered in this hack, so I don't know what you did wrong.

If you like, you can e-mail me register.php to goren@atlasf1.com and I'll have a look.

Cheers,

Bira

bira 12-13-2001 07:28 PM

Frank,

I looked at your register.php file. You have an extra dot (period) on line 444:

Code:

'".addslashes(htmlspecialchars($email))."',".$newstyleval."'".[high].[/high]addslashes(htmlspecialchars($parentemail))."','$coppauser'
REMOVE the highlighted dot :)

rawnet 12-13-2001 07:31 PM

Hello Bira,

This hack is simply amazing - I saw it first on Atlas F1 forums. It's a great idea, but I've had problems installing it on my site. I'm sure I must have made a wrong step somewhere as everybody else is okay, but as I didn't test it until it was installed I'm not sure where the error is.

It's basically showing the title of the post as a row - eg. http://www.servicepals.com/forums/sh...=&threadid=181 (please ignore the content - long story!!)

I was just wondering if anyone could see where the problem is as, frankly, I haven't got a bloody clue. Would be really grateful for any help on the matter!!

All the best,

Ross

bira 12-13-2001 07:41 PM

Hi Ross,

I looked at the source code of that link you gave us. You simply don't have the display set (show/hide).

Looks to me like you skipped the part of editing admin/functions.php (or maybe forgot to upload it, or maybe uploaded it to the wrong dir?).

Open admin/functions.php and Find:

Code:

        if ($post[dateline]>$bbuserinfo[lastvisit]) {
                $post[foldericon]="<img src=\"{imagesfolder}/posticonnew.gif\" border=\"0\" alt=\"New Post\">";
        } else {
                $post[foldericon]="<img src=\"{imagesfolder}/posticon.gif\" border=\"0\" alt=\"Old Post\">";
        }

REPLACE that with:

PHP Code:

// Contract Old Posts in Thread (v1.0)
    
global $display$HTTP_USER_AGENT;

    if (
$post[dateline]>$bbuserinfo[lastvisit]) {
        
$post[foldericon]="<img src=\"{imagesfolder}/posticonnew.gif\" border=\"0\" alt=\"New Post\">";
        if (!
$display) {
            
$pe "show";
            
$ph "none";
        }
    } else {
        
$post[foldericon]="<img src=\"{imagesfolder}/posticon.gif\" border=\"0\" alt=\"Old Post\">";
        if (!
$display) {
            if (
$bbuserinfo[hideposts]=="1") {
                
$pe "none";
                
$ph "show";
            } else {
                
$pe "show";
                
$ph "none";
            }    
        }
    }
    
    if (
$display=="none") {
        
$pe "none";
        
$ph "show";
    } elseif (
$display=="show") {
        
$pe "show";
        
$ph "none";
    }
    
    if (
strstr($HTTP_USER_AGENT,"MSIE")) {
        eval(
"\$plusimg = \"".gettemplate("postbit_plusimg")."\";");
        eval(
"\$minusimg = \"".gettemplate("postbit_minusimg")."\";"); 
    } else {
        
$plusimg "";
        
$minusimg "";
    }
// Contract Old Posts in Thread (v1.0) 

Let us know if it worked out.

Cheers,

Bira

rawnet 12-13-2001 07:54 PM

Bira, that is truly fantastic!

Thankyou!!

Is all working okay now - don't know how that happened - must be getting sloppy in my old age.

Is there any way to implement a Collapse All / Expand All link at the top of the threads page as well? I'm probably being guilty, but it might be good.

Cheers for now,

Ross


All times are GMT. The time now is 08:20 PM.

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.01499 seconds
  • Memory Usage 1,755KB
  • 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
  • (2)bbcode_code_printable
  • (1)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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