(1) 2 3 4 ... 6 »
McNaz McNaz
  • Just can't stay away
  • Just can't stay away
  • Joined: 2003/4/21 7:36
  • Group: Registered Users
  • Posts: 574
  • Posted on: 2005/11/10 7:00
Xoops 2.0.13.2 hack to add centre blocks above and below content block. #1
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
JMorris JMorris
  • XOOPS is my life!
  • XOOPS is my life!
  • Joined: 2004/4/11 13:55
  • From 127.0.0.1
  • Group: BANNED Users
  • Posts: 2722
  • Posted on: 2005/11/10 7:05
Re: Xoops 2.0.13.2 hack to add centre blocks above and below content block. #2
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.
davidl2 davidl2
  • XOOPS is my life!
  • XOOPS is my life!
  • Joined: 2003/5/25 21:19
  • Group: BANNED Users
  • Posts: 4843
  • Posted on: 2005/11/10 7:09
Re: Xoops 2.0.13.2 hack to add centre blocks above and below content block. #3
Very clever work indeed!

Have you looked into doing this for 2.2.3 yet?
McNaz McNaz
  • Just can't stay away
  • Just can't stay away
  • Joined: 2003/4/21 7:36
  • Group: Registered Users
  • Posts: 574
  • Posted on: 2005/11/10 7:17
Re: Xoops 2.0.13.2 hack to add centre blocks above and below content block. #4
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.
tjnemez tjnemez
  • Home away from home
  • Home away from home
  • Joined: 2003/9/21 13:05
  • From Manitoba
  • Group: Registered Users
  • Posts: 1594
  • Posted on: 2005/11/10 9:38
Re: Xoops 2.0.13.2 hack to add centre blocks above and below content block. #5
this is a cool hack, thanks so much!

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


Dream Catcher Dezines
Mind Health ...
TottoBG TottoBG
  • Not too shy to talk
  • Not too shy to talk
  • Joined: 2005/8/18 3:43
  • From Sofia, Bulgaria
  • Group: Registered Users
  • Posts: 111
  • Posted on: 2005/11/10 10:38
Re: Xoops 2.0.13.2 hack to add centre blocks above and below content block. #6
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)
(http://www.xoops.org/modules/newbb/vi ... 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
McNaz McNaz
  • Just can't stay away
  • Just can't stay away
  • Joined: 2003/4/21 7:36
  • Group: Registered Users
  • Posts: 574
  • Posted on: 2005/11/11 6:15
Re: Xoops 2.0.13.2 hack to add centre blocks above and below content block. #7
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.
TottoBG TottoBG
  • Not too shy to talk
  • Not too shy to talk
  • Joined: 2005/8/18 3:43
  • From Sofia, Bulgaria
  • Group: Registered Users
  • Posts: 111
  • Posted on: 2005/11/11 17:02
Re: Xoops 2.0.13.2 hack to add centre blocks above and below content block. #8
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..
skalpa skalpa
  • Quite a regular
  • Quite a regular
  • Joined: 2003/4/15 23:46
  • From City of lights
  • Group: Registered Users
  • Posts: 300
  • Posted on: 2005/11/11 17:24
Re: Xoops 2.0.13.2 hack to add centre blocks above and below content block. #9
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)
Mithrandir Mithrandir
  • XOOPS is my life!
  • XOOPS is my life!
  • Joined: 2003/6/21 12:37
  • From Copenhagen, Denmark
  • Group: Registered Users
  • Posts: 6320
  • Posted on: 2005/11/11 18:40
Re: Xoops 2.0.13.2 hack to add centre blocks above and below content block. #10
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
How to effectively post a question in the Xoops forums? - Read here...
Design by: XOOPS UI/UX Team