Closed (fixed)
Project:
Block Theme
Version:
6.x-1.0-beta1
Component:
Code
Priority:
Minor
Category:
Task
Reporter:
Created:
13 Mar 2008 at 12:19 UTC
Updated:
5 Jan 2009 at 19:51 UTC
Jump to comment: Most recent, Most recent file
I needed this for drupal 6 so I've updated it and attached my version to this post (not really sure if that's be right way to submit it). No longer need to add anything to the template.php file either, it's all taken care of in the module.
Hope someone finds it useful.
-Tony.
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | blocktheme-6.x-0.4.zip | 8.39 KB | atomicus.org |
| #3 | blocktheme-6.x-0.3.tar_.gz | 7.53 KB | Anonymous (not verified) |
| #3 | blocktheme-6.x-update.patch | 24.18 KB | Anonymous (not verified) |
| blocktheme-6.x-0.1.tar_.gz | 7.58 KB | drasgardian |
Comments
Comment #1
aMakUzr commentedFor anyone who's interested, blocktheme-6.x-0.1.tar_.gz works for the nice Tapestry theme (http://demo.roopletheme.com/) in Drupal 6.1.
Until the Tapestry download is properly updated, I posted instructions at
http://www.roopletheme.com/forum/index.php?topic=535.0
on how to get it all working.
Much thanks, Tony ... it is useful and appreciated.
Comment #2
Anonymous (not verified) commented@drasgardian (Tony)
Thanks for posting this update. Somehow I didn't see this page until today.
Because I also made a 6.x update, I sent an e-mail to Jacob Singh, the developer of this module, asking him what to do next.
He asked me to post patches for the module here, but if I did that now, it would be very confusing, having you version as well.
So I won't. Instead I will review you version today or tomorrow and comment on it on this site. (I saw there is a small issue with blocktheme_help). When we (and any other reviewer) agree, we can post the patch files and Jacob can create a 6.x branche in the drupal repository with a development version, so the community can do beta testing. When no more serious issues arise, we can remove the beta status. Mind you, the whole process doesn't have to take more than a week or two.
Gertjan
Comment #3
Anonymous (not verified) commentedI just reviewed the 6.x-0.1 version
I really like the added functionality to set the block theme right away when the block is created
Besides this, I found a few minor issues (see below)
function blocktheme_menu:
function blocktheme_help:
function blocktheme_preprocess_block:
end of file:
Apart from these issues, I added two features of my own:
Therefore I changed the code to add the blocktheme- prefix to the template file reference.
If the theme name allready starts with blocktheme- this prefix is removed first.
This variable can be used to change template file behavior according to the block theme instead of creating a seperate template file for each block theme.
Attachments:
-
Comment #4
atomicus.org commentedBased on the work done on the previous post (6.x-0.3), I tried to install and configure the module on Drupal 6.2 and I have had no success in accessing the admin/settings/blocktheme page (Access denied).
With little drupal coding experience I noticed that the function creating the admin menu entry was not the same as the other modules, therefore I added the callback in bold, in file blocktheme.module.
I just added the line
'access callback' => 'user_access',Now it works, showing the admin menu entry and allowing blocktheme module configuration under D6.2. Also works ok in showing the defined block styles in my theme.
Sorry, don't knw how to tar therefore I attached the .zip of a renamed 0.4 version.
regards
Comment #5
terryallan commentedThanks to all above and especially to aMakuzr and atomicus.org I have now managed to put myself into the situation as described by atomicus. ie "Now it works, showing the admin menu entry and allowing blocktheme module configuration under D6.2. Also works ok in showing the defined block styles in my theme."
Unfortunately when I choose one of the block themes it is not applied when I save the changes. Has anyone any ideas?
To clarify this post I would like to add the following.
I can see all that is necessary to make changes. All the block styles appear in the drop down menu. However, when I select on of these styles for a selected block and save appropriately, the change is not made. It is as though nothing has been selected.
As far as I am aware I have installed all the resources and updates, as suggested by aMakuzr and atomicus.org.
Clearly I have omitted something if others have succeeded.
Terry
Comment #6
Anonymous (not verified) commentedHi Terry,
I'm trying to figure out what goes wrong in your case. Could you answer the following questions:
Gertjan
Comment #7
terryallan commentedThanks Gertjan
In the custom block template field I have:
blk-nomargins.tpl.php|no margins
blk-outline3.tpl.php|outline 3
blk-outline4.tpl.php|outline 4
blk-rollover2.tpl.php|rollover 2
blk-outline1.tpl.php|outline 1
blk-solid1.tpl.php|solid 1
blk-outline2.tpl.php|outline 2
blk-rollover1.tpl.php|rollover 2
blk-solid2.tpl.php|solid 2
blk-solid3.tpl.php|solid 3
blk-solid4.tpl.php|solid 4
color0-pagebg.tpl.php|color 0
color3-pagebg.tpl.php|color 3
color4-pagebg.tpl.php|color 4
color1-pagebg.tpl.php|color 1
color2-pagebg.tpl.php|color 2
color5-pagebg.tpl.php|color 5
stripe0-pagebg.tpl.php|strip 0
stripe1-pagebg.tpl.php|stripe 1
stripe3-pagebg.tpl.php|stripe 3
stripe4-pagebg.tpl.php|stripe 4
stripe2-pagebg.tpl.php|stripe 2
The templates do show and I can select a template but it has no effect.
There is no Theme Settings API module installed but I believe that this is not necessary in Drupal 6. Is that correct?
Much appreciated
Terry
Comment #8
Anonymous (not verified) commentedHi Terry,
When the Blocktheme template 'searches for template files', it appends the .tpl.php suffix to your theme name.
In your case it will search for blk-nomargins.tpl.php.tpl.php, and not for blk-nomargins.tpl.php as I assume you expect.
Please remove the .tpl.php suffixes from your settings and let us know if this solves your issue.
Also if you have a suggestion to improve the instructions, please let us know.
Gertjan
Comment #9
drasgardian commentedI've only just come back to check this after my first post. Thanks everyone (and especially g.idema, I like and agree with the additions you've made) for running with it. I've checked out the 6.x-0.4 version and it seems to be working well. Is Jacob Singh watching this? It would be good to progress this to an official 6.x release.
Comment #10
terryallan commentedThanks Gertjan
I didn't have the .tpl.php suffixes originally and I added them because it wasn't working for me. I have since reverted to what you suggested and it still isn't working. Sorry! It is probably another issue with the site. If you have any other suggestions I am happy to try them.
I have, however, now given up on Drupal version 6 for the latest site I am producing and I have installed a version 5.7. All the modules I require are there and Tapestry works a treat and OG with Panels adds functionality. I will re-visit version 6 in a few months time once all the modules I require are ready.
Much appreciated.
Terry
Comment #11
JacobSingh commentedHi Guys,
I am watching this, but don't have a 6.x project to test it on right now and am too busy to test it otherwise.
When we get a couple people reviewing it successfully, I'll take a look and commit it.
Thanks!
-J
Comment #12
hkcert commentedI have used blocktheme-6.x-0.4.zip and copy the following files in tapestry on drupal 6.2, and i can access & setting the blocktheme. However, nothing has changed on my layout?
blk-nomargins.tpl.php
blk-outline3.tpl.php
blk-outline4.tpl.php
blk-rollover2.tpl.php
blk-outline1.tpl.php
blk-solid1.tpl.php
blk-outline2.tpl.php
blk-rollover1.tpl.php
blk-solid2.tpl.php
blk-solid3.tpl.php
blk-solid4.tpl.php
color0-pagebg.tpl.php
color3-pagebg.tpl.php
color4-pagebg.tpl.php
color1-pagebg.tpl.php
color2-pagebg.tpl.php
color5-pagebg.tpl.php
stripe0-pagebg.tpl.php
stripe1-pagebg.tpl.php
stripe3-pagebg.tpl.php
stripe4-pagebg.tpl.php
stripe2-pagebg.tpl.php
~
Do I miss some important step?
Comment #13
Anonymous (not verified) commentedHi hkcert,
I guess you missed something. Question is what? For what I read in your post, it looks like you did everything necessary to get it working, but your results show otherwise, so let's go to the questions/check-list.
blk-nomargins|Your nomargins description
blk-outline3|Your outline3 description
blk-outline4|Your outline4 description
If I find time, I'll have a look at the tapestry/blocktheme combination to see if there is an issue.
Comment #14
Anonymous (not verified) commentedPlease forget my previous post.
The step you missed is to prefix your template files with blocktheme-.
Please let me know if you think the documentation needs improvement.
Gertjan
Comment #15
hkcert commentedyou mean I need to add some codes in "template.php"?
Is it the following code?
function tapestry_block($block) {
if (module_exists('blocktheme')) {
if ( $custom_theme = blocktheme_get_theme($block) ) {
return _phptemplate_callback($custom_theme,array('block' => $block));
}
}
return phptemplate_block($block);
}
Comment #16
Anonymous (not verified) commentedNo, that's not what I meant. You don't have to put anything into "template.php". This was only necessary for Drupal 5.
What I meant is, you have to rename your templates as follows:
blk-nomargins.tpl.php -> blocktheme-blk-nomargins.tpl.php
blk-outline3.tpl.php -> blocktheme-blk-outline3.tpl.php
etc..
This change was made in the Drupal 6 version of Blocktheme to prevent name conflicts in a uniform way.
If this works, you could consider a little cleanup by removing the "blk-" part of both your blocktheme settings and template files:
Your settings will become:
nomargins|no margins
outline3|outline 3
etc ..
And your template files:
blocktheme-nomargins.tpl.php
blocktheme-outline3.tpl.php
Comment #17
edward.peters commentedJust want to say THANK YOU to all who have ported this module. It is absolutely brilliant to have it for D6. Will someone be committing the code officially to the CVS, and advertising its availability on the project page?
Comment #18
editormp commentedI am using 5.7 and have not upgraded to 6 at all, and found this while looking atpossible issues when I do.
Note that I had the same problem when I installed the module (as a result of trying out the roople tapestry theme) and it didn't work. It took me a while to figure out that I was also adding the suffixes ("tpl.php"). Without actually looking at code, I considered the possibility and tried the alternative and it worked.
Perhaps the instructions could clearly indicated how to add the block themes to the list.
Note that I find the module is one of the most useful, especially to new users, because it provides a great ability to rearrange the look without knowing the code. Although I know how to program, I am basically a content provider.
Comment #19
hsolomon commentedI haven't had a look at the code yet but can blocktheme work for themes other than tapestry? Would we need to modify template.php in that case?
Comment #20
drasgardian commentedYes, it will work for themes other than tapestry (I've never used tapestry). No you won't need to modify the template.php. Modifying the template.php was a requirement for the drupal 5.x version of this module and is no longer required for the drupal 6.x version.
Comment #21
JacobSingh commentedHey guys,
I'd like to commit this, and if possible find a co-maintainer, (roople?) because it isn't really a priority for me.
So going forward, I either want:
a). drasgardian or Gertjan or whomever to come forward and be the maintainer of the 6.x branch and they can decide when to commit it
or
b). Get some users to test this till it is RTBC and I'll do my own quick tests on 6.x and commit it.
Thanks for keeping this little hack alive :)
Jacob
Comment #22
gazwal commentedhi, this module is very powerful for theme developper/designer
We are all waiting for an official D6 release
thanks for working on it
best regards
++
Comment #23
Anonymous (not verified) commentedHi Jacob,
I'm prepared to step forward as the maintainer of the 6.x branch.
As far as I can see, the latest issues were all support issues. I'll read them over once more, improve the documentation where necessary, and commit it as a dev version.
Gertjan
Comment #24
AntinOz commentedI have this running on my personal site (just converted to D6) at the moment and it appears to be working fine.
Ant
Comment #25
JacobSingh commentedHi Gertjan,
Please apply for a CVS account on d.o. so I can authorize you.
Best,
J
Comment #26
Anonymous (not verified) commentedHi Jacob,
I just submitted my CVS account application.
Regards, Gertjan
Comment #27
AjK commentedFyi, CVS application approved.
Comment #28
JacobSingh commentedDone.
Comment #29
Anonymous (not verified) commentedI released the 6.x version. And will close this issue.
Comment #30
edward.peters commentedThe module seems to work very well. Are you planning a full release?
Comment #31
vidmarc commentedI've just installed "blocktheme-6.x-1.0-beta1" and I'm getting the following errors:
warning: Missing argument 2 for blocktheme_help() in /web/guide/site/public_html/modules/blocktheme/blocktheme.module on line 28.
warning: Missing argument 2 for blocktheme_help() in /web/guide/site/public_html/modules/blocktheme/blocktheme.module on line 28.
blocktheme does not appear in my admin/settings/