PHP forum
Would you like to react to this message? Create an account in a few clicks or log in to continue.
March 2024
SunMonTueWedThuFriSat
     12
3456789
10111213141516
17181920212223
24252627282930
31      

Calendar Calendar

Latest topics
» Kabaddi, Kabaddi, Kabaddi, Kabaddi......PHP?
separate submenu for friends and communties EmptyFri Jul 22, 2011 1:37 pm by shyamsunder

» Thousands of Free PHP Scripts Recommended
separate submenu for friends and communties EmptyWed May 18, 2011 10:33 am by bizboy12

» PHP form validation problem?
separate submenu for friends and communties EmptyWed Jan 12, 2011 1:25 pm by simy202

» string wrap
separate submenu for friends and communties EmptySat Aug 02, 2008 2:06 pm by scvinodkumar

» retrieving current date rows
separate submenu for friends and communties EmptyTue Jul 15, 2008 3:25 am by scvinodkumar

» number in words
separate submenu for friends and communties EmptyTue Apr 29, 2008 3:10 pm by scvinodkumar

» Simple PHP Form Field Generator
separate submenu for friends and communties EmptyFri Apr 25, 2008 12:28 pm by scvinodkumar

» PHP password generator
separate submenu for friends and communties EmptyFri Apr 18, 2008 7:24 pm by scvinodkumar

» PHP Script to Extract Email Address from any text
separate submenu for friends and communties EmptyFri Apr 18, 2008 7:18 pm by scvinodkumar

Search
 
 

Display results as :
 


Rechercher Advanced Search

Affiliates
free forum
 


Navigation
 Portal
 Index
 Memberlist
 Profile
 FAQ
 Search

separate submenu for friends and communties

Go down

separate submenu for friends and communties Empty separate submenu for friends and communties

Post  scvinodkumar Wed Feb 13, 2008 8:07 pm

http://mydomain.com/elgg/username/friends/

and

http://mydomain.com/elgg/username/communities/

both have the same sub menu, i.e.

Communities | Owned Communities | Community invitations | Friends | Friend of | Friendship requests | Access controls | Invite a friend

I would like to make it so that the Friends page only shows the friends related submenu options and the Communities page only shows the community related options. The lib.php file for each of these appears to only load the relevant sub menu items but the page actually loads both (not sure where from) so I'm not sure how to change this.

Thanks.

Answer:

The community index.php has:
$context = (defined('COMMUNITY_CONTEXT'))?COMMUNITY_CONTEXT:"network";
define("context", $context);

The friends index.php has:
define("context", "network");

Doesn't that mean they both have the same context (that being 'network')?

Would I need to change this first in order to give them different submenus?

Because the lib.php for friends loads up the friends submenu in the 'network' context and the lib.php for community loads up the community submenu in the 'network' context, so they're both always brought up, irrelevant of which page you're on.

I just changed the friends index.php from 'network' to 'friends' and then in the friends lib.php changed all instances of 'network' to 'friends' and it appears to have worked. Hopefully it won't have any negative knock-on effects?

scvinodkumar
Admin

Posts : 40
Join date : 2008-01-30

https://solutions.aforumfree.com

Back to top Go down

Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum