Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > General > Member Archives
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Maikeing Thos Work... Details »»
Maikeing Thos Work...
Version: , by globalwin globalwin is offline
Developer Last Online: Jul 2003 Show Printable Version Email this Page

Version: Unknown Rating:
Released: 07-07-2002 Last Update: Never Installs: 0
 
No support by the author.

Can anyone make this code compatible with 2.2.2+

PHP Code:
  $counter=0;
  
$postbits '';
  
$countposts 0;
  while (
$post=$DB_site->fetch_array($posts)) {
    if (++
$counter%2==0) {
      
$post[backcolor]="{firstaltcolor}";
      
$post[bgclass] = "alt1";
      
$countposts $countposts+1;
    } else {
      
$post[backcolor]="{secondaltcolor}";
      
$post[bgclass] = "alt2";
      
$countposts $countposts+1;
    } 

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 07-07-2002, 05:10 PM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

huh?

this code is compatible with every version, it's correct...

you should give more infrmations where this code should be...
Reply With Quote
  #3  
Old 07-07-2002, 07:16 PM
globalwin's Avatar
globalwin globalwin is offline
 
Join Date: Jun 2002
Posts: 85
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

the $countposts variable thingy has changed since then
Reply With Quote
  #4  
Old 07-09-2002, 11:49 AM
globalwin's Avatar
globalwin globalwin is offline
 
Join Date: Jun 2002
Posts: 85
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

anyone?
Reply With Quote
  #5  
Old 07-09-2002, 11:53 AM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

as i already said, you should give more informations, which hack is it, where is this code located aso or nobody would help....
Reply With Quote
  #6  
Old 07-09-2002, 11:57 AM
globalwin's Avatar
globalwin globalwin is offline
 
Join Date: Jun 2002
Posts: 85
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This Hack: Mini - Post Counter in Split Thread

PHP Code:
In the ###start split thread### section of postings.php find:

  
$counter=0;
  while (
$post=$DB_site->fetch_array($posts)) {
    if (++
$counter%2==0) {
      
$post[backcolor]="{firstaltcolor}";
      
$post[bgclass] = "alt1";
    } else {
      
$post[backcolor]="{secondaltcolor}";
      
$post[bgclass] = "alt2";
    }


Replace it with:

  
$counter=0;
  
$countposts 0;
  while (
$post=$DB_site->fetch_array($posts)) {
    if (++
$counter%2==0) {
      
$post[backcolor]="{firstaltcolor}";
      
$post[bgclass] = "alt1";
      
$countposts $countposts+1;
    } else {
      
$post[backcolor]="{secondaltcolor}";
      
$post[bgclass] = "alt2";
      
$countposts $countposts+1;
    }

Then open your threads_splitthreadbit template and add $countposts wherever you want.

I added:

<
br><b>Post # $countposts</b>

Right after:

<
input  type="radio" name="splitpost[$post[postid]]" value="no" checkedNo

If you want a direct link to the post to open up the thread in it's own window you can use the following in the same place in the template:

<br><b>Post # <a href="showthread.php?postid=$post[postid]#post$post[postid]" target="_blank">$countposts</a></b> 
Reply With Quote
  #7  
Old 07-09-2002, 12:09 PM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

ok, so its better

hmm, the code must work in vb226, theres no bug, normaly you can implement it like it's said in the install file
ok the code isn't really optimized, but it should work w/o problems.
are you sure you've uploaded the hacked file?
Reply With Quote
  #8  
Old 07-09-2002, 12:41 PM
globalwin's Avatar
globalwin globalwin is offline
 
Join Date: Jun 2002
Posts: 85
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i hav it going now, i was trying to use different code cause I have the post counter and that uses differnet code so I tried to implememt that, anyway, works now.
Reply With Quote
  #9  
Old 07-09-2002, 12:43 PM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

look into the original thread, i have posted an easier solution for that too
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 11:11 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.04487 seconds
  • Memory Usage 2,295KB
  • Queries Executed 22 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (2)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (9)post_thanks_box
  • (9)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (9)post_thanks_postbit_info
  • (8)postbit
  • (9)postbit_onlinestatus
  • (9)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete