Home | Support Forums | Your Account | Gallery [2] | Downloads | News | Site Map ]
Nuked Gallery
  Create a FREE account or Login   As a guest, you don't have access to our FULL navigation system.
 Forum FAQForum FAQ   StatisticsStatistics   SearchSearch   UsergroupsUsergroups   FavoritesFavorites  

Removing article rating & related articles etc

 
Post new topic   Reply to topic    NukedGallery.net Forum Index » PHP-Nuke Issues » Other PHPNuke Issues View previous topicPrinter friendly versionView next topic
Author Message
ElgertS

Beginner
Beginner


Joined: Oct 16, 2003
Posts: 17

PostPosted: Fri Nov 07, 2003 5:51 pm    Post subject: Removing article rating & related articles etc Reply with quote

Hello!

We are workings on finishing a website using PHPNUke & Gallery. We have links that will be displaying articles, however on the right side of the screen this showed a column of information including related articles, ratings for this article, the ability to print etc. We want all this turned off as we are maintaining a very clean interface on this site. Where do I go to turn these options off?

I apologize if this is a simple question!

Thanks!
----
Give us your Gallery/webserver information to get a faster answer.
Get this information from the PHP diagnostic (in the configuration wizard).
Gallery URL (optional but very useful): http://trinitygallery.dyndns.org/nuke/html/
Gallery version: 1.4p2
Apache version: 1.3.27
PHP version (don't just say PHP 4, please): 4.3.3
Graphics Toolkit: ImageMagick
Operating system: Mac OS X 10.2.8
Web browser/version (if applicable): Safari 1.0
The CONFIG lines from the top of your block file(s):
Back to top
Offline View user's profile Send private message
AdBot
   Post subject: Removing article rating & related articles etc  

Back to top
slackbladder

Moderator
Moderator


Joined: Mar 29, 2003
Posts: 1038
Location: Cambs,UK

PostPosted: Sat Nov 08, 2003 5:46 am    Post subject: Reply with quote

I think the only way is to remove those options is to remove the code from articles.php (/modules/news/)

This is the code that I have amended (nuke 6.5) (copy and paste in to a NEW articles.php then upload) - remember to BACKUP first
Code: ›
<?php

/************************************************************************/
/* PHP-NUKE: Web Portal System                                          */
/* ===========================                                          */
/*                                                                      */
/* Copyright (c) 2002 by Francisco Burzi                                */
/* http://phpnuke.org                                                   */
/*                                                                      */
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 of the License.       */
/************************************************************************/

if (!eregi("modules.php", $_SERVER['PHP_SELF'])) {
    die ("You can't access this file directly...");
}
require_once("mainfile.php");
$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.html");
}

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");
}

$sql = "select catid, aid, time, title, hometext, bodytext, topic, informant, notes, acomm, haspoll, pollID, score, ratings FROM ".$prefix."_stories where sid='$sid'";
$result = $db->sql_query($sql);
if ($numrows = $db->sql_numrows($result) != 1) {
    Header("Location: index.html");
    die();
}
$row = $db->sql_fetchrow($result);
$catid = $row[catid];
$aid = $row[aid];
$time = $row[time];
$title = $row[title];
$hometext = $row[hometext];
$bodytext = $row[bodytext];
$topic = $row[topic];
$informant = $row[informant];
$notes = $row[notes];
$acomm = $row[acomm];
$haspoll = $row[haspoll];
$pollID = $row[pollID];
$score = $row[score];
$ratings = $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($title);
$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) {
    $sql = "select title from ".$prefix."_stories_cat where catid='$catid'";
    $result = $db->sql_query($sql);
    $row = $db->sql_fetchrow($result);
    $title1 = $row[title];
    $title = "<a href=\"modules.php?name=$module_name&file=categories&op=newindex&catid=$catid\"><font class=\"storycat\">$title1</font></a><br>$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 = "";
}

/* Determine if the article has attached a poll */
if ($haspoll == 1) {
    $url = sprintf("surveys.html&op=results&pollID=%d", $pollID);
    $boxContent = "<form action=\"surveys.html\" method=\"post\">";
    $boxContent .= "<input type=\"hidden\" name=\"pollID\" value=\"".$pollID."\">";
    $boxContent .= "<input type=\"hidden\" name=\"forwarder\" value=\"".$url."\">";
    $sql = "SELECT pollTitle, voters FROM ".$prefix."_poll_desc WHERE pollID='$pollID'";
    $result = $db->sql_query($sql);
    $row = $db->sql_fetchrow($result);
    $pollTitle = $row[pollTitle];
    $voters = $row[voters];
    $boxTitle = _ARTICLEPOLL;
    $boxContent .= "<font class=\"content\"><b>$pollTitle</b></font><br><br>\n";
    $boxContent .= "<table border=\"0\" width=\"100%\">";
    for($i = 1; $i <= 12; $i++) {
   $sql = "SELECT pollID, optionText, optionCount, voteID FROM ".$prefix."_poll_data WHERE (pollID='$pollID') AND (voteID='$i')";
   $result = $db->sql_query($sql);
   $row = $db->sql_fetchrow($result);
   $numrows = $db->sql_numrows($result);
   if($numrows != 0) {
       $optionText = $row[optionText];
       if($optionText != "") {
      $boxContent .= "<tr><td valign=\"top\"><input type=\"radio\" name=\"voteID\" value=\"".$i."\"></td><td width=\"100%\"><font class=\"content\">$optionText</font></td></tr>\n";
       }
   }
    }
    $boxContent .= "</table><br><center><font class=\"content\"><input type=\"submit\" value=\""._VOTE."\"></font><br>";
    if (is_user($user)) {
        cookiedecode($user);
    }
    for($i = 0; $i < 12; $i++) {
   $sql = "SELECT optionCount FROM ".$prefix."_poll_data WHERE (pollID='$pollID') AND (voteID='$i')";
   $result = $db->sql_query($sql);
   $row = $db->sql_fetchrow($result);
   $optionCount = $row[optionCount];
   $sum = (int)$sum+$optionCount;
    }
    $boxContent .= "<font class=\"content\">[ <a href=\"surveys.html&op=results&pollID=$pollID&mode=$cookie[4]&order=$cookie[5]&thold=$cookie[6]\"><b>"._RESULTS."</b></a> | <a href=\"surveys.html\"><b>"._POLLS."</b></a> ]<br>";

    if ($pollcomm) {
   $sql = "select * from ".$prefix."_pollcomments where pollID='$pollID'";
   $result = $db->sql_query($sql);
   $numcom = $db->sql_numrows($result);
   $boxContent .= "<br>"._VOTES.": <b>$sum</b><br>"._PCOMMENTS." <b>$numcom</b>\n\n";
    } else {
        $boxContent .= "<br>"._VOTES." <b>$sum</b>\n\n";
    }
    $boxContent .= "</font></center></form>\n\n";
    themesidebox($boxTitle, $boxContent);
}

$sql = "select title, content, active, position from ".$prefix."_blocks where blockfile='block-Login.php' $querylang";
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
$title = $row[title];
$content = $row[content];
$active = $row[active];
$position = $row[position];
if (($active == 1) AND ($position == "r") AND (!is_user($user))) {
    loginbox();
}

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");

?>




Or this is the code I removed, look for it in your articles.php:

Code: ›
$boxtitle = ""._RELATED."";
$boxstuff = "<font class=\"content\">";
$sql = "select name, url from ".$prefix."_related where tid=$topic";
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result)) {
    $name = $row[name];
    $url = $row[url];
    $boxstuff .= "<strong><big>&</big></strong>&<a href=\"$url\" target=\"new\">$name</a><br>\n";
}

$boxstuff .= "<strong><big>&</big></strong>&<a href=\"search.html&topic=$topic\">"._MOREABOUT." $topictext</a><br>\n";
$boxstuff .= "<strong><big>&</big></strong>&<a href=\"search.html&author=$aid\">"._NEWSBY." $aid</a>\n";

$boxstuff .= "</font><br><hr noshade width=\"95%\" size=\"1\"><center><font class=\"content\"><b>"._MOSTREAD." $topictext:</b><br>\n";

global $multilingual, $currentlang;
    if ($multilingual == 1) {
   $querylang = "AND (alanguage='$currentlang' OR alanguage='')"; /* the OR is needed to display stories who are posted to ALL languages */
    } else {
   $querylang = "";
    }
$sql = "select sid, title from ".$prefix."_stories where topic=$topic $querylang order by counter desc limit 0,1";
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
$topstory = $row["sid"];
$ttitle = $row[title];

$boxstuff .= "<a href=\"modules.php?name=$module_name&file=article&sid=$topstory\">$ttitle</a></font></center><br>\n";
themesidebox($boxtitle, $boxstuff);

if ($ratings != 0) {
    $rate = substr($score / $ratings, 0, 4);
    $r_image = round($rate);
    $the_image = "<br><br><img src=\"images/articles/stars-$r_image.gif\" border=\"1\"></center><br>";
} else {
    $rate = 0;
    $the_image = "</center><br>";
}
$ratetitle = ""._RATEARTICLE."";
$ratecontent = "<center>"._AVERAGESCORE.": <b>$rate</b><br>"._VOTES.": <b>$ratings</b>$the_image";
$ratecontent .= "<form action=\"modules.php?name=$module_name\" method=\"post\"><center>"._RATETHISARTICLE."</center><br>";
$ratecontent .= "<input type=\"hidden\" name=\"sid\" value=\"$sid\">";
$ratecontent .= "<input type=\"hidden\" name=\"op\" value=\"rate_article\">";
$ratecontent .= "<input type=\"radio\" name=\"score\" value=\"5\"> <img src=\"images/articles/stars-5.gif\" border=\"0\" alt=\""._EXCELLENT."\" title=\""._EXCELLENT."\"><br>";
$ratecontent .= "<input type=\"radio\" name=\"score\" value=\"4\"> <img src=\"images/articles/stars-4.gif\" border=\"0\" alt=\""._VERYGOOD."\" title=\""._VERYGOOD."\"><br>";
$ratecontent .= "<input type=\"radio\" name=\"score\" value=\"3\"> <img src=\"images/articles/stars-3.gif\" border=\"0\" alt=\""._GOOD."\" title=\""._GOOD."\"><br>";
$ratecontent .= "<input type=\"radio\" name=\"score\" value=\"2\"> <img src=\"images/articles/stars-2.gif\" border=\"0\" alt=\""._REGULAR."\" title=\""._REGULAR."\"><br>";
$ratecontent .= "<input type=\"radio\" name=\"score\" value=\"1\"> <img src=\"images/articles/stars-1.gif\" border=\"0\" alt=\""._BAD."\" title=\""._BAD."\"><br><br>";
$ratecontent .= "<center><input type=\"submit\" value=\""._CASTMYVOTE."\"></center></form><br>";
themesidebox($ratetitle, $ratecontent);

$optiontitle = ""._OPTIONS."";
$optionbox .= "<br>&<img src=\"images/print.gif\" border=\"0\" alt=\""._PRINTER."\" title=\""._PRINTER."\" width=\"16\" height=\"11\">&&<a href=\"modules.php?name=$module_name&file=print&sid=$sid\">"._PRINTER."</a><br><br>";
$optionbox .= "&<img src=\"images/friend.gif\" border=\"0\" alt=\""._FRIEND."\" title=\""._FRIEND."\" width=\"16\" height=\"11\">&&<a href=\"modules.php?name=$module_name&file=friend&op=FriendSend&sid=$sid\">"._FRIEND."</a><br><br>\n";
if (is_admin($admin)) {
    $optionbox .= "<center><b>"._ADMIN."</b><br>[ <a href=\"admin.php?op=adminStory\">"._ADD."</a> | <a href=\"admin.php?op=EditStory&sid=$sid\">"._EDIT."</a> | <a href=\"admin.php?op=RemoveStory&sid=$sid\">"._DELETE."</a> ]</center>";
}
themesidebox($optiontitle, $optionbox);



The POLL block has been left in - so you have the option to display one or not!

Nice to see another OSX'er Very Happy
_________________
"The only difference between me and a madman is that I'm not mad."
Back to top
Offline View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger
ElgertS

Beginner
Beginner


Joined: Oct 16, 2003
Posts: 17

PostPosted: Tue Nov 11, 2003 9:36 am    Post subject: Reply with quote

Thanks!

For some reason I got parse errors from this code, but it gave me the guts to dig in and start tearing things out of articles.php. I now removed all the elements I wanted to get rid of and am very happy with the results!

Thanks so much!
Back to top
Offline View user's profile Send private message
joenorris

Beginner
Beginner


Joined: Mar 07, 2004
Posts: 1

PostPosted: Thu Mar 11, 2004 2:01 pm    Post subject: Re: Removing article rating & related articles etc Reply with quote

This was my problem too.
Here is what I did.
I didnt want people to be able to vote on articles, and I needed to remove the block on the right.

I edited /modules/News/article.php

I removed the following lines:

Code: › $ratetitle = ""._RATEARTICLE."";
$ratecontent = "<center>"._AVERAGESCORE.": <b>$rate</b><br>"._VOTES.": <b>$ratings</b>$the_image";
$ratecontent .= "<form action=\"modules.php?name=$module_name\" method=\"post\"><center>"._RATETHISARTICLE."</center><br>";
$ratecontent .= "<input type=\"hidden\" name=\"sid\" value=\"$sid\">";
$ratecontent .= "<input type=\"hidden\" name=\"op\" value=\"rate_article\">";
$ratecontent .= "<input type=\"radio\" name=\"score\" value=\"5\"> <img src=\"images/articles/stars-5.gif\" border=\"0\" alt=\""._EXCELLENT."\" title=\""._EXCELLENT."\"><br>";
$ratecontent .= "<input type=\"radio\" name=\"score\" value=\"4\"> <img src=\"images/articles/stars-4.gif\" border=\"0\" alt=\""._VERYGOOD."\" title=\""._VERYGOOD."\"><br>";
$ratecontent .= "<input type=\"radio\" name=\"score\" value=\"3\"> <img src=\"images/articles/stars-3.gif\" border=\"0\" alt=\""._GOOD."\" title=\""._GOOD."\"><br>";
$ratecontent .= "<input type=\"radio\" name=\"score\" value=\"2\"> <img src=\"images/articles/stars-2.gif\" border=\"0\" alt=\""._REGULAR."\" title=\""._REGULAR."\"><br>";
$ratecontent .= "<input type=\"radio\" name=\"score\" value=\"1\"> <img src=\"images/articles/stars-1.gif\" border=\"0\" alt=\""._BAD."\" title=\""._BAD."\"><br><br>";
$ratecontent .= "<center><input type=\"submit\" value=\""._CASTMYVOTE."\"></center></form><br>";
Back to top
Offline View user's profile Send private message
species

Beginner
Beginner


Joined: May 23, 2004
Posts: 1

PostPosted: Sun May 23, 2004 5:51 am    Post subject: Re: Removing article rating & related articles etc Reply with quote

how do you remove the "Score: 0" part from the bottom of the articles? (on the news page)
Back to top
Offline View user's profile Send private message
cvore

Beginner
Beginner


Joined: Jul 09, 2004
Posts: 1

PostPosted: Sun Jul 18, 2004 11:46 am    Post subject: Re: Removing article rating & related articles etc Reply with quote

species wrote: › how do you remove the "Score: 0" part from the bottom of the articles? (on the news page)


I did like this, in modules/News/index.php:

// MODIFICATION: We dont want this..
/* if ($score != 0) {
$rated = substr($score / $ratings, 0, 4);
} else {
$rated = 0;
}
$morelink .= " | "._SCORE." $rated";
*/
Back to top
Offline View user's profile Send private message
erdean2

Beginner
Beginner


Joined: Sep 29, 2004
Posts: 2

PostPosted: Wed Oct 06, 2004 9:57 am    Post subject: Re: Removing article rating & related articles etc Reply with quote

Using 7.3 phpnuke.

It doesnt work. Any ideas.
Back to top
Offline View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    NukedGallery.net Forum Index » PHP-Nuke Issues » Other PHPNuke Issues View previous topicPrinter friendly versionView next 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
All times are GMT - 5 Hours

Powered by phpBB © phpBB Group



Sponsors: Web HostingDedicated ServersDomain NamesDomain Name RegistrationDedicated Web HostingSearch Engine OptimisationSEOWeb Design New YorkSEO Web DesignWeb hosting AustraliaSEO

6th year online! 2003-2008
Legal • Use of this site consitutes agreement to the Acceptable Use Policy
Hosted by Implosion WorksSourceForge.net Logo • Theme by TonicMedia