SimplePortal

Customization => Custom Coding => Topic started by: iobit on September 30, 2011, 11:55:33 AM

Title: add category at side info
Post by: iobit on September 30, 2011, 11:55:33 AM
Hello,
how to see at side the title post, also the category?
for example: in portal

-------------------------------------------

this is normal:
Today at 06:51:37 PM by user| Views: 0 | Comments: 0 |

this is how I like it
Today at 06:51:37 PM by user| Views: 0 | Comments: 0 | Category

Thanks
Title: Re: add category at side info
Post by: ccbtimewiz on September 30, 2011, 12:07:19 PM
Open ./Themes/default/PortalArticles.template.php

Find:
Code: [Select]
| ', $txt['sp-articlesComments'], ': ', $article['topic']['replies'], '
Replace with:
Code: [Select]
| ', $txt['sp-articlesComments'], ': ', $article['topic']['replies'], ' | Category: ', $article['category']['name'], '
Title: Re: add category at side info
Post by: iobit on September 30, 2011, 12:42:33 PM
I found 2 of the code, change them both?

Code: [Select]


<div class="middletext">', $article['message']['time'], ' ', $txt['by'], ' ', $article['poster']['link'], '<br />', $txt['sp-articlesViews'], ': ', $article['topic']['views'], ' | ', $txt['sp-articlesComments'], ': ', $article['topic']['replies'], '</div>';
else
echo '
<div class="middletext">', $article['message']['time'], ' ', $txt['by'], ' ', $article['poster']['link'], ' | ', $txt['sp-articlesViews'], ': ', $article['topic']['views'], ' | ', $txt['sp-articlesComments'], ': ', $article['topic']['replies'], '</div>';




Thanks
Title: Re: add category at side info
Post by: iobit on September 30, 2011, 03:10:23 PM
I found 3 lines of code, I changed all 3, but the result does not change, I do not use the default theme, use another theme.

Thanks
Title: Re: add category at side info
Post by: ccbtimewiz on September 30, 2011, 04:24:40 PM
There are multiple instances.

Are you using the Articles feature of Simple Portal? Because if you aren't, regular news threads don't have categories.
Title: Re: add category at side info
Post by: iobit on September 30, 2011, 04:32:20 PM
i use board news for portal, and in info message see this:


this is normal:
Today at 06:51:37 PM by user| Views: 0 | Comments: 0 |

this is how I like it
Today at 06:51:37 PM by user| Views: 0 | Comments: 0 | Category

the my category are in separate block at the rigth block on portal.
Title: Re: add category at side info
Post by: ccbtimewiz on September 30, 2011, 04:40:32 PM
The board news block doesn't have categories, as I said.

Can you link me to your site, perhaps?
Title: Re: add category at side info
Post by: iobit on October 01, 2011, 12:07:39 AM
i send PM
Title: Re: add category at side info
Post by: ccbtimewiz on October 01, 2011, 01:00:00 AM
Okay, I looked at the site.

Could you tell me what kind of Block you're using to display the categories?
Title: Re: add category at side info
Post by: iobit on October 01, 2011, 11:03:34 AM
See this post:
http://simpleportal.net/index.php?topic=8721.msg46493#msg46493
Title: Re: add category at side info
Post by: ccbtimewiz on October 02, 2011, 01:34:18 AM
The code is for SMF 1.1, but the version if your profile says 2.0 RC5. Which SMF version are you using?
Title: Re: add category at side info
Post by: iobit on October 02, 2011, 02:11:01 AM
one board 2.0 other 2.01 but i think update both 2.01
SimplePortal 2.3.8 © 2008-2024, SimplePortal