vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Member Archives (https://vborg.vbsupport.ru/forumdisplay.php?f=202)
-   -   need help with this code (https://vborg.vbsupport.ru/showthread.php?t=49628)

squawell 03-04-2003 02:50 PM

need help with this code
 
i have problem with below code:

i put this code in phpincloud template:

Code:

if ($thread['replycount'] >10 and $thread['views'] >100){
$hot='HotTopic';}

and i put $hot in forumdisplaybit template but it not show up

so~~does this code wrong??

thankz~ :bunny:

Xenon 03-04-2003 02:53 PM

because $thread is never defined in phpinclude or before.

you have to put that code into forumdiplay.php into the while loop

squawell 03-04-2003 02:56 PM

so which place should i put it in that file??

or i can put that in everywhere in forumdiplay.php ??

Xenon 03-04-2003 02:59 PM

after this part:
PHP Code:

  while ($thread=$DB_site->fetch_array($threads)) { // and $counter++<$perpage) {
    
$thread['movedprefix'] = '';
    
$thread['typeprefix'] = ''


squawell 03-04-2003 03:06 PM

Quote:

Originally posted by Xenon
after this part:
PHP Code:

  while ($thread=$DB_site->fetch_array($threads)) { // and $counter++<$perpage) {
    
$thread['movedprefix'] = '';
    
$thread['typeprefix'] = ''


thakz Xenon~~~

now it show up .............:D:D:D:D

Xenon 03-04-2003 03:08 PM

:)
you're welcome :)

squawell 03-04-2003 03:27 PM

Quote:

Originally posted by Xenon
:)
you're welcome :)

Xenon i have another question~~~

about above code if i want to add attach file download times

variable what name is that?$thread[counter]??or......

thankz again~~

Xenon 03-04-2003 03:35 PM

nope, just the ammount of announcements is saved in the threadtable, not the ammount of downloads.

i wouldn't do this, because you have to add a query per thread in aerage then...

squawell 03-04-2003 03:39 PM

Quote:

Originally posted by Xenon
nope, just the ammount of announcements is saved in the threadtable, not the ammount of downloads.

i wouldn't do this, because you have to add a query per thread in aerage then...

oh~~i see!! :rambo:

Xenon thankz again!!:D:D:D

squawell 03-07-2003 06:09 AM

i use this code and it work well but i want it more different
PHP Code:

if ($thread['forumid']== x){
$hacktext='<br>XXX';}
elseif(
$thread['forumid']==x){
$hacktext='ZZZ';} 

this is what i want it to:

if the thread starter online show XXXif offline show ZZZ

how can i do that??

thankz..............

squawell 03-08-2003 09:52 AM

ANYONE can help that plz??

squawell 03-17-2003 12:23 AM

sorry bump my post.....but still need help.....


All times are GMT. The time now is 01:16 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.01049 seconds
  • Memory Usage 1,736KB
  • 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
  • (1)bbcode_code_printable
  • (3)bbcode_php_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (12)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete