Recent Topics

1 Jun 09, 2008 15:20    

Hello,

(before to start : sorry for my poor english)

I used an very old version of b2evolution with multiple hacks. This version uses a modified evo_users and evo_blogs table with new fields for specific needs in each blog.

I am studying the possibility of moving to b2evolution 2.4.2, replacing all the hacks by plugins, in order to simplify the next upgrade.


I'm working on my own plugin, and I already use the [url=http://doc.b2evolution.net/v-2-4/plugins/Plugin.html#methodGetDefaultUserSettings]Plugin::GetDefaultUserSettings()[/url] method in order to modify the "Users" tabs, and allow users to update the new fields (which will be stored in a separate table if I understood correctly).

My problems : I would like to use a similar method in order to add blog-specific field, for exemple by adding a new tab under the "Blog settings" tab.

I found how to add a tab on the "Tools", but not for "Blog settings".

Is it possible to do that with b2evo 2.4.2 plugins system ?
Otherwise it will be possible in a future version ?

Thank you

2 Jun 09, 2008 16:08

hi adiGuba,

It looks like you are doing OK. The UserSettings are stored in the database and the plugin system is such that you do not need to bother how and where. Actually the UserSettings for the plugin are stored in the Plugins table and the basic B2evo UserSettings are stored in the User table. But as said you just use the plugin hook and don't bother with the details.

Until recently it was not possible to add a tab. Luckily Yabba found a way and has a test setup with custom tabs. He will answer this post shortly and will provide you with details.

Keep up the good work

Have fun

3 Jun 09, 2008 16:27

Thank you for your help Afwas !

I will waiting for Luckily Yabba's response ;)

bye

5 Jun 09, 2008 16:58

I will looking for that !
Thank you ;)

bye

6 Jun 09, 2008 16:59

Actually what we need is a hook for blogs much like the hookage for users. GetDefaultSettings -> GetUserSettings -> GetBlogSettings. Then when a plugin builds with GetBlogSettings those options show up on the appropriate blogs subtab, or perhaps on a new blogs subtab called "plugin settings". I will look more into this after I sleep and get up and work a couple more times and post in the thread for new hooks request unless someone beats me to it.

7 Jun 09, 2008 19:26

Blog settings for plugins would be very cool B)

Unfortunately the only way I've found to do that ( so far ) is by suffixing ( or prefixing ... I just prefer Suffolk cos it's in a sunny part of england ) with the blog ID ... ie/ $this->Settings->set||get( 'my_unique_setting_for_blog_##' ) ... pretty ugly though :(

If it helps I can link you to another plugin that also does bugger all ( atm ), but it does add a subtab to the blogs tab .... or it did in one of it's incarnations .. *fairly* sure it still does .... if not, then the post that Afwas linked you to is the incarnation before the incarnation that did, or doesn't .... all these sketch pad plugins get blurred into one ;)

Alternatively, you can hit my blog and download the profiles plugin, which actually does something ... but on the profiles tab, but it should give you an idea how to beat the core into a miserable pulp ;)

¥

8 Jan 10, 2009 02:45

There are some news on it? I need this too ;)

9 Jan 10, 2009 19:19

Walter wrote:

There are some news on it? I need this too ;)

I look forward to your code in cvs :D

¥


Form is loading...