1
davidsless
change to system main menu block
  • 2006/12/13 1:44

  • davidsless

  • Just popping in

  • Posts: 49

  • Since: 2006/10/5


Hi

We want to make a change to the main menu block so that it does two things

1. includes a link to the login/register block. That bit is easy
2. after someone has logged in, the above link should be replaced with a message that includes the name of the person who has just logged in, something like"Welcome [username]". This is difficult

Has anyone written some code that can do this? If not, can someone point me to someone who can write the code for us?

Tanks

David



Website URL:
http://www.communication.org.au/cri1_x/htdocs

XOOPS Version:
XOOPS 2.0.16

XOOPS Theme:
cri_2

XOOPS Template Set:
default

PHP Version:
4.4.3

MySQL Version:
4.1.21-standard

Server Software:
Apache/1.3.37 (Unix) mod_auth_passthrough/1.8 mod_log_bytes/1.2 mod_bwlimited/1.4 PHP/4.4.3 FrontPage/5.0.2.2635.SR1.2 mod_ssl/2.8.28 OpenSSL/0.9.7a

User's Browser:
Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en) AppleWebKit/418.9.1 (KHTML, like Gecko) Safari/419.3

2
Bassman
Re: change to system main menu block
  • 2006/12/13 2:20

  • Bassman

  • Friend of XOOPS

  • Posts: 1272

  • Since: 2003/5/23


Easy.
1) Clone default template set in your template manager
2) set cloned template set to be default
3) edit system_block_mainmenu.html (it's a System template:
add the following before the closing "</table>" tag
Quote:

<tr>
<td><{if $xoops_isuser}>Welcome, <a href="<{$xoops_url}>/user.php"><{$xoops_uname}></a>!
<{else}> <a href="<{$xoops_url}>/register.php">Become a member</a> of this website.<{/if}></td></tr>


You can change the wording, of course.

3
davidsless
Re: change to system main menu block
  • 2006/12/13 11:05

  • davidsless

  • Just popping in

  • Posts: 49

  • Since: 2006/10/5


Thanks Bassman

That worked!

This community is a good one to be part of.

Warm Regards

David

Login

Who's Online

191 user(s) are online (124 user(s) are browsing Support Forums)


Members: 0


Guests: 191


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