vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   display text in whos online but not in online.php (https://vborg.vbsupport.ru/showthread.php?t=173827)

davidallsop 03-22-2008 01:44 PM

display text in whos online but not in online.php
 
I want to display some text next to the 'Most users ever online was x, 20th January 2008 at 12:53 PM.' text on the index page but do not want it to appear on the /online.php page.

I have written this code but it is showing nothing when implemented into the online phrase: -

Code:

Most users ever online was {1}, {2} at {3}.

<? 
$url = $_SERVER['REQUEST_URI'];

if($url == 'online.php')
        {
        echo "front";
        }
else
        {
        echo " | <font color=#045CA7>Administrators</font> | <font color=#55932F>Moderators</font> | <font color=#CD54C1>Premium Members</font>
| Members";}
?>

What am i doing wrong?

Lynne 03-22-2008 02:56 PM

Where are you putting that code? I do something similar on my site but I just edited the FORUMHOME template to add it in.

davidallsop 03-22-2008 03:04 PM

this was inside the phrase manager for the most users online.

snunhuck 03-22-2008 03:17 PM

What have you got
Quote:

<? and ?>
in the php file? Surely the file starts with those tags so no need to re-include them.

Lynne 03-22-2008 03:58 PM

Can you have php code within a phrase? Have you ever done that before? (I am really not sure here.)

davidallsop 03-24-2008 11:01 AM

im not sure - any suggestions?

Lynne 03-24-2008 02:52 PM

Well, you could just edit the template. I put this before the most ever online phrase text:
Code:

<span style="float:$stylevar[right]">My Extra Stuff</span>
If you don't want to do a template edit, I suppose you could do a 'fake' template edit by using a plugin to do a preg_replace... maybe... I'm not sure I would go about it that way though.

davidallsop 03-24-2008 03:02 PM

What template is that? and will that change it on just the index or also on the whos online page?

Opserty 03-24-2008 03:20 PM

Edit the FORUMHOME template...

AdminCP > Styles & Templates > Style Manager > Edit Templates > Forum Home Templates > FORUMHOME.

(You'll be looking for the area around <!-- what's going on box --> comment)


All times are GMT. The time now is 03:29 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.01418 seconds
  • Memory Usage 1,726KB
  • 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_code_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (9)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