1
anselmoso
Re: How can I access all blocks from within my theme?
  • 2006/10/21 22:24

  • anselmoso

  • Just popping in

  • Posts: 3

  • Since: 2006/10/15


Does anybody have another idea?



2
anselmoso
Re: How can I access all blocks from within my theme?
  • 2006/10/15 14:09

  • anselmoso

  • Just popping in

  • Posts: 3

  • Since: 2006/10/15


Hey Quest,

First: thanks for your quick answer!

Quote:
I do understand what you want to do but embedding them into the theme is a lot work and should you decide to change it later, more work.


work and time aren't the problem in my (very special) case;) The administrators of our page don't want to change the standard theme, but me and a lot of other users want this "alternative look". The standard design also hasn't any right blocks configured and we want a "look with left and right blocks", right now the theme only includes blocks on the left.

So, I will do anything to get "our old look back" - and the administrators only give me the "allowance" to do an alternative theme. In this theme, I can do "what I want" - but I can't change any system wide block settings or anything else.


I don't know if this "block cloning" is the right way to go....? If I understand this cloning right, the cloned block would also appear in the XOOPS blocks administration? If that's the case, this way is a "no go" :) This would lead to "stress with the admins"

I also thought about copying the block code into external php files and then including them in my theme at the desired position, but as far as my knowledge goes, this won't work, either...

So - do you still think this "cloning" is the way to go, then? As I said - the admins should "be bothered as less as possible" from my theme. I can "do what I want in my theme", but as soon, as I "change to much in the system wide config", the guys go mad;)



3
anselmoso
How can I access all blocks from within my theme?
  • 2006/10/15 13:10

  • anselmoso

  • Just popping in

  • Posts: 3

  • Since: 2006/10/15


Hi,

We're running XOOPS 2.2.3 on our community website and I'm doing a "theme hack" right now....

My question is:

How can I access all system-wide configured blocks from within my theme?

I mean, normally we all do it like this:

<{foreach item=block from=$xoops_lblocks}>
......
<{/foreach}>

to access the blocks, which are configured for the currently active page on the left.

The problem is the restriction, that I can only access the blocks, which are configured for the page, that is active at the moment.
For example: If the admin configures, that "who's online" is only viewable on the forum pages, I can't access this block if I'm leaving the forum-area on our site.


Let me explain what I want to do, so that you guys understand what I mean:

The standard design of our community is configured so that some blocks only appear on specific pages. What I want to do is a theme, where some specific blocks are available on the whole(!) site (so that they appear, whatever page you are looking at right now). So what I'm planing is kind of "blasphemy", because I want to configure these blocks statically. 3 or 4 blocks shall be configured statically in the theme so that they always appear on the left / right.


I hope you can follow my plan:)


In "spoken syntax", I want to do something like this:


.....
....(configure some variables to "collect" the specific blocks).....
........
$whosOnlineBlock, $searchBlock, $someOtherBlock;

<{foreach item=block from=$xoops_all_blocks}>
if $block.title = 'Who's Online' --> $whosOnlineBlock = $block;
........
.......(collect all blocks)....
........
<{/foreach}>



and then include these blocks on the left / right later on.


Maybe you could also help me out with the syntax...maybe I should do this in normal PHP syntax?



Thanks in advance, anselmoso




TopTop



Login

Who's Online

221 user(s) are online (144 user(s) are browsing Support Forums)


Members: 0


Guests: 221


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Apr 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits