PHP Web Host - Quality Web Hosting For All PHP Applications $35/month $250/year (Unlimited) - $25/month - 200,000 impressions - Your Ad Could be Here - Click For Details
  Login or Register
 • Home • Downloads • Your Account • Forums • 

View next topic
View previous topic


Google
 
Web RavenPHPScripts (This Site)
Post new topic   Reply to topic
Author Message
jakec
Moderator


Joined: Feb 06, 2006
Posts: 1712
Location: United Kingdom

PostPosted: Fri Mar 14, 2008 7:07 am Reply with quote Back to top

I have a feed which includes a <pubDate> field.

I would like to display this field in the boxover and I had look to see if I could huntdown the section of code in the files which defines this, but I to not avail. Embarassed

Is there any chance you could point me in the right direction.

Thanks in advance

Jakec
View user's profile Send private message
kguske
Site Admin


Joined: Jun 04, 2004
Posts: 4678

PostPosted: Fri Mar 14, 2008 9:23 am Reply with quote Back to top

I'll take a look when I get a chance...
View user's profile Send private message
jakec
Moderator


Joined: Feb 06, 2006
Posts: 1712
Location: United Kingdom

PostPosted: Fri Mar 14, 2008 10:58 am Reply with quote Back to top

I'll take another look tonight and hopefully I can find the section of code and I'll have a go hacking it. Whats the worst that can happen? Laughing
View user's profile Send private message
montego
Site Admin


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

PostPosted: Sat Mar 15, 2008 11:24 am Reply with quote Back to top

jakec, I had a similar desire and also wanted to have indentation on the text, so see if this replacement is more to your liking:

Code:

function headlines($bid, $cenbox=0) {
    global $prefix, $db, $useBoxoverWithnukePIE;
    if (!defined('_CHARSET')) define('_CHARSET','ISO-8859-1');
    include_once(INCLUDE_PATH.'includes/SimplePie/simplepie.inc');
    include_once(INCLUDE_PATH.'includes/SimplePie/idn/idna_convert.class.php');
    # Create a new instance of the SimplePie object
    $feed = new SimplePie();
    # Get Feed Information
    $bid = intval($bid);
    $result = $db->sql_query('SELECT title, url, refresh FROM '.$prefix.'_blocks WHERE bid=\''.$bid.'\'');
    list($title, $url, $refresh) = $db->sql_fetchrow($result);
    $title = stripslashes(check_html($title, 'nohtml'));
    $refresh = intval($refresh);
    # Initialize the whole SimplePie object.  Read the feed, process it, parse it, cache it, etc.
    $feed->set_feed_url($url);
    $feed->set_output_encoding(_CHARSET);
    $feed->set_cache_duration($refresh);
    $feed->init();
    $feed->handle_content_type();
    $content = '<font class="content"><table width="100%">';
    if (isset($feed->error)) {
      # If errors, display it.
      $content .= htmlspecialchars($feed->error);
    }
    else
    {
      foreach($feed->get_items() as $item) {
//        $content .= '&middot;';
        $content .= '<tr><td valign="top">&bull;</td><td valign="top">';
        //   If the item has a permalink back to the original post, link the item's title to it.
        if ($item->get_permalink())
        {
          $content .= '<a href="' . $item->get_permalink() . '" title="';
          $item_desc = $item->get_description();
          $item_date = $item->get_date('F j, Y');
          if ($useBoxoverWithnukePIE)
          {
            if ($item_desc == check_html($item_desc, 'nohtml')) $item_desc = nl2br($item_desc);
            $content .= 'cssbody=[nukePIEbody] cssheader=[nukePIEhdr] header=['.encodeBoxover($item_date . ': ' . check_html($item->get_title(), 'nohtml')).'] body=['.encodeBoxover(xmlentities($item_desc)).'] singleclickstop=[On] ';
          }
          else
          {
            $content .= check_html($item_desc, 'nohtml');
          }
          $content .= '">';
        }
        $content .= $item_date . ': ' . check_html($item->get_title(), 'nohtml');
        if ($item->get_permalink()) $content .= '</a>';
        // Check for enclosures.  If an item has any, set the first one to the $enclosure variable.
/*        if ($enclosure = $item->get_enclosure(0)) {
          # Use the embed() method to embed the enclosure into the page inline.
          $content .= '<div align="center">';
          $content .= '<p>' . $enclosure->embed(array(
            'audio' => './for_the_demo/place_audio.png',
            'video' => './for_the_demo/place_video.png',
            'alt' => '<img src="./for_the_demo/mini_podcast.png" class="download" border="0" title="Download the Podcast (' . $enclosure->get_extension() . '; ' . $enclosure->get_size() . ' MB)" />',
            'altclass' => 'download'
          )) . '</p>';
          $content .= '<p class="footnote" align="center">(' . $enclosure->get_type() . '; ' . $enclosure->get_size() . ' MB)</p>';
          $content .= '</div>';
        }
*/        $content .= '</td></tr>';
      }
    }

    $siteurl = ereg_replace('http://','',$url);
    $siteurl = explode('/',$siteurl);
    $content .= '</table></font><br /><table border="0" cellspacing="0" cellpadding="0" width="100%"><tr><td><a href="http://'.$siteurl[0].'" title="'.$title.'" target="blank"><b>'._HREADMORE.'</b></a></td><td align="right"><a href="http://nukeseo.com" title="nukePIE (c) nukeSEO.com">&copy;</a></td></tr></table>';
    if ($cenbox == 0) {
      themesidebox($title, $content);
    } else {
      themecenterbox($title, $content);
    }
}



This is what I use on some of my sites now.

You can see it
Only registered users can see links on this board!
Get registered or login to the forums!
if you like.
View user's profile Send private message Visit poster's website
Display posts from previous:       
Post new topic   Reply to topic

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
Forums ©
 

All logos and trademarks in this site are property of their respective owner.
The comments are property of their posters, all the rest © 2002-2008 by Raven
Proud to be listed at Lobo Links Web Directory

You can syndicate our news using the file xml

CSE HTML Validator Helped Clean up This Page! [Valid RSS] valid RSS 2.0 Valid robots.txt Stop Spam Harvesters, Join Project Honey Pot

Website engines core code is © copyright by PHP-Nuke but has been heavily patched and modified by myself and others.
PHP-Nuke is a free software released under the GNU/GPL.


:: fisubice phpbb2 style by Daz :: PHP-Nuke theme by www.nukemods.com ::

:: fisubice Theme Recoded To 100% W3C CSS & HTML 4.01 Transitional Compliance by Raven and 64bitguy ::

:: W3C CSS Compliance Validation :: W3C HTML 4.01 Transitional Compliance Validation ::

zerosum