TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

April 19, 2024, 02:15:57 AM

Login with username, password and session length
Members
  • Total Members: 3,885
  • Latest: Growner
Stats
  • Total Posts: 195,164
  • Total Topics: 21,219
  • Online today: 108
  • Online ever: 3,540 (September 03, 2022, 01:38:54 AM)
Users Online
  • Users: 0
  • Guests: 66
  • Total: 66

General feature request

Started by Vuurvreter, August 14, 2013, 10:39:30 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Vuurvreter

Hello,

I just started using TinyPortal on a forum, but I came across some (I think) limitations of TinyPortal, and I wondered if I didn't search at the right place, or that the functions maybe could be added in a new version of TinyPortal.
Is it possible to (for example) disable comments for all articles at the same time? Now I need to uncheck the box for every article I create, everytime again. This is also true for the viewing options.
And also, is it possible to switch the social media buttons on and off per site?

IchBin

To remove the option to have comments for the article you can in Sources/TPortalAdmin.php find this section:

// are we starting a new one?
if(isset($_GET['sa']) && substr($_GET['sa'], 0, 11) == 'addarticle_')
{
TPadd_linktree($scripturl.'?action=tpadmin;sa='.$_GET['sa'], $txt['tp-addarticle']);
$context['TPortal']['editarticle'] = array(
            'id' => '',
            'date' => time(),
            'body' => '',
            'intro' => '',
            'useintro' => 0,
            'category' => !empty($_GET['cu']) ? $_GET['cu'] : 0,
            'frontpage' => 1,
            'author_id' => $context['user']['id'],
            'subject' => '',
            'author' => $context['user']['name'],
            'frame' => 'theme',
            'approved' => 0,
            'off' => 1,
            'options' => 'date,title,author,linktree,top,cblock,rblock,lblock,bblock,tblock,lbblock,category,catlist,comments,commentallow,commentupshrink,views,rating,ratingallow,avatar,inherit,social,globaltags,nofrontsetting',
   


Remove in the options line at the bottom of that the commentallow part so the line looks like this:

            'options' => 'date,title,author,linktree,top,cblock,rblock,lblock,bblock,tblock,lbblock,category,catlist,comments,commentupshrink,views,rating,ratingallow,avatar,inherit,social,globaltags,nofrontsetting',
   


You can remove any of those other options from that line if you need. This will make it so that the options are not automatically checked.

It's not possible to turn off individual social icons off per site. You can remove any that you don't want by editing the TPsubs.template.php file in the default theme folder. Look for the article_bookmark() function where each image is put in the code there.