Author
Message
kevinkap Involved Joined: Apr 22, 2006 Posts: 350
Posted:
Tue Oct 31, 2006 11:43 am
Can someone tell me how to add google to nsn news? I have added it to all other sections of my site but when I try to add it to nsn news it always puts the adds above the header of page.
persona_non_grata Joined: Posts: 0
Posted:
Tue Oct 31, 2006 1:50 pm
kevinkap Involved Joined: Apr 22, 2006 Posts: 350
Posted:
Tue Oct 31, 2006 2:08 pm
wish it would, I have read just about everything on your site as well as several others in regards to this. And they all are the same. They tell you how to add it to the right of the article. I would like to add it above the article just as it is done when you add it to the other modules. Also the code in the nsn news article file as well as the others is not the same as the regular news article file.
Thanks.
persona_non_grata Joined: Posts: 0
Posted:
Tue Oct 31, 2006 2:20 pm
well i can give you my custom one...
but i completely stripped that......
leaving just the news article and google adsense..
kevinkap Involved Joined: Apr 22, 2006 Posts: 350
Posted:
Tue Oct 31, 2006 2:23 pm
Ok, that would be great if you do not mind..
Thanks
persona_non_grata Joined: Posts: 0
Posted:
Tue Oct 31, 2006 4:37 pm
ok this is from nsn huh......
backup your stuff...
file were talking about is article.php
Code:
<?php
if ( !defined('MODULE_FILE') )
{
die("You can't access this file directly...");
}
require_once("mainfile.php");
$optionbox = "";
$module_name = basename(dirname(__FILE__));
get_lang($module_name);
if (stristr($REQUEST_URI,"mainfile")) {
Header("Location: modules.php?name=$module_name&file=article&sid=$sid");
} elseif (!isset($sid) && !isset($tid)) {
Header("Location: index.php");
}
if (isset($sid)) $sid=intval($sid);
if (isset($tid)) $tid=intval($tid);
if ($save AND is_user($user)) {
cookiedecode($user);
$db->sql_query("UPDATE ".$user_prefix."_users SET umode='$mode', uorder='$order', thold='$thold' where uid='$cookie[0]'");
getusrinfo($user);
$info = base64_encode("$userinfo[user_id]:$userinfo[username]:$userinfo[user_password]:$userinfo[storynum]:$userinfo[umode]:$userinfo[uorder]:$userinfo[thold]:$userinfo[noscore]");
setcookie("user","$info",time()+$cookieusrtime);
}
if ($op == "Reply") {
Header("Location: modules.php?name=$module_name&file=comments&op=Reply&pid=0&sid=$sid&mode=$mode&order=$order&thold=$thold");
}
$result = $db->sql_query("select catid, aid, time, title, hometext, bodytext, topic, informant, notes, acomm, haspoll, pollID, score, ratings FROM ".$prefix."_stories where sid='$sid'");
if ($numrows = $db->sql_numrows($result) != 1) {
Header("Location: index.php");
die();
}
$row = $db->sql_fetchrow($result);
$catid = intval($row['catid']);
$aid = stripslashes($row['aid']);
$time = $row['time'];
$title = stripslashes(check_html($row['title'], "nohtml"));
$hometext = stripslashes($row['hometext']);
$bodytext = stripslashes($row['bodytext']);
$topic = intval($row['topic']);
$informant = stripslashes($row['informant']);
$notes = stripslashes($row['notes']);
$acomm = intval($row['acomm']);
$haspoll = intval($row['haspoll']);
$pollID = intval($row['pollID']);
$score = intval($row['score']);
$ratings = intval($row['ratings']);
if ($aid == "") {
Header("Location: modules.php?name=$module_name");
}
$db->sql_query("UPDATE ".$prefix."_stories SET counter=counter+1 where sid='$sid'");
$artpage = 1;
$pagetitle = "- $title";
require("header.php");
$artpage = 0;
formatTimestamp($time);
$title = stripslashes(check_html($title, "nohtml"));
$hometext = stripslashes($hometext);
$bodytext = stripslashes($bodytext);
$notes = stripslashes($notes);
if ($notes != "") {
$notes = "<br><br><b>"._NOTE."</b><i>$notes</i>";
} else {
$notes = "";
}
if($bodytext == "") {
$bodytext = "$hometext$notes";
} else {
$bodytext = "$hometext<br><br>$bodytext$notes";
}
if($informant == "") {
$informant = $anonymous;
}
getTopics($sid);
if ($catid != 0) {
$row2 = $db->sql_fetchrow($db->sql_query("select title from ".$prefix."_stories_cat where catid='$catid'"));
$title1 = stripslashes(check_html($row2['title'], "nohtml"));
$title = "<a href=\"modules.php?name=$module_name&file=categories&op=newindex&catid=$catid\"><font class=\"storycat\">$title1</font></a>: $title";
}
echo "<table width=\"100%\" border=\"0\"><tr><td valign=\"top\" width=\"100%\">\n";
themearticle($aid, $informant, $datetime, $title, $bodytext, $topic, $topicname, $topicimage, $topictext);
echo "</td><td> </td><td valign=\"top\">\n";
if ($multilingual == 1) {
$querylang = "AND (blanguage='$currentlang' OR blanguage='')";
} else {
$querylang = "";
}
$row7 = $db->sql_fetchrow($db->sql_query("select title, content, active, bposition from ".$prefix."_blocks where blockfile='block-Login.php' $querylang"));
$title = stripslashes(check_html($row7['title'], "nohtml"));
$content = stripslashes($row7['content']);
$active = intval($row7['active']);
$position = $row7['bposition'];
$position = substr("$position", 0,1);
if (($active == 1) AND ($position == "r") AND (!is_user($user))) {
loginbox();
}
$boxstuff .= "<strong><big>·</big></strong> <a href=\"modules.php?name=Search&topic=$topic\">"._MOREABOUT." $topictext</a><br>\n";
$boxstuff .= "<strong><big>·</big></strong> <a href=\"modules.php?name=Search&author=$aid\">"._NEWSBY." $aid</a>\n";
//$optiontitle = ""._OPTIONS."";
//$optiontitle = "";
$optionbox = "<center>blabla content here"
. "and ends here...</center>\n";
//}
themesidebox($optiontitle, $optionbox);
echo "</td></tr></table>\n";
cookiedecode($user);
include("modules/$module_name/associates.php");
if ((($mode != "nocomments") OR ($acomm == 0)) OR ($articlecomm == 1)) {
include("modules/News/comments.php");
}
include("footer.php");
?>
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