[2.0.6] FIND - Forum Integrated News Delivery - Input

The cleanup is complete. This forum is now read only.

Rating:

Excellent!
93
62%
Very Good
34
23%
Good
14
9%
Fair
3
2%
Poor
6
4%
 
Total votes: 150

pbowser
Registered User
Posts: 19
Joined: Sat Mar 05, 2005 7:29 pm

Post by pbowser » Wed Jul 13, 2005 5:36 pm

Hi,

I am having a little trouble setting up the cron job. While troubleshooting, I decided to try running the GET command directly from the command line, and I get this output:
> GET http://forum.lgbtout.com/mods/netclecti ... insert.php
<HTML>
<HEAD><TITLE>An Error Occurred</TITLE></HEAD>
<BODY>
<H1>An Error Occurred</H1>
403 Forbidden
</BODY>
</HTML>

So it seems I'm getting a 403 error. Do I just need to change the permissions on the mods directory? Or is that a security risk? Is there something I'm missing? Thanks for any advice.

Mark_the_accountant
Registered User
Posts: 27
Joined: Sun Jul 17, 2005 7:52 am
Contact:

Post by Mark_the_accountant » Sun Jul 17, 2005 8:01 am

This seems a really good mod - unfortunately when I use the following news feed http://www.vnunet.com/feeds/rss/accountancyage the topics appear as follows:
MyTravel has been fined £240,000 for leaving £24.3m of losses out of its accounts. The FSA issued the fine yesterday, finding the company guilty of breaching the listing rules in...

>&nbsp;Read the full article


It is the >&nbsp; I want to show correctly i.e. as > followed by a space

The actual html is:
<p><small>>&nbsp;<a href="http://www.accountancyage.com/accountan ... g"><i>Read the full article</i></a></small></p>


I have read through the advice in this post and have:

- set the board configuration to allow html
- the html tags set to br,b,i,u,pre,p,ul,li,strong,img,a,center,td,tr,table,font,hr,span,div,small
- the user account (an Administrator) set to allow html

Can anyone suggest what is wrong please or is there another tag I need to add?


Thanks

Mark

navyseal1
Registered User
Posts: 1
Joined: Wed Jul 20, 2005 9:45 am

Post by navyseal1 » Wed Jul 20, 2005 9:56 am

i have a bit more problems with one rss feed

the mod works great but now i have a feed which destroy my layout and which doesnt work correctly;(
look here http://bbck.org/phpBB2/viewforum.php?f=9
original rss file http://log1.steuermonitor.at/log3/index.rdf

i configured my board like Mark_the_accountant..... but it doesnt work
maybe someone could help me

thx

wilsonator
Registered User
Posts: 217
Joined: Sun Jul 03, 2005 7:57 am
Location: St.Helens, UK
Contact:

Post by wilsonator » Fri Jul 22, 2005 10:54 am

Cron?? What is this/ how do I use it to get news feeds automaticaally, I am on a linux server.

NightriderXP
Registered User
Posts: 1418
Joined: Sat Oct 09, 2004 8:17 am
Location: Florida, US
Contact:

Post by NightriderXP » Fri Jul 22, 2005 1:57 pm

I run Cron from my CPanel. It was a bit buried, but I finally found it in the FTP Manager. Your CPanel may have it right at the top level. In my FTP Manager, I have an option called Crontab. I would click on it to see a page like this. Your's would only have one row probably:

Image

This is the command that I use to Get the Newsfeeds. You would replace the path with what is on your board:

GET http://yourdomain.com/phpBB2/mods/netcl ... insert.php > /dev/null

Set the times you want it to run and hit the Submit button. If your host has Cron set to run correctly, this will pull the newsfeeds into your forums automatically at the times that you designated. The times I set seem to be an hour off of what time they really run. They may be going off of the server on a different time zone from me...

I hope this helps...

:lol:

wilsonator
Registered User
Posts: 217
Joined: Sun Jul 03, 2005 7:57 am
Location: St.Helens, UK
Contact:

Post by wilsonator » Fri Jul 22, 2005 3:40 pm

NightriderXP wrote: I run Cron from my CPanel. It was a bit buried, but I finally found it in the FTP Manager. Your CPanel may have it right at the top level. In my FTP Manager, I have an option called Crontab. I would click on it to see a page like this. Your's would only have one row probably:

Image

This is the command that I use to Get the Newsfeeds. You would replace the path with what is on your board:

GET http://yourdomain.com/phpBB2/mods/netcl ... insert.php > /dev/null

Set the times you want it to run and hit the Submit button. If your host has Cron set to run correctly, this will pull the newsfeeds into your forums automatically at the times that you designated. The times I set seem to be an hour off of what time they really run. They may be going off of the server on a different time zone from me...

I hope this helps...

:lol:


Sorry is that in the db or the file manager?

NightriderXP
Registered User
Posts: 1418
Joined: Sat Oct 09, 2004 8:17 am
Location: Florida, US
Contact:

Post by NightriderXP » Fri Jul 22, 2005 3:59 pm

Neither. In my CPanel, it is in my FTP Manager...

:lol:

pfuller
Registered User
Posts: 53
Joined: Mon Jul 19, 2004 8:17 pm

Post by pfuller » Fri Jul 22, 2005 4:06 pm

Here is a small mod I made to functions_news.php

Just compare and you will see what I added.

My first problem was with Yahoo feeds. The url contained a "*" and actually was just a redirect to the news story. The two lines that starts with $pos fixes that.

The prep_replace code just removes html and other junk and creates a clean message

I replace <br> and their variations with a space, all other html with nothing.

Code: Select all

function prepare_newsfeed_message( $description, $link, $channel, $channel_description, $channel_link, $image_link, $image_url, $include_channel, $include_image )
{
    global $lang; 
    
    $message = $description;
    
    $pos = strpos($link, '*');
    if ( !($pos === false) ) $link = substr($link,$pos+1);
    
    $search = array (
                 '@<script[^>]*?>.*?</script>@si', // Strip out javascript
                 '@<\s*br\s*/\s*>@',               // Strip out <br>
                 '@<\s*br\s*>@',                   // Strip out <br/>
                 '@<[\/\!]*?[^<>]*?>@si',          // Strip out HTML tags
                 '@([\r\n])[\s]+@',                // Strip out white space
                 '@&(quot|#34);@i',                // Replace HTML entities
                 '@&(amp|#38);@i',
                 '@&(lt|#60);@i',
                 '@&(gt|#62);@i',
                 '@&(nbsp|#160);@i',
                 '@&(iexcl|#161);@i',
                 '@&(cent|#162);@i',
                 '@&(pound|#163);@i',
                 '@&(copy|#169);@i',
                 '@&#(\d+);@e');                    // evaluate as php

	$replace = array ('',
                 ' ',
                 ' ',
                 '',
                 ' ',
                 '"',
                 '&',
                 '<',
                 '>',
                 '',
                 chr(161),
                 chr(162),
                 chr(163),
                 chr(169),
                 'chr(\1)');
                 
    $message = preg_replace($search, $replace, $message);             

	$message = preg_replace (
       array (
               '/\s+/s',       // Any space(s)
               '/^\s+/s',      // Any space(s) at the beginning
               '/\s+$/s'       // Any space(s) at the end
       ),
       array (
               ' ',    // ... one space
               '',     // ... nothing
               ''      // ... nothing
       ),
       $message );

    $message .= "\n\n" . '[url=' . $link . ']' . $lang['News_Read_More'] . '[/url]';
    
    // should we include the channel info for this newsfeed
    if ( $include_channel )
    {
        $message .= "\n\n" . $lang['News_source'] . '[url=' . $channel_link . ']' . $channel . '[/url]';
        $message .= "\n" . '[size=9]'. $channel_description . '[/size]';
    }
    
    // should we include any image info for this newsfeed
    if ( $include_image && ($image_url != '') )
    {
        $image_link = '[url=' . ( ($image_link != '') ? $image_link : $link ) . '][img]' . $image_url . '[/img][/url]' . "\n\n";
        $message = $image_link . $message;
    }
    
    return $message;
}

wilsonator
Registered User
Posts: 217
Joined: Sun Jul 03, 2005 7:57 am
Location: St.Helens, UK
Contact:

Post by wilsonator » Fri Jul 22, 2005 4:35 pm

NightriderXP wrote: Neither. In my CPanel, it is in my FTP Manager...

:lol:


Is their any other way of accesing it?

NightriderXP
Registered User
Posts: 1418
Joined: Sat Oct 09, 2004 8:17 am
Location: Florida, US
Contact:

Post by NightriderXP » Fri Jul 22, 2005 4:37 pm

Could be. I've seen several different layouts for CPanels. You might want to call your host to ask them first if it is available and if so, where can you find it. That's what I had to do to find it in my CPanel...

:lol:

wilsonator
Registered User
Posts: 217
Joined: Sun Jul 03, 2005 7:57 am
Location: St.Helens, UK
Contact:

Post by wilsonator » Fri Jul 22, 2005 4:38 pm

NightriderXP wrote: Could be. I've seen several different layouts for CPanels. You might want to call your host to ask them first if it is available and if so, where can you find it. That's what I had to do to find it in my CPanel...

:lol:


Thanks

emjrc
Registered User
Posts: 23
Joined: Fri Jul 04, 2003 10:53 pm

Post by emjrc » Mon Jul 25, 2005 10:47 pm

pfuller wrote: Here is a small mod I made to functions_news.php

Just compare and you will see what I added.

My first problem was with Yahoo feeds. The url contained a "*" and actually was just a redirect to the news story. The two lines that starts with $pos fixes that.

Code: Select all

    $pos = strpos($link, '*');
    if ( !($pos === false) ) $link = substr($link,$pos+1);


I added these 2 lines only, and it worked perfect for yahoo feeds..Thank you

tkaway
Registered User
Posts: 4
Joined: Thu Jul 28, 2005 1:22 pm

Post by tkaway » Thu Jul 28, 2005 1:30 pm

Ok. May I spent most of the night trying to get this to work. I have a Hosted Site. I have ftp admin. Although I am a newbie, I have accsess to the database for site through phpmyadmin. Can you help with these errors.

Couldn't obtain newsfeeds list

DEBUG MODE

SQL Error : 1146 Table 'sped.phpbb_newsfeeds' doesn't exist

SELECT f.forum_name, n.*, c.cat_id, c.cat_title, u.user_id, u.username FROM phpbb_newsfeeds n, phpbb_forums f, phpbb_categories c, phpbb_users u WHERE f.forum_id = n.forum_id AND c.cat_id = f.cat_id AND u.user_id = n.user_id ORDER BY c.cat_order ASC, f.forum_order ASC, n.news_name ASC

Line : 298
File : admin_newsfeeds.php

NightriderXP
Registered User
Posts: 1418
Joined: Sat Oct 09, 2004 8:17 am
Location: Florida, US
Contact:

Post by NightriderXP » Thu Jul 28, 2005 2:02 pm

If you had used EasyMod, you could have been done and running in a couple of minutes and you would have known that the code was added correctly to the board:

EasyMOD v0.2.1a released (for phpBB 2.0.x)

You need to add the Newsfeeds table to the database using the SQL queries from the MOD. Here are instructions that might help. Ignore the SQL queries in the picture below. They are for another MOD...

The following is how you apply your code manually to your phpMyAdmin database. You can get into your database through your CPanel by clicking on phpMyAdmin. Follow the following instructions:

I'm sure that every host is different. I will tell you how I run my queries manually and hopefully it will be close to what you have available to you. The following may or may not be similar to what you have...

Log into your domain Control Panel and find the database icons. You should be able to find the phpMyAdmin icon. Click on it...

Image

Hopefully that will log you into your phpAdmin panel. You may need to provide a username and password...

In the phpMyAdmin panel, click on the Databases hyperlink...

Image

Hopefully that should take you where you can select your database. You may only have one. Select your database hyperlink...

Image

That should open up the display of all the tables in your database. Ignore them. Somewhere on the page, you should see something similar to this:

Image

Click on the SQL tab to display something like the following where you can copy all of the SQL commands in at once:

Image

Click on the Go button and the queries will be run. If all goes well, you will be told that the commands were executed successfully. Otherwise you will see a screen that tells you which command failed. If the columns that you are trying to add already exist, a duplicate will not be added...

Hopefully my instructions above are close to what you would see on your domain. If not, perhaps you could provide some screenshots of what you have available and we can figure out what you need to do. I use Gadwin Printscreen to create the screenshots and www.ImageShack.us to host them so they can be posted here...

I hope this all made sense to you tkaway...

:lol:

NightriderXP
Registered User
Posts: 1418
Joined: Sat Oct 09, 2004 8:17 am
Location: Florida, US
Contact:

Re: HTML problems

Post by NightriderXP » Thu Jul 28, 2005 2:14 pm

rjay wrote: I'm having a problem with HTML commands such as span and block being shown in their entirety rather than being parsed. For example here is an example:

<div xmlns="http://www.w3.org/1999/xhtml">
<span style="font-style: italic;">Here's an item from the Buzz Factor e-zine archives. I think this one is worth a second look. And if you're celebrating it in your part of the world, have a great Indie-Pendence Day weekend!</span>

How do I get this to parse properly ??

In PHPBB's General Configuration, my "Allowed HTML Tags" looks like this:

br,b,i,u,pre,p,ul,li,strong,img,a,center,td,tr,table,font,hr,span,div

First, you will need an end div tag to match the one on top. Then instead of using the style, add the style to your cfg or css file and use a class instead. Something like this fixes the span problem on my board. I'm not sure I understand what you are trying to do with the div tag though. Is this supposed to work like a hyperlink???

Code: Select all

<div xmlns="http://www.w3.org/1999/xhtml"> 
<span class="maintitle">Here's an item from the Buzz Factor e-zine archives. I think this one is worth a second look. And if you're celebrating it in your part of the world, have a great Indie-Pendence Day weekend!</span>
</div>
:lol:

Post Reply

Return to “[2.0.x] MOD Database Cleanup”