Page 18 of 40

Re: [DEV] RSS Input

Posted: Fri May 28, 2010 9:44 am
by wadie
My bad..the forum that is doing what I said is actually using a PHP script and not this mod...but can't you do to this mod what that person have done to the PHP script ?

Re: [DEV] RSS Input

Posted: Sat May 29, 2010 3:31 am
by PoPoutdoor
jyllana24 wrote:Hi,

I cant find the acp_find from the ACP path that ws mentioned on the installation procedure. I am using subsilver2 and 3.0.7-PL1.

Big thnks.
This mod doesn't touch the style code, you needed to verify what the install.xml said with what you're going to do.

Re: [DEV] RSS Input

Posted: Sat May 29, 2010 3:46 am
by PoPoutdoor
To change the 'Read More' line in posting to

Code: Select all

Source: [url]http://the_source/link[/url]
just edit language/en/find_posting.php

find

Code: Select all

	'BB_READ_MORE'	=> "\n" . '[url=%s][i]Read more...[/i][/url]' . "\n\n",
replaced with

Code: Select all

	'BB_READ_MORE'	=> "\n" . 'Source: [url]%s[/url]' . "\n\n",
wadie wrote:My bad..the forum that is doing what I said is actually using a PHP script and not this mod...but can't you do to this mod what that person have done to the PHP script ?
The answer is NO.
This mod does what it does, I'm not going to do what you're asking. In fact, there is many software to 'copy' contents of other site, but what I see is 'robbing' others' IP. I think 'free' is freedom to have internet access, and this freedom is based on respect of local laws.

Re: [DEV] RSS Input

Posted: Sun May 30, 2010 11:29 am
by wadie
ok..ok

btw my host doesn't support cron jobs..is there any alternative way to do the automatic posting ?

Re: [DEV] RSS Input

Posted: Thu Jun 03, 2010 7:25 am
by Patti2010
PoPoutdoor wrote:version 0.3.2 is out, please goto first post for the updates!

@Patti2010, hope this version works for you.

Edit: the version is 0.3.2, not 3.0.2
thx,
but I switched to MySQL 5.1

sorry :oops:

Re: [DEV] RSS Input

Posted: Sun Jun 06, 2010 5:42 pm
by PoPoutdoor
@wadie , read post#2

@Patti2010, I'm with 5.0 right now and the SQL statement should works for 5.1. :D

Re: [DEV] RSS Input

Posted: Mon Jun 07, 2010 9:38 am
by wadie
I read post #2 but my host doesn't support CRON jobs and also can't log in to my web server from terminal !

Can you tell me what to do ??

Re: [DEV] RSS Input

Posted: Tue Jun 08, 2010 4:04 am
by PoPoutdoor
wadie wrote:I read post #2 but my host doesn't support CRON jobs and also can't log in to my web server from terminal !

Can you tell me what to do ??
Sorry to hear that...

You have to ask your hosting about the tools for setting up CRON jobs.
BTW, some users have CPanel and do get the CRON job set, search this topic for CPanel to get more info.

Re: [DEV] RSS Input

Posted: Fri Jun 18, 2010 10:07 am
by Mess
I got this up and running finally. I had some problems with rss_import.php, I think it might be because I installed with automod. Manually overwriting all the files fixed it however.

I got a question.
Is there a way to setup a special format for one particular feed? I am using several feeds for different parts of my forum.
The snippet from the input I want to change is:

*snip*
Image
Starcraft 2 - D9D #131 Part2/6 TheLittleOne (TLO) On Air
*snip*

I want it to be the following:
*snip*
http://www.youtube.com/watch?v=Pl7AN9msN64
Starcraft 2 - D9D #131 Part2/6 TheLittleOne (TLO) On Air
*snip*

Is this in anyway possible?

Re: [DEV] RSS Input

Posted: Mon Jun 21, 2010 7:05 am
by PoPoutdoor
@Mess

Sorry for the late reply! The Great Fire Wall of China block YouTube while the network speed barely keep my VPN alive :cry:

Please post a snapshot image link in order to let me understand what you're asking for ;)

Re: [DEV] RSS Input

Posted: Mon Jun 21, 2010 10:01 am
by Mess
PoPoutdoor wrote:@Mess

Sorry for the late reply! The Great Fire Wall of China block YouTube while the network speed barely keep my VPN alive :cry:

Please post a snapshot image link in order to let me understand what you're asking for ;)
Sorry I'm not sure what you mean. English is not my first language either.

The feed URL is:
http://gdata.youtube.com/feeds/base/use ... tv/uploads
Here is the raw output from RSS Input into my forum:

Code: Select all

Posted: [color=green]Fri Jun 18, 2010 7:37 am[/color]    Author: [color=brown]day9tv[/color]

[url=http://www.youtube.com/watch?v=Pl7AN9msN64&feature=youtube_gdata][img]http://i.ytimg.com/vi/Pl7AN9msN64/2.jpg[/img][/url]
[url=http://www.youtube.com/watch?v=Pl7AN9msN64&feature=youtube_gdata]Starcraft 2 - D9D #131 Part2/6 TheLittleOne (TLO) On Air[/url]

Complete video at http://blip.tv/file/3732380

June 7, 2010.

Part2 of 6
From:
[url=http://www.youtube.com/profile?user=day9tv]day9tv[/url]
Views:
3238
[img]http://gdata.youtube.com/static/images/icn_star_full_11x11.gif[/img] [img]http://gdata.youtube.com/static/images/icn_star_full_11x11.gif[/img] [img]http://gdata.youtube.com/static/images/icn_star_full_11x11.gif[/img] [img]http://gdata.youtube.com/static/images/icn_star_full_11x11.gif[/img] [img]http://gdata.youtube.com/static/images/icn_star_full_11x11.gif[/img]
23
ratings
Time:
10:57
More in
[url=http://www.youtube.com/categories_portal?c=20]Gaming[/url]

[url=http://gdata.youtube.com/feeds/base/videos/Pl7AN9msN64][i]Read more...[/i][/url] 
And this is what I would like the result to be:

Code: Select all

Posted: [color=green]Fri Jun 18, 2010 7:37 am[/color]    Author: [color=brown]day9tv[/color]

http://www.youtube.com/watch?v=Pl7AN9msN64&feature=youtube_gdata
[url=http://www.youtube.com/watch?v=Pl7AN9msN64&feature=youtube_gdata]Starcraft 2 - D9D #131 Part2/6 TheLittleOne (TLO) On Air[/url]

Complete video at http://blip.tv/file/3732380

June 7, 2010.

Part2 of 6
From:
[url=http://www.youtube.com/profile?user=day9tv]day9tv[/url]
Views:
3238
[img]http://gdata.youtube.com/static/images/icn_star_full_11x11.gif[/img] [img]http://gdata.youtube.com/static/images/icn_star_full_11x11.gif[/img] [img]http://gdata.youtube.com/static/images/icn_star_full_11x11.gif[/img] [img]http://gdata.youtube.com/static/images/icn_star_full_11x11.gif[/img] [img]http://gdata.youtube.com/static/images/icn_star_full_11x11.gif[/img]
23
ratings
Time:
10:57
More in
[url=http://www.youtube.com/categories_portal?c=20]Gaming[/url]

[url=http://gdata.youtube.com/feeds/base/videos/Pl7AN9msN64][i]Read more...[/i][/url]

Re: [DEV] RSS Input

Posted: Tue Jun 22, 2010 7:13 am
by PoPoutdoor
Now I get what you want:

you like to change

Code: Select all

[url=...uri...][img]...img...[/img][/url]
to

Code: Select all

...uri...
Right?

Current code is in do-it-all approach, but you can try FIND_STRIP to filter contents you don't want to posted.

Relative code in function_find.php

Code: Select all

		// Contents filter
		if (defined('FIND_STRIP'))
		{
			$item_content = str_replace(explode(',', FIND_STRIP), '', $item_content);	// Strip defined patterns
		}

Re: [DEV] RSS Input

Posted: Tue Jun 22, 2010 9:02 am
by Mess
Yes, exactly what I want, but only in the specific feed.
If I use the FIND_STRIP function it would remove images from other feeds as well, which i want to avoid.
Ill try to find another way to solve it. Would it be a feature you would consider in the future?

Re: [DEV] RSS Input

Posted: Wed Jun 23, 2010 7:00 am
by PoPoutdoor
Mess wrote:Would it be a feature you would consider in the future?
No.

I think you can work around this with some code mod in functions_find...
  1. Create another RSS Bot dedicated for stripping the link/image BBcode
  2. find

    Code: Select all

    				// prepare the message text
    				$message = bb_message(
    					$item_ary[$i],
    					$item_ts,
    					$post_limit,
    					$inc_html,
    					$inc_cat,
    					$is_cjk
    				);
    add after

    Code: Select all

    				if ( $bot['poster_id'] == $strip_bot_id )
    				{
    					$message = preg_replace('#\[url=(\w+)\]\[img\]\w+\[/img\]\[/url\]#is', '\\1', $message);
    				}
    
    where $strip_bot_id is the newly created RSS Bot.
I haven't test the preg code but this should do what you wanted with minimal code changes :)

Re: [DEV] RSS Input

Posted: Wed Jun 23, 2010 9:51 am
by Mess
Thank you, thats an excellent solution. :D

The bot I'm using has ID 53 so if I'm not mistaken I would need to edit in the following code:

Code: Select all

                if ( $bot['poster_id'] == 53 )
                {
                   $message = preg_replace('#\[url=(\w+)\]\[img\]\w+\[/img\]\[/url\]#is', '\\1', $message);
                }
I just tested it. But the bot still posts the feed as normal. :(