(2015-02-13, 02:59:17)Carlos Wrote: Here's a patch for NM 3.0. Edit news_manager/inc/site.php, find this:
Code:echo ' <',$nmoption['markuppost'],' class="nm_post';
if ($single) echo ' nm_post_single';
echo '">',PHP_EOL;
and replace it by:
Code:echo ' <',$nmoption['markuppost'],' class="nm_post';
if ($single) echo ' nm_post_single';
// patch - tag classes
foreach ($tags as $tag)
if (substr($tag, 0, 1) != '_')
echo ' nm_tag_'.htmlspecialchars($tag);
// end patch
echo '">',PHP_EOL;
This should generate additional classes nm_tag_foo, nm_tag_bar, ... in the post container.
Of course you will have to re-do the patch when you upgrade.
This part of the code will be changed in NM 3.1, so the patch would be a bit different.
In some future version this will be possible without patches, when some kind of post templating is implemented.
It's me again, I just updated to 3.1 and can't figure out which part to change in the file to get the "tag as class output" working again. I'd really appreciate if you could give me a hand!
== EDIT ==
Seems like a found a solution by myself.
I changed the following lines of code in "inc/site.php". Seems to work as before.
What do you think?
PHP Code:
// echo ' <',$nmoption['markuppost'],' class="',$nmoption['classpost'],'">',PHP_EOL;
echo ' <',$nmoption['markuppost'],' class="',$nmoption['classpost'];
foreach ($tags as $tag) {
if (substr($tag, 0, 1) != '_') {
echo ' nm_tag_'.(htmlspecialchars($tag));
}
}
echo '">',PHP_EOL;