Ravens PHP Scripts: Forums


View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> NSN News
Author Message

Joined: Apr 22, 2006
Posts: 356

PostPosted: Tue Oct 31, 2006 11:43 am Reply with quote

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.

Kevin Kappes 
View user's profile Send private message
Sells PC To Pay For Divorce

Posts: 5661

PostPosted: Tue Oct 31, 2006 1:50 pm Reply with quote

this will help you....
[ Only registered users can see links on this board! Get registered or login! ]
View user's profile Send private message

PostPosted: Tue Oct 31, 2006 2:08 pm Reply with quote

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.


PostPosted: Tue Oct 31, 2006 2:20 pm Reply with quote

well i can give you my custom one...
but i completely stripped that......
leaving just the news article and google adsense..

PostPosted: Tue Oct 31, 2006 2:23 pm Reply with quote

Ok, that would be great if you do not mind..


PostPosted: Tue Oct 31, 2006 4:37 pm Reply with quote

ok this is from nsn huh......
backup your stuff...

file were talking about is article.php



if ( !defined('MODULE_FILE') )
   die("You can't access this file directly...");
$optionbox = "";
$module_name = basename(dirname(__FILE__));

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)) {
    $db->sql_query("UPDATE ".$user_prefix."_users SET umode='$mode', uorder='$order', thold='$thold' where uid='$cookie[0]'");
    $info = base64_encode("$userinfo[user_id]:$userinfo[username]:$userinfo[user_password]:$userinfo[storynum]:$userinfo[umode]:$userinfo[uorder]:$userinfo[thold]:$userinfo[noscore]");

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");
$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";
$artpage = 0;

$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;


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&amp;file=categories&amp;op=newindex&amp;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>&nbsp;</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))) {

$boxstuff .= "<strong><big>&middot;</big></strong>&nbsp;<a href=\"modules.php?name=Search&amp;topic=$topic\">"._MOREABOUT." $topictext</a><br>\n";
$boxstuff .= "<strong><big>&middot;</big></strong>&nbsp;<a href=\"modules.php?name=Search&amp;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";


if ((($mode != "nocomments") OR ($acomm == 0)) OR ($articlecomm == 1)) {

Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> NSN News

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 ©