News: TinyPortal Release Schedule. Please read this update for More Info.

Login  |  Register
HTML5 Icon HTML5 Icon
TP on Social Media
Welcome, Guest. Please login or register.
Did you miss your activation email?

July 23, 2019, 01:39:47 PM

Login with username, password and session length

Recent

Members
Stats
  • Total Posts: 188522
  • Total Topics: 20737
  • Online Today: 399
  • Online Ever: 629
  • (November 08, 2018, 01:36:54 PM)
Users Online
Users: 0
Guests: 36
Total: 36

Author Topic: General feature request  (Read 3088 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 »
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?

Offline IchBin™

  • Developer
  • *
  • Posts: 16228
    • My Website
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.