September 2017
SunMonTueWedThuFriSat
     12
3456789
10111213141516
17181920212223
24252627282930

Calendar Calendar

Latest topics
» Kabaddi, Kabaddi, Kabaddi, Kabaddi......PHP?
Fri Jul 22, 2011 1:37 pm by shyamsunder

» Thousands of Free PHP Scripts Recommended
Wed May 18, 2011 10:33 am by bizboy12

» PHP form validation problem?
Wed Jan 12, 2011 1:25 pm by simy202

» string wrap
Sat Aug 02, 2008 2:06 pm by scvinodkumar

» retrieving current date rows
Tue Jul 15, 2008 3:25 am by scvinodkumar

» number in words
Tue Apr 29, 2008 3:10 pm by scvinodkumar

» Simple PHP Form Field Generator
Fri Apr 25, 2008 12:28 pm by scvinodkumar

» PHP password generator
Fri Apr 18, 2008 7:24 pm by scvinodkumar

» PHP Script to Extract Email Address from any text
Fri 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

View previous topic View next topic Go down

separate submenu for friends and communties

Post  scvinodkumar on 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

View user profile http://solutions.aforumfree.com

Back to top Go down

View previous topic View next topic Back to top

- Similar topics

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