Are story_home.html files interchangable between themes?

  Post new topicReply to topicPrintable Version
<< View previous topic View next topic >>
Share: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
#1   Are story_home.html files interchangable between themes?
Donovan
CZ Active Member
 Codezwiz Site Donator
Donovan has been a member for over 20 year's 20 Year Member
usa.gif ohio.gif
Occupation: Web Developer
Gender: Male
Fav. Sports Team: St Louis Cardinals
Status: Offline
Joined: Dec 03, 2003
0.02 posts per day
Posts: 160
Points: 9,216
   
I know they would have to be tweaked to an extent but I would like to know if it is possible. The reason I ask is I want to install FNA 3.0 and the instructions say the following.



/***************************************************************************/
/* */
/* 18. Open: themes/YOUR_THEME/story_home.html */
/* Note: if this file doesn't exist, look in side theme.php */
/***************************************************************************/
/***************************************************************************/
/* Find: */
/***************************************************************************/

<a href="modules.php?name=News&amp;new_topic=$topic">

/***************************************************************************/
/* Replace, with: */
/***************************************************************************/


<!--Begin ForumNews Advance-->
<!--<a href="modules.php?name=News&amp;new_topic=$topic">-->
$topiclink
<!--End ForumNews Advance-->


Well I have a story_home.html but it doesn't have this link anywhere.

<a href="modules.php?name=News&amp;new_topic=$topic">


Nor does it exist in my theme.php

I have one of those cheap free themes without much detail but for now it is serving it's purpose.


Here is my entire story_home file

<div align="center">
   <table cellSpacing="0" cellPadding="0" width="100%" align="center" border="0" id="table1">
      <tr vAlign="top">
         <td vAlign="top" width="100%" bgColor="#343635">
         <table cellSpacing="0" cellPadding="0" width="100%" border="0" id="table2">
            <tr>
               <td bgcolor="#343635">
               <img height="28" alt="" src="themes/COD2Nation/images/tlc.jpg" width="17" border="0" name="tlc"></td>
               <td width="100%" style="border-bottom-style: none; border-bottom-width: medium" bgcolor="#343635" background="themes/COD2Nation/images/tm.jpg">
               <img height="1" alt="" src="themes/COD2Nation/images/spacer.gif" width="1" border="0" name="tm"></td>
               <td bgcolor="#343635">
               <img height="28" alt="" src="themes/COD2Nation/images/trc.jpg" width="17" border="0" name="trc"></td>
            </tr>
            <tr>
               <td style="border-right-style: none; border-right-width: medium" bgcolor="#343635" background="themes/COD2Nation/images/leftside.jpg">
               <img height="1" alt="" src="themes/COD2Nation/images/spacer.gif" width="1" border="0" name="left0"></td>
               <td vAlign="top" bgColor="#343635" style="border-style: none; border-width: medium" align="center">
               <font face="Verdana" size="1"><font class=content>
                        <b>$title</b></font><b><img name="sbg" src="themes/COD2Nation/images/spacer.gif" width="1" height="1" border="0" alt=""></b></font></td>
               <td style="border-left-style: none; border-left-width: medium" bgcolor="#343635" background="themes/COD2Nation/images/rightside.jpg">
               <img height="1" alt="" src="themes/COD2Nation/images/spacer.gif" width="1" border="0" name="right0"></td>
            </tr>
            <tr>
               <td style="border-right-style: none; border-right-width: medium" bgcolor="#343635" background="themes/COD2Nation/images/leftside.jpg">
               <img height="1" alt="" src="themes/COD2Nation/images/spacer.gif" width="1" border="0" name="left1"></td>
               <td vAlign="top" bgColor="#343635" style="border-style: none; border-width: medium">&nbsp;</td>
               <td style="border-left-style: none; border-left-width: medium" bgcolor="#343635" background="themes/COD2Nation/images/rightside.jpg">
               <img height="1" alt="" src="themes/COD2Nation/images/spacer.gif" width="1" border="0" name="right1"></td>
            </tr>
            <tr>
               <td style="border-right-style: none; border-right-width: medium" bgcolor="#343635" background="themes/COD2Nation/images/leftside.jpg">
               <img height="1" alt="" src="themes/COD2Nation/images/spacer.gif" width="1" border="0" name="left1"></td>
               <td vAlign="top" bgColor="#343635" style="border-style: none; border-width: medium">
                    <p style="margin-top: 0; margin-bottom: 0"><font class="content">
      <font size="1" face="Verdana">$content</font></font></td>
               <td style="border-left-style: none; border-left-width: medium" bgcolor="#343635" background="themes/COD2Nation/images/rightside.jpg">
               <img height="1" alt="" src="themes/COD2Nation/images/spacer.gif" width="1" border="0" name="right1"></td>
            </tr>
            <tr>
               <td bgcolor="#343635" background="themes/COD2Nation/images/leftside.jpg">
               <img height="1" alt="" src="themes/COD2Nation/images/spacer.gif" width="1" border="0" name="left"></td>
               <td vAlign="top" bgColor="#343635" style="border-top-style: none; border-top-width: medium" align="center">
                          <hr width="95%">
                          </td>
               <td bgcolor="#343635" background="themes/COD2Nation/images/rightside.jpg">
               <img height="1" alt="" src="themes/COD2Nation/images/spacer.gif" width="1" border="0" name="right"></td>
            </tr>
            <tr>
               <td bgcolor="#343635" background="themes/COD2Nation/images/leftside.jpg">
               <img height="1" alt="" src="themes/COD2Nation/images/spacer.gif" width="1" border="0" name="left"></td>
               <td vAlign="top" bgColor="#343635" style="border-top-style: none; border-top-width: medium" align="center">
               <font face=verdana,arial,helvetica size=1><span class="infort"><span class="extra">$posted</span></span></font> </td>
               <td bgcolor="#343635" background="themes/COD2Nation/images/rightside.jpg">
               <img height="1" alt="" src="themes/COD2Nation/images/spacer.gif" width="1" border="0" name="right"></td>
            </tr>
            <tr>
               <td bgcolor="#343635" background="themes/COD2Nation/images/leftside.jpg">
               <img height="1" alt="" src="themes/COD2Nation/images/spacer.gif" width="1" border="0" name="left"></td>
               <td vAlign="top" bgColor="#343635" style="border-top-style: none; border-top-width: medium" align="right">
                          <p>
                          <span class="infort"><span class="extra"><font face=verdana,arial,helvetica size=1>( Reads: $counter ) $morelink</font></span></span>&nbsp;&nbsp;&nbsp; </td>
               <td bgcolor="#343635" background="themes/COD2Nation/images/rightside.jpg">
               <img height="1" alt="" src="themes/COD2Nation/images/spacer.gif" width="1" border="0" name="right"></td>
            </tr>
            <tr>
               <td bgcolor="#343635">
               <img height="28" alt="" src="themes/COD2Nation/images/blc.jpg" width="17" border="0" name="blc"></td>
               <td bgcolor="#343635" background="themes/COD2Nation/images/btm.jpg">
               <img height="1" alt="" src="themes/COD2Nation/images/spacer.gif" width="1" border="0" name="btm"></td>
               <td bgcolor="#343635">
               <img height="28" alt="" src="themes/COD2Nation/images/brc.jpg" width="17" border="0" name="brc"></td>
            </tr>
         </table>
         </td>
      </tr>
   </table>
</div>



And my theme



<?php
$bgcolor1 = "#474948";
$bgcolor2 = "#474948";
$bgcolor3 = "#474948";
$bgcolor4 = "#474948";
$textcolor1 = "#ffffff";
$textcolor2 = "#ffffff";

function OpenTable() {
    ?>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
  <tr>
   <td><img name="tlc" src="themes/COD2Nation/images/tlc.jpg" width="17" height="28" border="0" alt=""></td>
   <td width="100%" background="themes/COD2Nation/images/tm.jpg"><img name="tm" src="themes/COD2Nation/images/spacer.gif" width="1" height="1" border="0" alt=""></td>
   <td><img name="trc" src="themes/COD2Nation/images/trc.jpg" width="17" height="28" border="0" alt=""></td>
  </tr>
  <tr>
    <td background="themes/COD2Nation/images/leftside.jpg"><img name="left" src="themes/COD2Nation/images/spacer.gif" width="1" height="1" border="0" alt=""></td>
     <td valign="top" bgcolor="#343635">
<?
}
function OpenTable2() {
    global $bgcolor1, $bgcolor2;
    echo "<table width=\"100%\" border=\"0\" cellspacing=\"1\" cellpadding=\"0\" ><tr><td class=row1>\n";
    echo "<table width=\"100%\" border=\"0\" cellspacing=\"1\" cellpadding=\"0\" ><tr><td>\n";
}

function CloseTable() {
    ?>
    </td>
    <td background="themes/COD2Nation/images/rightside.jpg"><img name="right" src="themes/COD2Nation/images/spacer.gif" width="1" height="1" border="0" alt=""></td>
  </tr>
  <tr>
   <td><img name="blc" src="themes/COD2Nation/images/blc.jpg" width="17" height="28" border="0" alt=""></td>
   
    <td background="themes/COD2Nation/images/btm.jpg"><img name="btm" src="themes/COD2Nation/images/spacer.gif" width="1" height="1" border="0" alt=""></td>
   <td><img name="brc" src="themes/COD2Nation/images/brc.jpg" width="17" height="28" border="0" alt=""></td>
  </tr></table>
<?
}

function CloseTable2() {
    echo "</td></tr></table></td></tr></table>\n";
}

/************************************************************/
/* Function themeheader()                                   */
/************************************************************/
    function themeheader() {
    global $user, $cookie, $prefix, $name, $dbi, $db;
    cookiedecode($user);
    $username = $cookie[1];
    if ($username == "") {
        $username = "Anonymous";
    }
    $public_msg = public_message();
    echo "$public_msg";

   
   
echo "<body background=\"themes/COD2Nation/images/bg.gif\" topmargin=\"0\" leftmargin=\"0\" marginwidth=\"0\" marginheight=\"0\">\n";
include("themes/COD2Nation/header.php");
echo "<table width=\"100%\" align=center cellpadding=\"0\" cellspacing=\"0\" border=\"0\">\n"
."<tr valign=\"top\">\n"
."<TD WIDTH=\"5\" HEIGHT=\"100%\" valign=top background=\"themes/COD2Nation/images/lt.jpg\"><IMG SRC=\"themes/COD2Nation/images/spacer.gif\" WIDTH=\"42\" HEIGHT=\"1\"></TD>\n"
."<TD WIDTH=\"160\" HEIGHT=\"100%\" valign=top bgcolor=#474948>\n";
blocks(left);

echo "</td>\n"
."<TD WIDTH=\"100%\" valign=top bgcolor=#474948>\n";
}


/************************************************************/
/* Function themefooter()                                   */
/************************************************************/

function themefooter() {
    global $index, $banners;

    if (defined('INDEX_FILE')) {
   echo "</td>\n"
       ."<td width=\"160\" valign=\"top\" bgcolor=#474948>\n";
   blocks(right);
    }
    echo "</td>\n"
        ."<TD WIDTH=\"11\" HEIGHT=\"100%\" valign=top background=\"themes/COD2Nation/images/rt.jpg\"><IMG SRC=\"themes/COD2Nation/images/spacer.gif\" WIDTH=\"42\" HEIGHT=\"1\"></TD>\n"
       ."</tr>\n"
       ."</table>\n";
     include("themes/COD2Nation/footer.php");
   echo "<table width=\"100%\" align=center cellpadding=\"0\" cellspacing=\"0\" border=\"0\">\n"
      ."<tr valign=\"top\">\n"
        ."<TD WIDTH=\"11\" HEIGHT=\"100%\" valign=top background=\"themes/COD2Nation/images/lt.gif\"><IMG SRC=\"themes/COD2Nation/images/spacer.gif\" WIDTH=\"42\" HEIGHT=\"1\"></TD>\n"
       ."</table>\n";
   
}

/************************************************************/
/* Function themeindex()                                    */
/* This function format the stories on the Homepage         */
/************************************************************/
function themeindex ($aid, $informant, $time, $title, $counter, $topic, $thetext, $notes, $morelink, $topicname, $topicimage, $topictext) {
    global $anonymous, $tipath;

$ThemeSel = get_theme();
    if (file_exists("themes/$ThemeSel/images/topics/$topicimage")) {
   $t_image = "themes/$ThemeSel/images/topics/$topicimage";
    } else {
   $t_image = "$tipath$topicimage";
}
    if ($notes != "") {
        $notes = "<br><br><b>"._NOTE."</b> $notes\n";
    } else {
        $notes = "";
    }
    if ("$aid" == "$informant") {
        $content = "$thetext$notes\n";
    } else {
        if($informant != "") {
            $content = "<a href=\"modules.php?name=Your_Account&amp;op=userinfo&amp;username=$informant\">$informant</a> ";
        } else {
            $content = "$anonymous ";
        }
        $content .= ""._WRITES." \"$thetext\"$notes\n";
    }
    //Code Changed - just show posted by
    $posted = ""._POSTEDBY." ";
    $posted .= get_author($aid);
    $posted .= " "._ON." $time  ";
    //End Code Change
    $datetime = substr($morelink, 0, strpos($morelink, "|") - strlen($morelink));
    $morelink = substr($morelink, strlen($datetime) + 2);
    $tmpl_file = "themes/COD2Nation/story_home.html";
    $thefile = implode("", file($tmpl_file));
    $thefile = addslashes($thefile);
    $thefile = "\$r_file=\"".$thefile."\";";
    eval($thefile);
    print $r_file;
}

/************************************************************/
/* Function themeindex()                                    */
/************************************************************/

function themearticle ($aid, $informant, $datetime, $title, $thetext, $topic, $topicname, $topicimage, $topictext) {
    global $admin, $sid, $tipath;
$ThemeSel = get_theme();
    if (file_exists("themes/$ThemeSel/images/topics/$topicimage")) {
   $t_image = "themes/$ThemeSel/images/topics/$topicimage";
    } else {
   $t_image = "$tipath$topicimage";
}
    $posted = ""._POSTEDON." $datetime "._BY." ";
    $posted .= get_author($aid);
    if ($notes != "") {
        $notes = "<br><br><b>"._NOTE."</b> <i>$notes</i>\n";
    } else {
        $notes = "";
    }
    if ("$aid" == "$informant") {
        $content = "$thetext$notes\n";
    } else {
        if($informant != "") {
            $content = "<a href=\"modules.php?name=Your_Account&amp;op=userinfo&amp;username=$informant\">$informant</a> ";
        } else {
            $content = "$anonymous ";
        }
        $content .= ""._WRITES." <i>\"$thetext\"</i>$notes\n";
    }
    $tmpl_file = "themes/COD2Nation/story_page.html";
    $thefile = implode("", file($tmpl_file));
    $thefile = addslashes($thefile);
    $thefile = "\$r_file=\"".$thefile."\";";
    eval($thefile);
    print $r_file;
}

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


I have looked at other story_home files from other themes and the link is present so that is why I'm asking if I can somehow switch these files. I really like the features of Forum News Advanced and want to use it again.


Back to top Reply with quote
#2   
jaymullah
CZ Super Newbie
jaymullah has been a member for over 20 year's 20 Year Member
usa.gif northcarolina.gif
Occupation: Freelance Webdesign
Age: 44
Gender: Male
Website:
Status: Offline
Joined: Jan 11, 2004
0.01 posts per day
Posts: 40
Points: 3,244
 Yahoo Messenger MSN Messenger 
That step is to add a link to the Topic Image, that takes you to the Topic's Category .

Dont switch the story_home.html file from another theme. It will change the way your story article is all arranged. Your story_home is specific to your theme.

In your story_home.html code I do not see where the Topic's image is displayed. Is this theme on your 3rd Infantry site or another? It is possible your theme does not display the Topic Image, I dont know I'm not familiar with COD2 Nation theme.



Back to top Reply with quote
#3   re: Are story_home.html files interchangable between themes?
Donovan
CZ Active Member
 Codezwiz Site Donator
Donovan has been a member for over 20 year's 20 Year Member
usa.gif ohio.gif
Occupation: Web Developer
Gender: Male
Fav. Sports Team: St Louis Cardinals
Status: Offline
Joined: Dec 03, 2003
0.02 posts per day
Posts: 160
Points: 9,216
   
Its at eto-league.com

A gaming league I run for our WW2 First Person Shooter community. We all play Call of Duty 2 or Red Orchestra and we set up a league for it.

I guess this theme is missing this entire code in my story_home

<a href="modules.php?name=News&amp;new_topic=$topic"><img src="$tipath$topicimage" border="0" alt="$topictext" title="$topictext" align="right" hspace="10" vspace="10"></a>


I wonder if this is an easy fix and something I could insert.


Back to top Reply with quote
#4   re: Are story_home.html files interchangable between themes?
Donovan
CZ Active Member
 Codezwiz Site Donator
Donovan has been a member for over 20 year's 20 Year Member
usa.gif ohio.gif
Occupation: Web Developer
Gender: Male
Fav. Sports Team: St Louis Cardinals
Status: Offline
Joined: Dec 03, 2003
0.02 posts per day
Posts: 160
Points: 9,216
   
I find it odd that I find this in my theme but cannot find it in the story_home or anywhere else.

function themearticle ($aid, $informant, $datetime, $title, $thetext, $topic, $topicname, $topicimage, $topictext) {
    global $admin, $sid, $tipath;
$ThemeSel = get_theme();
    if (file_exists("themes/$ThemeSel/images/topics/$topicimage")) {
   $t_image = "themes/$ThemeSel/images/topics/$topicimage";
    } else {
   $t_image = "$tipath$topicimage";
}


It clearly has $topicimage.


Back to top Reply with quote
#5   re: Are story_home.html files interchangable between themes?
jaymullah
CZ Super Newbie
jaymullah has been a member for over 20 year's 20 Year Member
usa.gif northcarolina.gif
Occupation: Freelance Webdesign
Age: 44
Gender: Male
Website:
Status: Offline
Joined: Jan 11, 2004
0.01 posts per day
Posts: 40
Points: 3,244
 Yahoo Messenger MSN Messenger 
Yeah it's an easy fix. You dont have any news posted on the mainpage of eto-league.com yet so I cant see what your posted news looks like. Can you make a news test post?

Also, try this:


in story_home.html find:

$content


and replace with this:

<table width="100%" border="0"><tr>
<td width="50">$topiclink<img src="$tipath$topicimage" border="0" alt="$topictext" title="$topictext" align="left" hspace="10" vspace="10"></a></td>
<td align="center">$content</td>
</tr></table>



Back to top Reply with quote
#6   re: Are story_home.html files interchangable between themes?
Donovan
CZ Active Member
 Codezwiz Site Donator
Donovan has been a member for over 20 year's 20 Year Member
usa.gif ohio.gif
Occupation: Web Developer
Gender: Male
Fav. Sports Team: St Louis Cardinals
Status: Offline
Joined: Dec 03, 2003
0.02 posts per day
Posts: 160
Points: 9,216
   
Thanks. I think I got it working.



Back to top Reply with quote
Display posts from previous:      
Add To: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
<< View previous topic View next topic >>
Post new topicReply to topic

Jump to 
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 cannot attach files in this forum
You cannot download files in this forum