Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Themes
Author Message
prekill
Worker
Worker



Joined: Oct 22, 2005
Posts: 201

PostPosted: Wed May 16, 2007 8:05 am Reply with quote

Hey guys,

I am trying to build my own theme.

for now I am doing quite good.

I am having this "small" problem:
I am trying to divide the homepage into 2 tables. (see picture)

Image

as you can see in the image I reduced the news table (story_home.html) to 60% and now I want to insert blocks in the remaining 40% (blue empy square).

But I cant find this table anywhere. any ideas? thanks for the helpers!
 
View user's profile Send private message
fkelly
Former Moderator in Good Standing



Joined: Aug 30, 2005
Posts: 3312
Location: near Albany NY

PostPosted: Wed May 16, 2007 10:00 am Reply with quote

I don't think this is going to be so easy. Simply reducing the size of the story_home is not going to automatically give you another "block" or area to work in.

There's a certain regimentation in the way themes work. First they do the header area, then the left blocks, then the center, then (if appropriate) the right ones. The themes call the blocks() function in mainfile which looks in the blocks table in the database for which blocks are in the area they are responsible for (left, center, center down, or right). So, I'm not sure how you are going to create another area in your center block.

You could look at the theme Odyssey that was revised for RN2.10. In that theme the news articles are presented in two columns within the center block. I just don't recall the exact mechanism that was used but we made it compliant for 2.10.
 
View user's profile Send private message Visit poster's website
montego
Site Admin



Joined: Aug 29, 2004
Posts: 9457
Location: Arizona

PostPosted: Wed May 16, 2007 5:51 pm Reply with quote

I cannot recall off the top of my head which theme function calls blocks('left'), but I believe the themefooter() calls the blocks('right'). What I am wondering is if blocks('left') could actually be called in themefooter() before blocks('right') and you would just have to remember this when you assign a block to be "Left" vs. "Right".

Note: you would have to find where blocks('left') or blocks('l') is being called in theme.php right now, and remove that first before putting it into themefooter().

Disclaimer: I'm at work and do not have the themes in front of me so I cannot recall what opens the table and starts off the columns... hopefully it is themeheader().

_________________
Where Do YOU Stand?
HTML Newsletter::ShortLinks::Mailer::Downloads and more... 
View user's profile Send private message Visit poster's website
evaders99
Former Moderator in Good Standing



Joined: Apr 30, 2004
Posts: 3221

PostPosted: Wed May 16, 2007 8:31 pm Reply with quote

Yes, you can call blocks('left') and immediately call blocks('right') inside themefooter. It's something I've seen for various themes, it should work fine

_________________
- Star Wars Rebellion Network -

Need help? Nuke Patched Core, Coding Services, Webmaster Services 
View user's profile Send private message Visit poster's website
prekill







PostPosted: Fri May 18, 2007 2:13 am Reply with quote

I dont really understand what you want me to do.

you want me to call blocks('right') right after the blocks('left') this way I will have 2 raws of block one next to the other?

please expand instructions/way of act.

thank you!
 
montego







PostPosted: Fri May 18, 2007 6:31 am Reply with quote

prekill, you have already done so well with this theme, I think you have the skills to do this. Within your theme.php, just review the code for where blocks('left') - it is sometimes called as blocks('l') - is being called and remove it from there and then do as Evaders has said inside themefooter().

You will not learn unless you try. Wink
 
jaded
Theme Guru



Joined: Nov 01, 2003
Posts: 1006

PostPosted: Fri May 18, 2007 8:25 am Reply with quote

You can use this theme as a basic way to see what you want to do. This one has two rows of blocks on the left only.
[ Only registered users can see links on this board! Get registered or login! ]

_________________
Themes BB Skins [ Only registered users can see links on this board! Get registered or login! ]
Graphic Tees [ Only registered users can see links on this board! Get registered or login! ]
Paranormal Tees [ Only registered users can see links on this board! Get registered or login! ]
Ghost Stories & More [ Only registered users can see links on this board! Get registered or login! ] 
View user's profile Send private message Visit poster's website
prekill







PostPosted: Fri May 18, 2007 1:47 pm Reply with quote

jaded wow!! too complicated to me, maybe simplify it for me please?
 
prekill







PostPosted: Sat May 19, 2007 2:57 am Reply with quote

Umm I dont really want a row of blocks in this empty space,

Its more like center blocks. not right blocks.

any idea on how to call the center blocks to open in this empty space?
 
montego







PostPosted: Sat May 19, 2007 9:41 am Reply with quote

Quote:

any idea on how to call the center blocks to open in this empty space?


You might want to check to see if MetOpen is still around and try out their HomePage module. Maybe it is more what you are looking for.
 
evaders99







PostPosted: Sat May 19, 2007 11:09 pm Reply with quote

Center blocks is only called for index.php - as long as your News page is the main module and story_home.html is the one setting the widths of that columns, the empty space should work for blocks('center')

Otherwise, I would suggest just using blocks('left').. there is really no difference except that left blocks would appear using modules.php as well
 
prekill







PostPosted: Sun May 20, 2007 12:29 pm Reply with quote

OK, I changed blocks(right) with block blocks(center) and it came up very good!

I have only one problem:
the block loads 2 times, 1 in the block culm and the other in the TD of the news. how to I cancel the load in the TD of the news?

Image

thank you!
 
montego







PostPosted: Sun May 20, 2007 5:18 pm Reply with quote

Well, you were to use blocks('left') not blocks('right')... Based on your original graphic at the top, you weren't showing left blocks on the left of your main content, so that is why I recommended this approach. It looked to me like you wanted just to the right of your content the left blocks followed by the right blocks. If you follow what I suggested, you might be surprised at how well it works.
 
evaders99







PostPosted: Sun May 20, 2007 8:34 pm Reply with quote

You'd have to delete the extra call to blocks('center') in header.php
 
prekill







PostPosted: Mon May 21, 2007 12:49 pm Reply with quote

evaders99 thank you thank you thank you!!

thanks everybody, very helpfull - like always Embarassed

one small problem:

I want to switch between the blocks(center) to the news module on home page.

Image

I just can not find the table which control this.

any idea? Wink
 
evaders99







PostPosted: Mon May 21, 2007 1:26 pm Reply with quote

Arg then why didn't you just use blocks('left') ? Smile

You'll need to call blocks('center') somewhere before the News content is generated, so most likely somehwhere in themeheader()
 
prekill







PostPosted: Mon May 21, 2007 2:55 pm Reply with quote

ummm.. lol

I didnt use it because the width of the block is not what I am looking for, look how nice the center block fits Smile

umm thats strange, If I move blocks(center) to themeheader the blocks are not showing at all.

any clue?
 
prekill







PostPosted: Mon May 28, 2007 7:14 am Reply with quote

anyone?
 
prekill







PostPosted: Tue May 29, 2007 1:26 pm Reply with quote

progress here!

I succeeded in replacing the news and center block by adding echo "<table>"; into themeindex().

the only problem now is that the center blocks load every news, how can I disable those loads? and make it appear only once?

thank you very much for all the help!

Image
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Themes

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©