I'm guessing it pulling from the mainfile.php but I've been over it a couple a times and I can't identify it. If someone could give me some direction I sure would appreciate it.
That one command ($title) calls both the category and the title to the story. I want to modify this command to where it merely pulls the title without the category... because the category displays at the bottom of the story.
Joined: Sep 19, 2003 Posts: 95 Location: St. Louis, MO
Posted:
Sun Apr 25, 2004 2:49 pm
Oh sure... sorry about that.
Only registered users can see links on this board! Get registered or login to the forums!
The theme is called Newspaper. It's an older theme but I've had no technical problems with it. I figure I may be lucking out because the theme is so plain and basic... I don't know honestly. Chatserv is the one that told me it's an old theme. Works well though.
Anyway, notice the categories are listed at both the top and the bottom of the stories.
The top one is nested in the $title command and the bottom on is nested in the $morelink command.
Joined: Aug 27, 2002 Posts: 16987 Location: Kansas
Posted:
Sun Apr 25, 2004 3:42 pm
Find where themeindex is called. That is where $title gets passed. Check later in theme.php and mainfile.php. And I think it's the topic that is appended, not a category.
Joined: Sep 19, 2003 Posts: 95 Location: St. Louis, MO
Posted:
Sun Apr 25, 2004 6:39 pm
Raven wrote:
Find where themeindex is called. That is where $title gets passed. Check later in theme.php and mainfile.php. And I think it's the topic that is appended, not a category.
Hey Raven,
I'm sorry but I'm not sure I understand. The thing I'm looking for is the catid in the nuke_stories table of the database... I think.
Joined: Jul 30, 2003 Posts: 551 Location: Neurotic, State, USA
Posted:
Sun Apr 25, 2004 10:51 pm
You need to edit modules/news/categories.php
Note: This code is from Patched 7.2 so yours may be a bit different
On or about line:95 look for this code
Code:
$row2 = $db->sql_fetchrow($db->sql_query("select title from ".$prefix."_stories_cat where catid='$catid'"));
comment out this line like so:
Code:
/*$row2 = $db->sql_fetchrow($db->sql_query("select title from ".$prefix."_stories_cat where catid='$catid'"));*/
Then on or about line : 98 remove the : from here
Quote:
$title = "$title1: $title";
so it looks like this:
Quote:
$title = "$title1 $title";
That's it!
Thank you for stopping by and Please Come Again!
Joined: Sep 19, 2003 Posts: 95 Location: St. Louis, MO
Posted:
Mon Apr 26, 2004 7:46 am
Hey Nukeum,
Thanks a lot man... we're so close.
Here's the deal, I have a pretty hacked up news module. It's the old New2 mod that splits the news into two columns.
Anyway, I've made a couple changes and I have removed the category prefix from all the articles. However, when viewed in the index (home), or in the topics view the prefix is still present.
I'm posting the categories.php below and I'll make the changes I made bold. See if you can identify the additional changes needed.
Thanks again, I really appreciate it.
Quote:
<?php
/************************************************************************/
/* PHP-NUKE: Web Portal System */
/* =========================== */
/* */
/* Copyright (c) 2002 by Francisco Burzi */
/*
Only registered users can see links on this board! Get registered or login to the forums!
*/
/* */
/* 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...");
}
Joined: Sep 19, 2003 Posts: 95 Location: St. Louis, MO
Posted:
Mon Apr 26, 2004 9:54 am
Hey,
Thanks so much you guys for pointing me in the right direction.
That last suggested change didn't do it Raven... not completely anyway, but this whole process got me looking in the right area. I've been spending all my time in the core files... (like the mainfile.php and in the database stuff). It turned out to be much easier than I thought it would be.
*What worked...
I found this in the includes/theindex.php (remember, this is a news module hack, the actual line is most likely in the modules/News/index.php but I'm not sure).
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