• twitter image
  • facebook image
  • youtube image
  • linkedin image
Language: CMS Made Simple Czech CMS Made Simple France CMS Made Simple Spain CMS Made Simple Hungary CMS Made Simple Russia CMS Made Simple Netherlands

All times are UTC




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: [invalid] description tag gives empty value
PostPosted: Sun Jun 24, 2012 2:01 pm 
Offline
Power Poster
Power Poster

Joined: Sun Apr 19, 2009 9:33 am
Posts: 1372
Rev: 8101

The {description} tag gives back an empty value.

/plugins/function.description.php

Code:
$result = $content_obj->TitleAttribute();

  public function TitleAttribute()
  {
    return $this->mTitleAttribute;
  }




To fix:


--- lib/classes/class.ContentBase.php (revision 8101)
+++ lib/classes/class.ContentBase.php (working copy)
@@ -1305,7 +1305,7 @@
$this->mHierarchyPath = $row->fields["hierarchy_path"];
$this->mMenuText = $row->fields['menu_text'];
$this->mMarkup = $row->fields['markup'];
- $this->mTitleAttribute = $row->fields['titleattribute'];
+ $this->mTitleAttribute = $row->fields['content_name'];


See database fieldnames:

Code:
mysql> desc cms_content;
+------------------+--------------+------+-----+---------+-------+
| Field            | Type         | Null | Key | Default | Extra |
+------------------+--------------+------+-----+---------+-------+
| content_id       | int(11)      | NO   | PRI | NULL    |       |
| content_name     | varchar(255) | YES  |     | NULL    |       | <--------
| type             | varchar(25)  | YES  |     | NULL    |       |
| owner_id         | int(11)      | YES  |     | NULL    |       |
| parent_id        | int(11)      | YES  | MUL | NULL    |       |
| template_id      | int(11)      | YES  |     | NULL    |       |
| item_order       | int(11)      | YES  |     | NULL    |       |
| hierarchy        | varchar(255) | YES  | MUL | NULL    |       |
| default_content  | tinyint(4)   | YES  | MUL | NULL    |       |
| menu_text        | varchar(255) | YES  |     | NULL    |       |
| content_alias    | varchar(255) | YES  | MUL | NULL    |       |
| show_in_menu     | tinyint(4)   | YES  |     | NULL    |       |
| collapsed        | tinyint(4)   | YES  |     | NULL    |       |
| markup           | varchar(25)  | YES  |     | NULL    |       |
| active           | tinyint(4)   | YES  |     | NULL    |       |
| cachable         | tinyint(4)   | YES  |     | NULL    |       |
| id_hierarchy     | varchar(255) | YES  |     | NULL    |       |
| hierarchy_path   | text         | YES  |     | NULL    |       |
| prop_names       | text         | YES  |     | NULL    |       |
| metadata         | text         | YES  |     | NULL    |       |
| titleattribute   | varchar(255) | YES  |     | NULL    |       |
| tabindex         | varchar(10)  | YES  |     | NULL    |       |
| accesskey        | varchar(5)   | YES  |     | NULL    |       |
| last_modified_by | int(11)      | YES  |     | NULL    |       |
| create_date      | datetime     | YES  |     | NULL    |       |
| modified_date    | datetime     | YES  |     | NULL    |       |
| secure           | tinyint(4)   | YES  |     | NULL    |       |
| page_url         | varchar(255) | YES  |     | NULL    |       |
+------------------+--------------+------+-----+---------+-------+


BTW by looking into: plugins/function.title.php I saw the result is filtered by cms_htmlentities

Code:
$result = cms_htmlentities($contentobj->Name());


The result of function.description.php is not filtered.

Code:
$result = $content_obj->TitleAttribute();

_________________
The CMSMS Builder is a tool to help you develop and optimize CMS Made Simple >= 2.2.3 themes, it is made by a developer for developers.

I you like an automated file based work-flow this project might be for you. It is usable to kick-start a new CMSMS project or it can be applied to existing ones.


Last edited by arnoud on Sun Jun 24, 2012 4:06 pm, edited 1 time in total.

Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: description tag gives empty value
PostPosted: Sun Jun 24, 2012 3:02 pm 
Offline
Dev Team Member
Dev Team Member
User avatar

Joined: Tue Oct 19, 2004 6:44 pm
Posts: 8144
Location: Fernie British Columbia, Canada
a: your code is incorrect.
b: just tested the {description} tag, works fine for me.

_________________
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: [invalid] description tag gives empty value
PostPosted: Sun Jun 24, 2012 4:06 pm 
Offline
Power Poster
Power Poster

Joined: Sun Apr 19, 2009 9:33 am
Posts: 1372
oeps your are right, topic marked as [invalid]

_________________
The CMSMS Builder is a tool to help you develop and optimize CMS Made Simple >= 2.2.3 themes, it is made by a developer for developers.

I you like an automated file based work-flow this project might be for you. It is usable to kick-start a new CMSMS project or it can be applied to existing ones.


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
A2 Hosting