[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 »

I'm sorry but i'm French and in english.. i dont understand what i have to do. (

I must check the install of lastRSS agregator ?
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 »

Check the installation again and you´ll see, that you´ve added agregator´s edits after apbot ...

Your code looks like that :

Code: Select all

#SOME CODE
AUTOPOST_BOT_EDIT
AGREGATOR_EDIT
#SOME CODE
change the order of edit appearance to

Code: Select all

#SOME CODE
AGREGATOR_EDIT
AUTOPOST_BOT_EDIT
#SOME CODE
;)
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 »

I'd have to be stupid casue i dont' understand... :oops:

lastRSS agregator was running before apbot ... and i've made any modification about latRSS agregator mod.

you say me that my code shoud look likes

Code: Select all

#SOME CODE
AUTOPOST_BOT_EDIT
AGREGATOR_EDIT
#SOME CODE
but where ???

Sorry.... am i so stupid ? :-)
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 »

Nope ... I said, that your code looks like the template I´ve posted ...

Final edit of index.php must looks this way

Code: Select all

// lastrss agregator begin
include ($phpbb_root_path . 'includes/functions_lastrss.'.$phpEx);
// lastrss agregator end    
// lastrss autopost mod begin
include ($phpbb_root_path . 'includes/functions_lastrss_autopost.'.$phpEx);
// lastrss autopost mod end
;)
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 works !!!!

thanks !!

Sorry for the newby i am !
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 »

You are welcome ;) ...
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 »

Smix wrote:Please post there the URL of the feed - I´ll check it ... Also check again the forum_id and permissions of the user which is used as APBot poster ...
Feed URL: http://www.thenintendobasement.com/latestnews/feed/

I'll check what you said, but I logged in to the bot and it could create a new thread in the forum...
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.

i have a question about your mod.

1. i test in a forum http://dim.we11.net/ and work perfect
2. i test in another forum http://www.we11.net/phpBB3/index.php but in that forum Not work the Mod :o

The Server and the Steps to install the mod was the same but in one work and another not work

My COnfig of the Forum was Not work the Mod

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

The Feed:

INSERT INTO `phpbb_lastrss_autopost` (`name`, `url`, `next_check`, `next_check_after`, `destination_id`, `enabled`) VALUES
('Champ.League', 'http://espndeportes-assets.espn.go.com/ ... ection=uef', 0, 1, 22, 1);

The Error Show my in the Forum:

Code: Select all

General Error
SQL ERROR [ mysql4 ]

Column 'topic_first_poster_name' cannot be null [1048]

SQL

INSERT INTO phpbb_topics (topic_poster, topic_time, forum_id, icon_id, topic_approved, topic_title, topic_first_poster_name, topic_first_poster_colour, topic_type, topic_time_limit, topic_attachment) VALUES (7333, 1223501665, '22', 0, 1, 'Champ.League | Advocaat se toma en broma acusación de arregl', NULL, NULL, 0, 0, 0)

BACKTRACE

FILE: includes/db/mysql.php
LINE: 158
CALL: dbal->sql_error()

FILE: includes/functions_posting.php
LINE: 1807
CALL: dbal_mysql->sql_query()

FILE: includes/functions_lastrss_autopost.php
LINE: 186
CALL: submit_post()

FILE: includes/functions_lastrss_autopost.php
LINE: 52
CALL: autopost()

FILE: includes/functions_lastrss_autopost.php
LINE: 232
CALL: autopost_init()

FILE: index.php
LINE: 29
CALL: include('includes/functions_lastrss_autopost.php')
Add Questions:

1. Why in the report of the error appearce SQL ERROR [ mysql4 ] i used [mysql5] like the test boar

In the PhpMyAdmin, when i run , show that info.

Versión del servidor: 5.0.51a
Versión del protocolo: 10
Servidor: servage.net

To confirm MySql 5 in picture.
ImageImage

2. the user of lastrss_ap_bot_id its 7333,
how can change that with PhpMyAdmin :?:

The ID its Ok, but i will try with another User_id to test.


well... Thanks for the support Smix.

2. Any idea to fix that :?:
-
:ugeek:
Bye
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 »

PrattP :
:| ... Hmm ... I´m using this feed for as test feed all the developing time ... And it´s working ... Let me think about it tomorrow ... ;) ...

If anybody has again :arrow: the topics duplicity problem, please try this fix ...?
My mod is dupliciting the topic, because the topic name was always cut to 60 characters ($max_characters) ... But the database column has length 255 ... :| :roll: :idea: :?: :!:

Code: Select all

/**
* Truncates string while retaining special characters if going over the max length
* The default max length is 60 at the moment
* The maximum storage length is there to fit the string within the given length. The string may be further truncated due to html entities.
* For example: string given is 'a "quote"' (length: 9), would be a stored as 'a "quote"' (length: 19)
*
* @param string $string The text to truncate to the given length. String is specialchared.
* @param int $max_length Maximum length of string (multibyte character count as 1 char / Html entity count as 1 char)
* @param int $max_store_length Maximum character length of string (multibyte character count as 1 char / Html entity count as entity chars).
* @param bool $allow_reply Allow Re: in front of string
* @param string $append String to be appended
*/
function truncate_string($string, $max_length = 60, $max_store_length = 255, $allow_reply = true, $append = '')
I´ll do some research about this behavior tomorrow ... :? ... I´d like to use more than 60 chars ... :?

Hello DieagoPino,
sorry, I´ll answer you tommorow ... I´ve got already red and closed eyes ... :|
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 »

Smix wrote: Hello DieagoPino,
sorry, I´ll answer you tommorow ... I´ve got already red and closed eyes ... :|
do not worry, this week, when you have time .... ;)

bye smix , i am going to rest too.

-
:ugeek:
We11World [ Winning Eleven ] , Blog , PinoStudio1 , Archive Forums
User avatar
deanandeva
Registered User
Posts: 138
Joined: Fri May 30, 2008 12:11 pm
Location: Australia
Contact:

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

Post by deanandeva »

Hi Smix,

Hope all is well with you looks like you have been busy. I recently replaced my pc which ran Advanced RSS Mixer, I have reloaded this but now my posts dont include and text just the link to the item ?

Do I need to set something in the feed.

EDIT, fixed my bad !


BTW I will upgrade to 0.1.2 does this fix the duplicate posts ?

Thanks again
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?
Locked

Return to “[3.0.x] Abandoned MODs”