1
jaylach
Modified who's on-line template as a user welcome
  • 2010/8/27 16:08

  • jaylach

  • Just popping in

  • Posts: 7

  • Since: 2010/8/24


Hi, very much a newbie here. ;)

I just installed Xoops a couple of weeks ago to build a community type site so I really have no idea as to what I am doing.

I wanted to have welcome messages display for guests and registered members. The guest welcome was more than simple, just create a custom block viewable only by anonymous. The welcome for members gave me a bit more trouble. I wanted to have the welcome display their user name in the message. I also wanted just admins to see who's on-line.

I tried repeatedly to create a custom block as a welcome displaying the user name with no success. Then it dawned on me that I could modify the who's on-line template.

I surrounded the original template with an if $xoops_isadmin statement and added my welcome before the if. It works just fine!

I would like to do things in a correct manner so my question is how should I have done this? I have a hunch my solution would not be considered proper.

I can only offer my site as a demo.
http://my.jaylach.com
username: xoops
password: xoopsforum

Thank you for any insight and instruction.
Jay

<div align="center"><h2><strong>Welcome back, <{$xoops_uname}>!<br>
Great to see you again.strong>h2><br>
<
strong>View any new <a href="<{xoAppUrl notifications.php}>" title="<{$block.lang_notifications}>">notificationsa>.<br>
Go to your <a href="<{xoAppUrl viewpmsg.php}>" title="<{$block.lang_inbox}>"><{$block.lang_inbox}>inboxa>.
strong>
div><br><br>
<{if 
$xoops_isadmin}>
<{
$block.online_total}><br /><br />
<{
$block.lang_members}>: <{$block.online_members}><br />
<{
$block.lang_guests}>: <{$block.online_guests}><br /><br />
<{
$block.online_names}>
<
a href="javascript:openWithSelfMain('<{$xoops_url}>/misc.php?action=showpopups&type=online','Online',420,350);" title="<{$block.lang_more}>">
    <{
$block.lang_more}>
a>
<{/if}>

2
ghia
Re: Modified who's on-line template as a user welcome
  • 2010/8/27 17:36

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


I think you are good in that way. Other possibility for the block is a custom PHP block, but that involves some programming then.

One misconception: the notifications link make a list of to which notification events you are subscribed.
Not very interesting for a welcome menu.
The notifications itself, are sent to the user by PM or email depending on his settings.

3
jaylach
Re: Modified who's on-line template as a user welcome
  • 2010/8/27 17:48

  • jaylach

  • Just popping in

  • Posts: 7

  • Since: 2010/8/24


Thanks for the response. :)

I was already thinking of getting rid of the notifications link and adding articles and blog.

Login

Who's Online

252 user(s) are online (126 user(s) are browsing Support Forums)


Members: 0


Guests: 252


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits