• 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 This topic is locked, you cannot edit posts or make further replies.  [ 5 posts ] 
Author Message
 Post subject: ayuda plugin content_dump
PostPosted: Fri Dec 31, 2010 4:13 pm 
Offline
Forum Members
Forum Members

Joined: Thu Dec 16, 2010 8:50 pm
Posts: 56
Hola amigos, estoy un poco verde con respecto a como usar este plugin content_dump. Una pregunta muy basica, no es un modulo, estoy viendo que es un plugin: Como se instala un plugin? solamente debo de copiar el archivo function.content_dump.php a mi_sitio/plugins ?, o me hace falta configurar algo ma, es que no me muestra nada al querer utilizarlo en esta ayuda: http://wiki.cmsmadesimple.org/index.php ... ntent_dump estoy tratando de seguir los pasos

Alguna ayuda, Gracias.

_________________
Honesty: "The more I know, Joom ... n ... other-CMS's, more love CMSMadeSimple"


Top
 Profile  
 
 Post subject: Re: ayuda plugin content_dump
PostPosted: Sat Jan 01, 2011 12:13 pm 
Offline
Power Poster
Power Poster
User avatar

Joined: Fri May 25, 2007 10:57 am
Posts: 1137
Location: Germany
uloloi wrote:
Como se instala un plugin? solamente debo de copiar el archivo function.content_dump.php a mi_sitio/plugins?

Yes, just copy the function.content_dump.php into the folder /plugins. No further installation. You can find the plugin in admin panel Extensions » Tags where you can see the help link in English.

You can start by adding:
Code:
{content_dump}
{foreach from=$dump item=dump}
<h2>{$dump->content->title}</h2>
{/foreach}


into a page or template. This small piece of code would output all titles of the pages that are active and marked to be shown in menu. Then you can go through wiki help to see how you can refine it.

Sorry for writing in English. My written Spanish is awful :-[


Top
 Profile  
 
 Post subject: Re: ayuda plugin content_dump
PostPosted: Sun Jan 02, 2011 4:35 am 
Offline
Forum Members
Forum Members

Joined: Thu Dec 16, 2010 8:50 pm
Posts: 56
Hi Sonya, I appreciate the help you have given me.

Now that I'm aware of the extensive possibilities of content_dump I found a small detail. In the online help of content_dump talks about how to create blogs using as content_blocks summary, but in the pages created, unlike the news, I don't see an option to create some summary. Well, what I do is use $dump [n]->content to bring the entire contents of the article published. What I'm looking for this string is: [1st] Coming with html tags, if it have any embedded image, take only the first image, [2nd] then later cancel the entire html (content_dump ... html = 'strip' ...)

Bueno, ya no supe si va en español o no XD XD

Salu2! a to2! y Feliz Año!


Top
 Profile  
 
 Post subject: Re: ayuda plugin content_dump
PostPosted: Sun Jan 02, 2011 5:09 am 
Offline
Power Poster
Power Poster
User avatar

Joined: Fri May 25, 2007 10:57 am
Posts: 1137
Location: Germany
uloloi wrote:
What I'm looking for this string is: [1st] Coming with html tags, if it have any embedded image, take only the first image, [2nd] then later cancel the entire html (content_dump ... html = 'strip' ...)

It is diffucult to realize it this way. What I would recommend is to output content this way
Code:
{$dump->content->data|truncate:400:"..."|strip_tags}


Where the number of characters is cut by 400 (truncate:400:"...") and all HTML tags are stripped (strip_tags). Then load and install the module GBFilePicker. This module allows you to upload and attach an image to your page. To integrate the module, add somewhere in your template (probably after the tag {content} the module call:
Code:
{content_module block="pageimage" module="GBFilePicker" assign="pageimage"}


With content_dump you can now get the page image and format your output the way, you like. Example:
{content_dump limit_count="10" first_sort="created" first_sort_order="down" extensions="pageimage"}
Code:
{foreach from=$dump item=dump}
<h1>{$dump->content->title}</h1>
<p><a href="{cms_selflink href=$dump->content->alias}"><img src="uploads/{$dump->extensions->pageimage->data}" alt="{$dump->content->title}" /></a></p>
<p>{$dump->content->data|truncate:400:"..."|strip_tags}</p>
{/foreach}


This is the better and cleaner way to solve your idea.

PS: Puedes escribir en español, lo puedo entender. Me gusta este idioma más ;). He aprendido español hace 10 años pero nunca he hablado. Por último, este es el Foro Español :) Feliz Año!

_________________
CMS Made Simple 1.6: Beginner's Guide
Overview of modules, themes, tutorials and websites made with CMS Made Simple
Webseiten mit CMS erstellen


Top
 Profile  
 
 Post subject: Re: ayuda plugin content_dump  [SOLVED]
PostPosted: Mon Jan 03, 2011 3:43 am 
Offline
Forum Members
Forum Members

Joined: Thu Dec 16, 2010 8:50 pm
Posts: 56
Hola Sonya, gracias por tu ayuda, cree un custom_tag:extract_image para extraer la primer imagen proveniente de dump[n]->content->data, todo funcionaba bien [CLAP!! O0 ] pero al usar dos veces mi {extract_image}, en el código php de esta tengo una funcion getImage(param,...) {} en el template me muestra ERROR: Fatal error: Cannot redeclare extract_image() (previously declared in C:\...\lib\content.functions.php(975) : eval()'d code:3) in C:\...\lib\content.functions.php(975) : eval()'d code on line 3, porque estoy llamando mas de una vez este smarty tag

[RESUELTO]:
if(!function_exists('extractImage')){
...
}

Content_dump es excelente! GRACIAS


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic This topic is locked, you cannot edit posts or make further replies.  [ 5 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:  
Arvixe - A CMSMS Partner