1
DaveHaviland
Header hack, why a hack?

I found a hack here, (sorry I can't find it again, or I'd post the link top it) It allows a designer to place any blocks numbered below 10 above the module, and anything numbered above 10 gets put at the bottom of the page. - is there an "xoops way" of doing this - it seems that it would be a high-demand thing. I love XOOPS for so many reasons, but the all-or-nothing approach to placing the center blocks seems a little primitive.

So am I just missing something, or is this the norm?

If so, is there a simple faq on hacking this for any theme?

2
DogTags
Re: Header hack, why a hack?
  • 2005/5/7 15:08

  • DogTags

  • Just popping in

  • Posts: 50

  • Since: 2004/12/4


I would love this hack, too. Would give some nice flexibility

3
LazyBadger
Re: Header hack, why a hack?

Quote:

DaveHaviland wrote:
I found a hack here, (sorry I can't find it again, or I'd post the link top it)

Can't recall exact link, but you can search for "Happy Linux" in News section
Quote:

It allows a designer to place any blocks numbered below 10 above the module, and anything numbered above 10 gets put at the bottom of the page.

Main power behing this hack (from Japan community, BTW) - is idea how to get more block placeholders and use it in current state on blocks positioning admin's interface
Quote:

- is there an "xoops way" of doing this - it seems that it would be a high-demand thing.
No... AFAIS
Quote:

So am I just missing something, or is this the norm?

It is norm for all Nuke-grandchilds
Quote:

If so, is there a simple faq on hacking this for any theme?

Hmmm... inside hack archive you'll find modified for hack usability default theme (and theme's CSS) - it was all information, which I wanted to see in order to
- use orginal hack
- create own modification for additional new block-holders

4
LazyBadger
Re: Header hack, why a hack?


Can't recall exact link, but you can search for "Happy Linux" in News section

Wrong idea.

This hack was created by Kenichi OHWADA (ohwada here at xoops.org), developer of Weblinks module and can be found at this Happy Linux site

5
Mithrandir
Re: Header hack, why a hack?

We've been hearing this suggestion a number of times now and I would like to stress that I am not against it, but the downside is that it will only be applicable for new themes.

However, what I have done just two minutes ago is a cleanup of the code so new block positions can be added simply by adding new entries to three places in kernel/block.php and the blocks administration files.

Can be improved along the way.

6
DaveHaviland
Re: Header hack, why a hack?

I love it, maybe in time for 2.1? - either way I have a related question;

this just assigns it to an array and makes it ..._up, or ..._down

if ( $block_arr[$i]->getVar('weight') < 10)

what would happen if I modified my template to use that statement loop for the upper, ie = <10, and the use another statement at the bottom for = >10 ?

I would think that would work, but I haven't tried it yet. - and I'm not a real pro with php at all, I just gather what the jist of the statement is.

edit - eh, but I see they modify the header.php file to get the if statement in there, could that be done on a theme level?

I don't know the theme.html context weill enough to include that - without just a

7
LazyBadger
Re: Header hack, why a hack?

Quote:

Mithrandir wrote:
However, what I have done just two minutes ago is a cleanup of the code so new block positions can be added simply by adding new entries to three places in kernel/block.php and the blocks administration files.

And it can be tested in nearest nightlies?! Can you say, what can be changed (diff -u fulfill my needs)?

8
Mithrandir
Re: Header hack, why a hack?

The change is mainly in kernel/blockinstance.php in the assignBlocks() method that is done more dynamic now.

However, to be able to set a new block position, you will need to both add it to the $sides array there as well as to the

Who's Online

318 user(s) are online (217 user(s) are browsing Support Forums)


Members: 0


Guests: 318


more...

Donat-O-Meter

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

Latest GitHub Commits