1 waltercruz Jan 31, 2007 01:42
3 waltercruz Feb 01, 2007 01:45
Hi Bluyed. I did that. Look at my blog:
There a link called 'compartilhar' (share it). When you click, it opens a window to post pour post to delicious and other social nets.
my code is too hackish for now. I will make it more clear, and send to the b2evolution team.
[]'s
- Walter
4 blueyed Feb 11, 2007 19:43
Still you have not said, how the hook should be named, according to it's intention.
You could do what you've done now also with a renderer plugin: add the link at the end of each post.
btw: the non-JS link is wrong: e.g. http://devlog.waltercruz.com/qual_o_motor_deste_blogue_e_por_que&akst_action=share-this should be http://devlog.waltercruz.com/qual_o_motor_deste_blogue_e_por_que?akst_action=share-this probably. You might want to use b2evo's url_add_param() function. Apart from that, there's no "alternate page" then, when you fix the link. Maybe a TODO still? :)
5 waltercruz Feb 11, 2007 19:51
well,i don't know if i was right :)
there's a event to footer on
Do you have seen the 'comparrtilhar' link?
the popup begins invisible, near the footer.
I added the code near the end of my skin:
<?
$Plugins->call_by_code( 'sharethis', array('footer' =>'1') );
And there's no (yet) graceful degradation. Yes, it's a TODO :)
6 waltercruz Feb 11, 2007 19:58
And blueyd, in the version that I'm using online i'm calling:
$Plugins->call_by_code( 'sharethis', array() );
But I've made a plugin that is a stealth renderer (and I left it on my work :( )
Thanks on advance.
[]'s
- Walter
7 blueyed Feb 11, 2007 19:58
Yes, you can use Plugins::call_by_code(), but it involves skin editing.
Instead, you may be able to hook the RenderItemAsHtml event in your plugin and add the 'comparrtilhar' link to the end of the post(s).
Then the generated code would even get cached with each post (in 1.9.x).
8 waltercruz Feb 11, 2007 20:01
We are replying together :)
But I need to generate the html box that is displayed just one time :)
It will by a plugin soon.
A doubt: do you have a idea of what shall I modify to it work without javascript enabled? Or better, what i know, I don't know where's the better place.
[]'s
- Walter
9 waltercruz Feb 11, 2007 20:04
Just one note: the b2evo code is very impressive. The wordpress is almost all procedural. I really like b2evo :D
10 blueyed Feb 11, 2007 20:22
You could use DisplayItemAsHtml() (only if $params['dispmore'] is true) for the graceful degradation. Then you could add the non-JS code at the top of the item.
But I'm not sure either, if this is the best solution.
11 yabba Feb 12, 2007 00:27
This may be missing the point, but, if you're using js for your links hover/selections effect then you may as well also use js to write the html that you need?
In which case the existing SkinBeginHtmlHead() would suffice?
¥
12 waltercruz Feb 12, 2007 12:09
Hey ¥åßßå!
yes, you gave me a good idea.
Just one question: The original wordpress plugin uses the prototype library.
The CVS versions of b2evo have jquery bundled. Will the next b2evo come with jquery packed? If so, I can rewrite the javascript using jquery instead of prototype and get rid of the prototype dependence.
[]'s
- Walter
13 blueyed Feb 12, 2007 22:06
Walter, you're getting off topic.. but yes, I will add jquery to the v-1-10 branch in the next days, so it should be available with the 1.10 release.
14 waltercruz Feb 12, 2007 22:37
I don't see how a help for a plugin development is off-topic :( , but thank you for the information :)
15 blueyed Feb 12, 2007 22:43
I just meant the current thread. No problem really.. :)
You would have to add a call to the SkinTag method of your plugin in the skin's _main.php.
This will be easier in 2.0, but not 1.x.
You seem to want a hook like SkinDisplayFeedbackBlockHead, to output something when comments get displayed? Or rather something like adding something next to the "Comment..." link from b2evo itself?