vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Beta Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=34)
-   -   Threaded Forum Views (https://vborg.vbsupport.ru/showthread.php?t=59967)

Martin CX 01-23-2004 11:23 AM

Oh, another idea for future versions: Make it expandable so it only has the first post in the thread until you click on an icon.

tgmorris 01-23-2004 04:11 PM

Quote:

Originally Posted by Martin CX
Yes, congratulations! :) I made my own hack, but yours is better. Still I have a few problems. 1) I couldn't decipher this bit in the instructions: "Find the call to "fetch_trimmed_title" in 2 places and add ", $bbuserinfo['field7']" to the argument list." What do you mean exactly? 2) There are some odd vertical spaces between some of the posts when in "Compact" mode?!?

EDIT: Oh yeah, it would be nice if you could switch between the two modes from the forumdisplay (like you can when you are reading a thread). Perhaps an idea for 1.5 ;)

I guess I'll need to clarify that a bit more in the instructions. All that's being done is adding the second argument to the fetch_trimmed_title function. The 2nd argument controls how many characters are being displayed in the title.

Can you send/post a screen shot of the vertical spacing problem and with which browser?
Quote:

Oh, another idea for future versions: Make it expandable so it only has the first post in the thread until you click on an icon.
As far as making it expandable that's not a bad idea. But, at least to me, that capability sort of exists already by using the hybrid/threaded modes in the standard release. How best to accomplish this will take a bit of thought...

Wayne Luke 01-27-2004 05:25 PM

Why have this function:
PHP Code:

 function getbgclass() 
 {
     global 
$bgcounter;
     if (
$bgcounter++%== '0'
     {
         return 
'alt2';
     }
     else
     {
         return 
'alt1';
     }
 } 

There is already a global declared called $bgclass and a function in functions.php to toggle it between two background colors.
PHP Code:

 // ###################### Start altbgclass #######################
 // reads in $bgclass and returns the alternate table class
 // $alternate allows us to have multiple classes on one page without them overwriting each other
 
function exec_switch_bg($alternate 0)
 ... 

Also instead of refererncing field names throughout the code, making it more likely that errors will creep in when those field numbers do not match in individual installs, you can assign those values to constant defines in "init.php" which allows you to access the information via these constants in the other codes edits. This lowers the chance of errors being introduced while the hack is being installed.

tgmorris 01-27-2004 05:37 PM

Quote:

Originally Posted by Wayne Luke
Why have this function:
PHP Code:

 function getbgclass() 
 {
     global 
$bgcounter;
     if (
$bgcounter++%== '0'
     {
         return 
'alt2';
     }
     else
     {
         return 
'alt1';
     }
 } 

There is already a global declared called $bgclass and a function in functions.php to toggle it between two background colors.
PHP Code:

 // ###################### Start altbgclass #######################
 // reads in $bgclass and returns the alternate table class
 // $alternate allows us to have multiple classes on one page without them overwriting each other
 
function exec_switch_bg($alternate 0)
 ... 

Also instead of refererncing field names throughout the code, making it more likely that errors will creep in when those field numbers do not match in individual installs, you can assign those values to constant defines in "init.php" which allows you to access the information via these constants in the other codes edits. This lowers the chance of errors being introduced while the hack is being installed.

Thanks for the tips. Knowledge comes with experience and I've only been using vb for 2 months and am still learning my way around.

Perhaps when vb does the code for this feature it will be cleaner (he said with hope in his voice ;)).

gmarik 02-01-2004 08:28 PM

Please clarify this:

Quote:

Indent the next 2 "if" statements after which add the closing brace to the above "else" clause:
VVVVVVVVVVVVVVVV
}
^^^^^^^^^^^^^^^^

Locate the end of the file.

Insert BEFORE the closing comments
because I get these:

Parse error: parse error, expecting `')'' in /pub/home/includes/init.php on line 829
Parsing functions.php Time before: 1075677229.6479 Memory Before: 497KB Time after: 1075677229.6759 Time taken: 0.027982950210571 Memory After: 1,147KB
Processing sessions.php Time before: 1075677229.677 Memory Before: 1,152KB
Fatal error: Call to a member function on a non-object in /pub/home/includes/sessions.php on line 171

tgmorris 02-01-2004 09:30 PM

Quote:

Originally Posted by gmarik
Please clarify this:

All that's being done is to close the newly added 'else' part of the conditional. The indenting of the 2 existing statements, while not really necessary, preserves the formatting.

The other way to look at it is that we're wrapping those 2 existing if statments in the 'else' portion of a new if ... else statment.

Hope that clarifies things a bit.

gmarik 02-01-2004 09:37 PM

It does not. Just explain it via code, not the words - they doen't seem to help and the code is messed up ...

tgmorris 02-01-2004 09:37 PM

BTW - There's a patch that needs to be applied to RC2/RC3 to fix a bug dealing with setting default values in the User CP.

Refer to http://www.vbulletin.com/forum/showthread.php?t=93562 for instructions.

gmarik 02-02-2004 06:21 AM

Morris, that is not the problem. I can't really understand this place in your instruction and if you want more fans of your hack, please re-write that place in a more detailed way. Don't write 2 lines next and 10 lines down - it's no good, just cut the code ...

tgmorris 02-02-2004 04:11 PM

Quote:

Originally Posted by gmarik
Morris, that is not the problem. I can't really understand this place in your instruction and if you want more fans of your hack, please re-write that place in a more detailed way. Don't write 2 lines next and 10 lines down - it's no good, just cut the code ...

OK, now I understand :). I've made that section a bit more clear and uploaded the new zip.


All times are GMT. The time now is 01:46 AM.

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.01345 seconds
  • Memory Usage 1,759KB
  • 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
  • (4)bbcode_php_printable
  • (6)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (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