1
Rachel
Making a members welcome block thingy
  • 2004/1/4 10:02

  • Rachel

  • Just popping in

  • Posts: 16

  • Since: 2003/12/24



I am attempting to make a members welcome block. I am going to use sections. The idea is that there will be a headline at the top saying "Welcome X-USER [displaying the user's name] there has been the following activity on the site since your last visit...

So now I want to insert a module like bopcomments that only displays items since X-users last login.

A/ how do I call the member username?
b/ how do I insert a module in a block?
c/ how do I specify updates only since last login for each user?

Thank-you for any help.

2
svaha
Re: Making a members welcome block thingy
  • 2004/1/4 10:46

  • svaha

  • Just can't stay away

  • Posts: 896

  • Since: 2003/8/2 2


c/ You can hack the module BopComments and 'attach it to'the User Menu.

In the hack you must first get the users-id, get the latest login date/time and then let Bop comments start checking the modules, with the last login date/time as the max. time to go back.

I like the idea
Aloha

3
Rachel
Re: Making a members welcome block thingy
  • 2004/1/4 12:48

  • Rachel

  • Just popping in

  • Posts: 16

  • Since: 2003/12/24


Thanks SVHA, I'm going to be cheeky and ask for a bit more detail as to how you do this... Please be gentle, Im not that hot on coding this stuff. thankyou for the ideas anyways.

4
tjnemez
Re: Making a members welcome block thingy
  • 2004/1/4 17:21

  • tjnemez

  • Home away from home

  • Posts: 1594

  • Since: 2003/9/21


hey rachel,

this is the code for user:

<{if $xoops_isuser}>You
are logged in as <a
href=\"<{$xoops_url}>/user.php\">"<{$xoops_uname}>"</a>&nbsp;&nbsp;&nbsp;<{else}>

<form style=\"margin-bottom:0px;\"
action=\"<{$xoops_url}>/user.php\" method=\"post\">
Username:
<input type=\"text\" name=\"uname\"
size=\"12\" value=\"<{$block.unamevalue}>\" />
&nbsp; Password:
<input type=\"password\" name=\"pass\"
size=\"12\" />
<input type=\"hidden\" name=\"op\"
value=\"login\" />
&nbsp;
<input type=\"submit\" value=\"Login\"
name=\"login\" />
</form>
<{/if}>

you can change text to welcome back {user} or whatever. play with it a custom block. now you will need the code to include bopcomments which i do not have.


5
svaha
Re: Making a members welcome block thingy
  • 2004/1/4 20:35

  • svaha

  • Just can't stay away

  • Posts: 896

  • Since: 2003/8/2 2


Quote:
Please be gentle, Im not that hot on coding this stuff.


Ok, then we can shake hands Rachel, because you can compare me with ice, ice on this php programming thing.

I think we have to be in the index.php file of the BopComments mod.
Here you can find :
Quote:
$mod[$key]['topics'] = BopComments_finalize($topic, $count, $xoopsModuleConfig['User'], $xoopsModuleConfig['catmax'], $xoopsModuleConfig['topicmax'], $xoopsModuleConfig['timestamp']);


Now this timestamp is interesting, because when we know when the user logged in the last time we can compare this with the timestamp and then break out of this foreach loop (or something)
So first we have to check in the indexfile the identity of the (anonymous)user and the last time logged in.
Is there anybody here on XOOPS who knows how to program in PHP, and is willing to help?

Aloha

Login

Who's Online

208 user(s) are online (116 user(s) are browsing Support Forums)


Members: 0


Guests: 208


more...

Donat-O-Meter

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

Latest GitHub Commits