I'm hoping someone can help me with adding new blocks to a theme. I've made a theme and it seems to work Ok as long as I stick to the normal 3 column set up. What I want to do is have a horizontal row of 3 blocks above the center block and thats where I get really confused.
If someone could give me a step by step guide to get the first one working I'm sure I'll be Ok after that.
I really like this system and I'd like to use it if I can just get straight on this bit.
Thanks for your time
Watch
GitHub Core
Show your support for Zikula! Sign up at Github account and watch the Core project!
GitHub Modules
- mesteele101 responded to »ERR (3): E_USER_ERROR: Smarty error: [in pagesvar:pagesitem2en line XXX]…« 07:01 AM
- mazdev responded to »Pages 2.5.0 and updating - Page not found« 06:41 AM
- ehdwma created topic »Hide "Register new account" and change template to 3 col« 06:27 AM
- mesteele101 responded to »Zikula 1.3.3 - Selecting a category in Pages not working« 01:29 AM
- mdee created topic »How to implement returnpage ?« 01:00 AM
- nestormateo responded to »Fillters in Clip« 24. May
- damon responded to »Can the Updated Version Check be Turned Off (Z 1.3)« 24. May
Zikula Blog
- Anatomy of Open Source Projects on Mar 07
- Continuous Review on Mar 01
- Not Invented Here on Feb 24
- How to Contribute Your Code at Github on Jan 13
- 10 Steps to Coding-Nirvana: Tips for Successful Module Writing on Nov 12
- Submitting Bug Report Tickets That Get Results on Aug 17
- Cozi Tricks #1: Syntax Highlighting on Aug 07
Login
adding blocks
-
- Rank: Freshman
- Registered: Apr 06, 2005
- Last visit: Feb 27, 2010
- Posts: 59
-
**unknown user**
- Rank: Registered User
- Registered: Mar 16, 2002
- Last visit: Jun 17, 2005
- Posts: 15
Me too ! Same problem with new blocks adding. I'm a brand new newbie, and i'm brainstorming on PN since only 5 days. I keep trying to understand the way it works... I was a quiete good handyman on NukedKlan CMS, but it seems that PN is a little more difficult but more powerful for templates edition.
My block is a jukebox programmed in javascript, and it works well on NukedKlan, and i want it to fit in a PN block.
I copy the script in a new block template, and when i press "Download Template" on Xanthia/Theme Templates/, i obtain this message :
" Failed to load module Xanthia (at function: "downloadTemplate") "
So, am i proceding well or am i commiting a great mistake, because i dont understand how it works for the moment. Thanks for responding us (me and autoresponse, same problem i think). -
**unknown user**
- Rank: Registered User
- Registered: Mar 16, 2002
- Last visit: Oct 21, 2009
- Posts: 21
creating a three-column-block-row above the center blocks in a xanthia theme
(pn760-RC3)
this is how i did it...
1. creating the block-templates:
i created three different block templates, one for each block to be able to assign custom layouts when necessary. so fire up your editor and get coding. save them as c1block.htm, c2block.htm and c3block.htm (or whatever you want) and upload them into the appropriate directory (/templates/blocks/).
then go to the xanthia-admnistration and click on 'new block template'. name the file exactly as the one you just uploaded (i.e. c1block.htm) and copy the source into the form. i had some errors in the past and this way seemed the most secure and error-less. dunno wether this has been fixed in the meantime). save the file and repeat this procedure with the other two block templates.
2. creating the block position tags
in the administration click on 'block position tags' and fill in the fields for a new tag (for the first block), i.e.:
tag description: Center Block 1
tag to use in theme: C1BLOCK
do this - of course - for the other two as well.
this are the tags you will have to put in your theme-template to assign the block:
3. creating the block zones
now go into the section of your themes xanthia-administration called 'content wrappers' and click on 'add new zone'. fill in the fields for your first block, for example:
zone name: center block 1
zone label: c1block
(leave alone the selection boxes 'new master for module' and 'new skin for block')
new skin for zone: select Center Block 1
and again - don't forget the other two blocks...
4. now you need to put the tags into your theme-template, for example home.htm (to only display them on the homepage).
wrap them in div-containers or use tables, whatever you like. i don't know what theme you are using, therefore i can't help you any further at the moment. but if you want the blocks to display above the centerblock (i.e. admin-messages) you'll eventually have to put your tags somewhere above .
to give you an example i'll paste some (bad tables) code from a theme i was working on:
Code
<table cellpadding="0" cellspacing="0" border="0" align="center">
<tr valign="top">
<td align="center" valign="top" >
<!-- Left Block Start -->
<!--[$leftblocks]-->
<!-- Left Block end -->
</td>
<td width="15"><img src="<!--[$imagepath]-->/pixel.gif" width="15" height="1" border="0" alt="">
</td>
<td class="theme-maincontent" width="100%">
<!-- Center Block Area Start -->
<table bgcolor="#6699CC" width="100%" border="0" cellspacing="0" cellpadding="2" align="center">
<tr>
<td align="center" valign="top" width="33%">
<!--[$C1BLOCK]-->
</td>
<td align="center" valign="top" width="33%">
<!--[$C2BLOCK]-->
</td>
<td align="center" valign="top" width="33%">
<!--[$C3BLOCK]-->
</td>
</tr>
</table>
<!-- Center Block Area end -->
<!-- Center Block Start -->
<table width="100%" border="0" cellspacing="1" cellpadding="0" bgcolor="#cccccc">
<tr>
<td>
<table width="100%" border="0" cellspacing="1" cellpadding="8" bgcolor="#eeeeee">
<tr>
<td>
<!--[$centerblocks]-->
</td>
</tr>
</table>
</td>
</tr>
</table><br>
<!-- Center Block end -->
<!--[$maincontent]-->
</td>
<td width="15"><img src="<!--[$imagepath]-->/pixel.gif" width="15" height="1" border="0" alt="">
</td>
<td align="center" >
<!-- Right Block Start -->
<!--[$rightblocks]-->
<!-- Right Block end -->
</td>
</tr>
</table>
5. setting up the block control
you'll have to figure out this one for yourself, wherever you want to display your centerblocks1-3.
i wanted to only make em show up on the startpage, so i had to enable block control for the News module and assign position and template to the appropriate blocks. but then i also had to create a new theme-template for the News module, without adding the centerblock-tags, to not let them show up on the News page.
anyway, when you are interested in how it looks on my site: <expired>
the theme i converted is 'Brittania', its not yet finished though.
it's also been a while since i last added block templates zones etc, so i might have missed something or even mixed it all up. this whole explanation is just meant as a hint anyway, so... good luck ;)
hope i could help you!
regards
philipp
ps: i hope you don't get confused by the similar names (center block 1-3 and the default centerblocks) i used, but in the end, they are all just centerblocks...
i am a very confused person sometimes, so it can be quite hard to understand me :?
edit: removed link
edited by: ganja, Dec 16, 2007 - 09:27 AM </expired> -
**unknown user**
- Rank: Registered User
- Registered: Mar 16, 2002
- Last visit: Oct 21, 2009
- Posts: 21
RA|V|BO:
this is one reason why i chose the way described in #1 of my previous post above!
perhaps its even sufficient to enable the options 'check for updated version of templates' and 'force templates recompilation' in the main xanthia administration... didn't try this in the new version of pn760-RC3, so i stick(ed) to the procedure i am used to from previous xanthia-versions...
perhaps mark, the god of xanthia (and postnuke), can help any further/better. im sure he can ;) -
- Rank: Freshman
- Registered: Apr 06, 2005
- Last visit: Feb 27, 2010
- Posts: 59
Thank you ganja!
I'm going to give this another try now., I've been at this for a couple of days and really want to get it handled. I'll probably be back with more questions, if it's not to much trouble. -
- Rank: Freshman
- Registered: Apr 06, 2005
- Last visit: Feb 27, 2010
- Posts: 59
Ok. I think I'm getting somewhere now, very slowly. Where I'm at is feeling very dumb because I can't figure our how to change the login block from the left block where it's asigned in the blocks admin to the new position I've set up in the center of the page. All that show in the blocks admin is the original left, right and center poitions.
If I use AutoTheme I get 1-9 new block postions to use but this is not the way it seems to work with Xanthia.
Thanks for your help. -
- Rank: Legend
- Registered: Dec 11, 2002
- Last visit: Oct 21, 2009
- Posts: 11674
You need to use block control, in Xanthia administration
--
itbegins.co.uk - Zikula Consulting
birtwistle.me.uk - Personal Blog
Please read the Support Guide -
**unknown user**
- Rank: Registered User
- Registered: Mar 16, 2002
- Last visit: Jun 17, 2005
- Posts: 15
Very good tutorial ! Thank you Ganja for the time you have spent for two noobs. I managed to do it by myself, but now we have a well witten method.
Now the blocks work but not my content. I have created a block with only a simple text to display in the block called "Affichage". No problem for this one. But in the jukebox2, ive put some javascript without start and end HTML and body beacons. Ive also try by removing all carrier returns, the same... Idem with -
- Rank: Legend
- Registered: Dec 11, 2002
- Last visit: Oct 21, 2009
- Posts: 11674
You've put it in a PHP block? Try it in a HTML block
--
itbegins.co.uk - Zikula Consulting
birtwistle.me.uk - Personal Blog
Please read the Support Guide -
**unknown user**
- Rank: Registered User
- Registered: Mar 16, 2002
- Last visit: Jun 17, 2005
- Posts: 15
Yes, I've put all this code in an HTML block, but as you can see in the screenshot, it stays blank, but it should at least display the music list. I've just said that i've tried to put it on a PHP block, just to see if it works, but it's worst (see JukeTest3 and the PHP error).
I've just tried to add the beacons, but the same : it stays blank.
If the scripts are not yet supported, I just hope it'll be soon.
Thank you as well for your attention. -
- Rank: Legend
- Registered: Dec 11, 2002
- Last visit: Oct 21, 2009
- Posts: 11674
Quote
edit: hammerhead was quicker
There aren't many faster than me on these forums ;)
--
itbegins.co.uk - Zikula Consulting
birtwistle.me.uk - Personal Blog
Please read the Support Guide -
**unknown user**
- Rank: Registered User
- Registered: Mar 16, 2002
- Last visit: Jun 17, 2005
- Posts: 15
At least i've solved the problem by my own. In fact, there was no problem in my code, the only problem was mozilla..
So the jukebox works with IE, but stays blanck in Firefox.
Now i'll test my mods with IE, thought Firefox is great for code analysis, but completely deprecated for graphics displays...
I've also finally managed to create a block and even a module for this Juke. After having spending nearly two full days to look on these forums and on the web to understand HOW the module's file system WORKS, and how to built a simple module, and how to display it in the menu.
For a beginner, without any good docs, that was difficult, so that's why I'll release graphic tutorials in french and english to help noobs like me ! -
**unknown user**
- Rank: Registered User
- Registered: Mar 16, 2002
- Last visit: Oct 21, 2009
- Posts: 21
hammerhad, i would have never doubt it, comparing your "total posts" with mine (6617 - 18) ;)
rambo,
glad you could solve that. don't know why firefox refuses to display your jokebox... have you had any errors in the javascript control?
i think there is enough documentation about creating modules, themes etc, the problem is just to find it. when "creating" a module, the best way is to start with the example module, that should already be contained in your postnuke installation. this is very good documentated and makes life alot easier. as for graphic related issues, i am glad you wrote some tutorials =)
anyway, thanks for your contribution back to the community!
regards
philipp -
**unknown user**
- Rank: Registered User
- Registered: Mar 16, 2002
- Last visit: Jun 17, 2005
- Posts: 15
Yeah so here's my first (maybe bad) tiny tutorial about block creation based on your description Ganja, but with screenshots.
http://soldat.de.plo…nload/pn-Blocks.ppt
I am awaiting your opinion about it. I keep on working on modules and may release another one day...
- Moderated by:
- Support
