[ABD] lastRSS autoposting bot MOD (0.1.4)

Any abandoned MODs will be moved to this forum.

WARNING: MODs in this forum are not currently being supported or maintained by the original MOD author. Proceed at your own risk.
Forum rules
IMPORTANT: MOD Development Forum rules

WARNING: MODs in this forum are not currently being supported nor updated by the original MOD author. Proceed at your own risk.
Locked
Auden
Registered User
Posts: 34
Joined: Tue Mar 04, 2008 8:13 pm

Re: [DEV] lastRSS autoposting bot MOD (0.1.2)

Post by Auden »

It can be useful....
How to limit title to 100 characteres.. no only 60.

open styles/your_theme/template/posting_editor.html

find:

Code: Select all

<!-- IF S_NEW_MESSAGE -->60<!-- ELSE -->64<!-- ENDIF -->
remplacer par:

Code: Select all

<!-- IF S_NEW_MESSAGE -->96<!-- ELSE -->100<!-- ENDIF -->

open includes/functions_posting.php
Find:

Code: Select all

$subject = truncate_string($subject);
Remplace:

Code: Select all

$subject = truncate_string($subject, 100);

It works on my board.
Last edited by Auden on Thu Oct 09, 2008 7:13 pm, edited 1 time in total.
User avatar
reddevilmeuk
Registered User
Posts: 89
Joined: Mon Aug 20, 2007 1:03 pm

Re: [DEV] lastRSS autoposting bot MOD (0.1.2)

Post by reddevilmeuk »

hi,

yet another question for you..... you mention it checks and updates when people use the index.php... can this be changed to say a portal page instead?

ReD
User avatar
Smix
Registered User
Posts: 482
Joined: Mon Sep 11, 2006 1:07 am

Re: [DEV] lastRSS autoposting bot MOD (0.1.2)

Post by Smix »

Good "morning" :lol:,

after few hours of sleep, I´m back and just looking on the Auden´s code ... And ... I´m a little bit surprised ;) ...
It really works, but I´m still not sure, why is it working ... Btw. we don´t have to limit the maxlength in template, but only in code ... I´ve just tested it and it´s working in idea, that I didn´t hoped :) ... But it´s necessary to test it live ...

Well, who want´s to test it ... Do this ...
OPEN includes/functions_lastrss_autopost.php
FIND

Code: Select all

    // prepare data for posting
    $subject    = $post_data['name'] . ' | ' . $post_data['items'][$i]['title'];
    // cut the subject to fit the db
    $subject = $db->sql_escape(substr($subject,0,100));
    generate_text_for_storage($subject, $uid, $bitfield, $options, false, false, false);
replace with

Code: Select all

  	// prepare data for posting
  	$subject	= truncate_string($post_data['name'] . ' | ' . $post_data['items'][$i]['title'], 255);
    generate_text_for_storage($subject, $uid, $bitfield, $options, false, false, false);
OPEN includes/functions_posting.php
FIND

Code: Select all

	// First of all make sure the subject and topic title are having the correct length.
	// To achieve this without cutting off between special chars we convert to an array and then count the elements.
	$subject = truncate_string($subject);
REPLACE-WITH

Code: Select all

	// First of all make sure the subject and topic title are having the correct length.
	// To achieve this without cutting off between special chars we convert to an array and then count the elements.
	$subject = truncate_string($subject, 255); // $subject = truncate_string($subject);
  
But I´m not sure, how it works in normal running board. This function is used always when posting any message, so ... It must be checked live ... Please report, how it works and if there are no problems with board itself (posting, pm ...) and if it´s not causing any errors ...
No edits for the template is necessary - bot is posting it without templates :lol: ... But I also tested the change in template (overriding maxlength), but it doesn´t influenced the length of the topic (still 60), possibly it´s truncated differently (posting.php), but I didn´t checked it ...

Thanks Auden ;)

@PrattP :
Are you sure, that the bot doesn´t post the topics, but they are awaiting approval ??? It can be connected to permissions ... Also, once more check, with this package (copy the file into board root and than browse it), availibility of fopen/curl functions ...
Maybe your problem is also caused with the problem described by Auden ... Check the proposed edit please too ...


@reddevilmeuk
Hello,
Yes, if you´ll add this to your portal page - to similar part of the portal.php ...


@deanandeva
Well, upgrade to 0.1.2 and check the behavior of the text in the message. It may fix it ... Duplicity of the topics is probably fixed with the fix I´ve posted in this message (few rows higher) ... ;)


@DiegoPino :
... w8 a few hours more ... I´ve got to go now and your problems are bigger ... :roll: :| :cry:
User avatar
reddevilmeuk
Registered User
Posts: 89
Joined: Mon Aug 20, 2007 1:03 pm

Re: [DEV] lastRSS autoposting bot MOD (0.1.2)

Post by reddevilmeuk »

is there any way to manipulate how the text comes across? for example a feed from ign doesnt come across with line breaks and appends a disclaimer? any way of changing these?
User avatar
reddevilmeuk
Registered User
Posts: 89
Joined: Mon Aug 20, 2007 1:03 pm

Re: [DEV] lastRSS autoposting bot MOD (0.1.2)

Post by reddevilmeuk »

am receiving the error after running on my live site

Fatal error: Cannot redeclare generate_smilies() (previously declared in
xxxxxxxx/includes/functions_posting.php:22) in xxxxxxxxx/includes/functions_posting.php on line 145

any thoughts?
User avatar
PrattP
Registered User
Posts: 147
Joined: Sun Oct 21, 2007 6:26 am
Contact:

Re: [DEV] lastRSS autoposting bot MOD (0.1.2)

Post by PrattP »

FOPEN exists and works!
CURL exists and works!

Messages I got after running what you said.

I will try the edits and post results.
blitztrading
Registered User
Posts: 39
Joined: Mon Sep 01, 2008 6:58 pm
Contact:

Another issue with special character

Post by blitztrading »

Hi Smix,

Perhaps this is not new for you, but special character such as quotes (") are not supported in topic title, generating a error message when trying to import them into the topic table.

Thx again for all your effort in this (great) mod.
User avatar
Smix
Registered User
Posts: 482
Joined: Mon Sep 11, 2006 1:07 am

Re: [DEV] lastRSS autoposting bot MOD (0.1.2)

Post by Smix »

Hello again,
reddevilmeuk wrote:is there any way to manipulate how the text comes across? for example a feed from ign doesnt come across with line breaks and appends a disclaimer? any way of changing these?
... Please post the URL of the feed - I´ll test it ...
reddevilmeuk wrote:am receiving the error after running on my live site

Fatal error: Cannot redeclare generate_smilies() (previously declared in
xxxxxxxx/includes/functions_posting.php:22) in xxxxxxxxx/includes/functions_posting.php on line 145
any thoughts?
I think there is no edits in functions_posting.php for my mod ... :? ... They were removed ...

@Blitztrading :
Once again, please post the URL of the feeds, which are causing those problems ... Thanks for report ...

@DiegoPino (finally)
I´m sorry, I was bit more busy, than I thought.
About [ mysql4 ] / [ mysql5 ] - check out, if your config.php is similar ... I think it´s about what you´ve chosen in first steps of installation ... I really don´t have any idea why it´s not working ... Check as other users - permissions (forum/user based), all edits, and finally post the URL of the feed which is not working ...

Code: Select all

Column 'topic_first_poster_name' cannot be null [1048]
Thanks for report ... At this time, I really don´t have idea, where is the problem ... :roll: :oops:
2.the user of lastrss_ap_bot_id its 7333,
how can change that with PhpMyAdmin :?:
You can do this :arrow: via phpMyAdmin in phpbb_config table ...

@PrattP
:roll: I´ve got no idea at this time ... :oops:

Has anybody tryed the proposed edits few posts ago?

Thanks to everybody!
blitztrading
Registered User
Posts: 39
Joined: Mon Sep 01, 2008 6:58 pm
Contact:

Re: [DEV] lastRSS autoposting bot MOD (0.1.2)

Post by blitztrading »

Here is the feed with the issue with quotes: http://www.trendis-yourfriend.com/feeds/posts/default
User avatar
DiegoPino
Registered User
Posts: 135
Joined: Thu Oct 27, 2005 1:30 am
Location: Colombia
Contact:

Re: [DEV] lastRSS autoposting bot MOD (0.1.2)

Post by DiegoPino »

Hi Smix.

To report i install a new update of my site, now work perfect, like the fist test i was do it.

i think the error of the las board was in the moment to put the config in the sql. because i change the lastrss_ap_bot_id', '2' to lastrss_ap_bot_id', '7333

INSERT INTO `phpbb_config` (`config_name`, `config_value`, `is_dynamic`) VALUES
('lastrss_type', 'curl', 0),
('lastrss_ap_version', '0.1.2', 0),
('lastrss_ap_enabled', '1', 0),
('lastrss_ap_items_limit', '5', 0),
('lastrss_ap_bot_id', '7333', 0);

I thought that was the Problem....

Now, in that Board update, i put the original confing and work perfect

Code: Select all

INSERT INTO `phpbb_config` (`config_name`, `config_value`, `is_dynamic`) VALUES
('lastrss_type', 'curl', 0),
('lastrss_ap_version', '0.1.2', 0),
('lastrss_ap_enabled', '1', 0),
('lastrss_ap_items_limit', '5', 0),
('lastrss_ap_bot_id', '2', 0);
Well.... its the only one i think generate that error.... :oops: :oops: :oops:

work now- http://www.we11.net/phpBB3/bb3portal.php

-
:ugeek:


Thanks Again!!!
;)
We11World [ Winning Eleven ] , Blog , PinoStudio1 , Archive Forums
User avatar
Smix
Registered User
Posts: 482
Joined: Mon Sep 11, 2006 1:07 am

Re: [DEV] lastRSS autoposting bot MOD (0.1.2)

Post by Smix »

Hello again,

@DiegoPino :
Thanks god it works :lol:

@blitztrading :
Your feed is not a RSS feed but ATOM ... it cannot be parsed with lastRSS ...
User avatar
Smix
Registered User
Posts: 482
Joined: Mon Sep 11, 2006 1:07 am

Re: [DEV] lastRSS autoposting bot MOD (0.1.3)

Post by Smix »

ANNOUNCEMENT:

Probably last version from row 0.1.x of lastRSS autoposting bot - version 0.1.3 has been released!

Changes :
  • Fixes topic duplicity in simplest way
  • missing language string added
  • Code simplified
Image

Download :arrow: Image ... Bugtracker :arrow: http://phpbb3.smika.net
porkchop87
Registered User
Posts: 16
Joined: Thu Jul 31, 2008 3:42 pm
Location: Canada
Contact:

Re: [DEV] lastRSS autoposting bot MOD (0.1.3)

Post by porkchop87 »

Installation instructions have a typo.

In the common.php file it asks me to find

Code: Select all

'LOG_ERROR_LASTRSS' => '<strong>lastRSS error</strong><br />» %s',
and replace it with the same line

Code: Select all

'LOG_ERROR_LASTRSS' => '<strong>lastRSS error</strong><br />» %s',
The line doesn't exist. Probably a typo.


Thanks for the release. I hope it works better, it's a very useful mod.

P.S. for newbies trying to install the mod, I would suggest inserting the line after this one:

Code: Select all

'LOG_ERROR_EMAIL'		=> '<strong>E-mail error</strong><br />» %s',
Unless/until Smix suggests otherwise.
User avatar
Smix
Registered User
Posts: 482
Joined: Mon Sep 11, 2006 1:07 am

Re: [DEV] lastRSS autoposting bot MOD (0.1.3)

Post by Smix »

THANK YOU! ... I also forget to add this edit into updating instructions :oops: ...

Repacked ...
blitztrading
Registered User
Posts: 39
Joined: Mon Sep 01, 2008 6:58 pm
Contact:

Re: [DEV] lastRSS autoposting bot MOD (0.1.3)

Post by blitztrading »

great! and thx a lot ...
Locked

Return to “[3.0.x] Abandoned MODs”