Ravens PHP Scripts: Forums
 

 

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



Joined: May 19, 2006
Posts: 30

PostPosted: Mon Nov 23, 2009 10:58 pm Reply with quote

I now have it so that images will show up in my news articles however there is a large gray block to the left of them look here please.


I have it so the topic image will no longer show but how can i post images or text so that the gray block/bar is not there? I have played with editing the code from information i have found and i can not remove the gray bar.

thanks for any help


Last edited by arahad on Thu Nov 26, 2009 9:13 pm; edited 1 time in total 
View user's profile Send private message
Palbin
Site Admin



Joined: Mar 30, 2006
Posts: 2583
Location: Pittsburgh, Pennsylvania

PostPosted: Mon Nov 23, 2009 11:03 pm Reply with quote

You have an extra column in your table code for the news articles. For example:
Code:


<td class="extras" valign="center" height="126" bgcolor="#2e2e2e" align="middle" width="119">
<br/>
<a href="modules.php?name=News&new_topic=0">
<img hspace="10" border="0" vspace="10" title="" alt="" src="images/topics/"/>
</a>
<br/>
<a href="modules.php?name=News&new_topic=0">
</a>
<strong>
</strong>
<font size="1" face="verdana" color="#fdd802"> </font>
</td>

You need to edit your theme files to remove all of that. I can't offer more than that without seeing the file.

_________________
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." — Brian W. Kernighan. 
View user's profile Send private message
arahad







PostPosted: Mon Nov 23, 2009 11:17 pm Reply with quote

what theme file are you talking about, i am a novice at this.? and can i post the requested file here or send it to you to look at?

im really at a loss here.

Thanks
 
Palbin







PostPosted: Tue Nov 24, 2009 3:46 pm Reply with quote

Post your theme.php here.
 
arahad







PostPosted: Tue Nov 24, 2009 4:49 pm Reply with quote

Code:
<?php




/************************************************************/

/* Theme Colors Definition                                  */

/************************************************************/



$bgcolor1 = "#474646";

$bgcolor2 = "#474646";

$bgcolor3 = "#474646";

$bgcolor4 = "#474646";

$textcolor1 = "#FFFFFF";

$textcolor2 = "#FFFFFF";



/************************************************************/

/* OpenTable Functions                                      */

/*                                                          */

/************************************************************/



function OpenTable() {

    global $tableStatus;

if ($tableStatus != "open"){

    ?>

<br>

<table border="0" align=center cellpadding="0" cellspacing="0" width="98%">

  <!--DWLayoutTable-->

  <tr>

    <td width="23" height="23" valign="top"><img src="themes/Mech/images/ttl.jpg" width="23" height="23"></td>

    <td width="100%" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0" background="themes/Mech/images/ttm.jpg">

        <!--DWLayoutTable-->

        <tr>

          <td width="712" height="23" valign="top"><!--DWLayoutEmptyCell-->&nbsp;</td>

        </tr>

      </table></td>

    <td width="23" valign="top"><img src="themes/Mech/images/ttr.jpg" width="23" height="23"></td>

    <td width="1"></td>

  </tr>

  <tr>

    <td height="24" valign="top" background="themes/Mech/images/tl.jpg"><img name="leftside" src="themes/Mech/images/spacer.gif" width="1" height="1" border="0" alt=""></td>

    <td valign="top" bgcolor="#2e2e2e">

      <?



$tableStatus = "open";



}

else {}

}



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=\"8\" ><tr><td>\n";

}



function CloseTable() {

    global $tableStatus;

if ($tableStatus == "open"){

    ?>

    </td>

    <td valign="top" background="themes/Mech/images/tr.jpg"><img name="rightside" src="themes/Mech/images/spacer.gif" width="1" height="1" border="0" alt=""></td>

    <td></td>

  </tr>

  <tr>

    <td height="23" valign="top"><img src="themes/Mech/images/tbl.jpg" width="23" height="23"></td>

    <td valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0" background="themes/Mech/images/tbm.jpg">

        <!--DWLayoutTable-->

        <tr>

          <td width="712" height="23" valign="top"><!--DWLayoutEmptyCell-->&nbsp;</td>

        </tr>

        <!--DWLayoutTable-->

      </table></td>

    <td valign="top"><img src="themes/Mech/images/tbr.jpg" width="23" height="23"></td>

    <td></td>

  </tr>

  <tr>

    <td height="1"><img src="themes/Mech/images/Hm.jpg" alt="" width="23" height="1"></td>

    <td></td>

    <td><img src="themes/Mech/images/Hm.jpg" alt="" width="23" height="1"></td>

    <td><img src="themes/Mech/images/Hm.jpg" alt="" width="1" height="1"></td>

  </tr>

</table>

<?



$tableStatus = "closed";

}

else {}

}



function CloseTable2() {

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

}



/************************************************************/

/* FormatStory                                              */

/************************************************************/



function FormatStory($thetext, $notes, $aid, $informant) {

    global $anonymous;

    if ($notes != "") {

        $notes = "<br><br><b>"._NOTE."</b> <i>$notes</i>\n";

    } else {

        $notes = "";

    }

    if ("$aid" == "$informant") {

        echo "<font class=\"content\" color=\"#000000\">$thetext$notes</font>\n";

    } else {

        if($informant != "") {

            $boxstuff = "<a href=\"modules.php?name=Your_Account&amp;op=userinfo&amp;username=$informant\">$informant</a> ";

        } else {

            $boxstuff = "$anonymous ";

        }

        $boxstuff .= ""._WRITES." <i>\"$thetext\"</i>$notes\n";

        echo "<font class=\"content\" color=\"#000000\">$boxstuff</font>\n";

    }

}



/************************************************************/

/* Function themeheader()                                   */

/************************************************************/

    function themeheader() {

    global $user, $cookie, $sitekey, $prefix, $name, $db;

   

    cookiedecode($user);

    mt_srand ((double)microtime()*1000000);

    $maxran = 1000000;

    $random_num = mt_rand(0, $maxran);

    $datekey = date("F j");

    $rcode = hexdec(md5($_SERVER[HTTP_USER_AGENT] . $sitekey . $random_num . $datekey));

    $code = substr($rcode, 2, 6);

    $username = $cookie[1];

    if ($username == "") {

        $username = "Anonymous";

    }

   

    if ($username == "Anonymous") {

        $theuser = "<form action=\"account.html\" method=\"post\"><input type=\"text\" name=\"username\" value=\"username\" onFocus=\"if(this.value=='username')this.value='';\" value style=\"width:90;height:18;\" class=1>

  <input type=\"password\" name=\&quot;user_password\&quot; value=\"password\" onFocus=\"if(this.value=='password')this.value='';\" style=\"width:90;height:18;\" class=1>

  <input type=\"hidden\" name=\"random_num\" value=\"$random_num\">

  <input type=\"hidden\" name=\"gfx_check\" value=\"$code\">

  <input type=\"hidden\" name=\"op\" value=\"login\">

  <input type=\"image\" value=\"login\" class=\"noborder\" src=\"themes/Mech/images/login.gif\" border=\"0\" alt=login>

  <a href=\"account-new_user.html\"><img src=\"themes/Mech/images/reg.gif\" border=0 alt=register></a></td>

</form>

<p>\n"; } else { $theuser = "<img src=\"themes/Mech/images/spacer.gif\" border=0 width=4 height=1><font class=copyright>Welcome

  $username</font><a href=\"account-logout.html\"><img src=\"themes/Mech/images/logout.gif\" border=0 alt=logout></a></TD>\n";

  }

   

$sql = "SELECT msg1, msg2, msg3, link1, link2, link3, link4, link5, link1url, link2url, link3url, link4url, link5url, searchbox, flash FROM ".$prefix."_themecp";

$result = $db->sql_query($sql);

$row = $db->sql_fetchrow($result);

$msg1 = $row[msg1];

$msg2 = $row[msg2];

$msg3 = $row[msg3];

$link1 = $row[link1];

$link2 = $row[link2];

$link3 = $row[link3];

$link4 = $row[link4];

$link5 = $row[link5];

$link1url = $row[link1url];

$link2url = $row[link2url];

$link3url = $row[link3url];

$link4url = $row[link4url];

$link5url = $row[link5url];

$searchbox = $row[searchbox];

$flash = $row[flash];

$public_msg = public_message();

echo "$public_msg";



if ($searchbox == 1) {   

   $search1 ="<form action=\"modules.php?op=modload&name=Search&file=index\" method=\"post\"><input type=\"text\" name=\"query\" value=\"type search here\" onFocus=\"if(this.value=='type search here')this.value='';\" value style=\"width:120;height:18;\" class=1>&nbsp;<input type=\"image\" class=\"noborder\" value=\"search\" src=\"themes/Mech/images/search.gif\" border=\"0\" alt=\"submit search\"></TD></form>\n";

} else {

   $search1 ="&nbsp;</td>\n";

}



   



   echo "<body topmargin=\"0\" leftmargin=\"0\" marginwidth=\"0\" marginheight=\"0\">";



    $tmpl_file = "themes/Mech/header.html";

    $thefile = implode("", file($tmpl_file));

    $thefile = addslashes($thefile);

    $thefile = "\$r_file=\"".$thefile."\";";

    eval($thefile);

    print $r_file;

   



//LEFT SIDE BACKGROUND

echo "<table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" align=\"center\">\n"

      ."<tr valign=\"top\">\n"

        ."<td width=\"31\" valign=\"top\" background=\"themes/Mech/images/leftB.jpg\"><img src=\"themes/Mech/images/leftB.jpg\" width=\"31\" height=\"200\" border=\"0\"></td>\n"

      ."<td width=\"165\" valign=\"top\">\n";

    if (($name=='Forums') OR ($name=='Private_Messages') OR ($name=='Members_List') OR ($name=='Shopping_Cart') OR ($name=='Your_Account')) {

} else {

blocks(left);

}

    echo "</td>\n"

       ."<td width=\"0\" valign=\"top\" background=\"themes/Mech/images/spacer2.gif\"><img src=\"themes/Mech/images/spacer2.gif\" width=\"0\" height=\"1\" border=\"0\"></td>\n"

       ."<td width=\"100%\">\n";

}



/************************************************************/

/* Function themefooter()                                   */

/************************************************************/



$foot1 = "test";

$foot2 = "test";

$foot3 = "test";

$foot4 = "test";

function themefooter() {

    global $index, $banners, $prefix, $dbi, $total_time, $start_time, $foot1, $foot2, $foot3, $foot4;

$footer_message = $foot1. "<br>" . $foot2 . "<br>" . $foot3 . "<br>" . $foot4;

$showsub = "<FORM action=modules.php?op=modload&amp;name=Newsletter&amp;file=index&amp;func=action method=post><font class=copyright>&nbsp;<b>Email</b><br>&nbsp;<INPUT maxLength=100 size=20 class=\"sub\" name=new_email value=\"Your Email\" onFocus=\"if(this.value=='Your Email')this.value='';\" value style=\"width:150;height:18;FONT-SIZE: 9px;\"><BR><BR>&nbsp;<SELECT name=new_sub><OPTION value=sub selected>Subscribe<OPTION value=unsub>Unsubscribe</OPTION></SELECT><BR><BR>&nbsp;<SELECT name=new_type><OPTION value=0 selected>Text<OPTION value=1>HTML</OPTION></SELECT><br><br>&nbsp;<INPUT type=image class=\"liteoption1\" value=Submit src=\"themes/MStudioV2/images/submit.gif\" border=\"0\"></font></FORM>";



$maxshow = 10;   // Number of downloads to dispaly in the block.

$a = 1;

$result = sql_query("select lid, title, hits from ".$prefix."_links_links order by date DESC limit 0,$maxshow", $dbi);

while(list($lid, $title, $hits) = sql_fetch_row($result, $dbi)) {

    $title2 = ereg_replace("_", " ", "$title");

    $show .= "&nbsp;&nbsp;&nbsp;$a: <a href=\"links.html?amp;l_op=viewlinkdetails&amp;lid=$lid&amp;ttitle=$title\">$title2</a><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font class=\"content\">$hits<font class=\"copyright\"> times<br>";

     $showlinks = " <A name= \"scrollingCode\"></A><MARQUEE behavior= \"scroll\" align= \"left\" direction= \"up\" width=\"140\" height=\"97\" scrollamount= \"2\" scrolldelay= \"30\" onmouseover='this.stop()' onmouseout='this.start()'>$show";

   

   

    $a++;

}



global $prefix, $db;



$a = 1;

$sql = "SELECT lid, title FROM ".$prefix."_downloads_downloads ORDER BY hits DESC LIMIT 0,10";

$result = $db->sql_query($sql);

while ($row = $db->sql_fetchrow($result)) {

    $title2 = ereg_replace("_", " ", $row[title]);

   // $content .= "<strong><big>&middot;</big></strong>&nbsp;$a: <a href=\"modules.php?name=Downloads&amp;d_op=viewdownloaddetails&amp;lid=$row[lid]&amp;title=$row[title]\">$title2</a><br>";

   $content .= "<strong><big>&middot;</big></strong>&nbsp;<a href=\"modules.php?name=Downloads&amp;d_op=viewdownloaddetails&amp;lid=$row[lid]&amp;title=$row[title]\"><img src=\"themes/Mech/images/spacer.gif\" border=0></a> $a: <a href=\"modules.php?name=Downloads&amp;d_op=viewdownloaddetails&amp;lid=$row[lid]&amp;title=$row[title]\">$title2</a></span><br>";

    $showdl = " <font class=copyright>&nbsp;</b><br>&nbsp;<A name= \"scrollingCode\"></A><MARQUEE behavior= \"scroll\" align= \"left\" direction= \"up\" width=\"122\" height=\"91\" scrollamount= \"2\" scrolldelay= \"30\" onmouseover='this.stop()' onmouseout='this.start()'>$content";



    $a++;

}

if ($banners == 1) {

    $numrows = $db->sql_numrows($db->sql_query("SELECT * FROM ".$prefix."_banner WHERE type='0' AND active='1'"));

   /* Get a random banner if exist any. */

   /* More efficient random stuff, thanks to Cristian Arroyo from http://www.planetalinux.com.ar */



    if ($numrows>1) {

   $numrows = $numrows-1;

   mt_srand((double)microtime()*1000000);

   $bannum = mt_rand(0, $numrows);

    } else {

   $bannum = 0;

    }

    $sql = "SELECT bid, imageurl, clickurl, alttext FROM ".$prefix."_banner WHERE type='0' AND active='1' LIMIT $bannum,1";

    $result = $db->sql_query($sql);

    $row = $db->sql_fetchrow($result);

    $bid = $row[bid];

    $imageurl = $row[imageurl];

    $clickurl = $row[clickurl];

    $alttext = $row[alttext];

   

    if (!is_admin($admin)) {

       $db->sql_query("UPDATE ".$prefix."_banner SET impmade=impmade+1 WHERE bid='$bid'");

    }

    if($numrows>0) {

   $sql2 = "SELECT cid, imptotal, impmade, clicks, date FROM ".$prefix."_banner WHERE bid='$bid'";

   $result2 = $db->sql_query($sql2);

   $row2 = $db->sql_fetchrow($result2);

   $cid = $row2[cid];

   $imptotal = $row2[imptotal];

   $impmade = $row2[impmade];

   $clicks = $row2[clicks];

   $date = $row2[date];



/* Check if this impression is the last one and print the banner */



   if (($imptotal <= $impmade) AND ($imptotal != 0)) {

       $db->sql_query("UPDATE ".$prefix."_banner SET active='0' WHERE bid='$bid'");

       $sql3 = "SELECT name, contact, email FROM ".$prefix."_bannerclient WHERE cid='$cid'";

       $result3 = $db->sql_query($sql3);

       $row3 = $db->sql_fetchrow($result3);

       $c_name = $row3[name];

       $c_contact = $row3[contact];

       $c_email = $row3[email];

       if ($c_email != "") {

      $from = "$sitename <$adminmail>";

      $to = "$c_contact <$c_email>";

      $message = ""._HELLO." $c_contact:\n\n";

      $message .= ""._THISISAUTOMATED."\n\n";

      $message .= ""._THERESULTS."\n\n";

      $message .= ""._TOTALIMPRESSIONS." $imptotal\n";

      $message .= ""._CLICKSRECEIVED." $clicks\n";

      $message .= ""._IMAGEURL." $imageurl\n";

      $message .= ""._CLICKURL." $clickurl\n";

      $message .= ""._ALTERNATETEXT." $alttext\n\n";

      $message .= ""._HOPEYOULIKED."\n\n";

      $message .= ""._THANKSUPPORT."\n\n";

      $message .= "- $sitename "._TEAM."\n";

      $message .= "$nukeurl";

      $subject = "$sitename: "._BANNERSFINNISHED."";

      mail($to, $subject, $message, "From: $from\nX-Mailer: PHP/" . phpversion());

       }

   }

    $showbanners = "<a href=\"banners.php?op=click&bid=$bid\" target=\"_blank\"><img src=\"$imageurl\" border=\"0\" alt='$alttext' title='$alttext'></a>";

    }

}





    if (defined('INDEX_FILE')) {

echo"</td>"

  . "    <td width=\"170\" valign=\"top\">"

 ."";





    blocks(right);



   }

echo"</td>"

  . "    <td width=\"31\" valign=\"top\" background=\"themes/Mech/images/rightB.jpg\"><img src=\"themes/Mech/images/rightB.jpg\" width=\"31\" height=\"30\"></td>"

  . "  </tr>"

  . "</table>"

 ."";

   

   

    include("themes/Mech/footer.php");

   

}



/************************************************************/

/* 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

    $posted1 = get_author($aid);

        $posted = " $time $timezone";

    //End Code Change

   

    $tmpl_file = "themes/Mech/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/Mech/story_page.htm";

    $thefile = implode("", file($tmpl_file));

    $thefile = addslashes($thefile);

    $thefile = "\$r_file=\"".$thefile."\";";

    eval($thefile);

    print $r_file;

}



/************************************************************/

/* Function themesidebox()                                  */

/************************************************************/



function themesidebox($title, $content) {

    $tmpl_file = "themes/Mech/blocks.html";

    $thefile = implode("", file($tmpl_file));

    $thefile = addslashes($thefile);

    $thefile = "\$r_file=\"".$thefile."\";";

    eval($thefile);

    print $r_file;

}



?>



sorry this makes the post so long! this is the theme.php from the mech theme that I am using.
 
montego
Site Admin



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

PostPosted: Wed Nov 25, 2009 8:59 am Reply with quote

arahad wrote:
sorry this makes the post so long! this is the theme.php from the mech theme that I am using.


That is what the BBCode "Code" tags are for... Wink Please see how I modified your post.

_________________
Where Do YOU Stand?
HTML Newsletter::ShortLinks::Mailer::Downloads and more... 
View user's profile Send private message Visit poster's website
Palbin







PostPosted: Wed Nov 25, 2009 2:03 pm Reply with quote

arahad, post this file "themes/Mech/story_page.htm".

Be sure to put it in code tags as montego did above Wink
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> HTML

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 ©