AbstractHeader_tags Class Reference

List of all members.

Static Public Member Functions

Static Public Attributes

Protected Member Functions


Detailed Description

Definition at line 27 of file AbstractHeader_tags.php.


Member Function Documentation

AbstractHeader_tags::after_update ( id  )  [abstract, protected]
AbstractHeader_tags::after_update_lang ( language_id,
id 
) [abstract, protected]
AbstractHeader_tags::display_edit ( &$  contents  )  [abstract, protected]

Force Extending class to define this method.

static AbstractHeader_tags::get_prio_cms ( id  )  [static]

Attribution priorité tag / page cms surclass page fixe Cherche Id: Page_xxx.

Author:
oscim <mail oscim@oscss.org> <www http://www.oscim.fr>
Parameters:
string $id
Returns:
boolean

Definition at line 51 of file AbstractHeader_tags.php.

Referenced by seo_url::parse_parameters().

00051                                           {
00052     if(isset(self::$test_cache[$id])) return self::$test_cache[$id];
00053 
00054     $content_query = tep_db_query("select content_id from " . TABLE_CONTENT . " c where c.content_status = '1'  and c.content_name='Page_" . $id . "'   order by sort_order,content_name ASC Limit 1");
00055     $cnt=tep_db_fetch_array($content_query);
00056     $res =(tep_db_num_rows($content_query)>0)? (int)$cnt['content_id'] : false;
00057 
00058     return self::$test_cache[$id] = $res;
00059   }

static AbstractHeader_tags::insert_db_values ( tag_id,
action,
pInfo,
language_id 
) [static]

Insertion d'une valeur dans la table header_tag.

Author:
oscim <mail oscim@oscss.org> <www http://www.oscim.fr>
Parameters:
@a string $action (insert|upadte) object $pInfo int $language_id int (int)$tag_id

Definition at line 135 of file AbstractHeader_tags.php.

00135                                                                                 {
00136     $myarray=array( 'head_title_tag' => $pInfo->header_tags['head_title_tag'][$language_id],
00137                     'head_desc_tag' => strip_tags(@$pInfo->header_tags['head_desc_tag'][$language_id]),
00138                     'head_keywords_tag' =>strip_tags(@$pInfo->header_tags['head_keywords_tag'][$language_id]));
00139 
00140     if($action=='update')
00141       tep_db_perform(TABLE_FULL_TAG_DESCRIPTION, $myarray, 'update', " tag_id='".(int)$tag_id."' and language_id='".$language_id."' " );
00142     else{
00143       $myarray['tag_id']=(int)$tag_id;
00144       $myarray['language_id']=$language_id;
00145       tep_db_perform(TABLE_FULL_TAG_DESCRIPTION, $myarray);
00146     }
00147   }

static AbstractHeader_tags::load_db_base ( id,
type 
) [static]

Definition at line 81 of file AbstractHeader_tags.php.

00081                                                  {
00082     $product_query = tep_db_query("SELECT * FROM " . TABLE_FULL_TAG . " ft WHERE ft.page_type='".$type."' and  ft.page_id = '" . $id . "' ");
00083 
00084     if(tep_db_num_rows($product_query)>0)$product = tep_db_fetch_array($product_query);
00085     else $product=array();
00086 
00087     return new objectInfo($product);
00088   }

static AbstractHeader_tags::load_db_descr_check ( tag_id,
language_id 
) [static]

test db presence description

Author:
oscim <mail oscim@oscss.org> <www http://www.oscim.fr>
Parameters:
@a int $tag_id int $language_id
Returns:
boolean

Definition at line 98 of file AbstractHeader_tags.php.

00098                                                                    {
00099     $query = tep_db_query($sql="SELECT * FROM " . TABLE_FULL_TAG_DESCRIPTION . " ft WHERE tag_id= '" .$tag_id . "' and language_id='".$language_id."' ");
00100     if(tep_db_num_rows($query)>0)return true;
00101     else return false;
00102   }

static AbstractHeader_tags::load_db_full_byType ( type  )  [static]

Recuperation complete db pour un type.

Author:
oscim <mail oscim@oscss.org> <www http://www.oscim.fr>
Parameters:
string $type
Returns:
object

Definition at line 67 of file AbstractHeader_tags.php.

00067                                                    {
00068     $query = tep_db_query("SELECT * FROM " . TABLE_FULL_TAG . " ft WHERE ft.page_type='".$type."'  ");
00069 
00070     $array =(tep_db_num_rows($query)>0)? tep_db_fetch_array($query) : array();
00071 
00072     return new objectInfo($product);
00073   }

static AbstractHeader_tags::load_db_values ( id,
type 
) [static]

Definition at line 109 of file AbstractHeader_tags.php.

00109                                                      {
00110     $languages = tep_get_languages();
00111 
00112     for ($i=0, $n=sizeof($languages); $i<$n; $i++) {
00113       $languages_id = $languages[$i]['id'];
00114         $product_query = tep_db_query($sql="SELECT head_title_tag, head_desc_tag, head_keywords_tag FROM " . TABLE_FULL_TAG . " ft, " . TABLE_FULL_TAG_DESCRIPTION . " ftd WHERE ft.tag_id=ftd.tag_id and ft.page_type='".$type."' and  ft.page_id = '" . $id . "' and ftd.language_id = '" . (int)$languages_id . "'");
00115       if(tep_db_num_rows($product_query)>0){
00116         $product = tep_db_fetch_array($product_query);
00117         $arr ['head_title_tag'][$languages_id]=$product['head_title_tag'];
00118         $arr ['head_desc_tag'][$languages_id]=$product['head_desc_tag'];
00119         $arr ['head_keywords_tag'][$languages_id]=$product['head_keywords_tag'];
00120       } else $arr=array();
00121     }
00122 
00123     return $arr;
00124   }

static AbstractHeader_tags::load_lang (  )  [static]

constrcuteur

Definition at line 38 of file AbstractHeader_tags.php.

00038                                     {
00039     global $language,$oscss;
00040     if(is_object($oscss))
00041       $oscss->pile_file_lang(DIR_FS_ADMIN.DIR_WS_LANGUAGES.$language.'/modules/aca_header_tags.txt');
00042   }

static AbstractHeader_tags::load_post_values ( post  )  [static]

Definition at line 149 of file AbstractHeader_tags.php.

00149                                                   {
00150   // The $post contains only post values for this module
00151   // pInfo is an array: [field name][language id]=value
00152     return new objectInfo ($post);
00153   }


Member Data Documentation

AbstractHeader_tags::$test_cache = array() [static]

Definition at line 29 of file AbstractHeader_tags.php.


The documentation for this class was generated from the following file: