Fork me on GitHub
Get XOOPS XOOPSXOOPS FAQFAQ ForumsForums NewsNews ThemesThemes ModulesModules
New Posts New Topics All Posts All Forums Index General Modules Themes Development International XOOPS.org

Search

Nominate XOOPS!

Learn XOOPS Core

Donat-O-Meter

Make donations with PayPal!
Stats
Goal: $100.00
Due Date: Jul 31
Gross Amount: $15.00
Net Balance: $14.11
Left to go: $85.89

Donations
Anonymous ($15)Jul-20

Local Support

Advertisement

XOOPS Code hosted on SourceForge

Cumulus Tag Cloud

- 2 2.5 2.6 4 6 adslight Android AntiHarvesting AntiMalUser AntiSpam API Apple Battlefield billige Blocks Bootstrap Captcha cell cent chronolabs CHUNG Clicks content CĂN demo docek download Dresses evden eve facebook Fat floor for free Gateway Google Guide herre Honeypot HP html5 Human HỘ IP iPhone jQuery Language List log Loss module modules Monster new newbb news NHÀ online PARK Payment phone PHP Prevention profile project Protector publisher RESIDENCE responsive review Rights rmcommon Room security Sentry site Smartphone Smarty Smoking Spam stem Studio support tag tdmcreate template The Theme themes User userlog weight xoops Xortify XPayment ZendFramework

New Users

Registering user

# 137631

promozseo

Welcome to XOOPS!




Bottom   Previous Topic   Next Topic  Register To Post



#1 Posted on: 2009/7/21 5:46 I want to add a new block in xoopscore blocks
I am trying to add a new block type as side block left bottom.
i added it in admin system section. but i cannot find and figuoure out where i can define it for theme something like
sideleftbottom.html. anyone here to help me?
Resized Image

This is what i am trying to do see the above image. Need help doing it for client he wants some blocks at the bottom have to have a different layout and style


Top


Fluid fusion
Waqar
Mazar
Not too shy to talk
Not too shy to talk
Joined:
2009/1/3 18:27
Group:
Registered Users
Designer Group
Posts: 176
(Show More) (Show Less)


#2 Posted on: 2009/7/21 7:58 Re: I want to add a new block in xoopscore blocks
Can't you apply a css style depending on the block name?
Like :

<{if $block.title == 'mytitle' || $block.title == 'myothertitle'}>
class='myclassname'
<{/if}>

There are other ways. You can prefix your block name with class_ and the use some smarty function to see if title is prefixed, remove the prefix, and apply the class. I have seen it some done somewhere but don't know how to do it by head.

I think hacking the core is not a good idea and it is a big task. I'm not sure you will get free help for that.

Top


Xoops User Utilities | Xoops Search Engine | vil3/trabisdementia
trabis
Core Developer
Core Developer
Joined:
2006/9/1 13:10
From Portugal
Group:
Webmaster
Registered Users
Posts: 2198
(Show More) (Show Less)


#3 Posted on: 2009/7/21 9:41 Re: I want to add a new block in xoopscore blocks
Are you using all of the center blocks? You could move an unused center block to the bottom left column of your theme.

Top

tcnet
Friend of XOOPS
Friend of XOOPS
Joined:
2006/5/11 19:13
From Holopaw Beach
Group:
Registered Users
Posts: 267
(Show More) (Show Less)


#4 Posted on: 2009/7/21 9:46 Re: I want to add a new block in xoopscore blocks
I did move center bottom left block but now the client needs that block for something else.
so i decided to add a new block type.but it seems not working properly.

Top


Fluid fusion
Waqar
Mazar
Not too shy to talk
Not too shy to talk
Joined:
2009/1/3 18:27
Group:
Registered Users
Designer Group
Posts: 176
(Show More) (Show Less)


#5 Posted on: 2009/7/21 9:49 Re: I want to add a new block in xoopscore blocks
I think XOOPS developer team should really consider adding some more block type into the system
left block,
left middle block,
left bottom, block.

and same for center blocks and right blocks.

It would be good i think.
or maybe i am in need ;)

Top


Fluid fusion
Waqar
Mazar
Not too shy to talk
Not too shy to talk
Joined:
2009/1/3 18:27
Group:
Registered Users
Designer Group
Posts: 176
(Show More) (Show Less)


#6 Posted on: 2009/7/23 11:58 How to Change Style for Blocks Inside a XOOPS Core Block
Re: I want to add a new block in xoopscore blocks.

Quote:

I am trying to add a new block type as side block left bottom.

...some blocks at the bottom have to have a different layout and style


There is no need to add a new XOOPS core block to change the style for some blocks. The core developers have provided the smarty variable $block.weight and we can use it to identify blocks for special treatment.

To change the style for blocks at the bottom of a XOOPS Left Block using <{$block.weight}>:

Add a conditional and some math <{if $block.weight < n}> to set a threshold where the blocks should change style and add it to your theme_blockleft.html template.

Go to system blocks admin and set the block's weight greater than n to highlight.

You can also highlight a specific block by giving the block a unique weight n and using <{if $block.weight = n}>.

You can highlight a group of blocks by setting their Order Weight equal to n and using <{if $block.weight = n}>.

For example, at Technical Crew Network this <{$block.weight < 50}> was added to theme_blockleft.html to give blocks with a weight above 50 a yellow background.

In theme_blockleft.html:

<{if 
$block.weight 50}>
  <!-- default 
style -->
  <{if 
$block.title}>
    <
div class="blockTitle">
      <
h3><{$block.title}></h3>
    </
div>
   <{/if}>
   <
div class="blockContent">
     <{
$block.content}>
   </
div>
<{else}>
  <!-- 
special style -->
  <
div class="leftcolumnbottom" style="background-color: #FFFFCC">
    <{if 
$block.title}>
      <
div class="blockTitle">
        <
h3><{$block.title}></h3>
      </
div>
    <{/if}>
    <
div class="blockContent">
      <{
$block.content}>
    </
div>
  </
div>
<{/if}>


You will probably want to add the class leftcolumnbottom to your style sheet instead of using the example's inline style.

You could use this in your theme.html but it would require a new theme_blockleftbottom.html template.


Top

tcnet
Friend of XOOPS
Friend of XOOPS
Joined:
2006/5/11 19:13
From Holopaw Beach
Group:
Registered Users
Posts: 267
(Show More) (Show Less)







You can view topic.
You cannot start a new topic.
You cannot reply to posts.
You cannot edit your posts.
You cannot delete your posts.
You cannot add new polls.
You can vote in polls.
You cannot attach files to posts.
You cannot post without approval.
You cannot use topic type.
You cannot use HTML syntax.
You cannot use signature.

[Advanced Search]