TinyPortal

Development => Feedback => Bugs/Errors => Topic started by: rebelrose on May 05, 2007, 05:20:22 PM

Title: Article Layout Issues
Post by: rebelrose on May 05, 2007, 05:20:22 PM
Created an article and ticked the areas for the left, right, and center blocks not to show when viewing the article, yet if you click on the article the blocks still show.

I searched but didn't find anything on this, maybe I didn't search for the right text. Any Help would be greatly appreciated.

SMF 1.1.2 TP 9.8
Title: Re: Article Layout Issues
Post by: bloc on May 06, 2007, 07:35:39 PM
On viewing the single article - or viewing it on frontpage?
Title: Re: Article Layout Issues
Post by: rebelrose on May 06, 2007, 07:57:15 PM
viewing the article, if you click on it in the article block.

Never mind Bloc, looks like storm got it worked out. Thank You  :)
Title: Re: Article Layout Issues
Post by: bloc on May 06, 2007, 09:55:59 PM
k, what was it then..? theme errors..?
Title: Re: Article Layout Issues
Post by: stormlrd on May 06, 2007, 10:05:36 PM
no its still an error, i had to click the checkboxes in the frontpage setup turning off the blocks that way. What was happening was it was holding the sideblocks on even though the article options have it off, that part is not working i had to work my way around it.
Title: Re: Article Layout Issues
Post by: bloc on May 06, 2007, 10:38:05 PM
ok, so the frontpage options override article options when viewing the article as "singlepage" option on frontpage? ...or viewed as page=xxx?
Title: Re: Article Layout Issues
Post by: stormlrd on May 06, 2007, 11:17:12 PM
actually, when you create an article, the options in article editor dont work as far as block layout goes.

Now i have had my frontpage as single page for awhile now and when rebel added the article, when you went to view it, the article was showing both right and left blocks. Even within  site i had right blocks turned off via settings although block manager had a cpl active blocks, So when article was viewed it was showing those cpl right hand and all the left hand i have normally on.

I manually disabled the remaining cpl blocks in the right hand panel layout, than on frontpage settings where it says show page as single page, and there are checkboxes to turn off blocks (which if signle page are suppose to be disabled) i manually checked those boxes off as well to get article to work as it was suppose too. let me add a screenshot.
Title: Re: Article Layout Issues
Post by: stormlrd on May 06, 2007, 11:23:31 PM
Also i need to know how to set this up to let me know its on an article:

global $context, $settings, $options, $scripturl, $txt;

// Work out where we currently are.
$current_action = 'home';
if (in_array($context['current_action'], array('admin', 'ban', 'boardrecount', 'cleanperms', 'detailedversion', 'dumpdb', 'featuresettings', 'featuresettings2', 'findmember', 'maintain', 'manageattachments', 'manageboards', 'managecalendar', 'managesearch', 'membergroups', 'modlog', 'news', 'optimizetables', 'packageget', 'packages', 'permissions', 'pgdownload', 'postsettings', 'regcenter', 'repairboards', 'reports', 'serversettings', 'serversettings2', 'smileys', 'viewErrorLog', 'viewmembers')))
$current_action = 'admin';
if (in_array($context['current_action'], array('search', 'admin', 'calendar', 'profile', 'mlist', 'register', 'login', 'help', 'pm', 'forum', 'tpadmin')))
$current_action = $context['current_action'];
if ($context['current_action'] == 'search2')
$current_action = 'search';

if (isset($_GET['dl']))
$current_action = 'dlmanager';

if (isset($_GET['board']) || isset($_GET['topic']))
$current_action = 'forum';

if ($context['current_action'] == 'theme')
$current_action = isset($_REQUEST['sa']) && $_REQUEST['sa'] == 'pick' ? 'profile' : 'admin';
Title: Re: Article Layout Issues
Post by: IchBin on May 06, 2007, 11:34:46 PM
Are you referring to getting the menu to highlight when on articles?

if(isset($_GET['page']))
$current_action = 'articles';

To check for specific page:
if(isset($_GET['page']) && $_GET['page'] == 3)
$current_action = 'articles';

Changing 3 to match your article number.
Title: Re: Article Layout Issues
Post by: stormlrd on May 07, 2007, 12:33:04 AM
Thanks bro
Title: Re: Article Layout Issues
Post by: IchBin on May 07, 2007, 03:06:25 AM
You betcha Storm.