Giter Site home page Giter Site logo

elgg / elgg Goto Github PK

View Code? Open in Web Editor NEW
1.6K 1.6K 673.0 107.26 MB

A social networking engine in PHP/MySQL

Home Page: https://elgg.org

License: Other

PHP 96.78% JavaScript 1.63% HTML 0.39% CSS 1.18% Hack 0.03%
elgg framework hacktoberfest php social-networking-engine

elgg's People

Contributors

adayth avatar beck24 avatar benwerd avatar brettp avatar cash avatar ewinslow avatar franzliedke avatar hypejunction avatar iionly avatar jdalsem avatar jeabakker avatar jrtilson avatar juho-jaakkola avatar knezmilos13 avatar lehkonev avatar lianglee avatar mapkyca avatar mcloughlin3 avatar migrax avatar mrclay avatar perjensen avatar rivervanrain avatar rlerdorf avatar rohit1290 avatar srokap avatar stianlik avatar teamwebgalli avatar thats4shaw avatar tvld avatar wouter0100 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

elgg's Issues

wrong invite/join behavior of groups (Trac #572)

Original ticket http://trac.elgg.org/ticket/572 on 38888049-09-06 by trac user fuhrmara@..., assigned to unknown.

Elgg version: 1.1

The behavior of invite/join in groups is wrong.

This must be set to :

if the membership is set to privat

  • only the owner (and the members) can invite other users. This doesn't depends an the access state. Join or request to join isn't allowed.

if the membership is set to privat

  • it depends to the access state
    • if access is set to public/logged in users => all logged in user can join the group
    • if access is set to members only => logged in users can request to join the group

I think a combination of membership 'privat' and access 'privat' is nothing what a groups need. because this was only a one man group. so it isn't a group.

Two rivers in a while (Trac #567)

Original ticket http://trac.elgg.org/ticket/567 on 38887712-07-30 by trac user SGr33n, assigned to unknown.

Elgg version: 1.0

Hi,

It would be useful to add a rule that doesn't add a new river if the previous is the same (or similar sometimes) if it happen in a while.

ie. I add the widget Messageboard, then modify the access to public. The activity shows:

"sg[svn:33]n modified messageboard widget (now)"
"sg[svn:33]n added messageboard widget (now)"

Sometimes happen that you modify this two or more times:

"sg[svn:33]n modified messageboard widget (now)"
"sg[svn:33]n modified messageboard widget (1 minute ago)"
"sg[svn:33]n modified messageboard widget (2 minutes ago)"
"sg[svn:33]n added messageboard widget (2 minutes ago)"

So, it would be useful to add a control that doesn't add two similar activities.

Thanks :)

Tag order is reversed (Trac #538)

Original ticket http://trac.elgg.org/ticket/538 on 38862411-02-12 by trac user kevinjardine, assigned to unknown.

Elgg version: Github Master

If I enter three tags, eg. "Toronto, Leiden, Winnipeg" in a profile form, the display order is reversed when I view my profile.

This is not an alphabetical sort, but just a reversal, presumably because as usual Elgg displays the most recently created metadata item first.

Suggestion - use array_reverse to reverse the results of string_to_tag_array in metadata.php before that function returns its tag array.

Joinrequest to a closed group doesn't work (Trac #564)

Original ticket http://trac.elgg.org/ticket/564 on 38887610-08-08 by trac user fuhrmara@..., assigned to unknown.

Elgg version: 1.1

If an user of a closed-group (access private) invite friends,
this friends cannot join to the group with the join-link
in the sended email.
An error "groups:cantjoin"

Reason
If you get the group in join.php you load the group_entity.
But your SQL-Statement ask for access = public or user is owner.

SELECT * from entities where guid=10 and (access_id in (2,1) or (access_id = 0 and owner_guid = 14)) and enabled='yes'

This is a blocker for closed systems

Installation / .htaccess not written to (Trac #535)

Original ticket http://trac.elgg.org/ticket/535 on 38860320-08-11 by trac user p4u1, assigned to unknown.

Elgg version: 1.0

Uploaded elgg v1.1 to root of shared hosting space (Hostgator).
There was already an existing .htaccess file. This file was blank.
Ran through install process and experienced a "page not found" error where elgg tries to save my system settings to "..action/systemsettings/install"
instead of
"..actions/systemsettings/install.php"

Turned out the existing ".htaccess" was not flagged or overwritten - elgg created a file called "htaccess_dist".
To sort the problem I renamed "htaccess_dist" to ".htaccess" and all was fine.

I should get an error before getting to the point where "action/systemsettings/install" is called if elgg cannot write to the .htaccess or the engine/settings.php file.

I am using Safari 3.1.2 on OSX 10.4.11

Edit a user just edits current admin user (Trac #552)

Original ticket http://trac.elgg.org/ticket/552 on 38877576-06-28 by trac user judgej, assigned to unknown.

Elgg version: 1.1

Logged in as an administrator, I go to:

Administation -> User Administration -> (select a user) -> Edit Details (in red)

This takes me to page:

/pg/settings/user/user-login-to-edit/

However, the details in the profile form displayed are my own (the administrator) details and not the profile of 'user-login-to-edit'.

translation-tags in wrong language-file (Trac #546)

Original ticket http://trac.elgg.org/ticket/546 on 38868845-12-04 by trac user fuhrmara@..., assigned to unknown.

Elgg version: 1.1

The translation-tags

'email:confirm:success' => "You have confirmed your email address!",
'email:confirm:fail' => "Your email address could not be verified...",

are in /languages/en.php but have to be in /mod/uservalidationbyemail/languages/en.php

Email Headers in Message Body (Trac #579)

Original ticket http://trac.elgg.org/ticket/579 on 38898505-02-04 by trac user thearch, assigned to unknown.

Elgg version: 1.1

When the system sends out registration emails, the following

MIME-Version: 1.0

Content-Transfer-Encoding: 8bit

Message-Id: <20081119190138.23270454EA997642e3.fb.joyent.us >
Date: Wed, 19 Nov 2008 19:01:38 +0000 (GMT)

shows up on the email's body.


SOLUTION

this is a bug in engine/lib/notifications.php
Search for "\r\n" for example in lines like

$headers = "From: "$sitename" <$from>\r\n"

and replace "\r\n" with "\n" and it will work.

This should be configurable in elgg because most
mailservers tend to use "\n" only.


bad translation register of plugin-languages (Trac #578)

Original ticket http://trac.elgg.org/ticket/578 on 38890745-03-11 by trac user fuhrmara@..., assigned to unknown.

Elgg version: 1.1

if a plugin have translation files for a language that hasn't registered
(there is no file for this language for the core-system),
all this files will be added to the translation array.
But there is no possibility to access such languages.

I've attached a patch and a updated language.php wich will fix this.

Owners are not able to remove their posts in group forum (Trac #547)

Original ticket http://trac.elgg.org/ticket/547 on 38870274-01-16 by trac user starlessblack, assigned to unknown.

Elgg version: 1.0

in /mod/groups/views/default/forum/topicposts.php (lines ~49 and below) looks like authors were going to give the owner of a post a permission to delete it. However, canEdit() method returns false for posts that are actually owned by a particular user (based on wrong value of owner_guid returned by get_entity() function call in /engine/lib/entities.php. get_entity in fact returns the object with owner_guid set to a guid of an owner of the whole post, not a given topic).

Small Fixes (Trac #534)

Original ticket http://trac.elgg.org/ticket/534 on 38859609-04-29 by trac user SGr33n, assigned to unknown.

Elgg version: 1.1

Hi,

Customizing Elgg I found a few things to fix.

I'd like to share them with you.
Here we go (updated):

  1. mod/profile/views/default/profile/userdetails.php
    show a message if no description
    search: description); ?>
    replace with: <?php
    $userdescription = $vars['entity']->description;

          if (!empty($userdescription)) {
              echo autop($vars['entity']->description);
    
          } else {
    
              echo "<p class=\"description_none\">" . elgg_echo('profile:descriptionnone') . "</p>";
          }
      ?>
    

    add to the profile en.php language file: 'profile:descriptionnone' => "none entered",

  2. mod/bookmarks/views/default/widgets/bookmarks/view.php
    "bookmark inbox" hardcoded
    search: echo "<a href="{$user_inbox}">Bookmark inbox";
    replace with: echo "<a href="{$user_inbox}">" . elgg_echo('bookmarks:inbox') . "";

  3. mod/status/views/default/status/widget_view.php
    save & cancel buttons hardcoded
    search:

    replace with:

  4. mod/groups/views/default/groups/forum_latest.php
    * "Replies" hardcoded (added to language files)
    * Error counting replies (one more):
    search: $count_annotations = $f->countAnnotations("group_topic_post");
    replace with: $count_annotations = $f->countAnnotations("group_topic_post");
    $count_annotations = $count_annotations -1;

  5. mod/google-map/languages/en.php
    search: 'gmap:modify' => 'Enter your Google Maps API Key
    You can obtain an API Key here.',
    replace with: 'gmap:modify' => 'Enter your Google Maps API Key
    You can obtain an API Key here.',

  6. mod/messageboard/views/default/widgets/messageboard/view.php
    no message when empty
    search: echo "<div id="messageboard_wrapper">";

  7. replace with: echo "<div id="messageboard_wrapper" class="messageboard_none">" . elgg_echo('messageboard:none') . "";

    • added a class name so you can style the message as you want (ex. a red box with exclamation)
      add to the messageboard en.php language file: 'messageboard:none' => "No comments yet",
  8. mod/messageboard/views/default/widgets/messageboard/group_messageboard.php
    no message when empty
    search: echo "<div id="messageboard_wrapper" />";
    replace with: echo "<div id="messageboard_wrapper" class="messageboard_none" />" . elgg_echo('messageboard:none') . "";

    • added a class name so you can style the message as you want (ex. a red box with exclamation)

mysql db password length restriction (Trac #577)

Original ticket http://trac.elgg.org/ticket/577 on 38889020-05-16 by trac user tremaine, assigned to unknown.

Elgg version: 1.0

I'm not sure what elgg sets as a password length restriction for the mysql user password, but it breaks if you use 40 multi case alphanumeric characters. If there is going to be a length restriction it should be documented both in the INSTALL.txt file, as well as in the engine/settings.php (engine/settings.example.php), and on the install page itself.

As a security monkey, I'd set that value to be fairly high ;)

joiun to invite group with 'group only' access doesn't work (Trac #566)

Original ticket http://trac.elgg.org/ticket/566 on 38887678-11-22 by trac user fuhrmara@..., assigned to unknown.

Elgg version: 1.1

If the owner of a group with access 'member only' invite friends, this friends cannot join to the group with the join-link in the sended email. An error "groups:cantjoin"

Reason If you get the group in join.php you load the group_entity. But your SQL-Statement ask for access = public or user is owner.

SELECT * from entities where guid=10 and (access_id in (2,1) or (access_id = 0 and owner_guid = 14)) and enabled='yes'

This is a blocker for closed systems

Session variables & External authentication. (Trac #562)

Original ticket http://trac.elgg.org/ticket/562 on 38885616-04-21 by trac user staticred, assigned to unknown.

Elgg version: 1.1

Summary: Elgg appears to reset all session variables, making an external authentication module unworkable.

Full:
I've been putting together a CAS authentication module for Elgg 1.x, based on a successful CAS authentication module I developed for Elgg 0.8. The module is based on the phpCAS library, and makes a request to an external CAS server. When integrating this library into Elgg 1.0, it enters into an infinite loop of redirecting -- sending an authentication request to CAS, which returns a successful authentication ticket.

The same block of code outside of the Elgg system returns a successful CAS login. Upon further investigation, it appears that Elgg is destroying the session between the time the user leaves Elgg and returns from CAS, obliterating the phpCAS session variables and creating a new, empty Elgg session.

The basic setup of the module is as follows:

  1. New module created in ./mod (./mod/cas_auth)

  2. module initialized with
    --- 8< ---
    register_elgg_event_handler('init','system','cas_auth_init');
    --- 8< ---
    and custom action set up with
    --- 8< ---
    register_action('cas_auth/login', true, $CONFIG->pluginspath . 'cas_auth/login.php');
    --- 8< ---

  3. Custom login form is used to direct user credentials to CAS login page (ie: user form logs users into CAS page, instead of using Elgg's internal register_pam_handler() call. For what it's worth, the same problem occurs with the register_pam_handler() call).

  4. After successfully logging into CAS and receiving a ticket, user is returned to http://elggsite.com/action/cas_auth/login, which calls the following block of code:

--- 8< ---
$config = find_plugin_settings('cas_auth');
$NetUsername = authCAS($config);

    $attr = cas_ldapSearch($NetUsername);

--- 8< ---

the authCAS() function is as follows:

--- 8< ---
function athCAS($config) {
require_once('CAS/CAS.php');
$cas_validate=true;
$cas_version=CAS_VERSION_2_0;
$cas_language='english';
phpCAS::client($cas_version,$config->cashostname,(int)$config->casport,$config->casbaseuri,false);
phpCAS::setLang($cas_language);
phpCAS::sessionName("Elgg");
phpCAS::forceAuthentication();
$NetUsername = phpCAS::getUser(); //this stores their network user id

return $NetUsername;

}

--- 8< ---

The configuration options for the phpCAS calls are stored in the Elgg database as plugin configuration, and are retrieved without issue.

When the script reaches the call phpCAS::forceAuthentication();, it doesn't find the phpCAS session variable, and therefore redirects to the CAS server to authenticate the user.

This all works in Elgg 0.8 and 0.9, and also works when called independent of the Elgg framework. Through debugging, I've determined that the phpCAS session variables go missing at some point during Elgg's own session init cycle before it hits my code.

This is a death knell for any kind of external authentication method that relies on session variables and/or session cookies to pass along authentication. My institution is looking at upgrading to Elgg 1.x, but without the ability to integrate CAS, it's a non-starter.

Installation fails (Trac #533)

Original ticket http://trac.elgg.org/ticket/533 on 38857726-05-31 by trac user dropkernel, assigned to unknown.

Elgg version: 1.1

I downloaded and installed Full Package.[[BR]]
Started Elgg and got the startup page.[[BR]]
Entered database information.[[BR]]
System Settings page appeared.[[BR]]
Entered 1) site name, 2) site url "http://localhost/", 3) entered full path "D:\My Webs\test.com", 4) entered full path to data "D:\My Webs\test.com\data", 5) enabled RESTful API[[BR]]
Clicked Save button and got an error message "404 Not Found, The requested URL /action/systemsettings/install was not found on this server."[[BR]]
Renamed "actions" folder as "action" folder.[[BR]]
Refreshed page and resent the form and got a new error message "Fatal error: Call to undefined function elgg_set_viewtype() in D:\My Webs\test.com\action\systemsettings\install.php on line 16"[[BR]]
Now I'm stuck.

Sanitise on input, escape on output. (Trac #561)

Original ticket http://trac.elgg.org/ticket/561 on 38885458-12-20 by trac user judgej, assigned to unknown.

Elgg version: 1.1

If I use characters in a display name that would normally be used to define HTML tags, they get converted to HTML entities. I don't believe this is the correct action to take.

For example, if I enter the name "Admin>", then it saves the name "Admin>". If this is an input mapping, then it could have repercussions throughout the system. For example, if I used '>' or '<' in a password, then can I be sure those characters are actually going to be stored in the password? If I have a five character limit on an input field, then the what happens when I enter '&&&&&' and find the system expands it to '&&&&&' before it attempts to store it? What if I am entering data that has nothing whatsoever to do with HTML or XML? What relevance is that kind of 'sanitisation' of input?

Mapping of special XML characters to entities is a function of the output (including when displayed as pre-filled form items). It is only relevent when that kind of mapping is important to the output, such as when creating XML or HTML. It has no place being done in the path between the user and the database.

I believe this is a very important issue, because I have seen other projects flounder when they do not follow the simple rule of keeping XML mapping out of the path from the user to the database. It is just asking for double-encoding to happen in various output points, and then you are in serious trouble because your user-entered data has effectively been corrupted.

Admins cannot change profile photos (Trac #545)

Original ticket http://trac.elgg.org/ticket/545 on 38868516-12-19 by trac user kevinjardine, assigned to unknown.

Elgg version: 1.1

Although the fix to Ticket #448 allows admins to edit other user details, admins still cannot edit profile photos.

In part this is because the menu links at the left go to the admin's own settings rather than the settings for the user being viewed.

However, even changing this (eg with a mod/profile/editicon.php?username=xxx link) does not solve the problem because the view and action associated with editicon.php incorrectly use the logged-in user rather than the page owner.

I am ranking this bug minor because it would be a minor issue for most site operators, although it is not a minor issue for a client of mine who needs this feature!

reset password doesn't work (Trac #550)

Original ticket http://trac.elgg.org/ticket/550 on 38873576-12-05 by trac user fuhrmara@..., assigned to unknown.

Elgg version: 1.1

If a user request a new password and confirms the link that is sended by mail, an error ('user:password:fail') occurs.
I tested this with a fully new installation of the current svn release.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.