Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Blocks
Author Message
JTD
Hangin' Around


Joined: Nov 21, 2005
Posts: 47
Location: Minnisota

PostPosted: Mon Feb 05, 2007 11:57 am Reply with quote

Ok I dont know if this is the correct place or not. But here goes. The title image of my center blocks is coded into the mainfile.php file like this below. I want to be able to do the same thing at the bottom of each center block. And also be able to add text. I hope this makes sense. If not please contact me and I will try and explain it better. Also I am using ravenscripts version of nuke if that helps. Version 2.02.02



Image

Below is the snippet of code from my mainfile.php file

Code:
}


if(!function_exists("themecenterbox")) {
  function themecenterbox($title, $content) {
    OpenTable();
      echo "<div align=\"center\" style=\"width:100%;margin:0;padding:0;background-image: url(http://www.phantom309drivers.org/themes/DeepBlue/images/table-title.gif);\"><font class=\"option\"><b style=\"color:#FFF;\">$title</b></font></div>".$content;
    CloseTable();
    echo "<br>";
  }
}
 
View user's profile Send private message Yahoo Messenger MSN Messenger
JTD
PostPosted: Tue Feb 06, 2007 9:07 am Reply with quote

BUMP

30 views No replies???
 
Tao_Man
Involved
Involved


Joined: Jul 15, 2004
Posts: 252
Location: OKC, OK

PostPosted: Tue Feb 06, 2007 10:06 am Reply with quote

Just to let you know yes we are here but I have not responded because that would be (to me at least) a pretty major hack, and beyound my current Nuke knowlage. I am sure someone with more experance will jump in here soon, but it isn't a quick one liner fix.

_________________
------------------------------------------
To strive, to seek, to find, but not to yield!
I don't know Kara-te but I do know cra-zy, and I WILL use it! 
View user's profile Send private message Visit poster's website
fkelly
Former Moderator in Good Standing


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

PostPosted: Tue Feb 06, 2007 10:41 am Reply with quote

Well I am thinking aloud as I write this. We know that blocks, thru blocks administration, can be positioned left, right, center, and down. And you can have any number of blocks in the center, in a specified order. So you want your title to appear above the first center block and below the last one. Now, a theme generally processes the header information, then does a blocks, left to process the left hand "column" (which can contain number of blocks) then the center, then the right (if $index_file is on), and finally the footer.

With that background you'd want your theme to put your $title at the end of the header before it does blocks('l') (that's left and it is coded variously (which drives me up the wall) as left or LEFT or L or l). Then at the beginning of the footer you'd want your theme to output another title that would thereby go at the end of the center blocks.

With that in mind, what I'd probably do is put a call to themecenterbox after assigning values to $title and $content towards the bottom of the themeheader function and then at the top of the themefooter functions. Thinking further, I might be cautious and use variables other than $title and $content (something like $title_center ... ) because those variables are used extensively in Nuke and you wouldn't want to affect anything else.

Give it a try and let us know if it works.
 
View user's profile Send private message Visit poster's website
Gremmie
Former Moderator in Good Standing


Joined: Apr 06, 2006
Posts: 2415
Location: Iowa, USA

PostPosted: Tue Feb 06, 2007 11:04 am Reply with quote

That code that you show is only used if your theme does not provide it's own themecenterbox() function. It is a default implementation (notice the if not exists check). I think you can get what you want by modifying your theme's themecenterbox() function.
 
View user's profile Send private message
JTD
PostPosted: Tue Feb 06, 2007 10:13 pm Reply with quote

The code that I am showing is not even close to the original code in the mainfile.php file. I do not think i was clear in my explanation. Here is a picture of what i want to add. The part that i need coded is the bottom part circled in red. And I have no clue as to how to code that in. Plus I am sure it involves more than just adding some code to the mainfile.php file. As you would also need to be able to edit it also.

Image
 
evaders99
Former Moderator in Good Standing


Joined: Apr 30, 2004
Posts: 3221

PostPosted: Tue Feb 06, 2007 10:47 pm Reply with quote

There are a number of variables passed the function themeindex of your theme.php
That's probably the best example to start

_________________
- Only registered users can see links on this board! Get registered or login! -

Need help? Only registered users can see links on this board! Get registered or login! 
View user's profile Send private message Visit poster's website
Gremmie
PostPosted: Wed Feb 07, 2007 8:19 am Reply with quote

I'm confused. You are talking about center blocks but then you are showing a news story. If you want your center blocks to look like news stories, then yes, as evaders said, check out the themeindex() function. It is responsible for formatting news stories.....or why not just post News stories? Again, I'm confused. Confused
 
fkelly
PostPosted: Wed Feb 07, 2007 11:43 am Reply with quote

A couple of quick points. I've been working with themes quite a bit in RN lately and I don't recall any themecenterbox functions in any of the standard ones. That's why I posted what I did a few back. If you do a news story then it's going to "float" down the page as soon as a newer one is posted so it won't do what you want. You could stuff the material in the message cause that will stay up top but that doesn't deal with the bottom centered material.
 
Gremmie
PostPosted: Wed Feb 07, 2007 3:27 pm Reply with quote

Okay I am less confused now. (Hmmmm....maybe not.)

If your theme provides a themecenterbox() function, Nuke will call it. Otherwise it calls the default one in mainfile.php.

So JTD, your best bet is to start working on a themecenterbox() function (adding one to your theme if it doesn't already exist). I'm not sure how you are going to get the date/time when the center block was created, since that is currently not stored anywhere to my knowledge. If you really needed that you would probably have to add a database table to store that info. You would then need to retrieve that and send it to your fancy themecenterbox() function. But then you are creeping in on the functionality already offerred by the news module. Maybe you are better off modifying your news module to not scroll certain news stories down.

Or, maybe you could just use HTML in your center block to produce that "bottom info bar".
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Blocks

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 ©