@@ 1493-1585 (lines=93) @@ | ||
1490 | ||
1491 | ||
1492 | //rearrange menu items |
|
1493 | if(elgg_get_context() == 'profile'){ |
|
1494 | ||
1495 | elgg_unregister_menu_item('owner_block', 'activity'); |
|
1496 | ||
1497 | //turn owner_block menu into tabs |
|
1498 | foreach ($menu as $key => $item){ |
|
1499 | ||
1500 | switch ($item->getName()) { |
|
1501 | case 'discussion': |
|
1502 | $item->setText(elgg_echo('gprofile:discussion')); |
|
1503 | ||
1504 | $item->setPriority('1'); |
|
1505 | break; |
|
1506 | case 'file': |
|
1507 | $item->setText(elgg_echo('gprofile:files')); |
|
1508 | $item->setHref('#file'); |
|
1509 | $item->setPriority('2'); |
|
1510 | break; |
|
1511 | case 'blog': |
|
1512 | $item->setText(elgg_echo('gprofile:blogs')); |
|
1513 | $item->setHref('#blog'); |
|
1514 | $item->setPriority('3'); |
|
1515 | break; |
|
1516 | case 'event_calendar': |
|
1517 | $item->setText(elgg_echo('gprofile:events')); |
|
1518 | $item->setHref('#events'); |
|
1519 | $item->setPriority('6'); |
|
1520 | break; |
|
1521 | case 'pages': |
|
1522 | $item->setText(elgg_echo('gprofile:pages')); |
|
1523 | $item->setHref('#page_top'); |
|
1524 | $item->setPriority('7'); |
|
1525 | break; |
|
1526 | case 'bookmarks': |
|
1527 | $item->setText(elgg_echo('gprofile:bookmarks')); |
|
1528 | $item->setHref('#bookmarks'); |
|
1529 | $item->setPriority('8'); |
|
1530 | break; |
|
1531 | case 'polls': |
|
1532 | $item->setText(elgg_echo('gprofile:polls')); |
|
1533 | $item->setHref('#poll'); |
|
1534 | $item->setPriority('9'); |
|
1535 | break; |
|
1536 | case 'tasks': |
|
1537 | $item->setText(elgg_echo('gprofile:tasks')); |
|
1538 | $item->setHref('#task_top'); |
|
1539 | $item->setPriority('10'); |
|
1540 | break; |
|
1541 | case 'photos': |
|
1542 | $item->setText(elgg_echo('gprofile:photos')); |
|
1543 | $item->addItemClass('removeMe'); |
|
1544 | $item->setPriority('11'); |
|
1545 | break; |
|
1546 | case 'photo_albums': |
|
1547 | $item->setText(elgg_echo('gprofile:albumsCatch')); |
|
1548 | $item->setHref('#album'); |
|
1549 | $item->setPriority('12'); |
|
1550 | break; |
|
1551 | case 'ideas': |
|
1552 | $item->setText(elgg_echo('gprofile:ideas')); |
|
1553 | $item->addItemClass('removeMe'); |
|
1554 | $item->setPriority('12'); |
|
1555 | break; |
|
1556 | ||
1557 | case 'orgs': |
|
1558 | $item->setPriority('13'); |
|
1559 | break; |
|
1560 | case 'thewire': |
|
1561 | //$item->setText(elgg_echo('The Wire')); |
|
1562 | $item->setHref('#thewire'); |
|
1563 | $item->setPriority('5'); |
|
1564 | break; |
|
1565 | case 'activity': |
|
1566 | $item->setText(elgg_echo('activity')); |
|
1567 | ||
1568 | $item->setPriority('13'); |
|
1569 | $item->addItemClass('removeMe'); |
|
1570 | break; |
|
1571 | case 'user_invite_from_profile': |
|
1572 | $item->setPriority('13'); |
|
1573 | break; |
|
1574 | case 'questions': |
|
1575 | $item->setText(elgg_echo('widget:questions:title')); |
|
1576 | $item->setHref('#question'); |
|
1577 | $item->setPriority('8'); |
|
1578 | break; |
|
1579 | } |
|
1580 | ||
1581 | } |
|
1582 | ||
1583 | ||
1584 | ||
1585 | } |
|
1586 | ||
1587 | ||
1588 | //rearrange menu items |
|
@@ 1589-1669 (lines=81) @@ | ||
1586 | ||
1587 | ||
1588 | //rearrange menu items |
|
1589 | if (elgg_get_context() == 'profile') { |
|
1590 | elgg_unregister_menu_item('owner_block', 'activity'); |
|
1591 | ||
1592 | //turn owner_block menu into tabs |
|
1593 | foreach ($menu as $key => $item) { |
|
1594 | switch ($item->getName()) { |
|
1595 | case 'discussion': |
|
1596 | $item->setText(elgg_echo('gprofile:discussion')); |
|
1597 | $item->setPriority('1'); |
|
1598 | break; |
|
1599 | case 'file': |
|
1600 | $item->setText(elgg_echo('gprofile:files')); |
|
1601 | $item->setHref('#file'); |
|
1602 | $item->setPriority('2'); |
|
1603 | break; |
|
1604 | case 'blog': |
|
1605 | $item->setText(elgg_echo('gprofile:blogs')); |
|
1606 | $item->setHref('#blog'); |
|
1607 | $item->setPriority('3'); |
|
1608 | break; |
|
1609 | case 'thewire': |
|
1610 | $item->setHref('#thewire'); |
|
1611 | $item->setPriority('5'); |
|
1612 | break; |
|
1613 | case 'event_calendar': |
|
1614 | $item->setText(elgg_echo('gprofile:events')); |
|
1615 | $item->setHref('#events'); |
|
1616 | $item->setPriority('6'); |
|
1617 | break; |
|
1618 | case 'pages': |
|
1619 | $item->setText(elgg_echo('gprofile:pages')); |
|
1620 | $item->setHref('#page_top'); |
|
1621 | $item->setPriority('7'); |
|
1622 | break; |
|
1623 | case 'bookmarks': |
|
1624 | $item->setText(elgg_echo('gprofile:bookmarks')); |
|
1625 | $item->setHref('#bookmarks'); |
|
1626 | $item->setPriority('8'); |
|
1627 | break; |
|
1628 | case 'questions': |
|
1629 | $item->setText(elgg_echo('widget:questions:title')); |
|
1630 | $item->setHref('#question'); |
|
1631 | $item->setPriority('8'); |
|
1632 | break; |
|
1633 | case 'polls': |
|
1634 | $item->setText(elgg_echo('gprofile:polls')); |
|
1635 | $item->setHref('#poll'); |
|
1636 | $item->setPriority('9'); |
|
1637 | break; |
|
1638 | case 'tasks': |
|
1639 | $item->setText(elgg_echo('gprofile:tasks')); |
|
1640 | $item->setHref('#task_top'); |
|
1641 | $item->setPriority('10'); |
|
1642 | break; |
|
1643 | case 'photos': |
|
1644 | $item->setText(elgg_echo('gprofile:photos')); |
|
1645 | $item->addItemClass('removeMe'); |
|
1646 | $item->setPriority('11'); |
|
1647 | break; |
|
1648 | case 'photo_albums': |
|
1649 | $item->setText(elgg_echo('gprofile:albumsCatch')); |
|
1650 | $item->setHref('#album'); |
|
1651 | $item->setPriority('12'); |
|
1652 | break; |
|
1653 | case 'ideas': |
|
1654 | $item->setText(elgg_echo('gprofile:ideas')); |
|
1655 | $item->addItemClass('removeMe'); |
|
1656 | $item->setPriority('12'); |
|
1657 | break; |
|
1658 | case 'activity': |
|
1659 | $item->setText('Activity'); |
|
1660 | $item->setPriority('13'); |
|
1661 | $item->addItemClass('removeMe'); |
|
1662 | break; |
|
1663 | case 'user_invite_from_profile': |
|
1664 | case 'orgs': |
|
1665 | $item->setPriority('13'); |
|
1666 | break; |
|
1667 | } |
|
1668 | } |
|
1669 | } |
|
1670 | } |
|
1671 | ||
1672 | /* |