Nukemods Forum  
» Log in
User Name:

Password:

Not a member yet?
Register Now!
» Online Users: 91
9 members and 82 guests
bulnfldogowfd6n, datcong2sieqblo, dogxkobto7kf8ed, elecst2ctri, howtxtothre5mpa, nat7byionstarmo, pluqgmber, seo4pclinksrd3w, watakerdamageji
Most users ever online was 611, 03-21-2008 at 11:10 PM.
» .::.
tattoo fonts
http://www.checkoutmyink.com/category/tattoo-fonts-tattoo

Go Back   Nukemods Forum > General > Site design

Reply
 
LinkBack Thread Tools Display Modes
setting up your own block titles in image
Old
  (#1 (permalink))
Junior Member
 
Status: Offline
Posts: 3
Join Date: Sep 2004
setting up your own block titles in image - 09-14-2004, 11:50 AM

The first time I visit nukemods... man this site is great!

I figured out that nukemods.com works with their own gifs that are used for the blocktitels. for example:

How can this be done?

thx for the answers in advance!
   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old
  (#2 (permalink))
Senior Member
 
Status: Offline
Posts: 2,905
Join Date: Sep 2002
09-14-2004, 12:22 PM

I know how it was done but I haven't got a hold of coldblooded to find out if there are directions on how to do it.

Basically is goes like this: This is just an example. My theme name is Anagram, yours may be different.

First does your theme use a blocks.html file?
If it does, then do the following.
open your theme.php
edit the function themesidebox area at the bottom of the file from this:

Code:
/************************************************************/
/* Function themesidebox()                                  */
/*                                                          */
/* Control look of your blocks. Just simple.                */
/************************************************************/

function themesidebox($title, $content) {
    $tmpl_file = "themes/Anagram/blocks.html";
    $thefile = implode("", file($tmpl_file));
    $thefile = addslashes($thefile);
    $thefile = "\$r_file=\"".$thefile."\";";
    eval($thefile);
    print $r_file;
}
to look like this
Code:
/************************************************************/
/* Function themesidebox()                                  */
/*                                                          */
/* Control look of your blocks. Just simple.                */
/************************************************************/

function themesidebox($title, $content) {
	include("themes/Anagram/blocks.php");
	
/*    $tmpl_file = "themes/Anagram/blocks.html";
    $thefile = implode("", file($tmpl_file));
    $thefile = addslashes($thefile);
    $thefile = "\$r_file=\"".$thefile."\";";
    eval($thefile);
    print $r_file;
*/
}
I just commented out the old code and added the 'includes' line to include the blocks.php file we need to make from our blocks.html file.

OK open your blocks.html file. Mine looks like this:

Code:
<table width="165" border="0" cellspacing="0" cellpadding="4">
  <tr>
    <td><table width="165" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td bgcolor="#660000"><table width="100%" border="0" cellpadding="1" cellspacing="1">
              <tr>
                <td><table width="100%" border="0" cellspacing="0" cellpadding="1">
                    <tr>
                      <td bgcolor="#FFFFCC"><table width="100%" border="0" cellspacing="0" cellpadding="1">
                          <tr>
                            <td height="20" background="themes/Anagram/images/cell2.jpg"><table width="100%" border="0" cellspacing="0" cellpadding="3">
                                <tr>
                                  <td><font class="blocktitle">$title</font></td>
                                </tr>
                              </table></td>
                          </tr>
                          <tr>
                            <td><table width="100%" border="0" cellspacing="0" cellpadding="2">
                                <tr>
                                  <td  background="themes/Anagram/images/column-bg.jpg" bgcolor="#CEC091"><font class="content">$content</font></td>
                                </tr>
                              </table></td>
                          </tr>
                        </table></td>
                    </tr>
                  </table></td>
              </tr>
            </table></td>
        </tr>
      </table></td>
  </tr>
</table>
and I change it to this

Code:
<table width="165" border="0" cellspacing="0" cellpadding="4">
  <tr>
    <td><table width="165" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td bgcolor="#660000"><table width="100%" border="0" cellpadding="1" cellspacing="1">
              <tr>
                <td><table width="100%" border="0" cellspacing="0" cellpadding="1">
                    <tr>
                      <td bgcolor="#FFFFCC"><table width="100%" border="0" cellspacing="0" cellpadding="1">
                          <tr>
                            <td height="20" background="themes/Anagram/images/cell2.jpg">
                            <?php 
        if (!empty($title)) { 
                        $img_name=explode(" ",$title); 
                        $img_nametwo=$img_name[0]; 
                        if(file_exists("themes/Anagram/images/blocks/$img_nametwo.gif")) { 
                                echo "<IMG SRC=\"themes/Anagram/images/blocks/$img_nametwo.gif\" width=\"156\" height=\"21\" align=\"middle\">"; 
                        } else { 
                                echo "<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"3\">
                                <tr>
                                  <td><font class=\"blocktitle\">$title</font></td>
                                </tr>
                              </table>";
                        } 
        } 
?>
			</td>
                          </tr>
                          <tr>
                            <td><table width="100%" border="0" cellspacing="0" cellpadding="2">
                                <tr>
                                  <td  background="themes/Anagram/images/column-bg.jpg" bgcolor="#CEC091">
                                  <?php 
echo "<font class=\"content\">$content</font>\n" 
?>
                                  </td>
                                </tr>
                              </table></td>
                          </tr>
                        </table></td>
                    </tr>
                  </table></td>
              </tr>
            </table></td>
        </tr>
      </table></td>
  </tr>
</table>
Your going to have to play with that part since I have no clear cut instructions. Save your changed blocks.html as blocks.php and upload it and your edited theme.php file to your themes/Yourtheme folder.

Now you need to make a new directory in your themes/Yourtheme/images folder called blocks. That is where you would upload your block title images.

Last step.
Go to your Nuke Admin/Blocks and edit one of your blocks that you have a title image for. Let's say the name of the image is sitevisitors.gif. You need to make the title of your block sitevisitors. That should do it. If your theme only uses a theme.php, then all your editing will be done to it's function themesidebox area.
   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old
  (#3 (permalink))
Junior Member
 
Status: Offline
Posts: 3
Join Date: Sep 2004
09-14-2004, 01:12 PM

8O

/me is off to code some! <- n00b @ work

thx for the support!!!
   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old
  (#4 (permalink))
Senior Member
 
Status: Offline
Posts: 2,905
Join Date: Sep 2002
09-14-2004, 01:41 PM

Yes that is normal for a theme that does not use HTML files.

Try replacing that with this:

Code:
/************************************************************/ 
/* Function themesidebox()                                  */ 
/*                                                          */ 
/* Control look of your blocks. Just simple.                */ 
/************************************************************/ 

function themesidebox($title, $content) { 
    echo "<table border=\"0\" cellpadding=\"1\" cellspacing=\"0\" width=\"150\">\n" 
    ."<tr>\n" 
    ."<td>\n";

        if (!empty($title)) { 
       $img_name=explode(" ",$title); 
       $img_nametwo=$img_name[0]; 
       if(file_exists("themes/YourthemeName/images/blocks/$img_nametwo.gif")) { 
    echo "<IMG SRC=\"themes/YourthemeName/images/blocks/$img_nametwo.gif\" align=\"middle\">"; 
       } else { 
    echo  "<table border=\"0\" cellpadding=\"3\" cellspacing=\"0\" bgcolor=\"#EEEEEE\" width=\"100%\">\n" 
   ."<tr>\n" 
   ."<td align=left><font class=\"content\" color=\"#363636\">$title</font></td>\n" 
   ."</tr>\n" 
   ."</table>\n"; 
             } 
       } 



   echo "</td>\n" 
   ."</tr>\n" 
   ."</table>\n" 

   ."<table border=\"0\" cellpadding=\"3\" cellspacing=\"0\" width=\"150\">\n" 
   ."<tr valign=\"top\"><td>\n" 
   ."$content\n" 
   ."</td></tr></table>\n" 
   ."
\n\n\n"; 
} 

?>
Change YourThemeName to the name of your theme. BACKUP your THEME.PHP before you upload your edited one.
I can't test that code, so it's gonna be trial and error for ya.

mikem
   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old
  (#5 (permalink))
Junior Member
 
Status: Offline
Posts: 3
Join Date: Sep 2004
09-14-2004, 01:49 PM

YOU ROCK!!!

It works!


Quote:
sorry I deleted the previous post, you were too quick to answer -> it worked without your last post. I just copied the content you entered and it worked (ANd there is probably a difference between your Anagrama and mine, because I used the same theme)
   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old
  (#6 (permalink))
Senior Member
 
Status: Offline
Posts: 2,905
Join Date: Sep 2002
09-14-2004, 01:59 PM

Quote:
Originally Posted by Rodriguez
YOU ROCK!!!

It works!
woo, I got lucky. Hope you learned something...cause I didn't...hehe :wink:
   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old
  (#7 (permalink))
Junior Member
 
Status: Offline
Posts: 13
Join Date: Aug 2004
09-18-2004, 11:23 PM

ok im having some trouble this is the code u said to modify but the code i have in my folder looks alittlt different



yours
Code:
/************************************************************/ 
/* Function themesidebox()                                  */ 
/*                                                          */ 
/* Control look of your blocks. Just simple.                */ 
/************************************************************/ 

function themesidebox($title, $content) { 
    $tmpl_file = "themes/Anagram/blocks.html"; 
    $thefile = implode("", file($tmpl_file)); 
    $thefile = addslashes($thefile); 
    $thefile = "\$r_file=\"".$thefile."\";"; 
    eval($thefile); 
    print $r_file; 
}


Mine
Code:
/************************************************************/
/* Function themesidebox()                                  */
/*                                                          */
/* Control look of your blocks. Just simple.                */
/************************************************************/

function themesidebox($title, $content) {
			        if (@file_exists($content)) {
                $fp = fopen ($content, "r");
                $content = fread($fp, filesize($content));
                fclose ($fp);
                $content = "?>$content<?";
                $content = eval($content);
        } else if (eregi("^http", $content)) { 
                $fp = fopen ($content, "r"); 
                $content = fread($fp, 65535); 
                fclose ($fp); 
        }
    $tmpl_file = "themes/HeliusGray/blocks.html";
    $thefile = implode("", file($tmpl_file));
    $thefile = addslashes($thefile);
    $thefile = "\$r_file=\"".$thefile."\";";
    eval($thefile);
    print $r_file;
}

?>
any reason why
   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old
  (#8 (permalink))
Senior Member
 
Status: Offline
Posts: 2,905
Join Date: Sep 2002
09-19-2004, 09:05 PM

Yes, you need to follow my FIRST instructions...look up about 4 or 5 posts.
http://www.nukemods.com/modules.php?...&p=16934#16934
   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
How to use for two word block titles
Old
  (#9 (permalink))
Junior Member
 
Status: Offline
Posts: 2
Join Date: Dec 2004
Question How to use for two word block titles - 12-08-2007, 11:50 AM

how do you make this work for a block title that has a space in it.

Example being:

Block title Site Visitors and the images in theme/images/blocks/ being named Site Visitors doesn't work nor adding a % to the image title.

I have this working perfectly for one word titles but I need this to work for titles that have a space.

Thanks
   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old
  (#10 (permalink))
Junior Member
 
Status: Offline
Posts: 4
Join Date: Aug 2008
08-09-2008, 08:26 AM

This site is running Vbulletin and not phpnuke.
   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to remove center block titles? protegechris Nuke 7.x - Blocks 5 02-02-2005 03:35 AM
How to insert a gif image in any block sentinela Site design 3 10-11-2004 12:27 PM
where do i get a random image download block? SureFire Purged Topics 3 08-10-2003 02:37 AM
PHP generated image help, setting bg image? Zathu_Koon Open topics 1 07-24-2003 12:10 PM
need help with a random image in a block smallfry Purged Topics 6 05-31-2003 12:14 AM




vBulletin Skin developed by: vBStyles.com


LinkBacks Enabled by vBSEO 3.3.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31