TinyPortal

Development => Support => Topic started by: HugiN on March 07, 2011, 03:11:25 PM

Title: Display block only on specific article category
Post by: HugiN on March 07, 2011, 03:11:25 PM
Link to my site: http://www.newerth.com/forum
SMF version: 2.0 RC5
TP version: 1.0 RC1
Default Forum Language: English
Theme name and version: BlocWeb Gamerz Premium Theme
Browser Name and Version: Mostly Firefox
Mods installed: Tiny Portal & Aewa Media

Hey guys, i want to show a block called Welcome to the Savage: The Battle of Newerth Game Guide on the article category about savage xr (here is the direct link to that category: http://www.newerth.com/forum/index.php/cat,9.html (http://www.newerth.com/forum/index.php/cat,9.html)).

To do so, i selected in the options "Choose where the block should appear"  Article Categories - About Savage XR.

Here my settings:

(https://www.tinyportal.net/proxy.php?request=http%3A%2F%2Fwww.abload.de%2Fthumb2%2Fblocksettingstinyportagylh.png&hash=7d2185481846d77e66a98bce84bea302c716c919) (http://www.abload.de/image.php?img=blocksettingstinyportagylh.png) (https://www.tinyportal.net/proxy.php?request=http%3A%2F%2Fwww.abload.de%2Fthumb2%2Fcategorysettingstinypokas2.png&hash=0cbf842e6f9441c5159de2c9f9908d0b392f5fb1) (http://www.abload.de/image.php?img=categorysettingstinypokas2.png) (https://www.tinyportal.net/proxy.php?request=http%3A%2F%2Fwww.abload.de%2Fthumb2%2Fpanelsettingstinyportai9rw.png&hash=81e0e8caa416ecb00fb962bf4d71386456644010) (http://www.abload.de/image.php?img=panelsettingstinyportai9rw.png)

The Problem is, that the block doesn't appear on the article category about savage xr :tickedoff:
What can i do?!

Cheers
Title: Re: Display block only on specific article category
Post by: sturmkatze on March 07, 2011, 03:38:41 PM
Yeaahhhhhh.... I've never been able to get that to work either. I find I just have to choose the actual pages for it to show. Sad too, because it IS a good idea :-( Good luck if you can get it to work, I'd love to know how.
Title: Re: Display block only on specific article category
Post by: HugiN on March 07, 2011, 04:41:39 PM
@Sturmkatze: Well, can you explain to me how did you select the actual pages to show the desired block?

Hmm - is it really possible, that such a nice feature is not working properly - because imo this is a really central ability of a little cms...that would be sad, if this feature is not working.

Any other opinions?
Title: Re: Display block only on specific article category
Post by: sturmkatze on March 08, 2011, 02:46:16 AM
Sure. Off to the right of the category box, there is a drop down menu that shows the articles you want the block to show on. Go through there and select the ones you wish it to appear with and voila! it will work. I agree... it's sad, but happens.

TP is pretty complicated, but it does work. I use its flexibility and the blocks to keep my site together. If you want to go look, it's at http://www.reenactor.net/forums/index.php (http://www.reenactor.net/forums/index.php) I find that you just have to play w/ things to get them to work and when that doesn't work, ask someone here--most of these people are pretty sharp and more than willing to help you.  ;)
Title: Re: Display block only on specific article category
Post by: HugiN on March 08, 2011, 03:45:52 PM
Hello again!

I want to show blocks in the upper panel of the article category view. Somehow that doesn't work
If I assign blocks to the top panel they are being displayed, but when I move them to the upper panel in category view they dissapear. In other cases, e.g. the home-page, it is possible to display blocks in the upper panel.
The upper panel is turned on in the panel settings, and in the category settings, too.

I think this might have something to do with the article  category template. I'm afraid the upper panel position is not defined there in that template. At least this would explain why I can turn the panel on, and assign things to it, but they are still not displayed in that article category view.

Does anyone have an idea where these templates are being generated? Any hint is very appreciated!
Title: Re: Display block only on specific article category
Post by: HugiN on March 10, 2011, 04:44:59 PM
bump ;)
Title: Re: Display block only on specific article category
Post by: IchBin on March 14, 2011, 09:21:42 PM
When trying to show a block only in a category, do you have the category options set to display the panel that the block is in? I just tried this and didn't have a problem.
Title: Re: Display block only on specific article category
Post by: HugiN on March 15, 2011, 06:12:41 PM
Thanks for your reply! As you can see in the screenshots in my first post above i have set the category options to display the panel on the related category. I tried to switch the template back to default but no success. What else can i do?
Title: Re: Display block only on specific article category
Post by: IchBin on March 15, 2011, 08:52:02 PM
Quote from: HugiN on March 15, 2011, 06:12:41 PM
Thanks for your reply! As you can see in the screenshots in my first post above i have set the category options to display the panel on the related category. I tried to switch the template back to default but no success. What else can i do?

No I can't see that because nowhere did you declare which panel you were using. Nor did you say which block placement you are trying to use. Left/right/uppler/lower?

Looks like I can't access your site at the moment either. I'm getting a 404 not found from the links you provided above.
Title: Re: Display block only on specific article category
Post by: HugiN on March 15, 2011, 10:17:24 PM
Quote from: HugiN on March 08, 2011, 03:45:52 PM
I want to show blocks in the upper panel of the article category view. Somehow that doesn't work
If I assign blocks to the top panel they are being displayed, but when I move them to the upper panel in category view they dissapear. In other cases, e.g. the home-page, it is possible to display blocks in the upper panel.
The upper panel is turned on in the panel settings, and in the category settings, too.

The Site is down atm - we switched over to develop it on a different space.
Title: Re: Display block only on specific article category
Post by: standarddamage on March 19, 2011, 04:18:47 PM
Quote from: IchBin on March 14, 2011, 09:21:42 PM
When trying to show a block only in a category, do you have the category options set to display the panel that the block is in? I just tried this and didn't have a problem.

Actually, I'm running into the exact same problem on my site...

dcexpendables.com
SMF 2.0 RC5, TP 1.0 RC1

When you go to the main page, you see the Photo Gallery block in the upper panel. The should also appear in the upper block of the Photo Gallery (see the menu option on the right), but for whatever reason it simply won't show.  I've done a lot of experimentation with this, and what I've found interesting is that this only happens when you want to display a block in the Upper panel in a Category.  Some other things that might help you...

I appreciate how busy you are, so I tried to narrow this down as far as I could. If you have a solution to this problem, I would greatly appreciate it as it's limiting a couple of things we need to do with the site. Right now my TP installation is set to show the Photo Gallery on both the front page and the Photo Gallery category.
Title: Re: Display block only on specific article category
Post by: IchBin on March 22, 2011, 05:56:43 PM
Please test this to see if it works for you. You may have to go back in and re-save the block and categories that you are trying to use to get the settings to save properly.

Open Sources/TPortalAdmin.php file:
Code (find about line# 1022) Select
$check = array('layout','catlayout','toppanel','bottompanel','leftpanel','rightpanel','upperpanel','lowerpanel','showchild');

Code (replace) Select
$check = array('layout','catlayout','toppanel','bottompanel','leftpanel','rightpanel','centerpanel','lowerpanel','showchild');


Open Themes/default/TPortalAdmin.template.php:
Code (find about line: 1743) Select
<td><input type="checkbox" name="tp_category_upperrpanel" value="1"' , !empty($mg['upperpanel']) ? ' checked="checked"' : '' ,' />', $txt['tp-displayupperpanel'] ,'</td>
Code (replace) Select
<td><input type="checkbox" name="tp_category_centerpanel" value="1"' , !empty($mg['centerpanel']) ? ' checked="checked"' : '' ,' />', $txt['tp-displayupperpanel'] ,'</td>

Let me know if the upperpanel works for you. Please also test to make sure the upper block display normally outside of categories and other places. Thanks.
Title: Re: Display block only on specific article category
Post by: standarddamage on May 22, 2011, 03:11:55 PM
Quote from: IchBinâ,,¢ on March 22, 2011, 05:56:43 PM
Please test this to see if it works for you. You may have to go back in and re-save the block and categories that you are trying to use to get the settings to save properly...

Ichbin -

First off, I owe you a massive apology.  Due to some circumstances beyond my control, I've been away for a few months and unable to address this.  Thank you for your reply to my issue.

I tried exactly what you suggested, but it doesn't work. It still won't show under a specific category.  I even tried re-creating the block completely after applying the fix, but to no avail.

Any other thoughts?  Could it simply be the theme I'm using?  I'm aware not everyone is having this problem.
Title: Re: Display block only on specific article category
Post by: IchBin on May 23, 2011, 06:52:32 PM
No problem damage. It Looks like right and left blocks work. Upper blocks aren't working. Sorry I didn't see that sooner. I've fixed a few bugs with related situations. Let me check if my latest code has the same problem. If so I'll see if I can't figure out why it's working that way.
Title: Re: Display block only on specific article category
Post by: IchBin on May 24, 2011, 09:54:03 PM
Open Themes/default/TPortalAdmin.template.php and change this on about line #1743
<td><input type="checkbox" name="tp_category_upperpanel" value="1"' , !empty($mg['upperpanel']) ? ' checked="checked"' : '' ,' />', $txt['tp-displayupperpanel'] ,'</td>

Replace with this:
<td><input type="checkbox" name="tp_category_centerpanel" value="1"' , !empty($mg['centerpanel']) ? ' checked="checked"' : '' ,' />', $txt['tp-displayupperpanel'] ,'</td>

Go back in and resave the article options to display the upperpanel and it should be good to go I think.