function GFCIWidget_Custom($args, $widget_args = 1) { extract($args, EXTR_SKIP); if (is_numeric($widget_args)) { $widget_args = array('number' => $widget_args); } $widget_args = wp_parse_args($widget_args, array('number' => -1)); extract($widget_args, EXTR_SKIP); $canvas_path = get_option(gfci_canvas_path); $options = get_option('custom_widget_gfci'); if (!isset($options[$number])) { return; } $gadget_wid = attribute_escape($options[$number]['gadget_wid']); $gadget_url = attribute_escape($options[$number]['gadget_url']); $gfci_border = attribute_escape($options[$number]['gfci_border']); $gfci_present = attribute_escape($options[$number]['gfci_present']); if ("checked" == $gfci_present) { $gfci_present2 = 'presentation:"canvas",'; } echo $before_widget; echo $before_title; echo $after_title; ?> <div id="gfccustom-<?php echo $number; ?> " style="width:<?php echo $gadget_wid; ?> px;border:1px solid #<?php echo $gfci_border; ?> ;"></div> <script type="text/javascript"> google.friendconnect.container.setParentUrl('<?php echo $canvas_path; ?> ' /* location of rpc_relay.html and canvas.html */); google.friendconnect.container.renderOpenSocialGadget( { id: 'gfccustom-<?php echo $number; ?> ',<?php echo $gfci_present2; ?> url:'<?php echo $gadget_url; ?> ', site: '<?php echo gfci_sit(); ?> '}, skin); </script> <?php echo $after_widget; }
function GFCIWidget_Wall($args, $widget_args = 1) { extract($args, EXTR_SKIP); if (is_numeric($widget_args)) { $widget_args = array('number' => $widget_args); } $widget_args = wp_parse_args($widget_args, array('number' => -1)); extract($widget_args, EXTR_SKIP); $canvas_path = get_option(gfci_canvas_path); $options = get_option('wall_widget_gfci'); if (!isset($options[$number])) { return; } $gadget_wid = attribute_escape($options[$number]['gadget_wid']); $gadget_hei = attribute_escape($options[$number]['gadget_hei']); $endcap_bkgd = attribute_escape($options[$number]['endcap_bkgd']); $endcap_text = attribute_escape($options[$number]['endcap_text']); $endcap_links = attribute_escape($options[$number]['endcap_links']); $content_bkgd = attribute_escape($options[$number]['content_bkgd']); $content_text = attribute_escape($options[$number]['content_text']); $content_text2 = attribute_escape($options[$number]['content_text2']); $content_links = attribute_escape($options[$number]['content_links']); $content_links2 = attribute_escape($options[$number]['content_links2']); $content_hlines = attribute_escape($options[$number]['content_hlines']); $alt_bkgd = attribute_escape($options[$number]['alt_bkgd']); $gfci_border = attribute_escape($options[$number]['gfci_border']); $header_text = attribute_escape($options[$number]['header_text']); $com_text = attribute_escape($options[$number]['com_text']); $video_links = attribute_escape($options[$number]['video_links']); $anon_post = attribute_escape($options[$number]['anon_post']); $scope = attribute_escape($options[$number]['scope']); $wallid = attribute_escape($options[$number]['wallid']); echo $before_widget; echo $before_title; echo $after_title; ?> <div id="gfcwall-<?php echo $number; ?> " style="width:<?php echo $gadget_wid; ?> px;border:1px solid #cccccc;"></div> <script type="text/javascript"> var skin = {}; skin['BORDER_COLOR'] = '<?php echo $gfci_border; ?> '; skin['ENDCAP_BG_COLOR'] = '<?php echo $endcap_bkgd; ?> '; skin['ENDCAP_TEXT_COLOR'] = '<?php echo $endcap_text; ?> '; skin['ENDCAP_LINK_COLOR'] = '<?php echo $endcap_links; ?> '; skin['ALTERNATE_BG_COLOR'] = '<?php echo $alt_bkgd; ?> '; skin['CONTENT_BG_COLOR'] = '<?php echo $content_bkgd; ?> '; skin['CONTENT_LINK_COLOR'] = '<?php echo $content_links; ?> '; skin['CONTENT_TEXT_COLOR'] = '<?php echo $content_text; ?> '; skin['CONTENT_SECONDARY_LINK_COLOR'] = '<?php echo $content_links2; ?> '; skin['CONTENT_SECONDARY_TEXT_COLOR'] = '<?php echo $content_text2; ?> '; skin['CONTENT_HEADLINE_COLOR'] = '<?php echo $content_hlines; ?> '; skin['DEFAULT_COMMENT_TEXT'] = '<?php echo $com_text; ?> '; skin['HEADER_TEXT'] = '<?php echo $header_text; ?> '; skin['POSTS_PER_PAGE'] = '<?php echo $gadget_hei; ?> '; google.friendconnect.container.setParentUrl('<?php echo $canvas_path; ?> ' /* location of rpc_relay.html and canvas.html */); google.friendconnect.container.renderWallGadget( { id: 'gfcwall-<?php echo $number; ?> ', site: '<?php echo gfci_sit(); ?> ', 'view-params':{"scope":"<?php echo $scope; ?> ","allowAnonymousPost":"<?php echo $anon_post; ?> ","features":"<?php echo $video_links; ?> comment","docId":"<?php echo $wallid; ?> "} }, skin); </script> <?php echo $after_widget; }
function GFCIWidget_Login($args) { $options = get_option(GFCI_LOGIN_WIDGET); $gadget_wid = attribute_escape($options['gadget_wid']); $gadget_hei = attribute_escape($options['gadget_hei']); $content_bkgd = attribute_escape($options['content_bkgd']); $content_text = attribute_escape($options['content_text']); $content_links = attribute_escape($options['content_links']); $gfci_border = attribute_escape($options['gfci_border']); $canvas_path = get_option(gfci_canvas_path); extract($args); echo $before_widget; echo $before_title; echo $after_title; ?> <div id="gfci-login" style="width:<?php echo $gadget_wid; ?> px;border:1px solid #<?php echo $gfci_border; ?> ;"></div> <script type="text/javascript"> var skin = {}; skin['BORDER_COLOR'] = '#333333'; skin['ENDCAP_BG_COLOR'] = '#e0ecff'; skin['ENDCAP_TEXT_COLOR'] = '#333333'; skin['ENDCAP_LINK_COLOR'] = '#0000cc'; skin['ALTERNATE_BG_COLOR'] = '#ffffff'; skin['CONTENT_BG_COLOR'] = '<?php echo $content_bkgd; ?> '; skin['CONTENT_LINK_COLOR'] = '<?php echo $content_links; ?> '; skin['CONTENT_TEXT_COLOR'] = '<?php echo $content_text; ?> '; skin['CONTENT_SECONDARY_LINK_COLOR'] = '#7777cc'; skin['CONTENT_SECONDARY_TEXT_COLOR'] = '#666666'; skin['CONTENT_HEADLINE_COLOR'] = '#333333'; skin['ALIGNMENT'] = '<?php echo $gadget_hei; ?> '; google.friendconnect.container.setParentUrl('<?php echo $canvas_path; ?> ' /* location of rpc_relay.html and canvas.html */); google.friendconnect.container.renderSignInGadget( { id: 'gfci-login', site: '<?php echo gfci_sit(); ?> '}, skin); </script> <?php echo $after_widget; }
function GFCIWidget_Members($args) { $options = get_option(GFCI_MEMBER_WIDGET); $gadget_wid = attribute_escape($options['gadget_wid']); $gadget_hei = attribute_escape($options['gadget_hei']); $endcap_bkgd = attribute_escape($options['endcap_bkgd']); $endcap_text = attribute_escape($options['endcap_text']); $endcap_links = attribute_escape($options['endcap_links']); $content_bkgd = attribute_escape($options['content_bkgd']); $content_text = attribute_escape($options['content_text']); $content_text2 = attribute_escape($options['content_text2']); $content_links = attribute_escape($options['content_links']); $content_links2 = attribute_escape($options['content_links2']); $content_hlines = attribute_escape($options['content_hlines']); $alt_bkgd = attribute_escape($options['alt_bkgd']); $gfci_border = attribute_escape($options['gfci_border']); $gfci_border2 = attribute_escape($options['gfci_border2']); $canvas_path = get_option(gfci_canvas_path); extract($args); echo $before_widget; echo $before_title; echo $after_title; ?> <div id="gfci-member" style="width:<?php echo $gadget_wid; ?> px;border:1px solid #<?php echo $gfci_border2; ?> ;"></div> <script type="text/javascript"> var skin = {}; skin['HEIGHT'] = '<?php echo $gadget_hei; ?> '; skin['BORDER_COLOR'] = '<?php echo $gfci_border; ?> '; skin['ENDCAP_BG_COLOR'] = '<?php echo $endcap_bkgd; ?> '; skin['ENDCAP_TEXT_COLOR'] = '<?php echo $endcap_text; ?> '; skin['ENDCAP_LINK_COLOR'] = '<?php echo $endcap_links; ?> '; skin['ALTERNATE_BG_COLOR'] = '<?php echo $alt_bkgd; ?> '; skin['CONTENT_BG_COLOR'] = '<?php echo $content_bkgd; ?> '; skin['CONTENT_LINK_COLOR'] = '<?php echo $content_links; ?> '; skin['CONTENT_TEXT_COLOR'] = '<?php echo $content_text; ?> '; skin['CONTENT_SECONDARY_LINK_COLOR'] = '<?php echo $content_links2; ?> '; skin['CONTENT_SECONDARY_TEXT_COLOR'] = '<?php echo $content_text2; ?> '; skin['CONTENT_HEADLINE_COLOR'] = '<?php echo $content_hlines; ?> '; google.friendconnect.container.setParentUrl('<?php echo $canvas_path; ?> ' /* location of rpc_relay.html and canvas.html */); google.friendconnect.container.renderMembersGadget( { id: 'gfci-member', site: '<?php echo gfci_sit(); ?> '}, skin); </script> <?php echo $after_widget; }