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

Recent

Welcome to TinyPortal. Please login or sign up.

April 30, 2024, 07:02:51 AM

Login with username, password and session length
Members
  • Total Members: 3,885
  • Latest: Growner
Stats
  • Total Posts: 195,174
  • Total Topics: 21,220
  • Online today: 147
  • Online ever: 3,540 (September 03, 2022, 01:38:54 AM)
Users Online
  • Users: 0
  • Guests: 94
  • Total: 94

certain blocks on certain pages

Started by darkorical, February 19, 2008, 04:55:31 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

darkorical

alright Ive searched and found how to remove blocks from pages all together but what I want is to have one page that has its own set of blocks. and on that page I only want those blocks

I know that by using the show block on page I can tell it to show those blocks on that page but I cant figure out how to remove all the others from that page as well without removing the ones I want there as well

IchBin

Not currently possible unless you create separate blocks for your needs. This means you'll have duplicate blocks, but you can control when they show.

darkorical

care to elaborate on that a bit. and Ill elaborate on what I want.

Im using current version of smf and tp as well as current version of custom pages mod

I have a custom page that is going to show a catalog I want to use blocks to contain menu items Targeted at an an Iframe on the custom page. the set up works just fine but I only want the menu blocks (9 of them in all) to show on that certain page and I don't want any other blocks on the page.

IchBin

If you're page is in an article, you can set each block to display only while that article is displayed. There are a BILLION ways that people want blocks displayed. Unfortunately we will not be able to cover them all. You'll have to find a work around that works for you.

fr0d4ddy

I'm in a similar situation as well.  I have SMF Gallery, Ultimate Profile, and FelBlog installed and I want to have blocks pertinent to those pages show up on only those pages.

I can code this myself, but does it exist already?  Or has someone already done this?  I've done searches for a couple of hours but I have come up empty.  If not, is the easiest way to piggy-back on the "Show" section at the bottom of the page when you edit a block?  I can add a drop-down list for my specific sections and the appropriate code.  Perhaps I need to add a field to one of the TP tables?  Then I can grab one of the parameters that loads the section and include the appropriate blocks in a case statement or something.

Thanks

fr0d4ddy

Taking a look how things work behind the scenes, I'm thinking that the bottom of the block editing page "Show for this action" would be easiest to use.  The issue I see with this right now is displaying blocks on the forum only and not having those blocks carry over to the other add-ons.  It might be as simple as commenting out a few lines of code in the other add-ons.

I apologize for the blog-ish style replies :)


fr0d4ddy

I need some help now.  What I'm doing is creating a block for each mod and editing the blocks to "show on this action".  This way different blocks show up for different sections.

However, for the forum sections this doesn't work as advertised.  I want a block to show up while the user is in the forum sections.  I can edit the block for action Forum and it works for the forum landing page.  For example, links below this are:  \index.php?board=3.0 or \index.php?topic=22114.0.  In the "show for this action" I can enter board=3.0 and the block will show just for that board.  I tried using % and * wildcards like board=*, but that didn't work either.

Can someone point me in the right direction?  Of course the easiest way to do this is from the interface, but I'm okay with coding.  I looked at the code and didn't get very far yet.  I was looking for the code that loads the blocks for the action pages and didn't find it.  Another way to do this would be to change the SMF code for the boards from \index.php?board=1.0 to \index.php?action=forum;se=board  .  This way the TP code would work.  At this point I'm not sure which is easier, can anyone help?

Thanks

G6Cad

Please fr0d4ddy, when you post several times after one and the other, use the edit instead if no one else have replied to your post before.
It looks a lot better and it is easier for us to follow that you do and have done.  :)

IchBin

What you are seeking for is not part of TP 0.9.8. I would suggest you wait for TP 1.0 which will have many more options to show blocks in different sections. I've posted code work arounds for showing blocks in certain sections if you'd like to search my posts for something to work with.

fr0d4ddy

#9
G6, I didn't do an edit because the previous posts made it seem like I was okay.  An edit wouldn't have made a "new" reply and might have got overlooked.  It was either bump the post or create a new one, so I chose to bump it.  I'll make sure to play by the forum rules and next time I'll get more to a point before posting to avoid the bumping.

IchBin - I can't wait for 1.0, especially after I read a post of yours that it's not coming any time soon.  I'm developing a new site that needs to go up soon.  Really though, I am good at programming things on my own.  I found a SQL query on the Felblog forums how to do something, and I did the rest of the customization on my own.  Is it possible to give me more of a clue where to find this info on where to find the code where TP determines what blocks are displayed?  I just did a search on your user name and went through 100 posts and found nothing.   (You post A LOT on this forum, 100 posts didn't even get me past March.)  Combine this with another two hours of digging through code last night!  I'm putting in the effort but I'm not getting anywhere.   Perhaps a clue of how long ago you posted that code?  Help would be appreciated!!