1
xsell
Blocks (anywhere) 2 Quastions
  • 2009/9/3 20:58

  • xsell

  • Quite a regular

  • Posts: 245

  • Since: 2008/9/2 1


Hello
i do not know where to get support for Blocks anywhere plugin. so had to ask here
1- i have disabled block . but when i use the block anywhere plugin to show the block some where in my site . It Shows up , dont seem the plugin Respect the Stats of the Block if Disabled or Enabled .

2- i have block enabled on the Center of my Site . and tried to use the plug in to put the same block at the site Header , For Some reason the Site Breaks , won't Show any thing until Disable the block from the center of my site or remove <{block id=1}> from my site header.


2
ghia
Re: Blocks (anywhere) 2 Quastions
  • 2009/9/3 23:09

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


About which XOOPS, version, modules and blocks are you talking?
Did you try the same operation with another block, or one from another module, or a custom block?

3
xsell
Re: Blocks (anywhere) 2 Quastions
  • 2009/9/3 23:26

  • xsell

  • Quite a regular

  • Posts: 245

  • Since: 2008/9/2 1


I see where is the error Now , there seem duplicate function call ,
"Fatal error: Cannot redeclare smart() (previously declared

thats when Having same block twice .

is there a workaround way to use the same function in One File twice , without renam the function


4
trabis
Re: Blocks (anywhere) 2 Quastions
  • 2009/9/4 8:34

  • trabis

  • Core Developer

  • Posts: 2269

  • Since: 2006/9/1 1


Hi, point one and two are not consistent. Point one you say that it does not respect disable/enable. Point two you say you have to disable it.
I don't know what smart() is. Seems like the problem is in your block. Have you tried to place those blocks in the same page without using the smarty plugin?

5
xsell
Re: Blocks (anywhere) 2 Quastions
  • 2009/9/4 11:50

  • xsell

  • Quite a regular

  • Posts: 245

  • Since: 2008/9/2 1


Thx trabis , Yah you right it was problem with My Function File , it seems i was useing ' include' instaed 'include once ' ..
Now works Fine , But still the First point :) . For some Reason when a block is disable and if place the code <{block id=1}> some where in the Theme , it shows Up .. it seems it only Respects the Block Permissions , "who can see it" . but doese not respect the block Options .. like Visable or Not

6
trabis
Re: Blocks (anywhere) 2 Quastions
  • 2009/9/4 11:55

  • trabis

  • Core Developer

  • Posts: 2269

  • Since: 2006/9/1 1


Oh, it is supposed not to respect that. You would not want to have block displayed in header and also in other column would you? Your blocks should be set to invisible so they don't show in 2 different places. There is no way to disable the smarty block. You have to delete it from template/theme.

7
xsell
Re: Blocks (anywhere) 2 Quastions
  • 2009/9/4 23:32

  • xsell

  • Quite a regular

  • Posts: 245

  • Since: 2008/9/2 1


Thx. Trabis, the reason why to use your plug in , is the Flexability to use it anywhere , without having to use the Block Template ..

One more thing , Can this Plug in be adopted to the core of any or an Module .. Rather than put the plug in in smarty plugin .. No reason for my Quastion just Curious

8
trabis
Re: Blocks (anywhere) 2 Quastions
  • 2009/9/4 23:47

  • trabis

  • Core Developer

  • Posts: 2269

  • Since: 2006/9/1 1


This plugin has troubles with blocks that require javascript. There is a better way of doing this without using smarty plugins but requires developer to implement some code in his blocks. I think that in 2.4 we may introduce hooks in the block render engine and provide the ability of assigning a block result to a smarty var. Yeah, we can do that.

9
xsell
Re: Blocks (anywhere) 2 Quastions
  • 2009/9/5 5:09

  • xsell

  • Quite a regular

  • Posts: 245

  • Since: 2008/9/2 1


Thank you , Good News

10
trabis
Re: Blocks (anywhere) 2 Quastions
  • 2009/9/5 14:10

  • trabis

  • Core Developer

  • Posts: 2269

  • Since: 2006/9/1 1


Ok, it is done.
You can use Defacer final in XOOPS 2.4 from trunk:
http://www.xuups.com/modules/publisher/item.php?itemid=15

Tips for blocks anywhere (xoops 2.4 only)
=========
Just prefix your block title with an underscore and you will be able to use it
has a smarty variable inside your theme or template
Example:
-Edit User menu block and rename it to _User Menu
-Take notice of the "bid" in the url, in this case it is '1':
modules/system/admin.php?fct=blocksadmin&op=edit&bid=1
-Usage on theme/template:
<{$xoops_block_1.title}> --> echos User Menu
<{$xoops_block_1.content}> --> echos the block content

You can enable it, disable it, use cache, choose where and to who it displays just has you do for any other block. Prefixing your block with '_' will remove it from default position and render it to a smarty var.

This ability will be available just by installing defacer.

You can also use the new redirection system based on jgrowl(plugin for jquery). When enable in defacer configs, XOOPS redirection page will be replaced by nice floating box.

Login

Who's Online

352 user(s) are online (268 user(s) are browsing Support Forums)


Members: 0


Guests: 352


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