vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Trying to make an icon appear next to a thread if a user has posted... (https://vborg.vbsupport.ru/showthread.php?t=69510)

sblum 09-16-2004 05:42 AM

Trying to make an icon appear next to a thread if a user has posted...
 
And this is what I've tried so far. In "functions_forumdisplay.php" I've added these lines of code:
PHP Code:

        if ($thread['threadid'] == $dotthreads["$thread[threadid]"])
        {
        
$show['hasposted'] = true;
        } 

and then in my threadbit template I have a simple conditional saying if $show['hasposted'], display this image, but it's not working. The problem is in the conditional in the PHP file, and I can't figure this out for the life of me. I guess I just need to check to see if the current threadid is in the array of dotthreads? Any help would be much, much appreciated.

Dean C 09-16-2004 07:17 AM

Moved to General vBulletin questions. Please read the forum descriptions more closely in future :) Thanks

sblum 09-16-2004 03:22 PM

Just simply
PHP Code:

if ($dotthreads["$thread[threadid]"]) 
        { 
        
$show['hasposted'] = true
        } 

Makes an icon show up for every post, and I Can't figure out why. Pulling my hair out here, any ideas?

sblum 09-16-2004 06:26 PM

My most recent attempt was this, also didn't work:

PHP Code:

for($i=0;$i count($dotthreads);$i++);
    if (
$dotthreads[$i] == $thread['threadid'])
 {
 
$show['hasposted'] = true;
 } 


sblum 09-16-2004 06:48 PM

OK, well I finally figured it out - it required no hacking whatsoever, vB already did the work for me :)

I just had to put [php]<if condition="$thread[dot_count] > 0"> in the template. Oops!


All times are GMT. The time now is 03:10 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.04122 seconds
  • Memory Usage 1,717KB
  • 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
  • (3)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)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