Recent Topics

1 Sep 04, 2008 22:55    

My b2evolution Version: 1.10.x

Where do I find the output parameters for this?

What is happening is: what I type into the RSS/Atom footer field in the backoffice >advanced is being truncated.

So I have concluded that there is a set limit somewhere upon output, as there are none on input.

I am trying to find this so that I can amend it to accept what I want to type in (and perhaps explore other options for fontsize etc while there).

I figure that the above variable is the one to do this :?:

TIA

2 Sep 04, 2008 23:16

/inc/collections/views/_coll_advanced.form.php line 147:

	$Form->textarea( 'xml_item_footer_text', $edited_Blog->get_setting( 'xml_item_footer_text' ), 2, T_('Post footer in RSS/Atom'),
		T_('This will be appended to each post in your RSS/Atom feeds.'), 50, 'large' );


I think the '50' in this line is the limit.

Good luck

3 Sep 04, 2008 23:31

Thanks Afwas, will have a look around that file :)

I think the count is more like 240- 245 characters?

4 Sep 04, 2008 23:54

Yeah you're probably right:

function textarea( $field_name, $field_value, $field_rows, $field_label,
												$field_note = '', $field_cols = 50 , $field_class = '' )


This is only displaying the textarea and has nothing to do with the variable from the input.

Keep searching ...

5 Sep 05, 2008 02:41

What I don't get is that I thought the output would need to feature in the xml files

For example in the _rss2>index.main.php

but the only thing I can see is the item_footer which is the part that appears at the end of each post in the blog (not specifically in the rss, as I understand it).

So I am still looking ;)

6 Sep 05, 2008 03:47

I was getting nowhere but this may be a clue.
The xml_footer is a variable from Collection. See /inc/collections/model/_colsettings.class.php line 43:

	 * The default settings to use, when a setting is not defined in the database.


== starts some array ==
line 100:

'xml_item_footer_text' => '<p><small><a href="$item_perm_url$">Original post</a> blogged on <a href="http://b2evolution.net/">b2evolution</a>.</small></p>',


So that's the default setting, but we knew that already.

In the blog you can change the setting and now what?
I can't find that part, but it's stored in the database in evo_coll_settings. Here is a clue. The datafield cset_value holds the cset_name 'xml_item_footer_text' and the value as seen above (default, I didn't change anything.)

Well, the datafield cset_value is varchar(255) and there is your limitation.

So this might help a little, I haven't found where and when the data is stored in the database and if it is checked and/or truncated before submitting. At least it's a clue.

Good luck

7 Sep 05, 2008 04:02

Thanks for plugging away at it - keeps me from tossing my hands up in the air in frustration.

I can see in the database , the varchar that you are talking about (for each blog) but can't change it from there. (Not sure if that is an obvious statement?!)

Think I will go on a hunt for the cset_value in the b2evo files - does that sound sensible?

8 Sep 05, 2008 04:12

Ok, is this it?

/inc/collections/views/_coll_advanced.form.php has the following code at line 89

$Form->begin_fieldset( T_('Aggregation').' ['.T_('Admin').']' );

		$Form->text( 'aggregate_coll_IDs', $edited_Blog->get_setting( 'aggregate_coll_IDs' ), 30, T_('Blogs to aggregate'), T_('List blog IDs separated by ,'), 255 );

	$Form->end_fieldset();

If I simply change the 255 to say 300, do you think that will do the trick?

But still not sure where the css that relates to the fontsize and other variables that perhaps I can still 'play' with

9 Sep 05, 2008 04:21

Should have kept my trap shut until I understood that part - not the solution!

10 Sep 05, 2008 04:30

No that's never going to be the solution. That is displaying the form with some standard form sizes.
What you need to do is change the varchar(255) value in for cset_value the database to more than 255. Then you can change the value in the database to whatever you want.

However the footer must be stored in the database at some point. If we can find and edit it you wouldn't need to change the database value. But no matter what you'll need to set the table structure for cset_value varchar(255) by hand. And there are slim changes that if you do you can edit the footer in the admin and it would accept it.

Good luck

11 Sep 05, 2008 04:47

OK, what I have done and time will tell.....is.....

I backed up the evo_coll_settings in the db

Then edited the varchar by changing it to tinytext and took out all character limits.

[Yes I had help knowing what to do there!]

Apparently this should either have broken the entire blog or fixed the problem - will let you know after the next post goes out whether it has been 'fixed'.

12 Sep 05, 2008 04:58

Shouldn't you be catching 40 winks Afwas? (judging by your time zone)

13 Sep 05, 2008 05:15

Yes, I'm starting to make larger and larger mistakes.

Changing the database fixes the problem. You should be using TEXT instead of TINYTEXT since TINYTEXT holds a maximum of 255 characters as does VARCHAR().
However after you cange the type of the field all values are set to zero which probably means they are defaulted. So you might be looking at some other things stored there that won't work as expected. If you see something broken you can change your blogsettings and the correct values should be stored.

Good luck

*edit*
Wrong information grayed out.

14 Sep 05, 2008 05:21

Sorry, changing to TEXT has no effect on the value stored.
I can confirm it works as hoped without any sign of a warning by B2evolution.

15 Sep 05, 2008 06:29

Ok, back to square one - sigh :-/

16 Sep 05, 2008 06:53

It's a success, What I'm meaning is if you change the structure of the table cset_value from VARCHAR(255) to TEXT everything works the way you want. No issues on my blog whatsoever.
I just meant that changing to TINYTEXT instead of VARCHAR(255) won't help since TINYTEXT holds a max of 255 characters as well.

Good luck

17 Sep 05, 2008 07:25

Ok, well then I have other problems!!!

I had the cset_value set to TEXT and no limit on characters, posted and, um....it was cut off.

18 Sep 12, 2008 04:21

Late last night, dh, who had previously directed me to a certain file in the database to adjust the attributes for the rss footer, realised that it was the wrong/old database for b2evo! :roll:

Needless to say that database has now been deleted, changes made to the 'real' database and "Bob's your uncle!" (ie everything works). I even saw how I could use the <small> tag to reduce the size of the xml_feed_footer_text, while I was at it.

Thanks Afwas for your help!

19 Sep 12, 2008 05:39

B)
Glad you've got this working. I was a nice question.

Have fun


Form is loading...