Closed (fixed)
Project:
Newswire
Version:
6.x-3.0
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Reporter:
Created:
13 Sep 2008 at 07:52 UTC
Updated:
23 Nov 2008 at 22:42 UTC
Jump to comment: Most recent file
How difficult is it to add two more regions?
I would love to add two more big (390px) blocks on the right. One on top and one beneath the right blocks. Maybe someoone can make a tutorial, so we can learn. :)
See screenshot: http://i37.tinypic.com/n5m1qq.png
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | newswire-extra-regions.patch | 4.4 KB | Jeff Burnz |
Comments
Comment #1
Jeff Burnz commentedHi, this is a great suggestions and I will most certainly look at getting this into the core theme.
Its rather time consuming for me to explain how to do this (if someone else wants to then great), so for now I have attached a patch that will give you this feature.
In short here is what the patch does:
1) creats the two new regions - adds code to page.tpl.php, newswire.info and adds a class to layout.css
2) adds classes to style.css so you can style those two new regions different
Caveats:
1) only tested in Firefox3
2) only works if both the Right and Right_2 regions are active
Making this work without the Right and Right_2 regions being active means a very major modification to "function newswire_col_width" which I don't have time for right now (maybe in the future I will look at this).
If you need help applying the patch there's a very good guide on d.o for applying patches using "Cygwin", search for it in the documentation.
Preview:
http://i36.tinypic.com/2n8zvuw.gif
Comment #2
portait commentedWow, this was fast. :)
Thank you very much for this patch. The layout possibilities are much greater with those new two regions.
Comment #3
Genbushi commentedHoly wowzers, this is a great theme & patch!
Definitely recommend putting the patch in the next revision.
I'm running it on a news aggregation site, patch works great!
(Warning, adult content)
http://www.g33kreport.com
Where can I donate to your efforts?
Comment #4
Jeff Burnz commented@Genbushi - that looks great, thanks for the feedback re the patch.
I'll be looking at getting this into the next version, although ideally it would be great if you didn't need to have right & right_2 active, so you could just have the 2 big 390 regions active (if you wanted it that way). Its a bit of a mare to figure out the logic for the function (me not so smart ok...), but I'll do it eventually:)
If you'd like to make a donation please give to the Drupal Association, they do loads of great stuff and I am a member also, so thats where I'd want it to go, cheers!
http://association.drupal.org/donate
Comment #5
Jeff Burnz commentedAdded to latest release - thanks for the suggestions and feedback all, this is great new feature for Newswire.
Comment #6
janne commentedJust wanted to congratulate you on adding the new regions. (And thank Portait for suggesting them in the first place!) I've already put the top one to use and in my opinion it really gives the site a better feel.
Comment #7
AgentD commentedI'm trying out this theme and placed an image in one of these new regions (Right top box (390px)) but the only page it appears on is the /admin/build/block page. I have it checked to appear on all pages so I don't know why it isn't showing on any other.
Anyone else run into this?
Comment #8
Jeff Burnz commented@Janne - hi there lancefestivalen guy - great stuff, your site is looking great! Dude, if only my Swedish was better I'm sure I'd enjoy reading your site, I can get the jist of it but I am so bad with my Swedish, even thinking about going back to folk highschool for regular lessons - I just go to get it sorted!
@AgentD - sounds like you dont have both the right sidebars active - the two new 390px regions only work if you have blocks in both the right and right_2 sidebars.
Comment #9
AgentD commentedI see now....thanks!
Comment #10
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.
Comment #11
najibx commentedhow about add another one. The current one only works if both the Right and Right_2 regions are active.
In certain case, I only want 2 column ... but this one may not be that big maybe 300px only. So the content area can be expanded to 620px or so.
Comment #12
Jeff Burnz commentedSorry but I wont be adding any more collapsible regions to Newswire, the logic behind the layout is already complex enough:)
Comment #13
najibx commentedTo think about it...for multi purpose usage.
If I only want 2 columns either left or right.
I have a very small sidebar (left or right) and too large of the content area.
I can have the larger right only sidebar provided I must add two small columns, otherwise this large (390px) sidebar would not show up.
It does not really make sense to me. Even if I use panel for the frontpage, i still have other issues on other pages.
It's complicated enough too for me to customized it :-)
Thank you for taking your time into this.
Comment #14
Jeff Burnz commentedComment #15
najibx commentedHi,
can you provide info how to enable the (390px) without making the small column necessary. I change the if statement, it shows fine but, it's not place correctly on the right, but shift down. Then I might want to change 390px to 300px as per my initial plan.
Thank you.
Comment #16
Jeff Burnz commentedYou need to rework the logic of PHP function that controls the layout (function newswire_col_width), modify or simply brutally over ride the CSS framework and, as you state, modify the conditional statements in page.tpl.php.
Its doable, but I havent figured out the logic that needs to go into the function, as you have to account for all possibilities & it started to get rather complicated which is why I elected to leave it as is, until such time as I figured out a better way of handling the whole shebang.
To change the widths you'll need to study the set of CSS classes in layout-DEV.css and modify the values used in page.tpl.php & function newswire_col_width.
Comment #17
najibx commentedI am good providing patches but here's how I get it done.
please note that $right_bottom_box is now come in the picture. Please consider this options in the future version ;
template.php
somewhere in page.tpl.php
Comment #18
Jeff Burnz commentedThanks for the code snippets, hopefully I'll have time to take a closer look at this soon, any chance of a patch:)
Comment #19
Jeff Burnz commentedI'm going to close this for now, unfortunately I simply have no extra time to develop Newswire any further - thus we are now in maintenance mode until Drupal 7 nears release.
Comment #20
Jeff Burnz commented