Login  |  Register
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media


Welcome, Guest. Please login or register.
Did you miss your activation email?

January 31, 2023, 09:52:58 AM

Login with username, password and session length
  • Total Members: 3856
  • Latest: Bixby
  • Total Posts: 193910
  • Total Topics: 21127
  • Online today: 49
  • Online ever: 3540
  • (September 02, 2022, 06:38:54 PM)
Users Online
Users: 0
Guests: 34
Total: 34

Author Topic: General feature request  (Read 4321 times)

0 Members and 1 Guest are viewing this topic.

Offline Vuurvreter

  • Newbie
  • *
  • Posts: 1
General feature request
« on: August 14, 2013, 03:39:30 PM »

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?

Offline IchBin

  • Friends
  • *
  • Posts: 16231
Re: General feature request
« Reply #1 on: August 14, 2013, 05:33:19 PM »
To remove the option to have comments for the article you can in Sources/TPortalAdmin.php find this section:

Code: [Select]
// 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:
Code: [Select]
            '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.