Fork me on GitHub

Search

Donat-O-Meter

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

Learn XOOPS Core

Local Support

Advertisement

XOOPS Code hosted on SourceForge

Cumulus Tag Cloud

- 2 2.5 2.6 3.0 4 6 2013 Abuse Android AntiHarvesting AntiMalUser AntiSpam API Apple Battlefield Blocks Bootstrap Captcha cell cent chronolabs CHUNG Clicks content CĂN demo download Dresses facebook Fat Food for free Gateway Google Guide herre Honeypot HP html5 Human HỘ IP iPhone jQuery Legal List Loss mobile module modules Monster new newbb news NHÀ online PARK Payment phone PHP Prevention profile project Protector publisher RESIDENCE responsive review Rights rmcommon Room security Sentry site Smartphone Smarty Smoking Solution Spam stem Studio support tag tags tdmcreate The Theme themes User userlog web weight Wishcraft xoops Xortify ZendFramework

New Users

Registering user

# 137872

ode64de

Welcome to XOOPS!




Bottom   Previous Topic   Next Topic  |  Register To Post

(1) 2 »


#1 Posted on: 2008/2/25 15:50 Different homepage for different groups
I think there was a module which upon login redirected different groups to different pages. I m not sure of the module name.

tried myhome module but the redirection are either not working or i m making some mistake.

using XOOPS 2.0.18.1
php 5.2.3

on searching the forum i found this thread
http://www.xoops.org/modules/newbb/vi ... id=259113#forumpost259113

myhome module i have tried and the other module i can not find as the dev site is still not working.

What shall i be doing? please help.

Top


Nitin Shah
Most problems in world are result of poor communication
nmshah
Joined:
2007/7/2 3:24
Group:
Registered Users
Posts: 544
(Show More) (Show Less)


#2 Posted on: 2008/2/25 17:46 Re: Different homepage for different groups
Hi,

Look in our modules repository. The two versions for the startup modules are added today. (version 0.2 for XOOPS 2.2.x and version 0.3 for XOOPS 2.0.x)

Top


Resized Image
Conversion script
Professional Xoops
christian
Joined:
2002/2/24 17:08
From Le Mans - France
Group:
Registered Users
Posts: 362
(Show More) (Show Less)


#3 Posted on: 2009/9/11 16:04 Re: Different homepage for different groups
Since Startup 0.2 and 0.3 are not working for the current version of Xoops, do we have any other module that can do this?

Top

Mazarin
Joined:
2008/12/10 15:05
From Knivsta, Sweden
Group:
Registered Users
Repository Group
Posts: 518
(Show More) (Show Less)


#4 Posted on: 2009/9/12 2:29 Re: Different homepage for different groups
You can play with different custom blocks that show or hide for the different user groups and maybe with defacer change the looks.
You can also check with smarty which user group is active and do theme changements with it, with this hack:
Modify /class/template.php and add:
global $xoopsUser;
    if ( 
is_object($xoopsUser) ) {
        
$this->assign'xoops_usergroups'$xoopsUser->getGroups() );
    }

after:
$this->Smarty();

In your templates do something like:
<{if 1|in_array:$xoops_usergroups}>Show for group 1<{/if}>
<{if 
2|in_array:$xoops_usergroups}>Show for group 2<{/if}>


Could maybe a good addition to the core if interest by other people.

Top

ghia
Joined:
2008/7/3 14:19
From Belgium
Group:
Registered Users
Posts: 4946
(Show More) (Show Less)


#5 Posted on: 2009/9/12 5:37 Re: Different homepage for different groups

The Startup module seemed to do exactly what I was after. Maybe it's fairly easy to update to 2.3.x compatibility. Which do you think is best suited for upgrading, Startup for 2.0.x or Startup for 2.2.x?

Top

Mazarin
Joined:
2008/12/10 15:05
From Knivsta, Sweden
Group:
Registered Users
Repository Group
Posts: 518
(Show More) (Show Less)


#6 Posted on: 2009/9/12 9:36 Re: Different homepage for different groups
In principle 2.0.x
Where did you download it?

Top

ghia
Joined:
2008/7/3 14:19
From Belgium
Group:
Registered Users
Posts: 4946
(Show More) (Show Less)


#7 Posted on: 2009/9/12 10:27 Re: Different homepage for different groups
I'm interested too, if one have the module files I'd love to take a look ....

Top

tzvook
Joined:
2003/2/1 17:15
From Israel
Group:
Registered Users
Posts: 843
(Show More) (Show Less)


#8 Posted on: 2009/9/12 10:52 Re: Different homepage for different groups
Actually, I realized I can get by with a redirect after login for now (just a simple modification to include/checklogin.php), so I'm happy to hand this task over to tzvook

I downloaded both modules from the repository here.

Top

Mazarin
Joined:
2008/12/10 15:05
From Knivsta, Sweden
Group:
Registered Users
Repository Group
Posts: 518
(Show More) (Show Less)


#9 Posted on: 2010/7/8 7:55 Re: Different homepage for different groups
I have this code and I want a two customs link for a special group.



<div id="tools"><img src="<{$xoops_url}>/images/tlf_NBF.gif" alt="" width="227" height="31" />
<ul>
<li class="none"><{$smarty.const._TOG}></li>
<{php}> if (is_object($GLOBALS['xoopsUser'])) { <{/php}>
<li><a href="<{xoAppUrl /}>modules/profile/user.php"><{$smarty.const._MP}></a></li>
<li><a href="<{xoAppUrl /}>modules/profile/user.php?op=logout"><{$smarty.const._LU}></a></li>
<{php}> } else { <{/php}>
<li><a href="<{xoAppUrl /}>modules/profile/user.php"><{$smarty.const._B2}></a></li>
<{php}> } <{/php}>
<li>
</ul>

Where should I place the following line? Could I just paste it in in front of <{php}> tag or does this line need tags like that also?

<{if 10|in_array:$xoops_usergroups}>Show for group 1<{/if}>

Top

ptomter
Joined:
2009/3/31 12:42
Group:
Registered Users
Posts: 49
(Show More) (Show Less)


#10 Posted on: 2010/7/8 9:33 Re: Different homepage for different groups
hi'

Another solution if it can help you :

• 1 : open www/include/checklogin.php

• 2 : put this piece of code around the line 63
after :
setcookie($xoopsConfig['usercookie'], 0, -1'/'XOOPS_COOKIE_DOMAIN0);
        }
    }

add :
Quote:

// Redirection hack after login
if ( in_array(1, $_SESSION['xoopsUserGroups'] ) ) {
$_POST['xoops_redirect'] = "/modules/ilovesushi";
} elseif ( in_array(2, $_SESSION['xoopsUserGroups'] ) ) {
$_POST['xoops_redirect'] = "/modules/ipreferpizza";
}
// Redirection hack after login


• 3 : adapt the hack
green : id of the Group
red : module name

Top


Still learning CSS and... english
Burning
Joined:
2006/8/22 14:44
Group:
Registered Users
Repository Group
Posts: 1109
(Show More) (Show Less)




(1) 2 »



You can view topic.
You cannot start a new topic.
You cannot reply to posts.
You cannot edit your posts.
You cannot delete your posts.
You cannot add new polls.
You can vote in polls.
You cannot attach files to posts.
You cannot post without approval.
You cannot use topic type.
You cannot use HTML syntax.
You cannot use signature.
You cannot create pdf.
You cannot get print page.

[Advanced Search]