1 ion_rey Jul 26, 2009 19:09
3 ion_rey Jul 27, 2009 10:29
Thank you for you quicly reply!!!
But I opened the file you say and can´t find any. But, sorry if I am wrong, but the file you told me is related to plugins, isn´t?
And my request is about to reorganize the "write or edit a post" form. For instance, something like getting the "link to url" field in a different place, or, for instance, like how to hide the "issue date" field, or more complicate, like how to attach a new field. Just to reorganize the form that appear in the image attached in my first message.
4 yabba Jul 27, 2009 10:56
In that file, from line 51 onwards, is a list of all hooks that plugins can use:
/**
* Get the list of all events/hooks supported by the plugin framework.
*
* Also puts in additional events provided by plugins.
* fp> please provide an example/use case
*
* Additional to the returned event methods (which can be disabled), there are internal
* ones which just get called on the plugin (and get not remembered in T_pluginevents), e.g.:
* - AfterInstall
* - BeforeEnable
* - BeforeDisable
* - BeforeInstall
* - BeforeUninstall
* - BeforeUninstallPayload
* - DisplaySkin (called on a skin from {@link GetProvidedSkins()})
* - ExecCronJob
* - GetDefaultSettings
* - GetDefaultUserSettings
* - GetExtraEvents
* - GetHtsrvMethods
* - PluginInit
* - PluginSettingsUpdateAction (Called as action before updating the plugin's settings)
* - PluginSettingsEditAction (Called as action before editing the plugin's settings)
* - PluginSettingsEditDisplayAfter (Called after standard plugin settings are displayed for editing)
* - PluginSettingsValidateSet (Called before setting a plugin's setting in the backoffice)
* - PluginUserSettingsUpdateAction (Called as action before updating the plugin's user settings)
* - PluginUserSettingsEditDisplayAfter (Called after displaying normal user settings)
* - PluginUserSettingsValidateSet (Called before setting a plugin's user setting in the backoffice)
* - PluginVersionChanged (Called when we detect a version change)
*
* The max length of event names is 40 chars (T_pluginevents.pevt_event).
*
* @internal When adding a new event, please make sure to add a description as well.
* Please also add a new well-documented method to the "Plugin" class.
*
* @return array Name of event (key) => description (value)
*/
function get_supported_events()
{
static $supported_events;
if( empty( $supported_events ) )
{
$supported_events = array(
'AdminAfterPageFooter' => 'This gets called after the backoffice HTML footer has been displayed.',
'AdminDisplayEditorButton' => 'Display action buttons on the edit screen(s)',
'AdminDisplayToolbar' => 'Display a toolbar on the edit screen(s)',
'AdminDisplayCommentFormFieldset' => 'Display form fieldsets on the backoffice comment editing form',
'AdminDisplayItemFormFieldset' => 'Display form fieldsets on the backoffice item editing screen(s)',
'AdminEndHtmlHead' => 'This gets called at the end of the HTML HEAD section in backoffice skins',
'AdminAfterEvobarInit' => 'This gets called after the Evobar menu has been initialized.',
'AdminAfterMenuInit' => 'This gets called after the backoffice menu has been initialized.',
'AdminTabAction' => 'This gets called before AdminTabPayload when the Tools tab for the plugin is selected; no output allowed!',
'AdminTabPayload' => 'This gets called when the Tools tab for the plugin is selected and content should be displayed.',
'AdminToolAction' => '', // Tblue> Not used yet/anymore?
'AdminToolPayload' => 'This gets called when the plugin\'s block in the Tools menu should be displayed.',
'AdminBeforeItemEditCreate' => 'This gets called before a new item gets created from the backoffice.',
'AdminBeforeItemEditUpdate' => 'This gets called before an existing item gets updated from the backoffice.',
'AdminBeforeItemEditDelete' => 'This gets called before an existing item gets deleted from the backoffice.',
'AdminBeginPayload' => 'This gets called before the main payload in the backoffice is displayed.',
'CacheObjects' => 'Cache data objects.',
'CachePageContent' => 'Cache page content.',
'CacheIsCollectingContent' => 'Gets asked for if we are generating cached content.',
'AfterCommentDelete' => 'Gets called after a comment has been deleted from the database.',
'AfterCommentInsert' => 'Gets called after a comment has been inserted into the database.',
'AfterCommentUpdate' => 'Gets called after a comment has been updated in the database.',
'AfterItemDelete' => 'This gets called after an item has been deleted from the database.',
'PrependItemInsertTransact' => 'This gets called before an item is inserted into the database.',
'AfterItemInsert' => 'This gets called after an item has been inserted into the database.',
'PrependItemUpdateTransact' => 'This gets called before an item gets updated in the database..',
'AfterItemUpdate' => 'This gets called after an item has been updated in the database.',
'AppendItemPreviewTransact' => 'This gets called when instantiating an item for preview.',
'FilterItemContents' => 'Filters the content of a post/item right after input.',
'UnfilterItemContents' => 'Unfilters the content of a post/item right before editing.',
// fp> rename to "PreRender"
'RenderItemAsHtml' => 'Renders content when generated as HTML.',
'RenderItemAsXml' => 'Renders content when generated as XML.',
'RenderItemAsText' => 'Renders content when generated as plain text.',
// fp> rename to "DispRender"
// dh> TODO: those do not get called anymore!
'DisplayItemAsHtml' => 'Called on an item when it gets displayed as HTML.',
'DisplayItemAsXml' => 'Called on an item when it gets displayed as XML.',
'DisplayItemAsText' => 'Called on an item when it gets displayed as text.',
// fp> These is actually RENDERing, right?
// TODO: Rename to "DispRender"
'FilterCommentAuthor' => 'Filters the comment author.',
'FilterCommentAuthorUrl' => 'Filters the URL of the comment author.',
'FilterCommentContent' => 'Filters the content of a comment.',
'AfterUserDelete' => 'This gets called after an user has been deleted from the database.',
'AfterUserInsert' => 'This gets called after an user has been inserted into the database.',
'AfterUserUpdate' => 'This gets called after an user has been updated in the database.',
// fp> This is actually RENDERing, right?
// TODO: Rename to "DispRender"
'FilterIpAddress' => 'Called when displaying an IP address.',
'ItemApplyAsRenderer' => 'Asks the plugin if it wants to apply as a renderer for an item.',
'ItemCanComment' => 'Asks the plugin if an item can receive comments/feedback.',
'ItemSendPing' => 'Send a ping to a service about new items.',
'ItemViewsIncreased' => 'Called when the view counter of an item got increased.',
'SkinTag' => 'This method gets invoked when a plugin is called by its code. Providing this method causes the plugin to be listed as a widget.',
'AppendHitLog' => 'Called when a hit gets logged, but before it gets recorded.',
'DisplayCommentToolbar' => 'Display a toolbar on the public feedback form',
'DisplayCommentFormButton' => 'Called in the submit button section of the frontend comment form.',
'DisplayCommentFormFieldset' => 'Called at the end of the frontend comment form.',
'DisplayMessageFormButton' => 'Called in the submit button section of the frontend message form.',
'DisplayMessageFormFieldset' => 'Called at the end of the frontend message form.',
'DisplayLoginFormFieldset' => 'Called when displaying the "Login" form.',
'DisplayRegisterFormFieldset' => 'Called when displaying the "Register" form.',
'DisplayValidateAccountFormFieldset' => 'Called when displaying the "Validate account" form.',
'CommentFormSent' => 'Called when a public comment form has been sent and gets received.',
'BeforeCommentFormInsert' => 'Called before a comment gets recorded through the public comment form.',
'AfterCommentFormInsert' => 'Called after a comment has been added through public form.',
'BeforeTrackbackInsert' => 'Gets called before a trackback gets recorded.',
'AfterTrackbackInsert' => 'Gets called after a trackback has been recorded.',
'LoginAttempt' => 'Called when a user tries to login.',
'LoginAttemptNeedsRawPassword' => 'A plugin has to return true here, if it needs a raw (un-hashed) password in LoginAttempt.',
'AlternateAuthentication' => 'Called at the end of the login process, if the user did not try to login, the session has no user attached or only the username and no password is given (see Plugin::AlternateAuthentication() for more info).',
'MessageFormSent' => 'Called when the "Message to user" form has been submitted.',
'MessageFormSentCleanup' => 'Called after a email message has been sent through public form.',
'Logout' => 'Called when a user logs out.',
'GetSpamKarmaForComment' => 'Asks plugin for the spam karma of a comment/trackback.',
// Other Plugins can use this:
'CaptchaValidated' => 'Validate the test from CaptchaPayload to detect humans.',
'CaptchaValidatedCleanup' => 'Cleanup data used for CaptchaValidated.',
'CaptchaPayload' => 'Provide a turing test to detect humans.',
'RegisterFormSent' => 'Called when the "Register" form has been submitted.',
'ValidateAccountFormSent' => 'Called when the "Validate account" form has been submitted.',
'AppendUserRegistrTransact' => 'Gets appended to the transaction that creates a new user on registration.',
'AfterUserRegistration' => 'Gets called after a new user has registered.',
'SessionLoaded' => 'Gets called after $Session is initialized, quite early.',
'BeforeSessionsDelete' => 'Gets called when sessions are being pruned to enable plugin house cleaning, plugin might change the sess_lastseen timestamp of any sessions they want to keep',
'AfterLoginAnonymousUser' => 'Gets called at the end of the login procedure for anonymous visitors.',
'AfterLoginRegisteredUser' => 'Gets called at the end of the login procedure for registered users.',
'BeforeBlogDisplay' => 'Gets called before a (part of the blog) gets displayed.',
'SkinBeginHtmlHead' => 'Gets called at the top of the HTML HEAD section in a skin.',
'SkinEndHtmlBody' => 'Gets called at the end of the skin\'s HTML BODY section.',
'DisplayTrackbackAddr' => 'Called to display the trackback URL for an item.',
'GetCronJobs' => 'Gets a list of implemented cron jobs.',
'GetProvidedSkins' => 'Get a list of "skins" handled by the plugin.',
'PluginUserSettingsEditAction' => 'Called as action before editing a user\'s settings.',
// allow plugins to handle $disp modes
// 3.3? fp> WARNING: EXPERIMENTAL. API MAY CHANGE. MAY NOT GO INTO 3.3
'GetDispModes' => 'Called when building possible $disp list',
'HandleDispMode' => 'Called when displaying $disp',
);
Rearranging the write screen is fairly easy if you know jQuery and there's no need to hack any of the core files.
One thing to watch is pressing "publish now" from the post list screen will fire the AfterItemUpdate hook ( and a couple of others ), but won't have any custom fields that you add ;)
¥
5 ion_rey Jul 28, 2009 10:45
When I wrote my first message, I expected that the reply was something like: "You have a file called... and inside you will find HTML (tables, tr,th) and PHP ( some $ that get the fields from the DB)
But, as I can see, things are no so simple. And I am not ready yet for that stuff.
So, I will try to focus on rearranging the write screen through JQuery. I must confess I know javascript a little and I found browsing in Internet that JQuery is a library of js.
So, which file of jquery I should start with?
6 yabba Jul 28, 2009 12:28
This really is easier to do from a plugin ;)
If you give some more details about exactly what you're trying to achieve then I can tell you which hooks are best to use ;)
I'll move this to plugin development forum.
¥
7 ion_rey Jul 28, 2009 12:55
Ok, I´ll try to explain what I´m trying to do.
The site is about books, books that my students read and comment (give some data: title, writer, how many pages, rating)
They should write the post about books. And...
I like to personalize the write panel in order to make them easier to do their work...
So I need to hide some fields: "link to url", "type", "Issue date", "issue time", URL "filename","Assigned to" and "Deadline"
And I need to move "tags", "Excerpt","Priority" and "Task status" fields above, over the post text field and under "post title" field.
8 sam2kb Jul 28, 2009 17:28
You can do it from inc/items/views/_item_expert.form.php and _item_simple.form.php
Remember if you delete any input field you have to add a hidden input with the same name and value.
$Form->hidden( 'name', 'value' );
To hide "Link to url" set $use_post_url = 0; in conf/admin.php
To delete some toolbars go to Global settings > Plugins and disable Smiles, Video plugin, Quick tags
If you want to add post template add the following
if( $creating )
{
$item_content = 'Put default text or post template here';
}
// ---------------------------- TEXTAREA -------------------------------------
I'd recommend you to upgrade to b2evo 3 before you start customizing files, cos you'll loose your customizations after upgrade.
9 yabba Jul 28, 2009 20:26
sam2kb wrote:
cos you'll loose your customizations after upgrade.
That's exactly why it should be a plugin ;)
Ion Rey : If you can wait a tad I'll throw something together that should do at least some of what you want froma plugin ... with a tad of luck you'll be able to expand it ;)
¥
10 sam2kb Jul 28, 2009 21:33
That's exactly why it should be a plugin
But how is he gonna hide the inputs and move "tags", "Excerpt","Priority" and "Task status" fields above from plugin?[/quote]
11 yabba Jul 28, 2009 23:54
You've seen BOPIT admin? ... might like to download admintab plugin as well ... ohh, and custom profiles .... you can do all sorts from plugins with a tad of imagination ;)
¥
12 sam2kb Jul 28, 2009 23:59
with a tad of imagination
and output buffering + preg_replace, I guess :-/
This is not an easy way for beginners.
13 yabba Jul 29, 2009 00:03
sam2kb wrote:
This is not an easy way for beginners.
Ion Rey wrote:
My b2evolution Version: 2.x
Hi everybody!
I have been working with b2evolution for the last two years. And this the time to try to change some things by my own. I love programming but really not time to get into.
Hacking the files is waaay easier
¥
14 sam2kb Jul 29, 2009 00:08
I love programming
That makes sense :)
15 ion_rey Jul 29, 2009 01:37
Thank You ¥åßßå and sam2kb.
¥åßßå: Of course I can wait a tad. By the way, I found your am_tidyadmin_plugin and I love it.
sam2kb: Yes, I love programming and of course, in the meantime, I´ll try to change the files you tell me.
Thank you so much!!
16 yabba Jul 29, 2009 21:15
I'll try and find the time to throw the start of a plugin together and talk you through it ... be interesting to see how it ends up ;)
You should see how lean you can get admin when you try ;)
¥
17 ion_rey Jul 30, 2009 11:05
All right! I´ll be looking forward to trying the plugin.
Thank you for your work.
18 edb Jul 30, 2009 14:35
http://wonderwinds.com/hackblog.php/2008/05/11/seven-hacks-for-v242#hack5 shows you how to add some hooks to the back office as well. Then you can edit a plugin that makes a toolbar to move the toolbar.
MUCH easier than trying to change everything via a plugin :)
I find the default location of the few hooks back there to be way too limiting. So I added 2 more hooks for toolbars. Then since there is only one hook for fields a plugin will add and it is beneath all the junk that shows up under your post I figured I'd add two more of those and position them where I found them to be the most valuable.
As to upgrading, currently 3.everything is chock full of bugs and spam and spyware. Based on past performance it is WAY behind every other generation in terms of each step being a bit better than the last. At this rate I don't see an upgrade happening until someone who isn't blinded by the idea of turning a profit gets in the drivers seat.
19 yabba Jul 30, 2009 18:38
So, it looks like I need to throw a plugin together earlier than I scheduled, just to stop these wannabee plugin coders from convincing you to hack the core ;)
Although hacking the core is cool ;)
¥
20 yabba Jul 31, 2009 11:43
Ok, I've created a skeleton plugin in launchpad ( @link [url=https://code.launchpad.net/~yabs/+junk/amdemo-plugin]bzr branch lp:~yabs/+junk/amdemo-plugin[/url] ), and when I say "skeleton" I really mean it. It currently does bugger all but I'll start padding it out and adding notes so you can follow what it does .... and hopefully "why" :D
If I get really energetic I may even turn this into a blog post ;)
¥
21 ion_rey Jul 31, 2009 13:46
I got into the "am_demo.plugin.php" file and thanks to your notes I can follow quite easy the bones of your skeleton, and see you are using some events (hooks=events ??) of the write panel.
So I have to start learning how to use events in php functions and, maybe, where are these events come from.
Briefly, I have no idea "why" :)
Anyway, I´ll follow you whole-heartedly
22 yabba Jul 31, 2009 14:00
Hooks == Events == Triggers
Basically they're plugin functions ( events ) that are called ( triggered ) at certain times in the core files to allow plugins to strut there stuff ( by hooking into the event )
Example : event - function AdminDisplayToolbar( $arg1 ) is triggered in /inc/items/views/_item_expert.form.php ( and _item_simple.form.php with slightly different parameters ) with the following code :
// --------------------------- TOOLBARS ------------------------------------
echo '<div class="edit_toolbars">';
// CALL PLUGINS NOW:
$Plugins->trigger_event( 'AdminDisplayToolbar', array( 'target_type' => 'Item', 'edit_layout' => 'expert' ) );
echo '</div>';
Hopefully as the code expands things will become a smidge clearer ;)
¥
23 yabba Jul 31, 2009 18:40
Ok, I've committed a couple more changes, but now I need to know how you want to store your new information .... urm, I'd need to scroll up to find out what they were, lets pretend its "foo"
choices :
1) have your own plugin database table ... and all the hassle of maintaining it
2) embed the answers in $Item->content() ( ie/ <!--foo the_value -->, these can be removed by another hook so they don't show in a posts html ;)
¥
24 ion_rey Jul 31, 2009 21:53
I understand (I´m not an english native) that the first choice (having my own plugin database table) means that the new information (new fields) will be stored in the database table, and so, I will have to deal with extracting fields from it, and assigning to a variable and showing where ever.
In that case, I prefer this first choice, guessing that is more powerful.
25 yabba Aug 01, 2009 09:53
Each way has it's own (dis)advantages although there's nothing to stop you using both ;)
1) Using a database table
advantages :
a) more control over where the information is displayed, and to who.
b) easier to correlate your data without bleed over from post contents
disadvantages :
a) You have to maintain your own tables, including deleting entries when the associated item is deleted ( there's a hook for that ;) )
b) You have to edit your skins to spit out the data wherever you require it
c) extra mysql load when displaying your pages
d) your data won't be included with the normal evo searches
2) Abusing post content
advantages :
a) evo will look after the data for you, no need to worry if an item is deleted ;)
b) your data is searchable using the built in evo search
c) less mysql hits as the output is auto-cached by evo
d) no need for any skin changes
disadvantages :
a) Harder to correlate *just* your data without evo post content interfering
b) Your data will always be displayed in the same format no matter which skin is chosen
Either way we'll need to use a couple of new hooks, so I'll get on with those whilst you decide ;)
¥
26 yabba Aug 01, 2009 12:06
Ok, another update, hopefully the write screen will now start looking the way you want ;)
Note : Don't forget to reload your plugins ;)
¥
27 ion_rey Aug 01, 2009 12:07
Definitely, I choose the first one ("more control over where the information is displayed, and to who"), that is, using a database table. I see that the new fields will be difficult to integrata with the normal flow of information, but, as these fields aren´t key fields, no such a huge problem.
28 yabba Aug 01, 2009 12:12
Ok, I'm now at the point where I need to know the exact information about the new data you want to store :
name of field
data type ( string, html, integer, numeric, timestamp, etc )
max length of field if string/html
Then we get to make your shiny new table and start to put the information in ;)
¥
29 ion_rey Aug 01, 2009 13:08
Writer, string, 100
Pages, integer, 5
Rating, (In this field students rate the book from 1 to 5, I would set as integer, but may be there is a better type of field)
Age, integer, 3
30 yabba Aug 02, 2009 10:40
Sorry for the huge delay, I got landed on by friends and was forced to drink and smoke all day, it's a tough life :D
Ok, done an update, you should now get a shiny new table in your database and your write tab should look a lot like the final item.
Note : You will need to reload/ re-enable the plugin ;)
It doesn't actually store any data yet, I'll get to that next.
¥
31 ion_rey Aug 02, 2009 13:28
No problem with the "huge delay". I will have myself some "delays".
Ok!
The new table has been created and the fields I told you shine on the write panel. I saw in the code how you make them appear ($Form->text_input, $Form->radio_input) and try, as well, to change some tiny things. At least, this part of code is understable for me.
I can't guess how you get "tags" and "excerpt" fields above.
But, the request I wrote in this forum is, mainly, completed. And much more. What a lucky I am! By the way, I'm a privilege witness of how to make a plugin and I'm brushing up my english.
By the way.... In order to install the plugin, I created a folder called "am_demo.plugin.php" and put inside the files of the plugin, but didn´t work because the plugin didn't show in the install list. So, I uploaded again the files of the plugin, but outside of any folder. And I got it. Is logical?
32 yabba Aug 02, 2009 14:06
Yet another update, the plugin now talks to it's table, and tidies up after itself if an item is deleted.
Getting the tags/excerpt to the top is just some fancy regex and a tad of css to hide the unwanted fields ;)
the plugin path should look like :
/plugins/am_demo_plugin/_am_demo.plugin.php ( and other files ).
You can download each stage as a tar or zip by following the link on the branches page in launchpad ( @link [url=https://code.launchpad.net/~yabs/+junk/amdemo-plugin]andemo-plugin[/url] ). Currently they're on @link [url=http://demo.onewish.co.uk/_releases/]onewish[/url]. They should unzip/tar with the correct folder structure
¥
33 ion_rey Aug 02, 2009 15:35
I love this type of comments
if( empty( $data->author ) )
{
$this->msg( $this->T_('We don\'t review books written by ghosts O_o' ), 'error' );
}
if( empty( $data->pages ) )
{
$this->msg( $this->T_('How can you review an empty book? O_o' ), 'error' );
}
if( $data->rating < 0 || $data->rating > 5 )
{
$this->msg( $this->T_('Please rate this book between 0 and 5' ), 'error' );
}
if( empty($data->age) )
{
$this->msg( $this->T_('Not many books have been written before birth!' ), 'error' );
regex= "regular expressions"
And no problem now for installing the plugin.
34 yabba Aug 02, 2009 19:04
Heh, oh yeah, you may wish to change the error messages, good job they're translatable huh? ;)
Yep, regex == regular expressions .... buggered if I'm gonna write a tutorial on how they work though ... I'm old enough already ;)
I've updated the code to add in some renderer stuff ... we're gonna need to crack open some skin files to do things a different way .... so it'd be helpful to know what skin you're testing this with so I can be a smidge more specific
¥
35 tblue Aug 02, 2009 19:34
¥åßßå wrote:
tutorial on how they work
http://www.regular-expressions.info/
http://www.php.net/manual/en/pcre.pattern.php
http://en.wikipedia.org/wiki/Regular_expression
http://www.google.com/search?q=regular+expressions
Have fun.
36 yabba Aug 02, 2009 20:01
is that german for "buggered if I'm gonna write a tutorial on how they work though ... I'm old enough already" ? :roll:
¥
37 ion_rey Aug 02, 2009 21:52
I´m using "b2evo_ru" skin
38 ion_rey Aug 02, 2009 23:23
I think is better to see my blog in action, to get a closer idea. The language I use is Basque and the children that appear in are my students showing the book they have already read and their encouraged opinion to animate others to read.
This is the URL http://irati.pnte.cfnavarra.es/iturrpro/aldizkaria/blogs/index.php?blog=19
39 sam2kb Aug 03, 2009 04:30
I didn't know anybody use so many of my plugins + skin together :)
You may want to update [url=http://forums.b2evolution.net/viewtopic.php?t=15593]Advanced search[/url] and [url=http://forums.b2evolution.net/viewtopic.php?t=16492]Latest posts[/url] plugins to the latest versions, you use outdated ones.
BTW do you know about [url=http://forums.b2evolution.net/viewtopic.php?t=12346]BOPIT[/url]?
40 ion_rey Aug 03, 2009 12:00
Yes, I do know BOPIT (great!!). When I have a tad I will update them.
The reason that I have so many plugins installed is that, apart from my blog of books, I´m working in school magazines and trying to extend b2 to others schools of my province. So I need to know as many plugins as possible. As you can guess, I'm really grateful to you and people behind b2.
There is a pity that others around me use wordpress.
It´s funny that there is a little dispute between us.
41 yabba Aug 03, 2009 14:56
That reminds me, I need to add 3.x.rc1 && whissip to BOPIT ;)
I made another update, this one has some skin changes for your b2evo_ru skin, the changed files are in the plugins folder but need to be copied to your /skins/b2evo_ru/ folder before they'll work ;)
As an aside, would I be right that you only want this plugin activated for certain of your blogs? Currently it's activated for all your blogs and so will demand author/pages/rating/age for all posts in all blogs
¥
42 yabba Aug 03, 2009 17:15
And now it's a widget ;)
¥
43 ion_rey Aug 03, 2009 18:10
As an aside, would I be right that you only want this plugin activated for certain of your blogs?
The answer is yes.
Anyway, I might have lost something, because after reinstalling the skin with the new files, the result is that the new write panel appears in every blog, and the plugin doesn´t show in the widget list.
44 ion_rey Aug 03, 2009 18:23
Wait a moment! I realized that you changed the _am_demo.plugin.php file and wasn´t updated in http://demo.onewish.co.uk/_releases/
Now, I can see a brand new container in my skin "AM Demo Container" called. And a new widget "AM Demo Plugin" that I've already put into it.
Anyway, the write panel changes in other blogs as well.
------------------------------
I need a " huge delay" ;)
45 yabba Aug 03, 2009 19:23
Ion Rey wrote:
Anyway, the write panel changes in other blogs as well.
------------------------------
I need a " huge delay" ;)
Me to ;)
¥
46 ion_rey Aug 04, 2009 18:03
Hi again!
Correct me I am wrong.
In this moment, becoming am_demo_plugin a widget, it should only appear in the blog I use b2_ru skin and only if I put the widget into the container.
If the above is correct, something doesn't work properly: me or the plugin, because I have the plugin activated and I have the widget in its container and, the new brand special write panel shows in the blog, but not only in that.
47 yabba Aug 04, 2009 18:35
Ok, at the current stage with the code :
It will affect the write pane for all blogs
It will show RenderItemAsHtml() && DisplayItemAsHtml() in all skins ... if a post has author, age, etc
It will show AM Demo Plugin @file _item_content.books.container.inc.php in b2evo_ru ... if a post has book details
It will show in ( any skins ) container that it's added to
Next chance I get I'll add a plugin setting to enable the write screen changes on a per blog basis
Ohhhh ... and then we need to think of a cool name for it, because "am_demo" hardly rocks the casbah ;)
¥
48 ion_rey Aug 04, 2009 19:18
So, I guess for moment the review write panel is appearing in all blogs.
I created two articles and is great!!!!!!!!!!
The only think I supose It must be change is that as you can see in the image http://irati.pnte.cfnavarra.es/iturrpro/aldizkaria/estreineko_liburua.jpg there is a piece of code showing out.
I got into "am_demo_plugin.php" file and I commented ( using /* and */) the lines 663, 664 and 665.
And, about the name of the plugin... supose should be something describing the funtionality of it, like a "book_reviews", but it´s up to you, is your plugin.
49 yabba Aug 04, 2009 21:17
Ion Rey wrote:
So, I guess for moment the review write panel is appearing in all blogs.
It is ... sorry, when I started this I didn't realise you were testing on a live blog .... thought it was only me that did that ;)
Ion Rey wrote:
The only think I supose It must be change is that as you can see in the image http://irati.pnte.cfnavarra.es/iturrpro/aldizkaria/estreineko_liburua.jpg there is a piece of code showing out.
I got into "am_demo_plugin.php" file and I commented ( using /* and */) the lines 663, 664 and 665.
That bit's there so you can see "where" in the plugin code it's triggered from ;)
Ion Rey wrote:
And, about the name of the plugin [...] but it´s up to you, is your plugin.
NOOOOOOOOOOOOOOOOOOO I'm crap at naming plugins!!ONE!! pick a name! :roll:
¥
50 ion_rey Aug 05, 2009 08:10
Supose should be something describing the funtionality of it, like a "book_reviews"
51 yabba Aug 06, 2009 16:30
Sorry for yet another huge delay, it was all dr's and hospitals yesterday and looking after flowers today ( our first show is in 14 days, so they're kinda a priority for a while ).
With a tad of luck I'll get time tomorrow to add a setting so the plugins doesn't interfere with all your blogs posts.
¥
52 ion_rey Aug 06, 2009 23:01
I hope everything is OK.
53 yabba Aug 14, 2009 10:07
Ok, lets hope I get enough tome to finish this ;)
I've updated the code :
1) disabled the (Render||Display)ItemAsHtml() stuff as it's not required for this plugin
2) added a plugin setting to allow you to choose which blogs the plugin is enabled for ( admin > global settings > plugins > am_demo > hit the edit icon
Note : In the 3.x era you'd use blog settings instead of plugin settings as it'd look neater
This *should* now do pretty much everything you want, if I've forgotten something then just let me know ;)
¥
54 ion_rey Aug 14, 2009 12:59
Hi again!
Thank you again!
I´ve already choosen the blog, without any problem. Great!!!!
But, some strange events occur: The firs time I create an article, everything seems to be ok, but in the front-end author, age, rated and pages don´t appear. I go back to edit and these fields are there, except the author. I fill in again the author, save it and go to the blog (front-end) and everything is OK.
And should the plugin be installed together with the "b2evo_ru" skin?
55 yabba Aug 14, 2009 15:32
That's a smidge weird, could you pm me a login so I can see it happening on your blog?
You can use any skin you like but you will need to make the skin changes that are in the b2evo_ru skin that I uploaded
¥
56 ion_rey Aug 14, 2009 18:05
¥åßßå wrote:
That's a smidge weird, could you pm me a login so I can see it happening on your blog?
I just sent you a private message.
¥åßßå wrote:
You can use any skin you like but you will need to make the skin changes that are in the b2evo_ru skin that I uploaded
Ok with the skins. I´ll try it.
57 yabba Aug 14, 2009 19:06
Your passwords challenge mine for obviousness :p
I'll (hopefully) take a look in the morning ... with a smidge of luck some blonde error will scream at me ... even if it doesn't scream the chances are it's blonde ;)
¥
58 yabba Aug 15, 2009 08:23
I thought you were running 2.x ?
I'll need to setup a 3.x testblog to check the plugin. Back soon
¥
59 ion_rey Aug 15, 2009 11:47
Sorry! That´s my fault!
You thought correctly. I´m running 2.x in the books system. But, meanwhile, I tried 3.x and supossed was better that way to try the plugin out.
If is better for you, I´ll send you the real blog´s url.
By the way. If the plugin only do strange things in my sistem, don´t bother about that, I would try myself to see what happen with my settings.
60 yabba Aug 15, 2009 18:02
The plugin can be coded for either version, just there's code/behaviour changes between the two different versions so it's easiest to code the version you intend running?
Do you have the same problem on your 2.x blog?
¥
61 ion_rey Aug 15, 2009 22:26
Yes, I have the same problem with 2.x.
Anyway, I gave you access to my real blog. The name and password are the same as I gave you for the 3.x blog. The URL is http://irati.pnte.cfnavarra.es/iturrpro/aldizkaria/blogs/index.php?blog=19
I hope you find the "log in" link. It´s nearly the only word in English. You´ll find it in the menu above the articles.
62 yabba Aug 18, 2009 15:36
Hmmm, ok, this is a smidge weird, I've got the plugin running on 2.4.7 ( [url=http://demo.onewish.co.uk/blog2.php/2009/08/02/foo-3]demo post[/url] ) and ( with a minor, unrelated, bug fix ) on Whissip, which for all intents and purposes is 3.stable ( [url=http://bzr.onewish.co.uk/babbles/2009/foo]demo post[/url] )
I'd need to be able to play with the plugin on your server by FTP to work out why it doesn't work for you.
¥
63 ion_rey Aug 20, 2009 18:36
I´ll send you a pm
There's several hooks you can use to attach stuff to the write panel ( see /inc/plugins/model/_plugins_admin.class.php for a list of hooks )
If all else fails then remember that evo admin kinda requires js to function ;)
¥