vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   Nicer Greeting On NavBar (https://vborg.vbsupport.ru/showthread.php?t=100993)

davidw 01-25-2006 03:17 PM

What code are you using (and where) to produce this statement:

Code:

All times are GMT +1. The time now is 11:48.
I don't see it in the code you posted earlier, nor in this recent code from the navbar template.

Eagle Creek 02-07-2006 02:39 PM

Quote:

Originally Posted by christianb
What code are you using (and where) to produce this statement:

Code:

All times are GMT +1. The time now is 11:48.
I don't see it in the code you posted earlier, nor in this recent code from the navbar template.

Good Evening, Eagle Creek.
All times are GMT +1. The time now is 17:38.
========

What code exact do you want to view?

davidw 02-07-2006 03:28 PM

Whatever it is that produces the statement "All times are GMT +1. The time now is 17:38"
It sounds like it is working, but is off by an hour or two. We need to find out where the hour offset is coming from.

Raydar 02-08-2006 11:56 PM

Hi

The code we are supposed to remove is not in my navbar template.

Code:

<div style="padding: 0.5em;" nowrap="nowrap">
                                                <strong><phrase 1="$bbuserinfo[username]">$vbphrase[welcome_x]</phrase></strong><br />


I have something similar to that code.


Code:

<td class="alt2" valign="top" nowrap="nowrap">
                <div class="smallfont">
                        <strong><phrase 1="$bbuserinfo[username]">$vbphrase[welcome_x]</phrase></strong><br />


Is it safe to remove this code and add the hack even though it is slightly different?

Thanks

Reg

davidw 02-09-2006 01:32 AM

My suggestion on that would be to first copy this part to something like notepad or somewhere that is accessable and then remove the code and add the hack as you suggested. :) - The original code to be removed is from the default style I believe and your style, as mine, will differ. If it doesn't work, just replace what you removed with what you copied out. :)

AFMichael 02-09-2006 02:11 AM

Quote:

Originally Posted by amykhar
I'm going to share the one I'm testing on my board now. (I was always getting good morning too with this one)

Mine is very simple code.

First, it gets the user's time.
Code:

$nghourdiff = $vbulletin->options['hourdiff'];
$ng_time = TIMENOW -$nghourdiff;

Then, it gets it as the hour in a 24 hour format
Code:

$ng_result = date('G',$ng_time);
Then, it goes on to figure out if this is morning, afternoon or night.

The product is attached.


This absolutely worked! Thanks very much!

Raydar 02-09-2006 04:40 AM

Thanks Christianb. Good Idea. Yeah it worked but the new font is larger than the original and looks strange.

Which part of the code should I modify to keep the same font sizes?

Thanks again

Reg

Luggruff 02-09-2006 08:26 AM

doesn't seem that you have updated the readme according to what has been written in this thread.

About the smallfont class on the <div style="padding: 0.5em;" nowrap="nowrap"> etc.

And since my code is:
PHP Code:

<td class="alt2" valign="top" nowrap="nowrap">
<
div class="smallfont">
<
strong><phrase 1="$bbuserinfo[username]">$vbphrase[welcome_x]</phrase></strong><br />
<
phrase 1="$pmbox[lastvisitdate]

then this doesn't make any sence to me:

PHP Code:

<div style="padding: 0.5em;" nowrap="nowrap">
<
strong><phrase 1="$bbuserinfo[username]">$vbphrase[welcome_x]</phrase></strong><br /> 

or this:

PHP Code:

<div style="padding: 0.5em;" nowrap="nowrap">
$ng_greeting<br /> 

and I tried to replace the <phrase 1="$bbuserinfo[username]">$vbphrase[welcome_x]</phrase></strong><br /> with $ng_greeting<br />, then uploading the plugin.. but all that happened was that my forum shut down and gave me the message:

Quote:

Fatal error: Call to undefined function: bcadd() in /home/virtual/hlforum.net/public_html/global.php(349) : eval()'d code on line 24
I've tested this:
PHP Code:

 <php

$ng_hour 
date('G');
$ng_now bcadd($ng_hour4);
$ng_result bcadd($ng_now5); 

?> 

..and get no error there.

Raydar 02-09-2006 10:23 AM

Hi Luggruf,

The install.txt document that came in the zip file for this download, says that this code is to be removed -

Code:

<div style="padding: 0.5em;" nowrap="nowrap">
                                                <strong><phrase 1="$bbuserinfo[username]">$vbphrase[welcome_x]</phrase></strong><br />

But I don't have matching code for that. I have this -

Code:

<td class="alt2" valign="top" nowrap="nowrap">
                <div class="smallfont">
                        <strong><phrase 1="$bbuserinfo[username]">$vbphrase[welcome_x]</phrase></strong><br />

I may have slightly different code because I have a flashing gif image for when people receive private messages.

Once I removed that code and replaced it with this code which is the replacement code in the install.txt document that comes in the zip folder for this pluggin.

Code:

<div style="padding: 0.5em;" nowrap="nowrap">
                                                $ng_greeting<br />

It seems to work but the font is larger. I want it to look the same as it did before. But I'm not sure what code needs to be changed to make the font the same size.

I don't get any error messages.

Also, I'm not sure what you mean by this code.

Code:

<php

$ng_hour = date('G');
$ng_now = bcadd($ng_hour, 4);
$ng_result = bcadd($ng_now, 5); 

?>

Thanks

Reg

Luggruff 02-09-2006 10:49 AM

Quote:

Originally Posted by Reg Car
Hi Luggruf,

The install.txt document that came in the zip file for this download, says that this code is to be removed -

Code:

<div style="padding: 0.5em;" nowrap="nowrap">
                                                <strong><phrase 1="$bbuserinfo[username]">$vbphrase[welcome_x]</phrase></strong><br />

But I don't have matching code for that. I have this -

Code:

<td class="alt2" valign="top" nowrap="nowrap">
                <div class="smallfont">
                        <strong><phrase 1="$bbuserinfo[username]">$vbphrase[welcome_x]</phrase></strong><br />

I may have slightly different code because I have a flashing gif image for when people receive private messages.

Once I removed that code and replaced it with this code which is the replacement code in the install.txt document that comes in the zip folder for this pluggin.

Code:

<div style="padding: 0.5em;" nowrap="nowrap">
                                                $ng_greeting<br />

It seems to work but the font is larger. I want it to look the same as it did before. But I'm not sure what code needs to be changed to make the font the same size.

I don't get any error messages.

Also, I'm not sure what you mean by this code.

Code:

<php

$ng_hour = date('G');
$ng_now = bcadd($ng_hour, 4);
$ng_result = bcadd($ng_now, 5); 

?>

Thanks

Reg


hmm, strange then.

Ahh, it was another user that wrote it:

Quote:

Originally Posted by sabret00the
ouch at php5

ok could you try this

make a php file (that's just a text file with a .php extention instead) with the contents being this
PHP Code:

<php

$ng_hour 
date('G');
$ng_now bcadd($ng_hour4);
$ng_result bcadd($ng_now5); 

?> 

upload it and run it and tell me if you still get the undefined function error please.

edit: heh i just noticed i'm running 5.0.4 on my localhost and it works there :(



All times are GMT. The time now is 08: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.01706 seconds
  • Memory Usage 1,779KB
  • 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
  • (14)bbcode_code_printable
  • (5)bbcode_php_printable
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (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