Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion wp-content/plugins/TcApi-hookup/includes/ajax_func.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,17 @@ function post_register_controller(){
'lastName' => $_POST['lastName'],
'handle' => $_POST['handle'],
'country' => $_POST['country'],
'regSource' => 'http://www.topcoder.com/',
'email' => $_POST['email']
),
'cookies' => array()
);
#print_r($_POST);
if(isset($_POST['socialProviderId'])){
$params["body"]["socialProviderId"] = $_POST['socialProviderId'];
$params["body"]["socialProvider"] = $_POST['socialProvider'];
$params["body"]["socialUserName"] = $_POST['socialUserName'];
$params["body"]["socialUserId"] = $_POST['socialUserId'];
$params["body"]["socialEmail"] = $_POST['socialEmail'];
$params["body"]["socialEmailVerified"] = $_POST['socialEmailVerified'];
} else {
Expand All @@ -29,10 +33,12 @@ function post_register_controller(){
$response = wp_remote_post( $url, $params );

$msg = json_decode($response['body']);
#browser()->log($params);
#browser()->log($msg);
$code = $response['response']['code'];
#print_r($msg);
$mm = "";
if ( $msg->error )
if ( $msg->error->details )
foreach ( $msg->error->details as $m ):
$mm.= $m;
endforeach;
Expand Down
8 changes: 4 additions & 4 deletions wp-content/themes/tcs-responsive/author.php
Original file line number Diff line number Diff line change
Expand Up @@ -170,10 +170,10 @@
</div>
<div class="shareVia">
<span>Share via : </span>
<a href="<?php echo $email_article;?>" class="shareButton"><img src="<?php bloginfo( 'stylesheet_directory' ); ?>/i/shares-mail.png" width="21" height="21" /></a>
<a href="<?php echo $fbShare;?>" class="shareButton"><img src="<?php bloginfo( 'stylesheet_directory' ); ?>/i/shares-fb.png" width="21" height="21" /></a>
<a href="<?php echo $twitterShare;?>" class="shareButton"><img src="<?php bloginfo( 'stylesheet_directory' ); ?>/i/shares-twitter.png" width="21" height="21" /></a>
<a href="<?php echo $gplusShare;?>" class="shareButton"><img src="<?php bloginfo( 'stylesheet_directory' ); ?>/i/shares-gplus.png" width="21" height="21" /></a>
<a href="<?php echo $email_article;?>" class="shareButton shareMail small"></a>
<a href="<?php echo $fbShare;?>" class="shareButton shareFb small"></a>
<a href="<?php echo $twitterShare;?>" class="shareButton shareTw small"></a>
<a href="<?php echo $gplusShare;?>" class="shareButton shareGPlus small"></a>
</div>
<a href="<?php the_permalink();?>" class="continueReading">Continue Reading</a>
</div>
Expand Down
8 changes: 4 additions & 4 deletions wp-content/themes/tcs-responsive/category.php
Original file line number Diff line number Diff line change
Expand Up @@ -171,10 +171,10 @@
</div>
<div class="shareVia">
<span>Share via : </span>
<a href="<?php echo $email_article;?>" class="shareButton"><img src="<?php bloginfo( 'stylesheet_directory' ); ?>/i/shares-mail.png" width="21" height="21" /></a>
<a href="<?php echo $fbShare;?>" class="shareButton"><img src="<?php bloginfo( 'stylesheet_directory' ); ?>/i/shares-fb.png" width="21" height="21" /></a>
<a href="<?php echo $twitterShare;?>" class="shareButton"><img src="<?php bloginfo( 'stylesheet_directory' ); ?>/i/shares-twitter.png" width="21" height="21" /></a>
<a href="<?php echo $gplusShare;?>" class="shareButton"><img src="<?php bloginfo( 'stylesheet_directory' ); ?>/i/shares-gplus.png" width="21" height="21" /></a>
<a href="<?php echo $email_article;?>" class="shareButton shareMail small"></a>
<a href="<?php echo $fbShare;?>" class="shareButton shareFb small"></a>
<a href="<?php echo $twitterShare;?>" class="shareButton shareTw small"></a>
<a href="<?php echo $gplusShare;?>" class="shareButton shareGPlus small"></a>
</div>
<a href="<?php the_permalink();?>" class="continueReading">Continue Reading</a>
</div>
Expand Down
4 changes: 1 addition & 3 deletions wp-content/themes/tcs-responsive/css/blog-base.css
Original file line number Diff line number Diff line change
Expand Up @@ -279,10 +279,8 @@ img {
}
.sideFindRelatedContent .relatedContentList li a.contentLink:hover {
color: #FFB800;
text-shadow:none;
}
.sideFindRelatedContent .relatedContentList li a:hover .contentThumb{
box-shadow: 0 0 6px rgba(0, 0, 0, 0.3);
}
.sideFindRelatedContent .relatedContentList li .contentBrief {
display: block;
line-height: 15px;
Expand Down
5 changes: 2 additions & 3 deletions wp-content/themes/tcs-responsive/css/blog.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ a.blueLink {
-moz-transition-duration: .3s; -webkit-transition-duration: .3s; transition-duration: .3s;
}
a.blueLink:hover {
color: #0071bc;
text-shadow: 0 0 3px #989898;
color: #FFB800;
}
.blogCategoryMenu {
float:left;
Expand Down Expand Up @@ -429,7 +428,7 @@ h3.popularPostTitle {
}

.blogItem .blogTitle {
font-size:18px;
font-size:21px;
font-weight:normal;
line-height:22px;
color:#0071bc;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@

.challenge-detail .tableWrap h1{
color: #00aeff;
font-size:16px;
font-size:15px;
line-height:22px;
font-weight: bold;
border-bottom: 1px solid #e7e7e7;
Expand Down Expand Up @@ -309,6 +309,7 @@
height: auto;
padding-left:12px;
background: url("../i/bullet.png") no-repeat 0 7px;
color:#797979;
}

.challenge-detail .tableWrap p a{
Expand Down
5 changes: 1 addition & 4 deletions wp-content/themes/tcs-responsive/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -1474,11 +1474,8 @@
}
.sideFindRelatedContent .relatedContentList li a.contentLink:hover {
color: #FFB800;
text-shadow: 0 0 3px #ffdaa2;
}
.sideFindRelatedContent .relatedContentList li a:hover .contentThumb{
box-shadow: 0 0 6px rgba(0, 0, 0, 0.3);
}

.sideFindRelatedContent .relatedContentList li .contentBrief {
display: block;
line-height: 15px;
Expand Down
8 changes: 6 additions & 2 deletions wp-content/themes/tcs-responsive/footer.php
Original file line number Diff line number Diff line change
Expand Up @@ -573,9 +573,9 @@
redirect_uri: 'http://www.topcoder.com/'
});

var socialProviderId = "", socialUserName = "";
var socialProviderId = "", socialUserName = "", socialEmail = "",socialProvider = "";
auth0Register.parseHash(window.location.hash, function (profile, id_token, access_token, state) {
var socialProvider = profile.identities[0].connection;
socialProvider = profile.identities[0].connection;
var firstName = "" , lastName = "", handle = "", email = "";
if(socialProvider === googleProvider || socialProvider === facebookProvider){
firstName = profile.given_name;
Expand All @@ -602,10 +602,14 @@
socialProviderId = 4;
}
socialUserName = handle;
socialUserId = profile.user_id.split('|')[1];
socialEmail = profile.email;
$("#registerForm .firstName").val(firstName);
$("#registerForm .lastName").val(lastName);
$("#registerForm .handle").val(handle);
$("#registerForm .email").val(email);


});

$('.register-google').on('click', function() {
Expand Down
8 changes: 7 additions & 1 deletion wp-content/themes/tcs-responsive/functions-widget.php
Original file line number Diff line number Diff line change
Expand Up @@ -297,10 +297,16 @@ function widget($args, $instance) {
<?php
while ( have_posts() ) : the_post();
$post;

$postId = $post->ID;
$imageMobile = wp_get_attachment_image_src( get_post_thumbnail_id( $postId ), 'thumbnail' );
if($imageMobile!=null) $imageUrlMobile = $imageMobile[0];
else $imageUrlMobile = get_bloginfo('stylesheet_directory')."/i/content-thumb.png";

?>
<li>
<a class="contentLink" href="<?php the_permalink() ?>">
<img class="contentThumb" src="<?php bloginfo( 'stylesheet_directory' ); ?>/i/content-thumb.png" alt="<?php the_title(); ?>">
<img class="contentThumb" src="<?php echo $imageUrlMobile; ?>" alt="<?php the_title(); ?>">
<?php the_title(); ?>
</a> <span class="contentBrief"><?php echo wrap_content_strip_html(wpautop(get_the_content()), 70, true,'\n\r','...') ?></span>
</li>
Expand Down
Binary file modified wp-content/themes/tcs-responsive/i/bullet.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 4 additions & 1 deletion wp-content/themes/tcs-responsive/js/init-header.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,10 @@ $(document).ready(function(){
$('.myProfileLink, .profileLink').attr('href', userPofileUrl);
$('.userDetails .country').text(data['country']);
$('.userDetails .memberSince').text(data['memberSince'].split(" ")[0].split(".")[2]);
$('.userDetails .memberEarning').text("$"+data['overallEarning']);
if ( data['overallEarning'] )
$('.userDetails .memberEarning').text("$"+data['overallEarning']);
else
$('.userDetails .memberEarning').text("n/a");
});
$('#navigation, .sidebarNav').removeClass('newUser');
});
Expand Down
28 changes: 19 additions & 9 deletions wp-content/themes/tcs-responsive/js/register-login.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ $(function(){

function closeModal() {
$('.modal,#bgModal').hide();
$(".pwd, .confirm, .strength").parents(".row").show();
$("#register a.btnSubmit").removeClass("socialRegister");
};

$(window).on('resize', function(){
Expand All @@ -39,7 +37,9 @@ $(function(){

$('.actionLogin').on('click', function() {
document.getElementById("loginForm").reset();
$('#loginForm .btnSubmit').html('Login');
$('#loginForm .btnSubmit').html('Login');
$(".pwd, .confirm, .strength").parents(".row").show();
$("#register a.btnSubmit").removeClass("socialRegister");
showModal('#login');
});

Expand Down Expand Up @@ -268,8 +268,10 @@ $(function(){
}
if(socialProviderId !== ""){
fields.socialProviderId = socialProviderId;
fields.socialUserId = socialUserId;
fields.socialProvider = socialProvider,
fields.socialUserName = socialUserName;
fields.socialEmail = $('#registerForm input.email').val();
fields.socialEmail = socialEmail;
fields.socialEmailVerified = "t";
} else {
fields.password = $('#registerForm input.pwd').val();
Expand All @@ -284,7 +286,7 @@ $(function(){
$('#registerForm .invalid').removeClass('invalid');
$('#registerForm .valid').removeClass('valid');
$('.err1,.err2',frm).hide();

resetRegisterFields();
}
else{
//$('.modal').hide();
Expand All @@ -295,9 +297,7 @@ $(function(){

}
$('#register .btnSubmit').html('Sign Up');
}, "json");
$(".pwd, .confirm, .strength").parents(".row").show();
$("#register a.btnSubmit").removeClass("socialRegister");
}, "json");
}
});

Expand Down Expand Up @@ -374,4 +374,14 @@ $(function(){
else $span.css('opacity', 0);
});
});
});
});

// Resets the registration popup fields
function resetRegisterFields(){
$("#registerForm input[type='text'], #registerForm input[type='password']").val("");
$("#registerForm select").val($("#registerForm select option:first").val());
$("#registerForm .customSelectInner").text($("#registerForm select option:first").text());
$("#registerForm input[type='checkbox']").attr('checked', false);
$(".pwd, .confirm, .strength").parents(".row").show();
$("#register a.btnSubmit").removeClass("socialRegister");
}
30 changes: 12 additions & 18 deletions wp-content/themes/tcs-responsive/js/script-challenges.js
Original file line number Diff line number Diff line change
Expand Up @@ -454,10 +454,10 @@ appChallenges = {
callback();
}
},
error: function(data) {
fail: function(data) {
$('.loading').hide();
$('tbody', table).html(null);
alert("Ops.. Data not found!");
//$('tbody', table).html(null);
alert(" Data not found!");
}
});
},
Expand All @@ -483,9 +483,8 @@ appChallenges = {
$('.colReg', row).html('<a href="javascript:;">'+rec.totalCompetitors+'</a>');
}
else {
$('.contestName', row).html('<img alt="" class="allContestIco" src="'+stylesheet_dir+'/i/ico-track-data.png" />' + rec.fullName);
$('.contestName', row).attr('href','http://community.topcoder.com/tc?module=MatchDetails&rd=' + rec.roundId );
$('.colType', row).html("Marathon");
//$('.contestName', row).html(rec.fullName);
$('.contestName', row).html('<img alt="" class="allContestIco" src="'+stylesheet_dir+'/i/ico-track-data.png" />' + '<a href="http://community.topcoder.com/tc?module=MatchDetails&rd=' + rec.roundId + '">' + rec.fullName + '</a>'); $('.colType', row).html("Marathon");
$('.colR1start', row).html(app.formatDateChallenges(rec.startDate));
$('.colReg', row).html(rec.numberOfRegistrants);
}
Expand Down Expand Up @@ -550,9 +549,9 @@ appChallenges = {
callback();
}
},
error: function(data) {
fail: function(data) {
$('.loading').hide();
$('tbody', table).html(null);
//$('tbody', table).html(null);
alert("Data not found!");
}
});
Expand Down Expand Up @@ -710,9 +709,9 @@ appChallenges = {
callback();
}
},
error: function(data) {
fail: function(data) {
$('.loading').hide();
$('tbody', table).html(null);
// $('tbody', table).html(null);
alert("Data not found!");
}
});
Expand All @@ -739,7 +738,7 @@ appChallenges = {
callback();
}
},
error: function(data) {
fail: function(data) {
$('.loading').hide();
//$('tbody', table).html(null);
alert("Data not found!");
Expand All @@ -762,7 +761,7 @@ appChallenges = {

var startDate = app.formatDateChallenges(rec.startDate);
var totalCompetitors = rec.totalCompetitors;
var numSubmissions = rec.numberOfSubmissions;
var numSubmissions = rec.divIITotalSolutionsSubmitted;

$('.contestName', row).html('<img alt="" class="allContestIco" src="'+stylesheet_dir+'/i/ico-track-data.png" />' + rec.fullName + '</a>');
$('.contestName', row).parents(".inTCO").addClass("hasTCOIco");
Expand Down Expand Up @@ -1168,12 +1167,7 @@ appChallenges = {

//format currency
formatCur: function(cu) {
var str = "" + cu;
var len = str.length - 3;
for (var i = len; i > 0; i = i - 3) {
str = str.splice(i, 0, ',');
}
return str;
return cu.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
},

//format date
Expand Down
4 changes: 2 additions & 2 deletions wp-content/themes/tcs-responsive/page-challenges-active.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
<li><a href="javascript:;" class="active link">Open Challenges</a></li>
<li><a href="<?php echo $pastChallenges;?>" class="link">Past Challenges</a></li>
<li><a href="<?php echo $reviewChallenges;?>" class="link">Review Opportunities </a></li>
<li><a href="<?php echo $bugraceChallenges;?>" class="link">Races</a></li>
<!-- <li><a href="<?php echo $bugraceChallenges;?>" class="link">Races</a></li> -->
</ul>
</div>
<div class="rt">
Expand Down Expand Up @@ -272,7 +272,7 @@
<th class="colType" data-placeholder="challengeType">Type<i></i></th>
<th class="colTime desc" data-placeholder="postingDate">Timeline<i></i></th>
<th class="colTLeft noSort" data-placeholder="currentPhaseRemainingTime">Time Left<i></i></th>
<th class="colPur noSort" data-placeholder="prize">Prize<i></i></th>
<th class="colPur noSort" data-placeholder="prize">Prizes<i></i></th>
<th class="colPhase noSort" data-placeholder="currentPhase">Current Phase<i></i></th>
<th class="colReg noSort" data-placeholder="numRegistrants">Registrants<i></i></th>
<th class="colSub noSort" data-placeholder="numSubmissions">Submissions<i></i></th>
Expand Down
4 changes: 2 additions & 2 deletions wp-content/themes/tcs-responsive/page-challenges-past.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
<li><a href="<?php echo $activeChallenges;?>" class="link">Open Challenges</a></li>
<li><a href="javascript:;" class="active link">Past Challenges</a></li>
<li><a href="<?php echo $reviewChallenges;?>" class="link">Review Opportunities </a></li>
<li><a href="<?php echo $bugraceChallenges;?>" class="link">Races</a></li>
<!-- <li><a href="<?php echo $bugraceChallenges;?>" class="link">Races</a></li> -->
</ul>
</div>
<div class="rt">
Expand Down Expand Up @@ -271,7 +271,7 @@
<th class="colCh" data-placeholder="challengeName">Challenges<i></i></th>
<th class="colType" data-placeholder="challengeType">Type<i></i></th>
<th class="colTime desc" data-placeholder="submissionEndDate">Timeline<i></i></th>
<th class="colPur noSort" data-placeholder="prize">Prize<i></i></th>
<th class="colPur noSort" data-placeholder="prize">Prizes<i></i></th>
<th class="colPhase noSort" data-placeholder="currentPhase">Current Phase<i></i></th>
<th class="colReg noSort" data-placeholder="numRegistrants">Registrants<i></i></th>
<th class="coleSub noSort" data-placeholder="numSubmissions">Eligible Submissions<i></i></th>
Expand Down
4 changes: 2 additions & 2 deletions wp-content/themes/tcs-responsive/page-member-profile.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,13 @@
<label>Member Since:</label>
<div class="val"><?php
$memSince = $coder->memberSince;
$memSince = str_replace(".","/",$memSince);
#$memSince = str_replace(".","/",$memSince);
echo date("M d, Y", strtotime($memSince)) ;
?></div>
</div>
<div class="memberSince">
<label>Total Earnings :</label>
<div class="val"><?php echo $coder->overallEarning ? '$'.$coder->overallEarning : "$0";?></div>
<div class="val"><?php echo $coder->overallEarning ? '$'.$coder->overallEarning : "n/a";?></div>
</div>
</div>
</div>
Expand Down