Metadata in CGBlog module

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
Ektos.Elenchu
New Member
New Member
Posts: 6
Joined: Thu Mar 05, 2009 10:40 am
Location: Czech Republic, sometimes Greece

Metadata in CGBlog module

Post by Ektos.Elenchu »

Hello all,

I`m trying to run this http://smarty.incutio.com/?page=BlockHeadPlugin plugin with CMS MS ver. 1.6.6 to have possibility to attach metadata such as keywords etc. to posts made by CGBlog module. I`m lets say intermediate at html + css, but very newbie in things such as php and smarty so I can`t make it work. I`m playing two months with CMS MS and everything seems to be very intuitive, except of this.

Is there somebody who can tell me step-by-step how to make it work? I just understood that i must copy-paste the first code into the file named "block.head.php" and the second one into "outputfilter.move_to_head.php" and upload these files into smarty plugins directory. But absolutely don`t know, where to paste the piece of code from the "usage" section.

Exactly this one:

Code: Select all

$template = new Smarty();
// do stuff
$template->load_filter('output', 'move_to_head');
// do stuff
$template->display($filename);
I tried to paste it anywhere, but got only some error in "lib/smarty/Smarty.class.php on line 1113", or only text @@@SMARTY:HEAD:BEGIN@@@ "something" @@@SMARTY:HEAD:END@@@ on the top of the page, or simply nothing hapend, but there was still nothing added before

Any help would be appreciated

Thanks a lot

EktosElenchu
Tux mihi ancora.
Jeff
Power Poster
Power Poster
Posts: 961
Joined: Mon Jan 21, 2008 5:51 pm
Location: MI

Re: Metadata in CGBlog module

Post by Jeff »

There are other ways to do it. Because the body is processed first you can assign the Metadata variables in the CGBlog template either from custom fields to from other sources. Then in your main template add an {if} condition to output the metadata if the variables are set.

{if $blog_metadata}

{/if}
Ektos.Elenchu
New Member
New Member
Posts: 6
Joined: Thu Mar 05, 2009 10:40 am
Location: Czech Republic, sometimes Greece

Re: Metadata in CGBlog module

Post by Ektos.Elenchu »

As i wrote, I am very newbie to Php and Smarty. So i spent almost 2 hours searching what and where to do :D But finally it works  ;D Thanks for your reply. When i post my question, it was 3.00 am so it wasn't good time for thinking, that there may be any easier possibility, than fighting with plugins  :-[

Once more Thanks a lot!
Tux mihi ancora.
Post Reply

Return to “Modules/Add-Ons”