TinyPortal

Development => Support => Topic started by: mariusfv on May 08, 2011, 11:45:53 AM

Title: Frontpage-> Promoted topics-> Remove number of views
Post by: mariusfv on May 08, 2011, 11:45:53 AM
Hi,
SMF  2.0RC5, TP latest version.

For Frontpage I use Promoted topics and i want to remove number of views!

Ex:
Written by Admin posted in Product May 07, 2011, 04:36:15 PM 5 Views

Please help me to remove number of views, it disadvantage me.

10x
Title: Re: Frontpage-> Promoted topics-> Remove number of views
Post by: mariusfv on May 11, 2011, 12:25:28 PM
Bump :idiot2:
Title: Re: Frontpage-> Promoted topics-> Remove number of views
Post by: IchBin on May 11, 2011, 05:23:09 PM
There is no option for that unless you use the custom template option in frontpage settings. If you choose that option you can remove {article_views} from the code and it should remove the views.
Title: Re: Frontpage-> Promoted topics-> Remove number of views
Post by: mariusfv on May 11, 2011, 06:02:17 PM
I use: Picture + Article 2, so no chance to remove number of views on frontpage by "code edit" ?
Title: Re: Frontpage-> Promoted topics-> Remove number of views
Post by: IchBin on May 11, 2011, 06:54:42 PM
Not an easy thing to change. The layouts and output are all created dynamically. You could do the following edit, but that will remove the views option from all articles and posts on the front page.

Themes/default/TPsubs.template.php file and change this:
Code (find) Select
function article_views($render = true)
{
global $scripturl, $txt, $settings, $context;

if(in_array('views',$context['TPortal']['article']['visual_options']))


To this:
Code (replace) Select
function article_views($render = true)
{
global $scripturl, $txt, $settings, $context;

        return;

if(in_array('views',$context['TPortal']['article']['visual_options']))
Title: Re: Frontpage-> Promoted topics-> Remove number of views
Post by: mariusfv on May 12, 2011, 10:38:04 AM
10x man...this is what I want, sorry I've forgot to specify for all!
solved!