Skip to content

Commit

Permalink
Clean Up
Browse files Browse the repository at this point in the history
  • Loading branch information
Devindra Payment authored and Devindra Payment committed Feb 28, 2013
1 parent e43cd2d commit 61d3d55
Show file tree
Hide file tree
Showing 14 changed files with 231 additions and 188 deletions.
2 changes: 1 addition & 1 deletion css/form.css
Original file line number Diff line number Diff line change
Expand Up @@ -571,7 +571,7 @@ li.ui-sortable-helper {
cursor: pointer;
height: 16px;
width: 16px;
background: url(img/222222_256x240_icons_icons.png) no-repeat -80px -128px;
background: url(../img/icons.png) no-repeat -80px -128px;
overflow: hidden;
text-indent: -99999px;
}
Expand Down
325 changes: 164 additions & 161 deletions default-options.php
Original file line number Diff line number Diff line change
@@ -1,174 +1,177 @@
<?php
// This is the default option array
$option = array( );
$option['form'] = array(
'fields' => array(
'tabbed-1' => array(
array( "type" => "address", "label" => "address" ),
array( "type" => "phone" , "label" => "phone" ),
array( "type" => "email" , "label" => "email" ),
array( "type" => "website", "label" => "website" ),
array( "type" => "social" , "label" => "social" ),
),
'tabbed-2' => array(
array( "type" => "position", "label" => "position" ),
array( "type" => "bio", "label" => "bio" ),
),
'normal' => array(
array( "type" => "name", "label" => "name" ),
),
'side' => array(
array( "type" => "picture", "label" => "picture" ),
),
'bench' => array(
array( "type" => "department", "label" => "department" ),
array( "type" => "courses", "label" => "courses" ),
array( "type" => "officehours", "label" => "office hours" ),
array( "type" => "education", "label" => "education" ),
array( "type" => "awards", "label" => "awards" ),
array( "type" => "specialization", "label" => "specialization" ),
array( "type" => "teaching", "label" => "teaching" ),
array( "type" => "publications", "label" => "publications" ),
array( "type" => "research", "label" => "research" ),
array( "type" => "projects", "label" => "projects" ),
array( "type" => "unitassociations", "label" => "unit associations" ),
array( "type" => "professionalaffiliations", "label" => "professional affiliations" ),
array( "type" => "graduatestudent", "label" => "graduate student" ),
)
),
'tabs' => array( "Basic Info", "Bio" )
);
/**
* This is the default option array
*/


$option['page'] = array(
'fields' => array(
'tabbed-1' => array(
array( "type" => "address", "label" => "address" ),
array( "type" => "phone", "label" => "phone" ),
array( "type" => "email", "label" => "email" ),
array( "type" => "website", "label" => "website" ),
array( "type" => "social", "label" => "social" ),
),
'tabbed-2' => array(
array( "type" => "position", "label" => "position" ),
array( "type" => "bio", "label" => "biography" ),
),
'header' => array(
array( "type" => "picture", "label" => "picture" ),
array( "type" => "name", "label" => "name" )
$option = array(
/** Default layout for the Profile Form */
'form' => array(
'fields' => array(
'tabbed-1' => array(
array( "type" => "address", "label" => "address" ),
array( "type" => "phone" , "label" => "phone" ),
array( "type" => "email" , "label" => "email" ),
array( "type" => "website", "label" => "website" ),
array( "type" => "social" , "label" => "social" ),
),
'tabbed-2' => array(
array( "type" => "position", "label" => "position" ),
array( "type" => "bio", "label" => "bio" ),
),
'normal' => array(
array( "type" => "name", "label" => "name" ),
),
'side' => array(
array( "type" => "picture", "label" => "picture" ),
),
'bench' => array(
array( "type" => "department", "label" => "department" ),
array( "type" => "courses", "label" => "courses" ),
array( "type" => "officehours", "label" => "office hours" ),
array( "type" => "education", "label" => "education" ),
array( "type" => "awards", "label" => "awards" ),
array( "type" => "specialization", "label" => "specialization" ),
array( "type" => "teaching", "label" => "teaching" ),
array( "type" => "publications", "label" => "publications" ),
array( "type" => "research", "label" => "research" ),
array( "type" => "projects", "label" => "projects" ),
array( "type" => "unitassociations", "label" => "unit associations" ),
array( "type" => "professionalaffiliations", "label" => "professional affiliations" ),
array( "type" => "graduatestudent", "label" => "graduate student" ),
),
),
'bottom' => array(
),
'bench' => array(
array( "type" => "department", "label" => "department" ),
array( "type" => "education", "label" => "education" ),
array( "type" => "awards", "label" => "awards" ),
array( "type" => "specialization", "label" => "specialization" ),
array( "type" => "projects", "label" => "projects" ),
array( "type" => "graduatestudent", "label" => "graduate student" ),
array( "type" => "permalink", "label" => "permalink" ),
array( "type" => "unitassociations", "label" => "unit associations" ),
array( "type" => "professionalaffiliations", "label" => "professional affiliations" ),
array( "type" => "courses", "label" => "courses" ),
array( "type" => "officehours", "label" => "office hours" ),
)
'tabs' => array( "Basic Info", "Bio" ),
),
'tabs' => array( "Basic Info", "Bio" )
);


$option['list'] = array(
'fields' => array(
'normal' => array(
array( "type" => "picture", "label" => "picture" ),
array( "type" => "name", "label" => "name" ),
array( "type" => "phone", "label" => "phone" ),
array( "type" => "email", "label" => "email" ),
/** Default layout for a single Profile page */
'page' => array(
'fields' => array(
'tabbed-1' => array(
array( "type" => "address", "label" => "address" ),
array( "type" => "phone", "label" => "phone" ),
array( "type" => "email", "label" => "email" ),
array( "type" => "website", "label" => "website" ),
array( "type" => "social", "label" => "social" ),
),
'tabbed-2' => array(
array( "type" => "position", "label" => "position" ),
array( "type" => "bio", "label" => "biography" ),
),
'header' => array(
array( "type" => "picture", "label" => "picture" ),
array( "type" => "name", "label" => "name" ),
),
'bottom' => array(
),
'bench' => array(
array( "type" => "department", "label" => "department" ),
array( "type" => "education", "label" => "education" ),
array( "type" => "awards", "label" => "awards" ),
array( "type" => "specialization", "label" => "specialization" ),
array( "type" => "projects", "label" => "projects" ),
array( "type" => "graduatestudent", "label" => "graduate student" ),
array( "type" => "permalink", "label" => "permalink" ),
array( "type" => "unitassociations", "label" => "unit associations" ),
array( "type" => "professionalaffiliations", "label" => "professional affiliations" ),
array( "type" => "courses", "label" => "courses" ),
array( "type" => "officehours", "label" => "office hours" ),
),
),
'bench' => array(
array( "type" => "address", "label" => "address" ),
array( "type" => "website", "label" => "website" ),
array( "type" => "social", "label" => "social" ),
array( "type" => "position", "label" => "position" ),
array( "type" => "department", "label" => "department" ),
array( "type" => "courses", "label" => "courses" ),
array( "type" => "officehours", "label" => "office hours" ),
array( "type" => "education", "label" => "education" ),
array( "type" => "awards", "label" => "awards" ),
array( "type" => "specialization", "label" => "specialization" ),
array( "type" => "projects", "label" => "projects" ),
array( "type" => "graduatestudent", "label" => "graduate student" ),
array( "type" => "permalink", "label" => "permalink" ),
array( "type" => "unitassociations", "label" => "unit associations" ),
)
)
);

$option['settings'] = array(
"picture" => array(
"width" => 150,
"height" => 150,
),
"archive" => array(

'tabs' => array( "Basic Info", "Bio" ),
),
'slug' => 'person',
"permissions" => array(
'administrator' => array(
'edit_profile_cct' => true,
'edit_profiles_cct' => true,
'edit_others_profile_cct' => true,
'publish_profile_cct' => true,
'read_private_profile_cct' => true,
'delete_profile_cct' => true,
'delete_others_profile_cct' => true,
/** Default layout for a Profile exceprt, ie. the layout shown when a profile is shown as a part of a list. */
'list' => array(
'fields' => array(
'normal' => array(
array( "type" => "picture", "label" => "picture" ),
array( "type" => "name", "label" => "name" ),
array( "type" => "phone", "label" => "phone" ),
array( "type" => "email", "label" => "email" ),
),
'bench' => array(
array( "type" => "address", "label" => "address" ),
array( "type" => "website", "label" => "website" ),
array( "type" => "social", "label" => "social" ),
array( "type" => "position", "label" => "position" ),
array( "type" => "department", "label" => "department" ),
array( "type" => "courses", "label" => "courses" ),
array( "type" => "officehours", "label" => "office hours" ),
array( "type" => "education", "label" => "education" ),
array( "type" => "awards", "label" => "awards" ),
array( "type" => "specialization", "label" => "specialization" ),
array( "type" => "projects", "label" => "projects" ),
array( "type" => "graduatestudent", "label" => "graduate student" ),
array( "type" => "permalink", "label" => "permalink" ),
array( "type" => "unitassociations", "label" => "unit associations" ),
),
),
'editor' => array(
'edit_profile_cct' => true,
'edit_profiles_cct' => true,
'edit_others_profile_cct' => true,
'publish_profile_cct' => true,
'read_private_profile_cct' => true,
'delete_profile_cct' => true,
'delete_others_profile_cct' => true,
),
'settings' => array(
"picture" => array(
"width" => 150,
"height" => 150,
),
'author' => array(
'edit_profile_cct' => true,
'edit_profiles_cct' => true,
'edit_others_profile_cct' => false,
'publish_profile_cct' => true,
'read_private_profile_cct' => false,
'delete_profile_cct' => false,
'delete_others_profile_cct' => false
"archive" => array(

),
'contributor' => array(
'edit_profile_cct' => true,
'edit_profiles_cct' => false,
'edit_others_profile_cct' => false,
'publish_profile_cct' => false,
'read_private_profile_cct' => false,
'delete_profile_cct' => false,
'delete_others_profile_cct' => false,
'slug' => 'person',
"permissions" => array(
'administrator' => array(
'edit_profile_cct' => true,
'edit_profiles_cct' => true,
'edit_others_profile_cct' => true,
'publish_profile_cct' => true,
'read_private_profile_cct' => true,
'delete_profile_cct' => true,
'delete_others_profile_cct' => true,
),
'editor' => array(
'edit_profile_cct' => true,
'edit_profiles_cct' => true,
'edit_others_profile_cct' => true,
'publish_profile_cct' => true,
'read_private_profile_cct' => true,
'delete_profile_cct' => true,
'delete_others_profile_cct' => true,
),
'author' => array(
'edit_profile_cct' => true,
'edit_profiles_cct' => true,
'edit_others_profile_cct' => false,
'publish_profile_cct' => true,
'read_private_profile_cct' => false,
'delete_profile_cct' => false,
'delete_others_profile_cct' => false
),
'contributor' => array(
'edit_profile_cct' => true,
'edit_profiles_cct' => false,
'edit_others_profile_cct' => false,
'publish_profile_cct' => false,
'read_private_profile_cct' => false,
'delete_profile_cct' => false,
'delete_others_profile_cct' => false,
),
'subscriber' => array(
'edit_profile_cct' => true,
'edit_profiles_cct' => false,
'edit_others_profile_cct' => false,
'publish_profile_cct' => false,
'read_private_profile_cct' => false,
'delete_profile_cct' => false,
'delete_others_profile_cct' => false,
),
),
'subscriber' => array(
'edit_profile_cct' => true,
'edit_profiles_cct' => false,
'edit_others_profile_cct' => false,
'publish_profile_cct' => false,
'read_private_profile_cct' => false,
'delete_profile_cct' => false,
'delete_others_profile_cct' => false,
)
)
);

$option['taxonomy'] = array( );

$option['new_fields'] = array(
"1.1" => array(
array(
'field' => array( "type" => "data", "label" => "data" ),
'where' => array( "form", "page", "list" )
),
'taxonomy' => array(),
'new_fields' => array(
"1.1" => array(
array(
'field' => array(
"type" => "data",
"label" => "data",
),
'where' => array( "form", "page", "list" )
)
)
)
);
2 changes: 1 addition & 1 deletion examples/taxonomy.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@
<?php else: ?>
<div id="post-<?php the_ID(); ?>" class="<?php hybrid_entry_class(); ?>">
<?php get_the_image( array( 'custom_key' => array( 'Thumbnail' ), 'default_size' => 'thumbnail' ) ); ?>

<?php hybrid_before_entry(); // Before entry hook ?>
<div class="entry-summary entry">
<?php the_excerpt(); ?>
</div>

<?php hybrid_after_entry(); // After entry hook ?>
</div>
<?php endif; ?>
Expand Down
Binary file added img/button-white.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
Binary file modified img/ubc-blog.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified img/ubc-wiki.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 6 additions & 3 deletions inc/simple_html_dom.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,17 @@ function file_get_html($url, $use_include_path = false, $context=null, $offset =
{
// We DO force the tags to be terminated.
$dom = new simple_html_dom(null, $lowercase, $forceTagsClosed, $target_charset, $defaultBRText);
// For sourceforge users: uncomment the next line and comment the retreive_url_contents line 2 lines down if it is not already done.

// For sourceforge users: uncomment the next line and comment the retreive_url_contents line 2 lines down if it is not already done.
$contents = file_get_contents($url, $use_include_path, $context, $offset);
// Paperg - use our own mechanism for getting the contents as we want to control the timeout.
// $contents = retrieve_url_contents($url);
// Paperg - use our own mechanism for getting the contents as we want to control the timeout.
// $contents = retrieve_url_contents($url);

if (empty($contents))
{
return false;
}

// The second parameter can force the selectors to all be lowercase.
$dom->load($contents, $lowercase, $stripRN);
return $dom;
Expand Down
2 changes: 1 addition & 1 deletion js/admin.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ var Profile_CCT_Admin = {

prep: function( where ) {
var html = 'The profile '+where+' layout has been changed. <a href="#nogo" id="refresh-profiles" class="button">Update All Profiles</a>';
if (jQuery('#update-profile-shell').length ) { //ie. #update-profile-shell already exists.
if ( jQuery('#update-profile-shell').length ) { //ie. #update-profile-shell already exists.
jQuery('#update-profile-shell').html(html);
} else {
jQuery('#profile-setting').after('<div id="update-profile-shell" class="update-profiles info">'+html+'</div>');
Expand Down
1 change: 1 addition & 0 deletions js/autocomplete.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
jQuery(document).ready( function($) {
var ajaxurl = profile_cct_autocomple.admin_url;
var ajaxaction = 'profile_cct_autocomplete';

$(".profile-cct-search-form input.profile-cct-search").each( function() {
jQuery(this).autocomplete( {
delay: 0,
Expand Down
Loading

0 comments on commit 61d3d55

Please sign in to comment.