View Single Post
  #1  
Old 07-17-2004, 09:09 PM
msimonds msimonds is offline
 
Join Date: Aug 2003
Location: Dallas, Texas
Posts: 157
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default need help with this custom script!

I have a script here

PHP Code:
<?
include("include.inc.php");
include("config.inc.php");
//echo "<link href=$home/vbmynews/css.css rel=\"stylesheet\" type=\"text/css\">";
echo '<link href="css/sportsrant.css" rel="stylesheet" type="text/css">';
if(!$mynews && !$cat){
    if($n < 1){
        $news = headlines(1, $last, $news_forumid);
        foreach($news as $new){
            $post = smallnews($new['id'],$small);
            echo"<center><table border=\"0\" cellspacing=\"1\" cellpadding=\"1\"><tr><td><table width=100% bgcolor=#EBCC6E style=\"border: 1px solid #000000;\"><tr height=25 ><td ><div align=\"right\"><a style=\"font-family: Verdana, Arial, Helvetica, sans-serif;font-size: 12px;    font-weight: bold;text-decoration: none; color: #000000;\" href=article".$new['id'].".html >".$new['title']."</a></div></td><td width=20 valign=top><img src=http://www.sportsrant.com/forums/images/statusicon/forum_new.gif></td></tr></table></td></tr><tr><td class=tdby><font size=2><span style=\"text-decoration: none\"><font size=\"1\" color=\"#555555\" face=\"Verdana, Arial, Helvetica, sans-serif\">".$new['dateline']."<br>by:</span> <a class=link href=".$home."/member.php?u=".$new['userid']." target=_".$new['userid'].">".$new['user']."</a></td></tr><tr><td align=left valign=top class=tdsmall><span style=\"text-decoration: none\"><font size=\"1\" color=\"#555555\" face=\"Verdana, Arial, Helvetica, sans-serif\">$post<script language=\"Javascript\" src=\"http://www.rantchaos.com/advertise/index.php?section=serve&action=1\"></script></span></td></tr></table><br><br></center>";
        }
    }else{
        $new = headline($n);
        $post = news($n);
        echo "<script>document.title=\"Rant Chaos :: ".$new['title']."\"</script>";
        echo "<center><table border=\"0\" cellspacing=\"1\" cellpadding=\"1\"><tr><td><table width=100% bgcolor=#EBCC6E style=\"border: 1px solid #000000;\"><tr height=25 ><td ><div align=\"right\"><a style=\"font-family: Verdana, Arial, Helvetica, sans-serif;font-size: 12px;    font-weight: bold;text-decoration: none; color: #000000;\" href=article".$new['id'].".html >".$new['title']."</a></div></td><td width=20 valign=top><img src=http://www.sportsrant.com/forums/images/statusicon/forum_new.gif></td></tr></table></td></tr><tr><td><table width=100%><tr><td class=tdby width=50%><span style=\"text-decoration: none\"><font size=\"2\" color=\"#555555\" face=\"Verdana, Arial, Helvetica, sans-serif\">".$new['dateline']."<br>by:</span> <a class=linkhref=".$home."/member.php?u=".$new['userid']." target=_".$new['userid'].">".$new['user']."</a></td><td class=tdby width=80% align=\"right\"><a href=$npage class=link><img src=$home/vbmynews/images/back.gif alt=\"[back]\" border=0></a> <a href=$home/vbmynews/print.php?n=".$new['id']." class=link><img src=$home/vbmynews/images/print.gif alt=\"[print]\" border=0></a> <a href=\"#\" onClick=\"window.open('$home/vbmynews/friend.php?n=".$new['id']."','mywindow','width=400,height=200,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,copyhistory=no,resizable=no');\" class=link><img src=$home/vbmynews/images/mail.gif alt=\"[mail a friend]\" border=0></a> <a href=$home/showthread.php?t=".$new['id']." class=link><img src=$home/vbmynews/images/board.gif alt=\"[discuss on boards]\" border=0></a></td></tr></table></tr><tr><td align=left valign=top class=tdsmall><span style=\"text-decoration: none\"><font size=\"2\" color=\"#555555\" face=\"Verdana, Arial, Helvetica, sans-serif\">$post</span><br></td></tr></table></center>";
    }
}
if($cat){
    if($n < 1){
        $news = headlines(1, $last, $cat);
        foreach($news as $new){
            $post = smallnews($new['id'],$small);
            echo"<center><table border=\"0\" cellspacing=\"1\" cellpadding=\"1\"><tr><td><table width=100% bgcolor=#EBCC6E style=\"border: 1px solid #000000;\"><tr height=25 ><td ><div align=\"right\"><a style=\"font-family: Verdana, Arial, Helvetica, sans-serif;font-size: 12px;    font-weight: bold;text-decoration: none; color: #000000;\" href=article".$new['id'].".html >".$new['title']."</a></div></td><td width=20 valign=top><img src=http://www.sportsrant.com/forums/images/statusicon/forum_new.gif></td></tr></table></td></tr><tr><td class=tdby><font size=2><span style=\"text-decoration: none\"><font size=\"1\" color=\"#555555\" face=\"Verdana, Arial, Helvetica, sans-serif\">by</span> <a class=link href=".$home."/member.php?u=".$new['userid']." target=_".$new['userid'].">".$new['user']."</a>  </td></tr><tr><td align=left valign=top class=tdsmall><span style=\"text-decoration: none\"><font size=\"1\" color=\"#555555\" face=\"Verdana, Arial, Helvetica, sans-serif\">$post</span></td></tr></table><br><br></center>";
        }
    }else{
        $new = headline($n);
        $post = news($n);
        echo "<script>document.title=\"Rant Chaos :: ".$new['title']."\"</script>";
        echo "<center><table border=\"0\" cellspacing=\"1\" cellpadding=\"1\"><tr><td><table width=100% bgcolor=#EBCC6E style=\"border: 1px solid #000000;\"><tr height=25 ><td ><div align=\"right\"><a style=\"font-family: Verdana, Arial, Helvetica, sans-serif;font-size: 12px;    font-weight: bold;text-decoration: none; color: #000000;\" href=article".$new['id'].".html >".$new['title']."</a></div></td><td width=20 valign=top><img src=http://www.sportsrant.com/forums/images/statusicon/forum_new.gif></td></tr></table></td></tr><tr><td><table width=100%><tr><td class=tdby width=50%><span style=\"text-decoration: none\"><font size=\"2\" color=\"#555555\" face=\"Verdana, Arial, Helvetica, sans-serif\">by:</span> <a class=linkhref=".$home."/member.php?u=".$new['userid']." target=_".$new['userid'].">".$new['user']."</a></td><td class=tdby width=80% align=\"right\"><a href=$npage class=link><img src=$home/vbmynews/images/back.gif alt=\"[back]\" border=0></a> <a href=$home/vbmynews/print.php?n=".$new['id']." class=link><img src=$home/vbmynews/images/print.gif alt=\"[print]\" border=0></a> <a href=\"#\" onClick=\"window.open('$home/vbmynews/friend.php?n=".$new['id']."','mywindow','width=400,height=200,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,copyhistory=no,resizable=no');\" class=link><img src=$home/vbmynews/images/mail.gif alt=\"[mail a friend]\" border=0></a> <a href=$home/showthread.php?t=".$new['id']." class=link><img src=$home/vbmynews/images/board.gif alt=\"[discuss on boards]\" border=0></a></td></tr></table></tr><tr><td align=left valign=top class=tdsmall><span style=\"text-decoration: none\"><font size=\"2\" color=\"#555555\" face=\"Verdana, Arial, Helvetica, sans-serif\">$post</span><br></td></tr></table></center>";
    }
}
if($mynews == "post"){
//    if($bbuserinfo['forumpermissions'][$news_forumid] < 66000){
//        echo "sorry, you have no access to post news";
//        print_r($bbuserinfo);
//    }else{
        echo '<form enctype="multipart/form-data" method="POST" class="tdby" action="'.$fileroot.'/post.php">
<p>title:<br>
<input name="title" type="text" size="30">
</p>
<p>image: (jpg/jpeg only)<br>
<input name="foto" type="file" size="30">
</p>
<p>news:<br>
<textarea cols="20" rows="5" name="post" style="width:90%; height:250px"></textarea>
</p>
<center>
<input type=submit name=send class=tdby value=send>
</center>
</form>';
//    }
}
?>
I have an advertising javascript that I want to place in the first story only! I have added it to the echo and it is showing up in all the stories on the home page. can someone help me with this!

The javascript call is:

Quote:
<script language="Javascript"
src="http://www.rantchaos.com/advertise/index.php?section=serve&action=1">
</script>
and you can find it in the first echo command!!


you can see what I mean by going to htp://www.rantchaos.com

Thanks
Mike
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.02207 seconds
  • Memory Usage 1,817KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • showpost_complete