[RC][1.1.0-r2] FIND

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment!
Get Involved
Locked
wadie
Registered User
Posts: 558
Joined: Sun May 02, 2010 5:05 am
Location: Your ACP
Name: Wadie

Re: [DEV] RSS Input

Post by wadie » Fri May 28, 2010 9:44 am

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 ?
Need a custom style made ? want me to install a MOD for you ? Contact me here.

User avatar
PoPoutdoor
Registered User
Posts: 217
Joined: Fri Oct 31, 2008 2:58 pm
Contact:

Re: [DEV] RSS Input

Post by PoPoutdoor » Sat May 29, 2010 3:31 am

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.

User avatar
PoPoutdoor
Registered User
Posts: 217
Joined: Fri Oct 31, 2008 2:58 pm
Contact:

Re: [DEV] RSS Input

Post by PoPoutdoor » Sat May 29, 2010 3:46 am

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.

wadie
Registered User
Posts: 558
Joined: Sun May 02, 2010 5:05 am
Location: Your ACP
Name: Wadie

Re: [DEV] RSS Input

Post by wadie » Sun May 30, 2010 11:29 am

ok..ok

btw my host doesn't support cron jobs..is there any alternative way to do the automatic posting ?
Need a custom style made ? want me to install a MOD for you ? Contact me here.

Patti2010
Registered User
Posts: 5
Joined: Sat May 01, 2010 7:24 pm

Re: [DEV] RSS Input

Post by Patti2010 » Thu Jun 03, 2010 7:25 am

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:

User avatar
PoPoutdoor
Registered User
Posts: 217
Joined: Fri Oct 31, 2008 2:58 pm
Contact:

Re: [DEV] RSS Input

Post by PoPoutdoor » Sun Jun 06, 2010 5:42 pm

@wadie , read post#2

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

wadie
Registered User
Posts: 558
Joined: Sun May 02, 2010 5:05 am
Location: Your ACP
Name: Wadie

Re: [DEV] RSS Input

Post by wadie » Mon Jun 07, 2010 9:38 am

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 ??
Need a custom style made ? want me to install a MOD for you ? Contact me here.

User avatar
PoPoutdoor
Registered User
Posts: 217
Joined: Fri Oct 31, 2008 2:58 pm
Contact:

Re: [DEV] RSS Input

Post by PoPoutdoor » Tue Jun 08, 2010 4:04 am

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.

User avatar
Mess
Registered User
Posts: 985
Joined: Wed Jul 01, 2009 6:37 am
Name: Kim

Re: [DEV] RSS Input

Post by Mess » Fri Jun 18, 2010 10:07 am

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?

User avatar
PoPoutdoor
Registered User
Posts: 217
Joined: Fri Oct 31, 2008 2:58 pm
Contact:

Re: [DEV] RSS Input

Post by PoPoutdoor » Mon Jun 21, 2010 7:05 am

@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 ;)

User avatar
Mess
Registered User
Posts: 985
Joined: Wed Jul 01, 2009 6:37 am
Name: Kim

Re: [DEV] RSS Input

Post by Mess » Mon Jun 21, 2010 10:01 am

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]

User avatar
PoPoutdoor
Registered User
Posts: 217
Joined: Fri Oct 31, 2008 2:58 pm
Contact:

Re: [DEV] RSS Input

Post by PoPoutdoor » Tue Jun 22, 2010 7:13 am

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
		}

User avatar
Mess
Registered User
Posts: 985
Joined: Wed Jul 01, 2009 6:37 am
Name: Kim

Re: [DEV] RSS Input

Post by Mess » Tue Jun 22, 2010 9:02 am

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?

User avatar
PoPoutdoor
Registered User
Posts: 217
Joined: Fri Oct 31, 2008 2:58 pm
Contact:

Re: [DEV] RSS Input

Post by PoPoutdoor » Wed Jun 23, 2010 7:00 am

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 :)

User avatar
Mess
Registered User
Posts: 985
Joined: Wed Jul 01, 2009 6:37 am
Name: Kim

Re: [DEV] RSS Input

Post by Mess » Wed Jun 23, 2010 9:51 am

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. :(

Locked

Return to “[3.0.x] MODs in Development”