Author |
Message |
neralex
Site Admin
![](modules/Forums/images/avatars/201442295664a46e4575d46.jpg)
Joined: Aug 22, 2007
Posts: 1775
|
Posted:
Sat Aug 13, 2011 2:31 pm |
|
hi!
how can i put the name of topic in the backend.php?
i want echo the topictitle before the storytitle starts.
$topicname - $title
![Rolling Eyes](modules/Forums/images/smiles/icon_rolleyes.gif) |
Last edited by neralex on Sat Dec 03, 2011 10:38 pm; edited 1 time in total |
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
montego
Site Admin
![](modules/Forums/images/avatars/0c0adf824792d6d341ef4.gif)
Joined: Aug 29, 2004
Posts: 9457
Location: Arizona
|
Posted:
Sun Aug 14, 2011 8:44 am |
|
Does your backend.php look like this:
Code:
<?php
/************************************************************************/
/* nukeFEED
/* http://www.nukeSEO.com
/* Copyright © 2007 by Kevin Guske
/************************************************************************/
/* 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 (!defined('INCLUDE_PATH')) define('INCLUDE_PATH', './');
require_once 'config.php';
$host = $_SERVER['HTTP_HOST'];
$uri = rtrim(dirname($_SERVER['PHP_SELF']), '/\\');
/*
* If wrapper added by montego from http://montegoscripts.com for TegoNuke(tm) ShortLinks
*/
if (isset($tnsl_bUseShortLinks) && $tnsl_bUseShortLinks) {
header('Location: http://'.$host.$uri.'/feeds-1-rss20.xml');
} else {
header('Location: http://'.$host.$uri.'/feeds-1-rss20.xml');
}
die();
?>
|
If not, post what your code is and do so between code tags.
Thanks. |
_________________ Only registered users can see links on this board! Get registered or login!
Only registered users can see links on this board! Get registered or login! |
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
neralex
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Sun Aug 14, 2011 3:20 pm |
|
hey montego!
sorry i forgot to post, i search this in the index of the Feeds-module.
my backend.php looks like your code. its a RN v2.40.01
greets |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
neralex
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Tue Aug 16, 2011 5:38 am |
|
this my goal, but i dont't know to change this in the Feeds.
![Image Image](http://www.abload.de/img/rnbookmarkswu2l.png) |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
spasticdonkey
RavenNuke(tm) Development Team
![](modules/Forums/images/avatars/48fb116845dfecf66294c.gif)
Joined: Dec 02, 2006
Posts: 1693
Location: Texas, USA
|
Posted:
Tue Aug 16, 2011 9:39 am |
|
I think this would be difficult since the topic title is stored in a different db table than the news articles. although someone else may have some ideas... |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Palbin
Site Admin
![](modules/Forums/images/avatars/Dilbert/Dilbert_-_Dogbert_King.gif)
Joined: Mar 30, 2006
Posts: 2583
Location: Pittsburgh, Pennsylvania
|
Posted:
Tue Aug 16, 2011 10:41 am |
|
spasticdonkey, can you point me to the proper query that needs edited? |
_________________ "Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." — Brian W. Kernighan. |
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
spasticdonkey
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Tue Aug 16, 2011 12:26 pm |
|
I believe you would need to edit includes/nukeSEO/content/News.php |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
neralex
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Mon Nov 21, 2011 8:36 pm |
|
i am take a look into this file but its to hard for me to understand it. i see it on many websites but in RN is it not possible? has anyone an idea? |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
kguske
Site Admin
![](modules/Forums/images/avatars/41f0b40a419280935f3a0.gif)
Joined: Jun 04, 2004
Posts: 6437
|
Posted:
Tue Nov 22, 2011 11:57 am |
|
I believe you just need to change 3 lines in includes/nukeSEO/content/News.php. Try this (previous lines are commented out, and new lines are added - you can replace the file with this):
Code:<?php
/************************************************************************/
/* nukeFEED
/* http://www.nukeSEO.com
/* Copyright © 2007 by Kevin Guske
/************************************************************************/
/* 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 (realpath(__FILE__) == realpath($_SERVER['SCRIPT_FILENAME'])) {
header('Location: ../../../index.php');
exit('Access Denied');
}
class seoNews extends seocontentclass
{
function seoNews ()
{
global $prefix;
$this->name = 'News';
$this->sql_col_id = 'sid';
# $this->sql_col_title = 'title';
$this->sql_col_title = 'CONCAT(t.topicname," - ", s.title)';
$this->sql_col_desc = 'hometext';
$this->sql_col_desc2 = 'bodytext';
$this->sql_col_time = 'time';
$this->sql_col_catid = 'catid';
$this->sql_col_author = 'aid';
# $this->sql_table_with_prefix = $prefix.'_stories';
$this->sql_table_with_prefix = $prefix.'_stories s, '.$prefix.'_topics t';
$this->sql_where_cols = array
(
'title',
'hometext',
'bodytext'
);
// Pending stories are stored in the nuke_queue table - all news in the stories table is active
# $this->activeWhere = '';
$this->activeWhere = 's.topic = t.topicid';
$this->orderArray = array
(
'recent' => 'recent',
'popular' => 'popular',
'rated' => 'rated'
);
$this->orderSQLArray = array
(
'recent' => 'sid DESC',
'popular' => 'counter DESC',
'rated' => 'score DESC'
);
$this->levelArray = array
(
'topic' => 'topic',
'category' => 'category'
);
$this->levelSQLArray = array(
'topic' => 'topic',
'category' => 'catid',
);
}
function getLink($id, $catid)
{
return getNukeURL().'article.html'.$id;
}
}
?>
|
|
_________________ I search, therefore I exist...
Only registered users can see links on this board! Get registered or login! |
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
neralex
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Tue Nov 22, 2011 4:23 pm |
|
hey kguske!
thx for you snippit but i become an xml error:
Code:Sorry
This feed does not validate.
line 1, column 1: XML parsing error: <unknown>:1:1: xml declaration not at start of external entity
<?xml version="1.0" encoding="utf-8"?>
^
|
i don't must start the rest of the variables with s.? or i must change an another file, too? |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
kguske
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Tue Nov 22, 2011 10:41 pm |
|
Not sure what might cause that. You might compare this to your previous file and only make the 3 changes. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
neralex
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Wed Nov 23, 2011 1:18 am |
|
ok i have changed it again and now i don't have this xml-error.
the head in the xml are ready, now. but all titles and links are not displayed. the problem seems to be here:
Code:$this->sql_col_title = 'CONCAT(t.topicname," - ", s.title)';
|
if i change it back to the orignial settings, then start the feed. give it here an another way as CONCAT? |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
kguske
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Wed Nov 23, 2011 7:41 am |
|
Oops. Try this one (we needed to override a function to properly use the concat function):
Code:<?php
/************************************************************************/
/* nukeFEED
/* http://www.nukeSEO.com
/* Copyright © 2007 by Kevin Guske
/************************************************************************/
/* 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 (realpath(__FILE__) == realpath($_SERVER['SCRIPT_FILENAME'])) {
header('Location: ../../../index.php');
exit('Access Denied');
}
class seoNews extends seocontentclass
{
function seoNews ()
{
global $prefix;
$this->name = 'News';
$this->sql_col_id = 'sid';
# $this->sql_col_title = 'title';
$this->sql_col_title = 'CONCAT(t.topicname," - ", s.title)';
$this->sql_col_desc = 'hometext';
$this->sql_col_desc2 = 'bodytext';
$this->sql_col_time = 'time';
$this->sql_col_catid = 'catid';
$this->sql_col_author = 'aid';
# $this->sql_table_with_prefix = $prefix.'_stories';
$this->sql_table_with_prefix = $prefix.'_stories s, '.$prefix.'_topics t';
$this->sql_where_cols = array
(
'title',
'hometext',
'bodytext'
);
// Pending stories are stored in the nuke_queue table - all news in the stories table is active
# $this->activeWhere = '';
$this->activeWhere = 's.topic = t.topicid';
$this->orderArray = array
(
'recent' => 'recent',
'popular' => 'popular',
'rated' => 'rated'
);
$this->orderSQLArray = array
(
'recent' => 'sid DESC',
'popular' => 'counter DESC',
'rated' => 'score DESC'
);
$this->levelArray = array
(
'topic' => 'topic',
'category' => 'category'
);
$this->levelSQLArray = array(
'topic' => 'topic',
'category' => 'catid',
);
}
function getItemFields()
{
// Retrieve item fields (sort id?, date, content id, title, hometext, bodytext, author, module)
$itemFields = '';
// content ID = cid
$itemFields .= '`'.$this->sql_col_id.'` AS `cid`, ';
// title
$itemFields .= $this->sql_col_title. ' AS `title`, ';
// hometext
$itemFields .= '`'.$this->sql_col_desc.'` AS `hometext` ';
// bodytext
if ($this->sql_col_desc2 > '') $itemFields .= ', `'.$this->sql_col_desc2.'` AS `bodytext` ';
// author
if ($this->sql_col_author > '') $itemFields .= ', `'.$this->sql_col_author.'` AS `author` ';
// time
if ($this->sql_col_time > '') $itemFields .= ', `'.$this->sql_col_time.'` AS `time`';
// category ID
if ($this->sql_col_catid > '') $itemFields .= ', `'.$this->sql_col_catid.'` AS `catid`';
return $itemFields;
}
function getLink($id, $catid)
{
return getNukeURL().'article.html'.$id;
}
}
?>
|
|
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
neralex
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Wed Nov 23, 2011 10:18 pm |
|
kguske, it works!!!
but a little correction must be set in the line with the return getNukeURL(). the sid was set on a wrong place. i changed here.:
Code:return getNukeURL().'article'.$id'.html';
|
it is overwritten with the global TegoNuke ShortURLs. now is all fine. let me say thank you!
i have try it to change the $topicname to the $topictext and it works, too. i am happy now. it looks pretty cool!
![RavensScripts](modules/Forums/images/smiles/ravensphpscripts.gif) |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
|