Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

RSS File Contribution...


loxly

Recommended Posts

I can't believe no one has said anything about this awesome contribution. It installs in seconds and if you have a site that you want to have your Newest Products or your category list show up on, it doesn't get any easier than this!

 

http://www.oscommerce.com/community/contributions,966

 

You can see it in action at http://loxly.com and check out the Butterfly Gifts and Cards box. It's too cool! and it will update automatically (actually I have it set to check once per hour) when I add new categories.

 

Thank you to Rodolphe Quiedeville.

 

Debbie

[no external urls in signatures please, kthanks]

Link to comment
Share on other sites

I haven't been able to get it to work with postnuke. Anyone out there get this thing working with postnuke? I think it a problem with postnuke, but I'd love to hear what other people's experiences with this are.

Link to comment
Share on other sites

It's working with postnuke .7.2.? at http://4fundraising.org/phoenix

 

What version do you have? Another thing I just found adding the url to this postnuke is an "available feed list" that takes you to a site to submit your feed to a directory where people can search for feeds by topic to add to their sites. http://www.syndic8.com/suggest.php

I just suggested my site feed, so we will see what happens.

 

Anyone see any security issues associated with making feeds available?

 

Debbie

[no external urls in signatures please, kthanks]

Link to comment
Share on other sites

I'm using .7.2.x (not sure, I'd have to look), but it's not the latest .7.2

 

Maybe I should break down and upgrade or install the newest in another dir to check it out.

 

I hate upgrading postnuke. I have alot of modules... :)

Link to comment
Share on other sites

Well, I went into admin and into blocks and created a new block. Gave it a title and for the block I choose RSS/Extra. Then, I put in the URL to the RSS file on my store site (the category choice). I left the drop down as custom and after clicking commit I got the following error:

 

Fatal error: Call to undefined function: headlinesadd() in /pathtomyhtmldir/public_html/includes/blocks/rss2.php on line 82

 

I poked around in the postnuke code and found the line in question and can't find any function called "headlinesadd" in any of the code. At least not in the version I'm using.

 

I did try it using the RSS/newsfeed, but ended up with an empty block.

Link to comment
Share on other sites

Yeah, that's what I did. This is really starting to bug me because this is such a cool mod!

 

This is what I used in addition to my store url. I have my store installed at the root rather than under catalog.

 

/rss.php?box=categories

 

I tried it with a postnuke (newer version than mine) site that I setup for my parents and I get the same problem

 

Each time I try it with the newsfeed one I get an empty block. That seems to be the way to go though.

 

After poking around your site a little I came to the conclusion that maybe it's because my store is on a different site than my postnuke site, but I kinda doubt that's the case. My other thought is that maybe it's because I have osC installed at the root as opposed to in a catalog dir.

 

I don't know and I'm running out of ideas. :)

 

Thanks for your help. I will probably email you and maybe we can figure out what the differences are between yours and mine.

Link to comment
Share on other sites

I figured what I was doing wrong. You're not going to believe this, but I decided to go back and make sure I did the directions correctly for the mod (it's not like they are that long, but hey) so I discovered that the addition to the configure.php file uses another define and I had put the new define before the one he uses.

 

In other words I had to put the define at the end instead of the beginning (as I tend to do) or the rss dir would never get defined and thus not work.

 

Doh!

 

Thanks for your help Debbie, I appreciate it. It helps when you can bounce things off other people.

 

Feel free to check out both sites in question.

 

www.prizmstore.com - my store

www.prizmnet.com - postnuke site

 

Alan

Link to comment
Share on other sites

Nice... Glad you figured it out :)

 

Can I make a suggestion? Most people pay more attention to the left column of a site than the right, I would move the store block to the left column and the weather and cnn blocks to the right column. After all, you want them to shop, not go running off to CNN :)

 

Which PN theme is that? I would also try and match the osC theme more to the PN theme or the other way around. I am working on that at http://coolcatsites.net and http://coolcatsites.net/coolstuff

 

Debbie

[no external urls in signatures please, kthanks]

Link to comment
Share on other sites

Suggestions are ALWAYS welcome! After looking at it I think you're right. I had been thinking of dropping the cnet.com block for a while now. It's just another rss feed. You're right, if people are going to jump to another site, I want it to be one of mine. :)

 

As far as similiar themes go, I hadn't thought of that. I may have to give that some thought. The only problem is that I'm really bad at design, but I'm really good at hunting for and playing with themes. :)

 

The PN theme is called mblocFig. Lousy name, but it's a part of a package I stumbled across some time ago at pntm.com (a great site to find themes for PostNuke and PHPNuke, but kinda cluttered), but I think it was created by the person who runs mentalbloc.net. I tried to contact him (her, them, ?) to make sure it was cool for me to use it, but never got a response. The package came with 3 or 4 themes, all fairly similiar, but different enough. If you'd like it and can't find it send me an email ([email protected]) and I'll dig it up and post it on my site or something.

 

I may have to look closer at coolcatsites.net since I have 2 cats of my own. :)

 

Alan

Link to comment
Share on other sites

CoolCatSites has some cool new stuff coming this week, but that is another story :-))) But I am going to try and put a block in osC to run the newsfeed from nuke, so we'll see how that goes!

 

I like the changes to your nuke site. Less clutter.

 

As far as using the theme goes, you can go into the theme readme and it usually says just credit the creator if you use it for something else.

 

What you can do easily is open both stylesheets and use find and replace to replace the color codes from the osc stylesheet to the ones from the nuke theme stylesheet. Obviously back up your current stylesheet!

 

Let me know if you need additional help!

 

deb

[no external urls in signatures please, kthanks]

Link to comment
Share on other sites

But I am going to try and put a block in osC to run the newsfeed from nuke, so we'll see how that goes!

 

That could be cool. Be sure to spread the wealth if you figure it out. :)

 

Thanks again for all your help and your suggestions.

Link to comment
Share on other sites

It creates a feed from your categories or bestsellers that you can put on another site. It updates when there are changes. It is commonly used for a news feed.

 

You can see it in action at http://coolcatsites.net , look at the box that is titled Butterfly Gifts and Cards.

[no external urls in signatures please, kthanks]

Link to comment
Share on other sites

@tangent

 

I've got 6 cats, all chincillas (err, 3 full chincilla and 3 tabi-chinilla .... doesn't make any sense to me though) 2 brown tabi, 2 whites, and 2 oranges ...

 

meow !!! kitty litter time is a pain though :roll:

NewsDesk(934) / FAQDesk(1106) / OrderCheck(1168) :::

Link to comment
Share on other sites

Look what a little kitty can do..... :-) meow........

 

I'll have to do something with the rss feed testing this weekend to get this back on topic. Maybe chitchat forum needs a kitkat topic!!!! :wink:

 

I love my kitties, I'm making an osc store just for them :P

[no external urls in signatures please, kthanks]

Link to comment
Share on other sites

  • 2 months later...
  • 3 months later...

I had the same problem, this should fix it.

 

 

 

$blocks_modules['rss'] = array(

'func_display' => 'blocks_rss_block',

'func_update' => 'blocks_rss_update',

'func_edit' => 'blocks_rss_select',

'func_add' => 'blocks_rss_add',

'text_type' => 'RSS',

'text_type_long' => 'RSS Newsfeed',

'allow_multiple' => true,

'form_content' => true,

'form_refresh' => true,

'show_preview' => true

);

 

// Security

pnSecAddSchema('RSSblock::', 'Block title::');

 

function blocks_rss_block($row) {

if (!pnSecAuthAction(0, 'RSSblock::', "$row[title]::", ACCESS_READ)) {

return;

}

 

$row = blocks_rss_refresh($row);

blocks_rss_display($row);

}

 

function blocks_rss_display($row)

{

$args = pnBlockVarsFromContent($row['content']);

if (!empty($args['headlines'])) {

$row['content'] = $args['headlines'];

} else {

$row['content'] = '';

}

 

// Ugly ugly

$row['content'] = preg_replace('/_RSSREADMORE/', _RSSREADMORE, $row['content']);

return themesideblock($row);

}

 

function blocks_rss_add($row)

{

$row = blocks_rss_refresh($row, 1);

return $row;

}

 

function blocks_rss_update($row) {

list($dbconn) = pnDBGetConn();

 

list($args['rssurl'],

$args['maxitems'],

$args['showimage'],

$args['showsearch'],

$args['showdescriptions'],

$args['altstyle']) = pnVarCleanFromInput('rssurl',

'maxitems',

'showimage',

'showsearch',

'showdescriptions',

'altstyle');

// Remove old URL if there

unset($row['url']);

 

// Defaults

if (!isset($args['rssurl'])) {

$args['rssurl'] = '';

}

if (!isset($args['maxitems'])) {

$args['maxitems'] = 5;

}

if (!isset($args['showdescriptions'])) {

$args['showdescriptions'] = 0;

}

if (!isset($args['altstyle'])) {

$args['altstyle'] = 0;

}

if (!isset($args['showimage'])) {

$args['showimage'] = 0;

}

if (!isset($args['showsearch'])) {

$args['showsearch'] = 0;

}

$row['content'] = pnBlockVarsToContent($args);

 

// Refresh data

$row = blocks_rss_refresh($row, 1);

 

return $row;

}

 

function blocks_rss_select($row)

{

list($dbconn) = pnDBGetConn();

$pntable = pnDBGetTables();

 

$output = '';

 

$args = pnBlockVarsFromContent($row['content']);

 

// Migrate $row['rssurl'] to content if present

if (!empty($row['url'])) {

$args['rssurl'] = $row['url'];

unset($row['url']);

}

 

// Defaults

if (!isset($args['rssurl'])) {

$args['rssurl'] = '';

}

if (!isset($args['showdescriptions'])) {

$args['showdescriptions'] = 0;

}

if (!isset($args['altstyle'])) {

$args['altstyle'] = 0;

}

if (!isset($args['maxitems'])) {

$args['maxitems'] = 5;

}

if (!isset($args['showimage'])) {

$args['showimage'] = 1;

}

if (!isset($args['showsearch'])) {

$args['showsearch'] = 0;

}

 

// RSS URL

$output .= '<tr><td class="pn-normal">RSS File URL:</td><td>'

."<input type="text" name="rssurl" size="64" maxlength="128" value="$args[rssurl]">";

 

// List of RSS URLs

$output .= '<a target="_parent" href="http://www.syndic8.com/">' . _BLOCKSRSSLISTS . '<a>';

$output .= "</td></tr>";

 

 

// Number of items

$output .= '<tr><td class="pn-normal">' . _RSSMAXITEMS . ':</td>';

$output .= '<td><input type="text" name="maxitems" size="4" maxlength="4" value="' . $args['maxitems']. '"></td></tr>';

 

// Show image

$output .= '<tr><td class="pn-normal">' . _RSSSHOWIMAGE . ':</td>';

$output .= '<td><input type="checkbox" name="showimage" value="1"';

if ($args['showimage'] == 1) {

$output .= ' checked';

}

$output .= '></td></tr>';

 

// Show search

$output .= '<tr><td class="pn-normal">' . _RSSSHOWSEARCH . ':</td>';

$output .= '<td><input type="checkbox" name="showsearch" value="1"';

if ($args['showsearch'] == 1) {

$output .= ' checked';

}

$output .= '></td></tr>';

 

// Show descriptions

$output .= '<tr><td class="pn-normal">' . _RSSSHOWDESCRIPTIONS . ':</td>';

$output .= '<td><input type="checkbox" name="showdescriptions" value="1"';

if ($args['showdescriptions'] == 1) {

$output .= ' checked';

}

$output .= '></td></tr>';

 

// Use old-style

$output .= '<tr><td class="pn-normal">' . _RSSALTSTYLE . ':</td>';

$output .= '<td><input type="checkbox" name="altstyle" value="1"';

if ($args['altstyle'] == 1) {

$output .= ' checked';

}

$output .= '></td></tr>';

 

return $output;

}

 

/*

* Parse RSS File (as array of lines)

* A rather un-optimized function to parse an rss file (sent as an array)

* I'll have to clean it up some later.

*

* If all goes well, the resulting array should be compatable with the results from

* the built-in xml_parse_into_struct() function. Except for some differences in

* parsing of html entities.

*/

 

function rss_parse_array($f)

{

$struct = '';

foreach ($f as $line)

{

$parse = '';

// get our positions

$sp = strpos($line,'>');

$ep = strrpos($line,'<');

$ep2 = strrpos($line,'>');

// split into first tag, last tag, and content

$first_tag = substr($line,1,($sp - 1));

$last_tag = substr($line,($ep + 1),(($ep2 - $ep) - 1));

$content = substr($line,($sp + 1),(($ep - 1) - $sp));

if (!$line)

{ // blank line

continue;

}

if ($first_tag == $last_tag)

{ // no content, single tag line

if ($first_tag[0] == '/')

{

$parse['type'] = 'close';

if ($temp_str = strstr($first_tag, ':'))

{

$first_tag = $temp_str;

}

$parse['tag'] = strtolower(substr($first_tag,1,(strlen($first_tag) - 1)));

} else {

$parse['type'] = 'open';

$first_tag = preg_replace('/^S*:/', '', $first_tag);

$first_tag = preg_replace('/s.*/', '', $first_tag);

$parse['tag'] = strtolower($first_tag);

}

$parse['value'] = '';

} else { // complete

$parse['type'] = 'complete';

$parse['tag'] = strtolower($first_tag);

if ($content) {

// Content might have HTML entities, turn it into

// normal text and then parse it through our own

// system

$trans = get_html_translation_table (HTML_ENTITIES);

$trans = array_flip ($trans);

 

// Need to do this twice as some systems pass us quotes like

// &quot; - ug

$content = strtr($content, $trans);

$content = strtr($content, $trans);

$content = pnVarPrepForDisplay($content);

}

$parse['value'] = $content;

}

$struct[] = $parse;

}

return $struct;

}

 

 

function blocks_rss_refresh($row, $forceupdate=0) {

 

list($dbconn) = pnDBGetConn();

$pntable = pnDBGetTables();

 

// Get arguments

$args = pnBlockVarsFromContent($row['content']);

 

// Check for URL

if (empty($args['rssurl'])) {

return $row;

}

 

$past = time() - $row['refresh'];

if ((!$forceupdate) && ($row['unix_update'] > $past)) {

return $row;

}

 

$rss = parse_url($args['rssurl']);

if (!isset($rss['port'])) {

$rss['port'] = 80;

}

 

if (!isset($rss['query'])) {

$rss['query'] = '';

}

 

// retrive the rss file

$fp = fsockopen($rss['host'], $rss['port'], $errno, $errstr, 10);

if(!$fp) {

$next_try = time() + 600;

$column = &$pntable['blocks_column'];

$sql = "UPDATE $pntable[blocks]

SET $column[last_update]=". pnVarPrepForStore($next_try) . "

WHERE $column[bid]=" . pnVarPrepForStore($row['bid']);

 

$result = $dbconn->Execute($sql);

 

$row['title'] .= ' *';

return $row;

}

 

fputs($fp, 'GET ' . $rss['path'] . '?' . $rss['query'] . " HTTP/1.0rn");

// cocomp 2002/07/13 Added Referer & User-Agent as some sites won't give RSS

// feed otherwise

fputs($fp, 'HOST: ' . $rss['host'] . "rn");

fputs($fp, 'Referer: ' . pnGetBaseURL() . "rn");

fputs($fp, 'User-Agent: ' . pnConfigGetVar('Version_ID') . ': ' . pnConfigGetVar('Version_Sub') . ': ' .pnConfigGetVar('Version_Num') . "rnrn");

$rss_file = '';

$start_time = time();

 

while(!feof($fp)) {

$line = fgets($fp, 4096);

if(empty($go)) {

if($line[0] == '<') {

$go = true;

}

/*

* Fix on SF-bug #566489

*/

if (preg_match("/[n]?[r]{1}[^n]{1}/", $line)) {

$line = preg_replace("/([n]?[r]{1})([^n]{1})/", "n2", $line);

$lines = explode("n", $line);

$first = true;

foreach ($lines as $line) {

if ($first) {

$first = !$first;

} else {

$rss_file[] = trim($line);

}

}

}

/*

* End of fix

*/

} else {

/*

* Fix on SF-bug #566489

*/

if (preg_match("/[n]?[r]{1}[^n]{1}/", $line)) {

$line = preg_replace("/([n]?[r]{1})([^n]{1})/", "n2", $line);

$lines = explode("rn", $line);

foreach ($lines as $line) {

$rss_file[] = trim($line);

}

} else {

$rss_file[] = trim($line);

}

/*

* End of fix

*/

}

if ((time() - $start_time) == 5) { // if the source server is too slow, we give up. 5 seconds is more then enough time

fputs($fp, "Connection: closernrn");

fclose($fp);

$column = &$pntable['blocks_column'];

$sql = "UPDATE $pntable[blocks]

SET $column[last_update]=0

WHERE $column[bid]=" . pnVarPrepForStore($row['bid']);

$result = $dbconn->Execute($sql);

 

return $row;

}

}

fputs($fp, "Connection: closernrn");

fclose($fp);

 

$struct = rss_parse_array($rss_file);

 

// parse the file

$channel_data = '';

$image_data = '';

$item_data = array();

$search_data = '';

$total_items = 0;

$cur_block = '';

foreach($struct as $v) {

if(!is_array($v)) {

continue;

}

if($v['type'] == 'open') {

switch($v['tag']) {

case 'channel' :

$cur_block = 'channel';

break;

case 'image' :

$cur_block = 'image';

break;

case 'item' :

$cur_block = 'item';

break;

case 'textinput' :

$cur_block = 'textinput';

break;

}

} elseif($v['type'] == 'close') {

switch($v['tag']) {

case 'channel' :

$cur_block = '';

break;

case 'image' :

$cur_block = '';

break;

case 'item' :

$cur_block = '';

$total_items++;

break;

case 'textinput' :

$cur_block = '';

break;

}

} elseif($v['type'] == 'complete') {

$tag = $v['tag'];

switch($cur_block) {

case 'channel' :

$channel_data[$tag] = $v['value'];

break;

case 'image' :

$image_data[$tag] = $v['value'];

break;

case 'item' :

$item_data[$total_items][$tag] = $v['value'];

break;

case 'textinput' :

$search_data[$tag] = $v['value'];

break;

}

}

}

 

// start generating content

$content = '';

// image & link

if (!empty($args['showimage'])) {

// cocomp 2002/07/13 - prevent E_ALL errors check for $image_data

if (isset($image_data) && is_array($image_data)) {

if (isset($image_data['url']) && ($image_data['url'] != 'http://yoursite.com/images/logo.gif')) {

if (!$image_data['link']) {

$image_data['link'] = $channel_data['link'];

}

if (!$image_data['title']) {

$image_data['title'] = $channel_data['title'];

}

if(!isset($image_data['description'])) {

if($channel_data['description']) {

$image_data['description'] = $channel_data['description'];

}

else {

$image_data['description'] = 'No description provided...';

}

}

if(!isset($image_data['width'])) {

$image_data['width'] = 88;

}

if(!isset($image_data['height'])) {

$image_data['height'] = 31;

}

if (pnUserloggedIN())

{

list($dbconn) = pnDBGetConn();

$pntable = pnDBGetTables();

// Get user information

$userscolumn = &$pntable['users_column'];

$userstable = $pntable['users'];

 

$query = "SELECT $userscolumn[pass]

FROM $userstable

WHERE $userscolumn[uname] = '" . pnVarPrepForStore(pnUserGetVar('uname')) ."'";

$result = $dbconn->Execute($query);

list($realpass) = $result->fields;

$result->Close();

$url = parse_url($image_data[link]);

 

$url['path'] = ereg_replace("default.php","",$url['path']);

$url['path'] = ereg_replace("product_info.php","",$url['path']);

 

$link = "osredirect.php?url=$image_data[link]&url2=http://".$url['host']."".$url['path']."&password=$realpass&email=".pnUserGetVar('email');

 

}

else

{

$link ="user.php";

}

if ($args['altstyle']) {

$content .= "<a class="pn-normal" href="$link" target="_parent" title="$image_data[description]">n"

."<img src="$image_data" border="0" alt="$image_data[title]" width="$image_data[width]" height="$image_data[height]"></a>n"

."<br>n";

} else {

$content .= "<div align="center" style="text-align:center"><a class="pn-normal" href="$link" target="_parent" title="$image_data[description]">n"

."<img src="$image_data" border="0" alt="$image_data[title]" width="$image_data[width]" height="$image_data[height]"></a>n"

."</div>";

}

}

}

}

 

// pub date

if(isset($channel_data['pubDate'])) {

$content .= "<div align="center" style="text-align:center">n"

."<b>($channel_data[pubDate])</b></div>";

}

 

// items

if ($total_items > $args['maxitems']) { // we don't want a bunch of empty item spaces

$total_items = $args['maxitems'];

}

 

for($i = 0; $i < $total_items; $i++) {

if($i) {

if ($args['altstyle']) {

$content .= "n";

} else {

$content .= "<hr noshade size="1" width="50%">n";

}

}

 

if(empty($item_data[$i]['title'])) {

$item_data[$i]['title'] = '<i>[no title]</i>';

}

// cocomp 2002/07/13 prevent E_ALL errors check for $item_data[$i]['link']

if(isset($item_data[$i]['catimg'])){

$catimage='<img src="'.$item_data[$i]['catimg'].'">';

}

elseif(isset($item_data[$i]['whatimg'])){

$catimage='<img src="'.$item_data[$i]['whatimg'].'">';

}

if(isset($item_data[$i]['price'])){

$price='<img src="'.$item_data[$i]['price'].'"><br>';

}

if(isset($item_data[$i]['specialprice'])){

$specialprice='<img src="'.$item_data[$i]['specialprice'].'"><br>';

}

if (isset($item_data[$i]['link'])) {

if (pnUserloggedIN())

{

list($dbconn) = pnDBGetConn();

$pntable = pnDBGetTables();

// Get user information

$userscolumn = &$pntable['users_column'];

$userstable = $pntable['users'];

 

$query = "SELECT $userscolumn[pass]

FROM $userstable

WHERE $userscolumn[uname] = '" . pnVarPrepForStore(pnUserGetVar('uname')) ."'";

$result = $dbconn->Execute($query);

list($realpass) = $result->fields;

$result->Close();

$url = parse_url($item_data[$i]['link']);

$url['path'] = ereg_replace("product_info.php","",$url['path']);

 

$url['path'] = ereg_replace("default.php","",$url['path']);

$link = "osredirect.php?url=" . $item_data[$i]['link'] . "&url2=http://".$url['host']."".$url['path']."&password=$realpass&email=".pnUserGetVar('email');

 

}

else

{

$link ="user.php";

}

if ($args['altstyle']) {

$content .= '<center>'.$catimage.'<br><font class="pn-normal"><strong><big>·</big></strong> </font><a class="pn-normal" href="'.$link.'" title="' . $item_data[$i]['title'] . '" target="_parent">' . $item_data[$i]['title'] . '</a><br>';

} else {

$content .= '<center>'.$catimage.'<br><a href="' . $link . '" title="' . $item_data[$i]['title'] . '" target="_parent" class="pn-normal">' . $item_data[$i]['title'] . '</a><br>';

}

}

if (!empty($args['showdescriptions']) && isset($item_data[$i]['description'])) {

$content .= '<font class="pn-normal"><i>' . $item_data[$i]['description'] . '</i></font><br>';

}

}

 

// search

if (!empty($args['showsearch'])) {

if((isset($search_data['link'])) && (isset($search_data['name'])) && (isset($search_data['title']))) {

if ($args['altstyle']) {

$content .= '<br>';

} else {

$content .= '<hr noshade size="1" width="50%">';

}

$content .= "<center><form method="get" action="$search_data[link]" target="_parent">n";

if ($search_data['description']) {

$content .= htmlspecialchars($search_data['description']) . '<br>';

}

$content .= "<input type="text" name="$search_data[name]" size="15"><br><input type="submit" value="$search_data[title]"></form></center>n";

}

// copyright

if(isset($channel_data['copyright'])) {

$content .= "<font class="pn-normal">$channel_data[copyright]</font>n";

}

if (pnUserloggedIN())

{

list($dbconn) = pnDBGetConn();

$pntable = pnDBGetTables();

// Get user information

$userscolumn = &$pntable['users_column'];

$userstable = $pntable['users'];

 

$query = "SELECT $userscolumn[pass]

FROM $userstable

WHERE $userscolumn[uname] = '" . pnVarPrepForStore(pnUserGetVar('uname')) ."'";

$result = $dbconn->Execute($query);

list($realpass) = $result->fields;

$result->Close();

$url = parse_url($channel_data['link']);

$url['path'] = ereg_replace("product_info.php","",$url['path']);

 

$url['path'] = ereg_replace("default.php","",$url['path']);

$link = "osredirect.php?url=$channel_data[link]&url2=http://".$url['host']."".$url['path']."&password=$realpass&email=".pnUserGetVar('email');

 

}

else

{

$link ="user.php";

}

// done with rdf file

if ($args['altstyle']) {

$content .= "<br><a class="pn-normal" href="$link" target="_parent"><b>_RSSREADMORE</b></a>n";

} else {

$content .= "<div align="right" style="text-align:right"><a class="pn-normal" href="$link" target="_parent"><b>_RSSREADMORE</b></a></div>n";

}

$content = "<font class="pn-normal">$content</font>n";

}

 

$args['headlines'] = $content;

$row['content'] = pnBlockVarsToContent($args);

 

$column = &$pntable['blocks_column'];

// cocomp 2002/07/13 cross db compatibility - changed now() to DBTimestamp

$sql = "UPDATE $pntable[blocks]

SET $column[content]='" . pnVarPrepForStore($row['content']) . "',

$column[last_update]=" . $dbconn->DBTimestamp(time()) . "

WHERE $column[bid]=" . pnVarPrepForStore($row['bid']);

$result = $dbconn->Execute($sql);

 

if($dbconn->ErrorNo() != 0) {

$row['title'] .= ' *';

}

 

return $row;

}

?>

Link to comment
Share on other sites

Wanna explain what that all was? Was it what you enter in PostNuke or is it a new rss file for osc?

 

I am not using postNuke, but I think the folks looking at it might be confused! If it is a new file, add it to the contribution section and just explain what it is and where it goes in a separate readme.

[no external urls in signatures please, kthanks]

Link to comment
Share on other sites

Good Point

 

The file is for Postnuke .723, it replaces the includes/blocks/rss.php file.

This postnuke file was modified after trying with no success to get the osCommerce RSS contribution to work.

 

Other than that I can't help you as I pay money for any tweaks or programming work. I don't have the time to learn PHP nor care to know exactly what was modified.

 

BUT, I am willing to share whatever I have so someone else may benefit from it.

 

Thanks John

Link to comment
Share on other sites

um, so instead of just posting you can't upload that file with a note that it is to replace the file in postNuke version what ever? The work is done, it just needs to go into the area in contribs where the rss feed is.

 

I don't understand the problem with doing that. If you want I will do it for you since you don't seem to want to.

[no external urls in signatures please, kthanks]

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...