Main Menu
collapse

Simple Portal Archived Forum

This is an Archive Forum.

The content in this forum may be out-of-date or have been superseded by newer information, and links in forum pages to other sites may not work.
This forum contains archives for future reference.

Visit our thread at Simple Machines Forum for current support.

SMF 2.1 users: EhPortal is a ported version of Simple Portal specifically designed for the SMF 2.1 branch.
Please visit web-develop.ca to download EhPortal and for its support.

User Info

Welcome Guest.
Please log in.

Who's Online

  • Dot Guests: 1229
  • Dot Hidden: 0
  • Dot Users: 0

There aren't any users online.

Recent Posts

Adding Forums Button to Nav bar by jirapon
[August 01, 2019, 09:07:12 AM]


Re: Board Icons by ♦ Ninja ZX-10RR ♦
[July 30, 2019, 04:03:41 PM]


MOVED: Czech translation???? by ♦ Ninja ZX-10RR ♦
[July 30, 2019, 03:04:51 PM]


Board Icons by jirapon
[July 30, 2019, 07:28:44 AM]


Re: Thankyou Simpleportal, by ♦ Ninja ZX-10RR ♦
[July 29, 2019, 09:41:29 AM]


If you're interested in helping other members with support requests, consider joining the Community Support Helpers group.

Custom Display Options only for topics

Started by natasa, April 15, 2012, 12:23:03 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

natasa


For example, if I have board=66.0 and topics on that board:

topic=1.0
topic=2.0
topic=3.0

Is it possible (and how) to show block on topic pages but not on board 66?
Thanks!

andy

Yes... you can show a block on a particular topic using the advanced options - custom display setting in the block edit.

Try looking at this:
http://simpleportal.net/index.php?topic=10997.msg56677#msg56677

And searching for 'custom display options blocks'

There is a help popup on the block edit page. If you enter the right custom syntax it will display only on the topics you select. Give it a try.
Everyone is a volunteer here so please try and make a small donation to keep the Simple Portal website running


natasa


Thanks igirisjin for quick reply.

I know that I can put it like:

~topic|1.0,~topic|2.0,~topic|3.0

but when you have, for example, 50 or more themes it is exhausting.

My question is:
can I put block on all themes of one board at once, but only not on board page itself?

andy

#3
Theme selection should not make any difference to blocks displayed anyway?
If I change my themes the blocks are still there the same.

Quotecan I put block on all themes of one board at once, but only not on board page itself?

You want it on all topic pages of a board but not on the board index page?

I guess to do this you can select it to show on the board (select board in advanced options).
Then use Idkin (|)  (exact value) with Negator (-) in custom display to stop it showing on the board index page only.



I couldn't find the answer and the documentation doesn't have anything I can find. I think a page with examples needs making - many questions like yours.

I know it can be done - keep trying! Another support staff will know the answer.

This didn't work on my site but something like this - syntax is incorrect. Try something similar and it will stop display on board index.
I selected the board in advanced options then tried to stop it displaying on just the index page but showing on all the board topics - without success - even without ~ it stopped displaying on all topics.
Quote-board|66

I guess you could also do it for topics using the custom action for the link through that board only.
Sorry I can't be of more help.

Everyone is a volunteer here so please try and make a small donation to keep the Simple Portal website running


natasa


Thanks again igirisjin.
You are right, I thought topics and not themes.
And I tried a lot of combinations, but no success  :thumbsdown:

andy

Same ... tried so many and driving me insane  :P

Cant negate just the board index - all topics also off.
Or try and get topics to show block through that board.

I'm sure it can be done. They need a detailed examples page for these kinds of problems.
Wait a couple of days - one of the others knows the answer.

Everyone is a volunteer here so please try and make a small donation to keep the Simple Portal website running


andy

Good news!

Our 'master' developer  Sinan gave this answer - and it works - I tested. The Custom display option is cleverly designed to take php as well. Just copy and paste this into  the box with the board ID. This displays a block in topics belonging to the board, but not display on the board index page. You do not even need to select the board in the Advanced options .... as long as the you change the 'board_id' to the actual number.




$php global $context; return (!empty($context['current_board']) && $context['current_board'] == board_id && !empty($context['current_topic']));


If your board ID number is 66? then this:

$php global $context; return (!empty($context['current_board']) && $context['current_board'] == 66 && !empty($context['current_topic']));


I think more advanced custom display options are supposed to be in the next big version (2.4).
Let us know if this works for you and mark off solved if ok.
Everyone is a volunteer here so please try and make a small donation to keep the Simple Portal website running


natasa


It is working for SMF 2.0.2 and SP 2.3.5 but not for SMF 2.0.1 and SP 2.3.3  :dead:
I think that problem is in SP version?

andy

#8
For security reasons as well as bug fixes you should always upgrade.

Im not sure if this works only with versions after yours but I tested it on my site and it does work.

There are recent posts about easy ways to upgrade ... I suggest you read this:

http://simpleportal.net/index.php?topic=11083.msg57176#msg57176

Easily done!

The list of backup files in the Packages/backup/ folder give you the order mods were installed - reserve it.
Everyone is a volunteer here so please try and make a small donation to keep the Simple Portal website running


natasa


I upgraded on SMF 2.0.2 and SP 2.3.5, but have problem with Custom Title Style for blocks - colors and images do not cover whole title background, but just little left part.

I tried to test it on my test site (SMF 2.0.2 and SP 2.3.5) and get same result: Custom Title Style is not working like it suppose to?

So, I go back on SP 2.3.3.

Anyway, code you gave me is working for SP 2.3.5, but not for SP 2.3.3 (unless there is problem with my mods or something like that).

I'll do some more tests on that Custom Title Style problem  :0.

andy

Catbg problem should be fixed in 2.3.5 so no need to copy portal css to your theme or make other changes. But hard to understand your description - theme, version and screenshot would be best.
Did you use a fresh/clean unmodified template when you installed the new version of SP?

Similar to this?
http://simpleportal.net/index.php?topic=9079.msg47906#msg47906
Everyone is a volunteer here so please try and make a small donation to keep the Simple Portal website running


natasa

#11
QuoteCatbg problem should be fixed in 2.3.5 so no need to copy portal css to your theme or make other changes.

That problem is solved.

Here is what I am talking about:
I put in block
Custom Title Style: background: #B3D2E7;

In SP 2.3.3 I get #B3D2E7 color as title background.
In SP 2.3.5 I get what you can see on screenshot.

It is SMF Default Theme - Curve, SMF 2.0.2 and SP 2.3.5

andy

You are using new theme files now? You replaced old theme with no old portal css files and modified code in themes etc?
Or you are using old them files?
You can give a link to site?

As far as I know all these corner theme display problems are fixed if you are using a new, unmodified theme and SP 2.3.5.
I do not know all the details well so can only advise changing the theme files for new ones and trying again.
If that doesn't work, maybe one of the other people here can help.
Everyone is a volunteer here so please try and make a small donation to keep the Simple Portal website running


natasa


This is test site, and everything is new.
And it is not old problem with corners, it is problem with Custom Title Style option  :-X




andy

Then I dont understand ... I thought it was the title corner/edge that is light blue, that is a problem.
Everyone is a volunteer here so please try and make a small donation to keep the Simple Portal website running


natasa


Whole title background should be light blue, and not just corner.

andy

If its a new board then this is different from previous questions about a board with 2.0.1 and 2.3.3 - of course, that cant be this test board  -same...?

And this corner/background problem is on a clean newly installed site?
Perhaps a link to your site is best to check.

If you have done everything mentioned I do not know what the problem is. Without a link, a list of all mods and themes, it would be difficult to say what the problem is - maybe someone else can help.
Everyone is a volunteer here so please try and make a small donation to keep the Simple Portal website running