Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
PlanetRed
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Digital Experience Group
PlanetRed
Commits
fe67e7fc
Commit
fe67e7fc
authored
14 years ago
by
Matthew Juhl
Browse files
Options
Downloads
Patches
Plain Diff
Get profile pages functional on mobile. CSS work is needed.
parent
b25423d5
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
plugins/mobile_unl/views/mobile/profile/userdetails.php
+104
-53
104 additions, 53 deletions
plugins/mobile_unl/views/mobile/profile/userdetails.php
with
104 additions
and
53 deletions
plugins/mobile_unl/views/mobile/profile/userdetails.php
+
104
−
53
View file @
fe67e7fc
...
...
@@ -10,8 +10,17 @@
*
*/
// Load flexprofile model
require_once
(
dirname
(
dirname
(
dirname
(
dirname
(
dirname
(
__FILE__
)))))
.
"/flexprofile/models/model.php"
);
// Load form profile model
require_once
(
dirname
(
dirname
(
dirname
(
dirname
(
dirname
(
__FILE__
)))))
.
"/form/models/profile.php"
);
$iconsize
=
"
medium
"
;
$iconsize
=
"
large
"
;
// wrap all profile info
echo
"<div id=
\"
profile_info
\"
>"
;
...
...
@@ -21,9 +30,10 @@
<?php
// wrap the icon and links in a div
echo
"<div id=
\"
profile_info_column_left
\"
>"
;
echo
"<div id=
\"
profile_icon_wrapper
\"
>"
;
// TODO: move styles to mobile stylesheet
echo
'<div id="profile_icon_wrapper" style="width: 100%; text-align: center;">'
;
// get the user's main profile picture
echo
elgg_view
(
"profile/icon"
,
array
(
...
...
@@ -35,36 +45,32 @@
);
echo
"</div>"
;
echo
"<div class=
\"
clearfloat
\"
></div>"
;
// display relevant links
//echo elgg_view("profile/profilelinks", array("entity" => $vars['entity']));
echo
"</div><!-- /#profile_icon_wrapper -->"
;
// display the users name
echo
"<h2><a href=
\"
"
.
$vars
[
'entity'
]
->
getUrl
()
.
"
\"
rel=
\"
$rel
\"
>"
.
$vars
[
'entity'
]
->
name
.
"</a></h2>"
;
// display relevant links
// TODO: determine if we want to keep these or not. They look bad right now.
echo
elgg_view
(
"profile/profilelinks"
,
array
(
"entity"
=>
$vars
[
'entity'
]));
// close profile_info_column_left
echo
"</div>"
;
?>
<div
id=
"profile_info_column_middle"
>
<?php
$rel
=
""
;
if
(
page_owner
()
==
$vars
[
'entity'
]
->
guid
)
$rel
=
'me'
;
else
if
(
check_entity_relationship
(
page_owner
(),
'friend'
,
$vars
[
'entity'
]
->
guid
))
$rel
=
'friend'
;
// display the users name
echo
"<h2><a href=
\"
"
.
$vars
[
'entity'
]
->
getUrl
()
.
"
\"
rel=
\"
$rel
\"
>"
.
$vars
[
'entity'
]
->
name
.
"</a></h2>"
;
$owner
=
$vars
[
'entity'
]
->
guid
;
$latest_wire
=
get_entities
(
"object"
,
"thewire"
,
$owner
,
""
,
1
,
0
,
false
,
0
,
null
);
foreach
(
$latest_wire
as
$lw
){
$status
=
$lw
->
description
;}
echo
"<div id=
\"
profilestatus
\"
>
$status
</div>"
;
echo
"<div id=
\"
profilestatus
\"
>
<h6>Latest Wire Post</h6>
$status
</div>"
;
//check to see if the user is looking at their own profile
if
(
$_SESSION
[
'user'
]
->
guid
==
page_owner
()){
//ADD A STATUS UPDATE BOX HERE
//TODO: ADD A STATUS UPDATE BOX HERE
}
else
{
if
(
isloggedin
())
{
...
...
@@ -84,46 +90,91 @@
?>
</div>
<!-- /#profile_info_column_middle -->
</div>
<!-- /#profile_info -->
<?php
// 0 open divs at this point
if
(
$vars
[
'full'
]
==
true
)
{
$form
=
flexprofile_get_profile_form
(
$vars
[
'entity'
]);
if
(
$form
)
{
if
(
$form
->
profile_format
!==
'tabbed'
)
{
$body
=
''
;
$data
=
form_get_data_for_profile_summary_display
(
$form
,
$vars
[
'entity'
]);
}
}
}
?>
<div
class=
"profile_nav"
>
<a
href=
"?view=mobile&p=activity"
>
Activity
</a>
<!-- | <a href="?view=mobile&p=mb">Message Board </a>-->
|
<a
href=
"?view=mobile&p=info"
>
Info
</a>
<!-- | <a href="?view=mobile&p=photos">Photos</a>-->
<p>
<a
href=
"?view=mobile&p=activity"
>
Activity
</a>
<!-- | <a href="?view=mobile&p=mb">Message Board </a>-->
|
<a
href=
"?view=mobile&p=info"
>
Info
</a>
<!-- | <a href="?view=mobile&p=photos">Photos</a>-->
</p>
</div>
<?php
if
(
get_input
(
'p'
)
==
'info'
)
{
$even_odd
=
null
;
if
(
is_array
(
$vars
[
'config'
]
->
profile
)
&&
sizeof
(
$vars
[
'config'
]
->
profile
)
>
0
)
foreach
(
$vars
[
'config'
]
->
profile
as
$shortname
=>
$valtype
)
{
if
(
$shortname
!=
"description"
)
{
$value
=
$vars
[
'entity'
]
->
$shortname
;
if
(
!
empty
(
$value
))
{
//This function controls the alternating class
$even_odd
=
(
'odd'
!=
$even_odd
)
?
'odd'
:
'even'
;
<?php
if
(
get_input
(
'p'
)
==
'info'
)
{
?>
<p
class=
"
<?php
echo
$even_odd
;
?>
"
>
<b>
<?php
echo
elgg_echo
(
"profile:
{
$shortname
}
"
);
?>
:
</b>
<?php
echo
elgg_view
(
"output/
{
$valtype
}
"
,
array
(
'value'
=>
$vars
[
'entity'
]
->
$shortname
));
?>
</p>
<?php
}
}
}
?>
<p
class=
"profile_aboutme_title"
><b>
<?php
echo
elgg_echo
(
"profile:aboutme"
);
?>
</b></p>
<?php
echo
elgg_view
(
'output/longtext'
,
array
(
'value'
=>
$vars
[
'entity'
]
->
description
));
//echo autop(filter_tags($vars['entity']->description));
?>
<?php
if
(
$vars
[
'entity'
]
->
canEdit
())
{
$editdetails
=
elgg_echo
(
"profile:edit"
);
$body
=
''
;
if
(
$vars
[
'entity'
]
->
canEdit
())
{
$body
.
=
<<<END
<p class="profile_info_edit_buttons">
<a href="{$vars['url']}pg/profile/{$vars['entity']->username}/edit/">
$editdetails</a>
</p>
END;
?>
<a
href=
"
<?php
echo
$vars
[
'url'
];
?>
pg/profile/
<?php
echo
$vars
[
'entity'
]
->
username
;
?>
/edit/"
>
<?php
echo
elgg_echo
(
"profile:edit"
);
?>
</a>
<?php
}
}
else
if
(
get_input
(
'p'
)
==
'activity'
||
get_input
(
'p'
)
==
false
){
?>
}
// Simple XFN
$rel
=
""
;
if
(
page_owner
()
==
$vars
[
'entity'
]
->
guid
)
$rel
=
'me'
;
else
if
(
check_entity_relationship
(
page_owner
(),
'friend'
,
$vars
[
'entity'
]
->
guid
))
$rel
=
'friend'
;
if
(
$vars
[
'full'
]
==
true
)
{
if
(
$form
)
{
if
(
$form
->
profile_format
!=
'tabbed'
)
{
// do right column
if
(
$data
[
'right'
])
{
foreach
(
$data
[
'right'
]
as
$item
)
{
$value
=
$item
->
value
;
if
(
!
empty
(
$value
))
{
//This function controls the alternating class
$even_odd
=
(
'odd'
!=
$even_odd
)
?
'odd'
:
'even'
;
$body
.
=
"<p class=
\"
{
$even_odd
}
\"
><b>"
;
$body
.
=
$item
->
title
.
':</b> '
;
$body
.
=
$item
->
value
;
$body
.
=
"</p>"
;
}
}
}
}
else
{
$body
.
=
elgg_view
(
'flexprofile/extended'
,
array
(
'entity'
=>
$vars
[
'entity'
],
'embedded'
=>
true
));
}
}
else
{
$body
.
=
elgg_echo
(
'form:error_no_profile_form'
);
}
}
echo
$body
;
}
else
if
(
get_input
(
'p'
)
==
'activity'
||
get_input
(
'p'
)
==
false
){
?>
<div
id=
"profileriver"
>
<?php
$type
=
''
;
...
...
@@ -133,7 +184,7 @@ $subject_guid = $vars['entity']->guid;
echo
elgg_view_river_items
(
$subject_guid
,
0
,
$relationship_type
,
$type
,
$subtype
,
''
);
?>
</div>
</div>
<!-- /#profileriver -->
<?php
}
else
if
(
get_input
(
'p'
)
==
'mb'
){
// Get the user who is the owner of the message board
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment