コード例 #1
0
 * SocialApparatus CONFIDENTIAL
 * __________________
 * 
 *  [2002] - [2017] SocialApparatus (http://SocialApparatus.co) 
 *  All Rights Reserved.
 * 
 * NOTICE:  All information contained herein is, and remains the property of SocialApparatus 
 * and its suppliers, if any.  The intellectual  and technical concepts contained herein 
 * are proprietary to SocialApparatus and its suppliers and may be covered by U.S. and Foreign 
 * Patents, patents in process, and are protected by trade secret or copyright law. 
 * 
 * Dissemination of this information or reproduction of this material is strictly forbidden 
 * unless prior written permission is obtained from SocialApparatus.
 * 
 * Contact Shane Barron admin@socia.us for more information.
 */
namespace SocialApparatus;

denyDirect();
$metatags = Metatag::get();
$body = "<table class='table table-striped table-bordered table-condensed'>";
$body .= "<tr>";
$body .= "<th>Page</th>";
$body .= "<th>Parameter</th>";
$body .= "<th>Value</th>";
$body .= "</tr>";
$body .= viewEntityList($metatags);
$body .= "</table>";
$header = "SEO";
echo display("page_elements/page_header", array("text" => $header));
echo $body;
コード例 #2
0
 * NOTICE:  All information contained herein is, and remains the property of SocialApparatus 
 * and its suppliers, if any.  The intellectual  and technical concepts contained herein 
 * are proprietary to SocialApparatus and its suppliers and may be covered by U.S. and Foreign 
 * Patents, patents in process, and are protected by trade secret or copyright law. 
 * 
 * Dissemination of this information or reproduction of this material is strictly forbidden 
 * unless prior written permission is obtained from SocialApparatus.
 * 
 * Contact Shane Barron admin@socia.us for more information.
 */
namespace SocialApparatus;

denyDirect();
$page = pageArray(0);
$title = Metatag::getMetatagText("title", $page);
$description = Metatag::getMetatagText("description", $page);
echo "<meta charset = 'utf-8'>";
echo "<meta http-equiv = 'X-UA-Compatible' content = 'IE=edge'>";
echo "<meta name='viewport' content='width=device-width, initial-scale=1, maximum-scale=1'>";
echo "<title>{$title}</title>";
echo "<meta name='description' content='{$description}'>";
echo <<<HTML
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="viewport" content="user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimal-ui" />
<meta name="apple-mobile-web-app-status-bar-style" content="yes" />

HTML;
echo CSS::draw("external");
echo CSS::draw("internal");
$url = getSiteURL();
コード例 #3
0
 function get($title = '', $in_name = '', $in_action = '', $in_url = '')
 {
     if (empty($in_name) && !empty($this->request->params['controller'])) {
         $in_name = $this->request->params['controller'];
     }
     //if
     if (empty($in_action) && !empty($this->request->params['action'])) {
         $in_action = $this->request->params['action'];
     }
     //if
     $out = array('title' => $this->DefaultTitle, 'keywords' => $this->DefaultKeywords, 'author' => $this->DefaultAuthor, 'description' => $this->DefaultDescription);
     if (!empty($in_name) && !empty($in_action)) {
         if (!empty($in_action) && in_array($in_action, $this->UnUsedActions)) {
             return $out;
         }
         //if
         $search = array();
         $lngID = $this->Session->read('User.Lang.id');
         if (!$lngID) {
             $lngID = 1;
         }
         $search['language_id'] = $lngID;
         $objMetatag = new Metatag();
         $objMetatag->unbindModel(array('belongsTo' => array('Language')));
         if (in_array($in_name, $this->UsedURLControlers) && !empty($in_url)) {
             $search['url'] = $in_url;
         }
         //if
         if (!empty($in_name)) {
             $search['name'] = $in_name;
         }
         //if
         if (!empty($in_action)) {
             $search['action'] = $in_action;
         }
         //if
         $arrData = $objMetatag->find($search, null, null, 0);
         if (!empty($arrData['Metatag'])) {
             $out['title'] = empty($arrData['Metatag']['title']) ? $this->DefaultTitle : $arrData['Metatag']['title'];
             $out['keywords'] = empty($arrData['Metatag']['keywords']) ? $this->DefaultKeywords : $arrData['Metatag']['keywords'];
             $out['author'] = empty($arrData['Metatag']['author']) ? $this->DefaultAuthor : $arrData['Metatag']['author'];
             $out['description'] = empty($arrData['Metatag']['description']) ? $this->DefaultDescription : $arrData['Metatag']['description'];
         } elseif ($this->AutoAdd) {
             if ($this->IgnoreAdmin) {
                 $split_url = split("/", $in_url);
                 if (count($split_url) > 2 && $split_url[1] == 'admin') {
                     return $out;
                 }
                 //if
             }
             //if
             $arrData = array('url' => $in_url, 'name' => $in_name, 'action' => $in_action, 'language_id' => $lngID, 'title' => 'Page Title', 'keywords' => '', 'author' => '', 'description' => '');
             $objMetatag->save($arrData);
         }
         //if
     }
     //if
     $tagsOut = '';
     if (!empty($out['title'])) {
         $tagsOut .= '<title>' . (!empty($title) ? $title : $out['title']) . '</title>';
     }
     //if
     if (!empty($out['keywords'])) {
         $tagsOut .= '<meta name="keywords" content="' . $out['keywords'] . '">';
     }
     //if
     if (!empty($out['description'])) {
         $tagsOut .= '<meta name="description" content="' . $out['description'] . '">';
     }
     //if
     if (!empty($out['author'])) {
         $tagsOut .= '<meta name="author" content="' . $out['author'] . '">';
     }
     //if
     return $tagsOut;
 }