What drupal file to put the elements in???

Schlup - January 6, 2008 - 07:06
Project:Photoframe
Version:5.x-1.x-dev
Component:Code
Category:support request
Priority:normal
Assigned:Unassigned
Status:active
Description

Ok, so I am kinda new to this but I need to know exactly which file I should put the element in for the photoframes to work. My install is good and everything looks to be working...just need to figure out which file to put the elements in. If you could just tell me the name of it that would be great but if you could tell me the typical path as well to the file that would even be better. At minimum I need to know which file to add the element for the blocks but if you could tell me the files for blocks, pages, polls, stories, etc. that would even be better. Thank you in advance for your help!

P.S. Yes, I am wanting everything created whether it be a block or a page to default to the photoframe.

#1

Schlup - January 6, 2008 - 07:10

Oh yeah, if there is any special html code that I need to enter rather than just "Class: photoframe-round-with-white-background" please give me an example. Thanks!

#2

chrisshattuck - January 6, 2008 - 16:49

I think you're really asking a theming question here. You'll be adding the photoframe classes to the block, page and possibly node templates. Check out the README.txt for details on how to use the class, but basically, if the class is 'photoframe-quote', then you would add that class to the element you want to wrap the photoframe around. For instance. 'Content here'.

#3

Schlup - January 6, 2008 - 23:01

Ok, check out dev.bulletproofnerds.com

Now, everytime I create a new block I don't have to do anything to it or add anything to it...just automatically has a photoframe around it. Someone else did this and he is no longer around and doesn't remember which file he edited. I'm hoping maybe with this additional information you can help.

P.S. I don't know diddly about classes, elements, html code or anything else. Can you give me a sample of what it should look like if I am going to use the photoframe-round-with-white-background????

#4

Schlup - January 10, 2008 - 01:06

Ok, I still hadn't heard back anything new, so I did more research. This is the code that I have to enter in for each new add of content...

Content...

But my question still remains is that I want to run these photoframes around ALL content on the site. Every block that gets added, I want to automatically have the photoframe around it. Every page promoted to front page I want to automatically have the photoframe around it. Every poll that is created I want to automatically have the photoframe around it...etc. I think you get my point. I KNOW it can be done one of our previous admins (who is no longer with us) made it happen. This is ALSO about the only way you can get the photoframes around your menus which are shown as blocks and do not have actual user inputted data in them. I just need to know WHICH file to edit to make it happen and what EXACTLY I need to put in that file for it to work. I am assuming that it is the style.css file but I can't find anywhere in there that looks like it might work or has worked after I have tinkered with it.

PLEASE HELP...I AM REALLY NEEDING A HAND WITH THIS.

#5

chrisshattuck - January 10, 2008 - 01:33

Schlup - Sorry for the delay in getting back to you on this. You would be editing the template files, which can be found in your theme directory. For the blocks, you'll be editing either block.tpl.php or box.tpl.php (I don't remember at the moment). To put it around all the content, you'll probably be editing your page.tpl.php page. To wrap around pieces of your node content, you'll need to edit node.tpl.php. Since you are currently using photoframe, you should be able to see where 'photoframe' is used in the code. That will give you come clues as to what to wrap around.

Your developer might have also been adding them manually to each block and each node, in which case you'd find the code in the actual block or node info.

#6

Schlup - January 10, 2008 - 03:13

Thanks Stompeers, I will try this. The 'developer' was nut adding it manually to each block because I checked for that. Let me try out the tips you gave me and I will let you know if it works.

#7

Schlup - January 10, 2008 - 11:46

Well I guess I am now a little confused about what to put in the block.tpl.php???

Everything I tried either didn't work or cause a sitewide error. Could you please either copy your block.tpl.php or email it to me at Schlup@bulletproofnerds.com ??? I have looked at your site and though it is on a different theme you have your boxes around everything in the block or page promoted. If I enter it in manually on each piece (which I would rather not do) I still only get the actual content and not the title of the content as well as this method still not solving my problem for putting the photoframe around my menus. Once again thanks for your help so far and thanks in advance.

#8

chrisshattuck - January 12, 2008 - 01:04

I have this in my block.tpl.php file:

<div class="photoframe-round-with-gray-background">
<div id="block-<?php print $block->module .'-'. $block->delta; ?>" class="block block-<?php print $block->module ?>"> 
  <div class="blockinner">
    <h2 class="title"> <?php print $block->subject; ?> </h2>
    <div class="content">
      <?php print block->content; ?>
    </div>   
  </div>
</div>
</div>

#9

Schlup - January 10, 2008 - 22:46

Ok, I put that exactly in my block.tpl.php file located @ /sites/all/themes/litejazz/"tpl.php files" location and I got an error: "Internet Explorer cannot open the Internet site http://bulletproofnerds.com. Operation aborted." Then the only option it gives me on that little box that pops up is to click ok which then sends me directly to the "Internet Explorer cannot display the webpage"

Can you give me a copy of your page.tpl.php & node.tpl.php so I can check them against what I have...once again feel free to email them to me at schlup@bulletproofnerds.com if you want.

On a side note this only happens in IE7...works fine in Firefox.

#10

Schlup - January 10, 2008 - 23:11

Did you edit your last post with the example of the block.tpl.php file you had? When I first looked at it the example was of a nice little div coding block. Now when I look at it all it show is...
module .'-'. $block->delta; ?>" class="block block-

<?php
print $block->module
?>
">

<?php
print $block->subject;
?>

<?php
print $block->content;
?>

This is NOT was I originally saw...I don't know what is going on.

#11

chrisshattuck - January 12, 2008 - 01:17

There seems to be a filter problem right now on drupal.org. Here's the code again:

I have this in my block.tpl.php file:

&lt;div class="photoframe-round-with-gray-background"&gt;
&lt;div id="block-&lt;?php print $block-&gt;module .'-'. $block-&gt;delta; ?&gt;" class="block block-&lt;?php print $block-&gt;module ?&gt;"&gt; 
  &lt;div class="blockinner"&gt;
    &lt;h2 class="title"&gt; &lt;?php print $block-&gt;subject; ?&gt; &lt;/h2&gt;
    &lt;div class="content"&gt;
      &lt;?php print block-&gt;content; ?&gt;
    &lt;/div&gt;   
  &lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;

 
 

Drupal is a registered trademark of Dries Buytaert.