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

Recent

Welcome to TinyPortal. Please login or sign up.

Members
Stats
  • Total Posts: 196,004
  • Total Topics: 21,330
  • Online today: 468
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 1
  • Guests: 457
  • Total: 458
  • @rjen

Default options in "Add article"

Started by jonash, December 08, 2008, 12:48:02 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

ed_m2

Quote from: IchBinâ,,¢ on December 08, 2008, 08:02:18 PM
If its that simple, go ahead and give it a shot. lol

:D i did think that myself :D

jonash

Ok.. Maybe I need to clarify.  :-\ 
but ed_m's  post are the questions I tried to ask...

So I will have a look somewhere in the code...

Jonas

ed_m2

Quote from: jonash on December 08, 2008, 09:06:49 PM
Ok.. Maybe I need to clarify.  :-\ 
but ed_m's  post are the questions I tried to ask...

So I will have a look somewhere in the code...

Jonas

if its hard coded in the article admin template you'd need to edit that.... just need some kind soul to confirm if that is the case and tell you what file that all happens in.

just a guess... maybe i have too much time on my hands  ;)

jonash

This is the code I found in smf/Themes/default/TPortalAdmin.template.php

// set options for an article...
                                $opts=array('','date','title','author','linktree','top','cblock','rblock','lblock','bblock','_tblock','category',
                                         'catlist','comments','commentallow','commentupshrink','views','rating','ratingallow');
     $tmp=explode(',',$mg['options']); $options=array();
      foreach($tmp as $tp => $val){
          $options[$val]=1;
      }
      $switch=0;
       for($i=1 ; $i<19 ; $i++){
            $switch++;
             if($switch==5){
                 $pad=8;
                $switch=0;
               }
                else
                     $pad=0;
              // for 1.0!!
              if($i!=9 && $i!=10)
                  echo '
                      <div style="padding-bottom: '.$pad.'px;">
                      <input style="vertical-align: middle;" name="tp_article_options_'.$opts[$i].'" type="checkbox"
value="'.$mg['id'].'" ' , isset($options[$opts[$i]]) ? 'checked' : '' , '> '.$txt['tp-articleoptions'.$i].'
                         </div>';
              }


I tried to change things there, but it did not work out so well.. If I changed something there, the saved articles get these values too, and not the saved..


This website is proudly hosted on Crocweb Cloud Website Hosting.