1
McNaz
Xoops 2.0.13.2 hack to add centre blocks above and below content block.
  • 2005/11/10 12:00

  • McNaz

  • Just can't stay away

  • Posts: 574

  • Since: 2003/4/21


Why do this?

At the moment XOOPS contains the following blocks:
* Left Block
* Right Block
* Center Block
* Center Left Block
* Center Right Block.

Depending on your theme, the center blocks display either above or below the content. If you want to display blocks above and below the content block then it is currently not possible.

What this core hack does is give you the following blocks:
* Left Block
* Right Block
* Center Block
* Center Left Block
* Center Right Block
* Center Down Block
* Center Down Left Block
* Center Down Right Block

There is only one caveat that I found so for with this hack and that is the inline notification options content has to changed to Block Style otherwise the Down blocks will display after the Notifications content.

I hope someone else finds this useful or it finds its way into the core.

Download the Diff Patch, Patched Files, and example default theme.

Resized Image

Resized Image

Resized Image

2
JMorris
Re: Xoops 2.0.13.2 hack to add centre blocks above and below content block.
  • 2005/11/10 12:05

  • JMorris

  • XOOPS is my life!

  • Posts: 2722

  • Since: 2004/4/11


Nice hack! I've wanted something like this for a VERY long time. IMHO, this would be an excellent addition to the Core.

Have you done any testing of this on 2.2.x?

Best Regards,

James
Insanity can be defined as "doing the same thing over and over and expecting different results."

Stupidity is not a crime. Therefore, you are free to go.

3
davidl2
Re: Xoops 2.0.13.2 hack to add centre blocks above and below content block.
  • 2005/11/10 12:09

  • davidl2

  • XOOPS is my life!

  • Posts: 4843

  • Since: 2003/5/26


Very clever work indeed!

Have you looked into doing this for 2.2.3 yet?

4
McNaz
Re: Xoops 2.0.13.2 hack to add centre blocks above and below content block.
  • 2005/11/10 12:17

  • McNaz

  • Just can't stay away

  • Posts: 574

  • Since: 2003/4/21


Hi JMorris and DavidL.

Thanks for the feedback. I must admit that I still haven't dived into XOOPS 2.2.x yet but I am sure I would be able to do a similar hack there.

Cheers.

McNaz.

5
tjnemez
Re: Xoops 2.0.13.2 hack to add centre blocks above and below content block.
  • 2005/11/10 14:38

  • tjnemez

  • Home away from home

  • Posts: 1594

  • Since: 2003/9/21


this is a cool hack, thanks so much!

cheers
Not right now; I am busy screwing up my site!


Dream Catcher Dezines
Mind Health ...

6
TottoBG
Re: Xoops 2.0.13.2 hack to add centre blocks above and below content block.
  • 2005/11/10 15:38

  • TottoBG

  • Not too shy to talk

  • Posts: 111

  • Since: 2005/8/18


Ham, I should have done what you did now McNaz, i.e. to post a link to a package with the hacked files, when I did mention it here before (the hack for extra blocks in theme)
(https://xoops.org/modules/newbb/viewtopic.php?topic_id=19242&forum=15&post_id=185720#forumpost185720)

and here the block admin area:
Resized Image

As it seems it's it - just those 3 files + the language file. But it's only the way the block system on 2.0.x does it, still haven't tried to achieve it on 2.2.x. Wish you have time for it cause it's a really worth hack!

and sorry all for the stretch because of long link

7
McNaz
Re: Xoops 2.0.13.2 hack to add centre blocks above and below content block.
  • 2005/11/11 11:15

  • McNaz

  • Just can't stay away

  • Posts: 574

  • Since: 2003/4/21


I've managed to hack the XOOPS 2.2.3 final core files to produce the same results. It was easier to do in XOOPS 2.2.3

Get the modified files HERE.

Please note that you have to modify your theme.html to take advantage of the new blocks. I've modified the original default theme (renamed blocks) to demonstrate how this is done.

Cheers.

McNaz.

8
TottoBG
Re: Xoops 2.0.13.2 hack to add centre blocks above and below content block.
  • 2005/11/11 22:02

  • TottoBG

  • Not too shy to talk

  • Posts: 111

  • Since: 2005/8/18


Thanks again McNaz! In my opinion it's a really usable hack cause giving XOOPS admins more power in ordering site content which in many cases comes needed. I've just inherited this hack on the site I'm administrating and then looked for it deeply to reproduce it on a local testing site. Sure your hack on 2.2.3 will be usable to me too for upgrading some day or for needed new sites And to many other xoopsers too..

9
skalpa
Re: Xoops 2.0.13.2 hack to add centre blocks above and below content block.
  • 2005/11/11 22:24

  • skalpa

  • Quite a regular

  • Posts: 300

  • Since: 2003/4/16


Quote:
I hope someone else finds this useful or it finds its way into the core.


I'll look at it, but if it's as good as it looks it will soon...

Thanks a lot

skalpa.>
Any intelligent fool can make things bigger, and more complex. It takes a touch of genius, a lot of courage, to move in the opposite direction.
Two things are infinite: the universe and human stupidity; and I'm not sure about the 1st one (A.Einstein)

10
Mithrandir
Re: Xoops 2.0.13.2 hack to add centre blocks above and below content block.

There is nothing really talking against adding more block positions - except that no themes will support these positions.

This means that the no. 1 question asked in the forums - if we add more block positions - will be "Why won't my [block position] blocks show up???"

We could even make it dynamic - add new positions on the fly... but end up with the same problem.

With XOOPS 2.2.3 a lot more information about each block is available to the themes - its block id, its instance id and its weight. With the weight, it is possible to accomplish what you have done (in theme: If $block.weight < 10 show block before content, else after)

Adding new block positions is something I have wanted for a long time, but we will need some "fallback" measure for a theme to broadcast which positions it has available and perhaps let it define a default block position where all the blocks that are positioned on positions not in the theme will be put.

All in all it is somewhat more than just tinkering with the possible block positions (big thumbs up for the work done so far, though - it's just that it ain't for beginners)
"When you can flatten entire cities at a whim, a tendency towards quiet reflection and seeing-things-from-the-other-fellow's-point-of-view is seldom necessary."

Cusix Software

Login

Who's Online

271 user(s) are online (231 user(s) are browsing Support Forums)


Members: 0


Guests: 271


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