vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Image Based on Forum Id (https://vborg.vbsupport.ru/showthread.php?t=42272)

Seifer 08-14-2002 04:13 AM

Image Based on Forum Id
 
PHP Code:

$forumimageid=$DB_site->query("SELECT forumid FROM forum");

        if (
$forumimageid == "2") {
          
$forumimage "<img src=\"http://www.plasmicgaming.com/forum/images/2.gif\">";
        } if (
$forumimageid == "3") {
          
$forumimage "<img src=\"http://www.plasmicgaming.com/forum/images/3.gif\">";
        } 

I know little about PHP, so I'm just going by what I've learned from looking at forumdisplay and some hacks, but this doesn't work. I place the forumimage variable in "navbar", so it shows up next to the navigation links, but all I got is blank space. What exactly am I doing wrong :angry: ?

Edit: This is in forumdisplay.php above // draw nav bar

Dark_Wizard 08-15-2002 06:55 PM

<a href="https://vborg.vbsupport.ru/showthread.php?s=&threadid=39779" target="_blank">https://vborg.vbsupport.ru/showt...threadid=39779</a>

DrkFusion 08-15-2002 09:30 PM

imm...this is pretty easy

Code:

<img src="{imagesfolder]/$forum[id].gif">
in iamges folder, make the iamges and name it 1, 2 3 etc

Atleast I think this is what you want.

Also put this in the navbar template somewhere.

Seifer 08-15-2002 09:45 PM

*dies*

I tried EVERY variable =P...I was like $forum[forumid] $forumid...$forum[id] doesn't work either =P

And that hack isn't what I'm looking for.

DrkFusion 08-15-2002 11:13 PM

Well...try
$forum[name]...or something by the way I was guessing at the id lol.

Anyways, from wwhat I understand of ur post, something similar to my method in a template would work.

Seifer 08-16-2002 12:25 AM

Yeah, I tried everything in the templates and nothing works. I just want to know why my php thing up there doesn't work...

DrkFusion 08-16-2002 01:06 AM

Well explain to us what you want in full detail

Seifer 08-16-2002 01:16 AM

Like, above all the forums, next to the navbar, I want an image to be displayed based on the forum ID. The image will be like, some kind of banner welcoming you to this forum. This is like, when you're looking at a forum (like, you're looking at General Hacking) but before you go into a thread.

DrkFusion 08-16-2002 01:19 AM

Uhh...the word like threw me off.

If this was inspired by some other site, mind getting us a screenshot?

Seifer 08-16-2002 03:53 AM

lol, I just got back from a friend gathering when I posted that...when we're together everyone starts saying "Like"...sorry. I try to control my teen grammar, but you know, it sometimes gets the best of me ;).

And thanks for trying to help, I got it to work though =D. :banana:


All times are GMT. The time now is 03:03 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.00993 seconds
  • Memory Usage 1,730KB
  • 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)pagenav
  • (1)pagenav_curpage
  • (1)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