xoops forums

3lr0n

Not too shy to talk
Posted on: 2007/8/19 20:45
3lr0n
3lr0n (Show more)
Not too shy to talk
Posts: 167
Since: 2004/3/13
#1

blocks on system module

Hello, I have a question... is there any way to place blocks ONLY in user.php page? I have a block to be only show when a user takes a look to his/her account page.
Spanish Overclocking Community xoops based site : www.overclocking.es

christian

Just can't stay away
Posted on: 2007/8/19 21:22
christian
christian (Show more)
Just can't stay away
Posts: 401
Since: 2002/2/24
#2

Re: blocks on system module

Hi,

With smartblock perhaps.

3lr0n

Not too shy to talk
Posted on: 2007/8/20 4:56
3lr0n
3lr0n (Show more)
Not too shy to talk
Posts: 167
Since: 2004/3/13
#3

Re: blocks on system module

The problem is I am used 2.0.14 atm. :(
Spanish Overclocking Community xoops based site : www.overclocking.es

pod

Quite a regular
Posted on: 2007/8/20 11:26
pod
pod (Show more)
Quite a regular
Posts: 301
Since: 2003/4/19
#4

Re: blocks on system module

Say you're not using any center-right blocks on your system module pages... you could utilize the block position only on user.php by placing this code in your theme.html where you want the block in question to appear:

<{if $xoops_requesturi == "/your_xoops_root/user.php"}>
<{foreach 
item=block from=$xoops_crblocks}>
<
div class="blockTitle"><{$block.title}></div>
<
div class="blockContent"><{$block.content}></div>
<{/foreach}>  
<{/if}>


(I _think_ $xoops_requesturi is supported in 2.0.14 - someone correct me if I'm wrong.)

Of course if you are using center-right blocks on your system pages, you would replace the block part with left, right, or center blocks... whatever works for you.

Hope this helps!
www.myxoops.com - MyXoops Is Your XOOPS!

3lr0n

Not too shy to talk
Posted on: 2007/8/20 14:08
3lr0n
3lr0n (Show more)
Not too shy to talk
Posts: 167
Since: 2004/3/13
#5

Re: blocks on system module

This could be a nice solution.. I think I have a couple of non used blocks positions to do it

I will try and i tell you if this works

Thks
Spanish Overclocking Community xoops based site : www.overclocking.es

3lr0n

Not too shy to talk
Posted on: 2007/8/25 12:01
3lr0n
3lr0n (Show more)
Not too shy to talk
Posts: 167
Since: 2004/3/13
#6

Re: blocks on system module

One problem.. :(

The reason to do this is to put a block with all user menu (notifications, edit profile, etc...) in user.php (user watching his own profile) but i need to put the block in userinfo.php?uid=X, on edituser, on notifications.php..etc..

All the actions a user can take to edit, view, etc...

The problem is that as the uid is part of the url and not ever equal.. can I use "*" or something like this.. does requesturi accept them.

And other question, Im planning to use dirname to check the active module for a rollover horizontal menu. For the modules no problem, but for the Home?, I mean, i can put www.overclocking.es (my web) and Iam sure Iam in home page, but if you write www.overclocking.es/whatever_not_resolved
you will be redirected to home page but the url you typed is still there so the active rollver will not be displayed.

Can I force my XOOPS to redirect to home page with the same url always?

best regards
Spanish Overclocking Community xoops based site : www.overclocking.es