array('ultize' => '','params' =>array(),),'author' =>array('ultize' => '','params' =>array(),),'avatar' =>array('ultize' => '','params' =>array(),),'responses' =>array('ultize' => '','params' =>array(),),);
$offset = 0;
$al_p_header = '
';
$al_p_subHeader = '';
$al_p_numItems = '5';
$al_p_showQuestionTitle = 'yes';
$al_p_showQuestionContent = 'yes';
$al_p_showAnswers = 'yes';
$al_p_showPoster = 'yes';
$al_p_showPosterPhoto = 'yes';
$al_p_showNumResponses = 'yes';
$al_p_questionTitleNumChars = '100';
$al_p_questionContentNumChars = '100';
$al_p_answerNumChars = '100';
$al_p_userNameNumChars = '8';
$type = EPUtils::getRequestParam('type');
$type = ($type) ? $type : 'resolved';
$al_p_questionType = $type;
$al_p_dateSubmitted = 'all';
$al_p_sort = 'date_desc';
$al_p_region = 'us';
$al_p_tag ='Land+Rover OR LandRover OR RangeRover OR Range+Rover OR Range+Rover+Sport OR Land+Rover+LR3 OR Land+Rover+LR2 OR LR3 OR LR2 OR Land+Rover+Defender OR Land+Rover+Series+One OR Land+Rover+Series OR Land+Rover+Series+II OR Land+Rover+Parts OR Land+Rover+Accessories OR Land+Rover+Audio OR Land+Rover+Engines OR Land+Rover+Brakes OR Land+Rover+Brakes OR Land+Rover+Off-Roading OR Land+Rover+Maintenance OR Land+Rover+Drivetrain OR Land+Rover+Suspension OR Land+Rover+Wheels OR Land+Rover+Tires OR Land+Rover+Towing OR Land+Rover+Warranty OR Land+Rover+Buying OR Land+Rover+Selling OR Land+Rover+Discovery OR Land+Rover+Freelander OR Range+Rover+Classic';
$al_p_showPagination = 'yes';
$al_p_paginationAlignment = 'bottom';
$al_p_no_pages = '4';
$al_p_block_link = 'yes';
$al_p_question_icon = '';
$al_p_answer_icon = '';
$al_link_name = 'http://answers.yahoo.com';
$al_see_more_link = '';
$al_see_more_url = 'http://';
$al_see_more_link_alignment = 'inline-l';
$al_p_footer = '';
$spaces = '';
$sitename = getenv('EP_MICROSITE_ID');
$pageNumKey = 'answersList_4_p_page_no';
$page_no = EPUtils::getRequestParam($pageNumKey);
$num_results = $al_p_numItems + 1;
if ($page_no != '')
{
$offset = ($page_no - 1) * $al_p_numItems;
$cnt = $offset + $al_p_numItems;
}
else
{
$page_no = 1;
$offset = 0;
$cnt = $al_p_numItems;
}
echo '
EOD;
}
if ($answers[$i]['type'] != 'Answered')
{
echo '
'; } //*echo '
';
/* placed for showing best answer */
//echo 'Land Rover Answers
';
$al_p_subHeader = '';
$al_p_numItems = '5';
$al_p_showQuestionTitle = 'yes';
$al_p_showQuestionContent = 'yes';
$al_p_showAnswers = 'yes';
$al_p_showPoster = 'yes';
$al_p_showPosterPhoto = 'yes';
$al_p_showNumResponses = 'yes';
$al_p_questionTitleNumChars = '100';
$al_p_questionContentNumChars = '100';
$al_p_answerNumChars = '100';
$al_p_userNameNumChars = '8';
$type = EPUtils::getRequestParam('type');
$type = ($type) ? $type : 'resolved';
$al_p_questionType = $type;
$al_p_dateSubmitted = 'all';
$al_p_sort = 'date_desc';
$al_p_region = 'us';
$al_p_tag ='Land+Rover OR LandRover OR RangeRover OR Range+Rover OR Range+Rover+Sport OR Land+Rover+LR3 OR Land+Rover+LR2 OR LR3 OR LR2 OR Land+Rover+Defender OR Land+Rover+Series+One OR Land+Rover+Series OR Land+Rover+Series+II OR Land+Rover+Parts OR Land+Rover+Accessories OR Land+Rover+Audio OR Land+Rover+Engines OR Land+Rover+Brakes OR Land+Rover+Brakes OR Land+Rover+Off-Roading OR Land+Rover+Maintenance OR Land+Rover+Drivetrain OR Land+Rover+Suspension OR Land+Rover+Wheels OR Land+Rover+Tires OR Land+Rover+Towing OR Land+Rover+Warranty OR Land+Rover+Buying OR Land+Rover+Selling OR Land+Rover+Discovery OR Land+Rover+Freelander OR Range+Rover+Classic';
$al_p_showPagination = 'yes';
$al_p_paginationAlignment = 'bottom';
$al_p_no_pages = '4';
$al_p_block_link = 'yes';
$al_p_question_icon = '';
$al_p_answer_icon = '';
$al_link_name = 'http://answers.yahoo.com';
$al_see_more_link = '';
$al_see_more_url = 'http://';
$al_see_more_link_alignment = 'inline-l';
$al_p_footer = '';
$spaces = '';
$sitename = getenv('EP_MICROSITE_ID');
$pageNumKey = 'answersList_4_p_page_no';
$page_no = EPUtils::getRequestParam($pageNumKey);
$num_results = $al_p_numItems + 1;
if ($page_no != '')
{
$offset = ($page_no - 1) * $al_p_numItems;
$cnt = $offset + $al_p_numItems;
}
else
{
$page_no = 1;
$offset = 0;
$cnt = $al_p_numItems;
}
echo '';
echo ' .')
'; echo '
'; $query = EPUtils::parseTagQuery($al_p_tag); $req_params = array('query' => $query, 'start' => $offset, 'count' => $al_p_numItems, 'sort' => $al_p_sort, 'region' => $al_p_region, 'date_range' => $al_p_dateSubmitted, 'results' => $al_p_numItems, 'type' => $al_p_questionType, 'useCache' => "yes" ); $sitename = getenv('EP_MICROSITE_ID'); $method = 'searchQuestions'; $ttl = ''; /** Call the common controller to get data **/ $controllerObj = EPFEController::getInstance(); $requestArr = array(); $requestArr[d_CNT_WIDGET_NAME] = 'Simple_Answers_List'; $requestArr[d_CNT_MICROSITE_ID] = $sitename; $requestArr[d_CNT_MODULE_PARAMS] = $req_params; $requestArr[d_CNT_METHOD_NAME] = $method; $requestArr[d_CNT_TTL] = $ttl; $response = $controllerObj->fetchContent($requestArr); $answers = $response['Results']; $total_results = count($answers); /* echo '
EOD;
}
}
if ($al_p_showPoster == 'yes')
{
$timestamp = EPUtils::getRelativeTimestamp($answers[$i]['timestamp']);
echo << .')
'; echo '
';
if ($type == 'open')
{
echo 'OPEN QUESTIONS:';
}
elseif ($type == 'resolved')
{
echo 'ALL RESOLVED QUESTIONS:';
}
elseif ($type == 'all')
{
echo 'ALL ANSWERS:';
}
echo '
'; $query = EPUtils::parseTagQuery($al_p_tag); $req_params = array('query' => $query, 'start' => $offset, 'count' => $al_p_numItems, 'sort' => $al_p_sort, 'region' => $al_p_region, 'date_range' => $al_p_dateSubmitted, 'results' => $al_p_numItems, 'type' => $al_p_questionType, 'useCache' => "yes" ); $sitename = getenv('EP_MICROSITE_ID'); $method = 'searchQuestions'; $ttl = ''; /** Call the common controller to get data **/ $controllerObj = EPFEController::getInstance(); $requestArr = array(); $requestArr[d_CNT_WIDGET_NAME] = 'Simple_Answers_List'; $requestArr[d_CNT_MICROSITE_ID] = $sitename; $requestArr[d_CNT_MODULE_PARAMS] = $req_params; $requestArr[d_CNT_METHOD_NAME] = $method; $requestArr[d_CNT_TTL] = $ttl; $response = $controllerObj->fetchContent($requestArr); $answers = $response['Results']; $total_results = count($answers); /* echo '
';
print_r($response);
exit; */
/**************** Pagination variable starts here **********************************/
$pageNumKey = 'answersList_4_p_page_no';
$pageNumber = array_key_exists($pageNumKey, $_REQUEST) ? $_REQUEST[$pageNumKey] : 1;
$baseQuery = '';
foreach($_GET as $key => $val)
{
if ($key != $pageNumKey)
{
$baseQuery .= urlencode($key) . '=' . urlencode($val) . '&';
}
}
$hitsPerPage = $al_p_numItems;
$totalHits = $response['TotalResultsAvailable'];
$pageLinks = $al_p_no_pages;
$curPageKey = $pageNumber;
$startIndex = ($pageNumber - 1) * $hitsPerPage;
/**************** Pagination variable ends here **********************************/
?>
0) && ($pageval >= 1) )
{
echo '';
for($i=0; $i<$total_results && $i<$al_p_numItems; $i++)
{
if ($al_p_block_link == 'yes')
{
$blockLink = $epBlockLink->getBlockLink($response['mid'], $answers[$i]['cid'], $opt_params, $sitename);
if ($blockLink)
{
$blocklink = 'Block';
}
else
{
$blocklink = '';
}
}
echo '';
if ($al_p_showPosterPhoto == 'yes')
{
$answers_div_width = '85%';
}
else
{
$answers_div_width = '98%';
}
if ($al_p_question_icon != '' && $al_p_answer_icon != '')
{
$spaces = ' ';
}
if ($al_p_showPoster == 'yes')
{
$username = EPStringUtils::stripstring($answers[$i]['usrnm'], $al_p_userNameNumChars); //$answers[$i]['usrnm'];
$profile_url = $answers[$i]['profile_url'];
$ultize = $ult_params['author']['ultize'];
if ($ultize == true)
{
$link_params = $ult_params['author']['params'];
$profile_url = $ultObj->trackLink($profile_url,$link_params);
}
}
if ($al_p_question_icon == '' || $al_p_answer_icon == '')
{
if ($al_p_showPosterPhoto == 'yes')
{
$padding_value = 'padding-left:0px;';
$profile_url = $answers[$i]['profile_url'];
$ultize = $ult_params['avatar']['ultize'];
if ($ultize == true)
{
$link_params = $ult_params['avatar']['params'];
$profile_url = $ultObj->trackLink($profile_url,$link_params);
}
echo <<
$username
EOD;
}
}
echo '';
if ($al_p_showQuestionTitle == 'yes')
{
$url = $answers[$i]['url'];
$question_id = explode('qid=',$url);
$title = EPStringUtils::stripstring($answers[$i]['title'], $al_p_questionTitleNumChars);
$title = htmlentities($title);
$tag1 = '';
$tag2 = '';
$search = array('/(landrover)/i','/(land rover)/i','/(rover)/i','/(Range Rover)/i','/(Range Rover Sport)/i','/(Land Rover LR3)/i','/(Land Rover LR2)/i','/(LR3)/i','/(LR2)/i','/(Land Rover Defender)/i','/(Land over SeriesOne)/i','/(Land Rover Series)/i','/(Land Rover SeriesII)/i','/(Land Rover Parts)/i','/(Land Rover Accessories)/i','/(Land Rover Audio)/i','/(Land Rover Engines)/i','/(Land Rover Brakes)/i','/(Land Rover Off-Roading)/i','/(Land Rover Maintenance)/i','/(Land Rover Drivetrain)/i','/(Land Rover Suspension)/i','/(Land Rover Wheels)/i','/(Land Rover Tires)/i','/(Land Rover Towing)/i','/(Land Rover Warranty)/i','/(Land Rover Buying)/i','/(Land Rover Selling)/i','/(Land Rover Discovery)/i','/(Land Rover Freelander)/i','/(Range Rover Classic)/i');
$title = preg_replace($search, $tag1 . '$1' . $tag2, $title);
$ultize = $ult_params['question']['ultize'];
if ($ultize == true)
{
$link_params = $ult_params['question']['params'];
$url = $ultObj->trackLink($url,$link_params);
}
/* if ($al_p_questionType == 'Answered')
{
$type = $answers[$i]['type'];
//$typesarr = array('Open','Voting','Answered');
if($type == 'Open')
$type_of_answer='Open Questions';
elseif($type == 'Voting')
$type_of_answer='Open for voting';
elseif($type == 'Answered')
$type_of_answer='Resolved Questions';
echo <<{$type_of_answer}
EOD;
} */
echo 'Q';
echo <<$title
EOD;
}
if ($isMSIE == true)
{
$padding = "28px";
}
else
{
$padding = "25px";
}
if ($al_p_showQuestionContent == 'yes')
{
$url = $answers[$i]['url'];
$ultize = $ult_params['question']['ultize'];
if ($ultize == true)
{
$link_params = $ult_params['question']['params'];
$url = $ultObj->trackLink($url,$link_params);
}
$content = EPStringUtils::stripstring($answers[$i]['content'], $al_p_questionContentNumChars);
if ($al_p_question_icon != '' && $al_p_answer_icon != '')
{
echo <<
EOD;
}
if ($content != '')
{
$tag1 = '';
$tag2 = '';
//$search = array('/(landrover)/i','/(land rover)/i','/(rover)/i');
$content = preg_replace($search, $tag1 . '$1' . $tag2, $content);
echo <<$content $blocklink '; } //*echo '
'; /* echo <<
';
//*echo '
";
echo '';
echo "
';
$ans = $answers[$i]['bestans'];
if ($ans == '')
{
$ans = $answers[$i]['recentans'];
}
if ($al_p_showAnswers == 'yes' && $ans !== '' && $ans != NULL)
{
$chosennickname = $obj_answers->getNickname($question_id[1]);
$lrloggif = $ycsObj->getImagePath('uploads/lrlogo.gif', false);
if ($chosennickname == $ansnick){
echo '
';
}
echo '
EOD;
}
$ans = EPStringUtils::stripstring($ans, $al_p_answerNumChars);
$tag1 = '';
$tag2 = '';
//$search = array('/(landrover)/i','/(land rover)/i','/(rover)/i');
$ans = preg_replace($search, $tag1 . '$1' . $tag2, $ans);
echo '
"; } /* if ($al_p_showNumResponses == 'yes') { $url = $answers[$i]['url']; $ultize = $ult_params['responses']['ultize']; if ($ultize == true) { $link_params = $ult_params['responses']['params']; $url = $ultObj->trackLink($url,$link_params); } echo << -
{$answers[$i]['ansnum']} responses
EOD;
} */
echo ' ';
echo '
'; echo '
';
echo 'A
';
if ($al_p_question_icon != '' && $al_p_answer_icon != '')
{
echo <<' . $ans . ' see other answers
';
}
/* end of that */
if ($al_p_showPoster == 'yes')
{
$timestamp = EPUtils::getRelativeTimestamp($answers[$i]['timestamp']);
//echo ""; } /* if ($al_p_showNumResponses == 'yes') { $url = $answers[$i]['url']; $ultize = $ult_params['responses']['ultize']; if ($ultize == true) { $link_params = $ult_params['responses']['params']; $url = $ultObj->trackLink($url,$link_params); } echo <<
'; echo '
; ?>)
; ?>)