Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> v2.4 RN Issues
Author Message
neralex
Site Admin



Joined: Aug 22, 2007
Posts: 1772

PostPosted: Sat Aug 13, 2011 2:31 pm Reply with quote

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


Last edited by neralex on Sat Dec 03, 2011 10:38 pm; edited 1 time in total 
View user's profile Send private message
montego
Site Admin



Joined: Aug 29, 2004
Posts: 9457
Location: Arizona

PostPosted: Sun Aug 14, 2011 8:44 am Reply with quote

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.

_________________
Where Do YOU Stand?
HTML Newsletter::ShortLinks::Mailer::Downloads and more... 
View user's profile Send private message Visit poster's website
neralex







PostPosted: Sun Aug 14, 2011 3:20 pm Reply with quote

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
 
neralex







PostPosted: Tue Aug 16, 2011 5:38 am Reply with quote

this my goal, but i dont't know to change this in the Feeds.

Image
 
spasticdonkey
RavenNuke(tm) Development Team



Joined: Dec 02, 2006
Posts: 1693
Location: Texas, USA

PostPosted: Tue Aug 16, 2011 9:39 am Reply with quote

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...
 
View user's profile Send private message Visit poster's website
Palbin
Site Admin



Joined: Mar 30, 2006
Posts: 2583
Location: Pittsburgh, Pennsylvania

PostPosted: Tue Aug 16, 2011 10:41 am Reply with quote

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. 
View user's profile Send private message
spasticdonkey







PostPosted: Tue Aug 16, 2011 12:26 pm Reply with quote

I believe you would need to edit includes/nukeSEO/content/News.php
 
neralex







PostPosted: Mon Nov 21, 2011 8:36 pm Reply with quote

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?
 
kguske
Site Admin



Joined: Jun 04, 2004
Posts: 6433

PostPosted: Tue Nov 22, 2011 11:57 am Reply with quote

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...
nukeSEO - nukeFEED - nukePIE - nukeSPAM - nukeWYSIWYG
 
View user's profile Send private message
neralex







PostPosted: Tue Nov 22, 2011 4:23 pm Reply with quote

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?
 
kguske







PostPosted: Tue Nov 22, 2011 10:41 pm Reply with quote

Not sure what might cause that. You might compare this to your previous file and only make the 3 changes.
 
neralex







PostPosted: Wed Nov 23, 2011 1:18 am Reply with quote

ok i have changed it again and now i don't have this xml-error. Smile

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?
 
kguske







PostPosted: Wed Nov 23, 2011 7:41 am Reply with quote

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;
  }
}
?>
 
neralex







PostPosted: Wed Nov 23, 2011 10:18 pm Reply with quote

kguske, it works!!! Smile

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
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> v2.4 RN Issues

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 ©