vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Chat Room opening image (https://vborg.vbsupport.ru/showthread.php?t=67761)

SiFor 07-29-2004 05:48 PM

Chat Room opening image
 
Not sure if I'm asking this in the correct fourm or site even, on my site I have a chatroom that we have a weekly get together on Thursday. The rest of the time its just left open for others to wonder in or PM another member to join them for a chat.

What I would like though is to display an image in the forum header when its Thursday to let members know that its chat day, now that I can do but I need to manually change the image every week to say its open then change it again to say its closed. What I'd like to know is there a way that I can make this automatic with the use of some kind of condition in the template or do I need a script or similar for this job?

Thanks, Si :nervous:

Colin F 07-29-2004 05:55 PM

you could try inserting this in your phpinclude template:

PHP Code:

if(date("w") == 4)
{
$chatimage = <img src="images/misc/chatimage.jpg" alt="chat today!" />


Then add the $chatimage to the place where you want the image to go (header template probably)
Change the image path to where your image is.

SiFor 07-29-2004 06:29 PM

Quote:

Originally Posted by Colin F
you could try inserting this in your phpinclude template:

I take it you mean phpinclude_start.

It didnt seem to work and had an effect on some of my other things on my site, This is what I have in my phpinclude_start already.

PHP Code:

// Example of how to include a seperate file:
// ob_start();
// require("yourheader.html");
// $header = ob_get_contents();
// ob_end_clean();
eval('$navbar2 = "' fetch_template('navbar2') . '";'); 

if (
$bbuserinfo['field8'] == 'Top')
    {
      
$vboptions['legacypostbit'] = 0;
    }
    else
    {
      
$vboptions['legacypostbit'] = 1;
    } 


Colin F 07-29-2004 06:35 PM

make that

$chatimage = '<img src="images/misc/chatimage.jpg" alt="chat today!" />'

SiFor 07-29-2004 06:48 PM

Still the same I'm afraid, I also tried it on a vannila install I have on my local machine but that doesnt work also.


All times are GMT. The time now is 11:18 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.01026 seconds
  • Memory Usage 1,724KB
  • 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
  • (2)bbcode_php_printable
  • (1)bbcode_quote_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