TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,963
  • Latest: BiZaJe
Stats
  • Total Posts: 195,917
  • Total Topics: 21,308
  • Online today: 445
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 455
  • Total: 455

Greetings: Birthday, Holiday, Time of Day

Started by JPDeni, October 22, 2006, 11:48:25 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

JPDeni

No, changing lines in the language file won't do anything. But there may be a problem with your block. You should have a global command.


global $context;

require_once('UserFunctions.php');
echo '<span style="font-size: 8pt;"> ',greeting(),'<br /><b>'.$context['user']['name'],'</b></span><br />';


If that doesn't fix things, PM me the link to your forum so I can take a look.

dy

Looks like it didn't work.  I'll make the block visible, and send a PM.

RoarinRow

Quote from: houston on October 24, 2006, 04:41:01 AM
:up: Thanks JPdeni that was the ticket.

Cheers

That worked for me too, thank you!   :up:

SMF 2.0 RC3
TP 1.0 beta 5-1
Wordpress 3.0


CampCounselor

I would like to show what time it is...how would i do this
If is it the users Birthday would it automatically say Happy Birthday [username] ?

thanks

mike

JPDeni

QuoteIf is it the users Birthday would it automatically say Happy Birthday [username] ?
That's what this code is for. Use the code in the first post of this topic and that's what you'll get.

QuoteI would like to show what time it is...how would i do this
You just want to say "It's now 3:14 PM?"

simpark77

I know this post is old, but I'm new to TP.
I came across this block today and I thought it would be a great tool to offer my users.

I came across a small problem and was hoping someone could help me.

I added all the necessary codes and files and what happens is when i set my birthday to today
I get this message:  Happy birthday Happy birthday (name)

Seems like it says it twice.

I made it into a welcome phpbox on my left column.

Here is the code i put in:

global $user_info;

require_once('UserFunctions.php');
echo greeting(),', '.$context['user']['name'],'
';


Also I was a little confused when JP mentioned about going into my calendar and changing all the Holiday targets by removing the spaces. Does she mean that all the holidays I want showing can't have any spaces? For Example: Thanksgiving Day is the target, i have to change it to thanskgivingday ? Wouldn't this change the way the holiday appears in my calender?

thank you

osquitar


joybreezy

Hi all.. I uploaded it to just test it out and found by cycling through the posts I could fix some of my issues.  However I am trying to put the code in an article with a nice size font.  Currently using 16pt but it is cutting off some of the letters.. like "y"  any sugessions?

This website is proudly hosted on Crocweb Cloud Website Hosting.