vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Hack of the Month Logo Placement? (https://vborg.vbsupport.ru/showthread.php?t=35853)

slideboxer 03-08-2002 04:01 AM

Hack of the Month Logo Placement?
 
Hi, Chen. Have a question for you - or anyone for that matter :) How do I go about placing a graphic at the top of a particular thread? Just like what has been done for the Welcome Panel Hack of the Month.

Admin 03-08-2002 12:00 PM

In showthread.php:
Code:

if ($thread['threadid']==33477) {
        $thread['title'] .= '<br><br><a href="https://vborg.vbsupport.ru/showthread.php?s='.$session['sessionhash'].'&threadid=35661"><img src="https://vborg.vbsupport.ru/images/saintdog.gif" border="0"></a>';
}

right after updateuserforum().
It can be done much better and nicer but I was lazy that day so this is how I do it...

slideboxer 03-08-2002 02:27 PM

Okay, I see, thanks. Now it appears that you would have to enter this whole statement for every thread that you gave the award to. How could this be done in a cleaner fashion?

In my showthread.php I have two occurrences of of updateuserforum - one in show posts and the other in show thread... obviously the above code would go in the show thread portion lie so?
PHP Code:

updateuserforum($thread['forumid']);
if (
$thread['threadid']==33477) {
    
$thread['title'] .= '<br><br><a href="https://vborg.vbsupport.ru/showthread.php?s='.$session['sessionhash'].'&threadid=35661"><img src="https://vborg.vbsupport.ru/images/saintdog.gif" border="0"></a>';
}
eval(
"dooutput(\"".gettemplate("showthread")."\");"); 


Admin 03-08-2002 02:32 PM

Yup.
Doing this in a cleaner fashion would require a hack I'm afraid. For now, I'm cool with having this code once every month. :)

slideboxer 03-08-2002 02:52 PM

Got it working no probs. Gracias :D

http://www.abudokan.com/forums/showt...=&threadid=575


All times are GMT. The time now is 04:43 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.01484 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
  • (1)bbcode_code_printable
  • (1)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