Project

General

Profile

Feature #322

Add short URL to consult users profiles

Added by Carlos Vargas about 10 years ago. Updated over 8 years ago.

Status:
Feature implemented
Priority:
Normal
Category:
-
Target version:
Start date:
03/12/2009
Due date:
% Done:

100%

Estimated time:
Complexity:
Normal
SCRUM pts - complexity:
?

Description

Develop a new (and short) way to see a user's profile in dokeos. For example, http://campus.dokeos.com/user.php?ywarnier
where "ywarnier" is found by doing an "array_keys($_GET)" and selecting that username from the database, then checking permissions to see that profile, and allow to login as this user on that same page, which would redirect to the profile edition, to ease the recovery of an API key...


Related issues

Related to Chamilo LMS - Feature #7049: Add "@" user tags in forumNew28/03/2014

Actions

History

#1

Updated by Carlos Vargas about 10 years ago

Actualizado por Julio Montoya hace 8 meses

Comment

I proposed this:

We go to
http://campus.dokeos.com/user.php?ywarnier

if the social tool is enabled the page will be redirect to:
http://dev.dokeos.com/main/social/profile.php?u=9

else

user.php will generate some simple page like the whoisonline but with more info about the user
http://dev.dokeos.com/whoisonline.php?id=1
#2
Actualizado por Yannick Warnier hace 7 meses

Comment

I'm ok with that.
#3
Actualizado por Julio Montoya hace 4 meses

Comment

it will be better if the url is:

http://campus.dokeos.com/user/ywarnier

the user/index.php does not exist
#4
Actualizado por Julio Montoya hace 4 meses

Comment

but I will need something like clean urls in drupal
#5
Actualizado por Julio Montoya hace 4 meses

Comment

I have something like this:
this should be created in the same directory as whoisonline.php with the name:

user.php

// name of the language file that needs to be included
$language_file = array('index','registration','messages','userInfo');
require_once './main/inc/global.inc.php';
api_block_anonymous_users();
require_once api_get_path(LIBRARY_PATH).'usermanager.lib.php';

$array_keys = array_keys($_GET);
$username = Database::escape_string(substr($array_keys0,0,20)); // max len of an username
$friend_id = UserManager::get_user_id_from_username($username);

if ($friend_id!=false) {
if (api_get_setting('allow_social_tool') =='true') {
header('Location: main/social/profile.php?u='.$friend_id.'');
exit;
} else {
header('Location: whoisonline.php?id='.$friend_id.'');
exit;
}
} else {
// we cant find your friend
header('Location: whoisonline.php');
}
#6
Actualizado por Julio Montoya hace 3 meses

  • VersiĆ³n prevista changed from 1.8.5 to 1.8.7
#2

Updated by Yannick Warnier over 9 years ago

Julio, como estamos con esto? Al final implementamos algo o no?

#3

Updated by Julio Montoya over 9 years ago

Clean URls for the Social Network

The idea is to access to the user info more easily:
http://campus.chamilo.org/admin instead of http://campus.chamilo.org/main/social/profile.php?1
To use this you should rename the htaccess to .htaccess and check your virtualhost configuration

I also need a database configuration setting to know if the mod_rewrite is enabled in chamilo
More improvements will be set in the next version of Chamilo I guess...

#5

Updated by Julio Montoya over 9 years ago

  • Status changed from New to Needs testing
  • Assignee changed from Julio Montoya to Curt Ricardo Rodriguez Salazar
  • Target version changed from 1.8.7 to 1.8.7.1
  • % Done changed from 0 to 60
#6

Updated by Curt Ricardo Rodriguez Salazar over 9 years ago

  • % Done changed from 60 to 100

this it is ok.

#7

Updated by Yannick Warnier over 8 years ago

  • Status changed from Needs testing to Feature implemented

Also available in: Atom PDF