1 lefataliste Oct 19, 2012 19:00
3 lefataliste Nov 17, 2012 01:23
tilqicom wrote:
iframe is not the best idea but thanks for the effort.
If you have a moderate experience on b2 plugins you can easily make it into an actual plugin without iframe.Just look at "renderer" plugins, which will replace [your_slider_trigger] shortcode with actual slideshow code.
Thank you for your comment. However I was expecting something a little bit more helpfull when I wrote "tell me". You said that I "just" have to "look at" the plugins... I indeed spent some time looking at the doc (manual) for plugins. I hardly found anything which could really be of any help. And since I don't have any feedback up to now, I'm unsure that it worth the time that I would spent trying to have my code running without the iframe. I developped my code independently from b2evo and managed to have it working with (if not working "in") b2evo to fit my need. To go further, I need some "push". Again, I thank you for having commented my post. Regards. jacques
4 tilqicom Nov 17, 2012 04:47
Well, it's pretty straight forward, you give your code and the plugin renders it, triggered by a [short code].
var $mycode = '<div id="slider"><!-- slider content --> </div>';
var $short_code = '[my_trigger]';
function RenderItemAsHtml( & $params )
{
$content = & $params['data'];
$content = preg_replace( $this->short_code, $this->mycode, $content );
return true;
}
Take a look at any rendering plugin, you'll get the gist of it
5 lefataliste Nov 17, 2012 10:52
tilqicom wrote:
Well, it's pretty straight forward, you give your code and the plugin renders it, triggered by a [short code].
[...]Take a look at any rendering plugin, you'll get the gist of it
May be you did not noticed that it is what I did ? I'm using a plugin to change my [short code] into some html. But then comes the (more) difficult part of the job : understand all the subtilties of b2evo to have my code working properly once inserted. Up to now I failed to do it. So I keep my code inside an iframe until I understand a little bit more b2evo behaviour. Thank you for your help. Regards. Jacques
6 tilqicom Nov 17, 2012 14:33
leFataliste wrote:
tilqicom wrote:
Well, it's pretty straight forward, you give your code and the plugin renders it, triggered by a [short code].
[...]Take a look at any rendering plugin, you'll get the gist of itMay be you did not noticed that iti is what I did ? I'm using a plugin to change my [short code] into some html. But then comes the (more) difficult part of the job : understand all the subilties of b2evo to have my code working properly once inserted. Up to now I failed to do it. So I keep my code inside an iframe until I understand a little bit more b2evo behaviour. Thank you for your help. Regards. Jacques
ah ok, i see.Sorry bout that, i didnt look into the content of your plugin earlier.Now i get it
7 lefataliste Nov 18, 2012 20:00
tilqicom wrote:
leFataliste wrote:
tilqicom wrote:
Well, it's pretty straight forward, you give your code and the plugin renders it, triggered by a [short code].
[...]Take a look at any rendering plugin, you'll get the gist of itMay be you did not noticed that iti is what I did ? I'm using a plugin to change my [short code] into some html. But then comes the (more) difficult part of the job : understand all the subilties of b2evo to have my code working properly once inserted. Up to now I failed to do it. So I keep my code inside an iframe until I understand a little bit more b2evo behaviour. Thank you for your help. Regards. Jacques
ah ok, i see.Sorry bout that, i didnt look into the content of your plugin earlier.Now i get it
I finally spent a few hours (in fact 2 days) to try to run the slideshow without an iframe. And I think that I did it. Not so easy for me however. A few answers would have help. 1/ how to get the path to the different important dirs ? 2/ how to send * from the plugin * some code into the head section of the page (to add some call to javascript or css). 3/ how to manage the character sets conversions when reading a file to insert it into the code ? I succeeded to go around all these problems, but I would have get a better code with the answers ti these questions. Thank you again for your interest :) Regards. jacques
8 tilqicom Nov 20, 2012 00:50
leFataliste wrote:
tilqicom wrote:
leFataliste wrote:
tilqicom wrote:
Well, it's pretty straight forward, you give your code and the plugin renders it, triggered by a [short code].
[...]Take a look at any rendering plugin, you'll get the gist of itMay be you did not noticed that iti is what I did ? I'm using a plugin to change my [short code] into some html. But then comes the (more) difficult part of the job : understand all the subilties of b2evo to have my code working properly once inserted. Up to now I failed to do it. So I keep my code inside an iframe until I understand a little bit more b2evo behaviour. Thank you for your help. Regards. Jacques
ah ok, i see.Sorry bout that, i didnt look into the content of your plugin earlier.Now i get it
I finally spent a few hours (in fact 2 days) to try to run the slideshow without an iframe. And I think that I did it. Not so easy for me however. A few answers would have help. 1/ how to get the path to the different important dirs ? 2/ how to send * from the plugin * some code into the head section of the page (to add some call to javascript or css). 3/ how to manage the character sets conversions when reading a file to insert it into the code ? I succeeded to go around all these problems, but I would have get a better code with the answers ti these questions. Thank you again for your interest :) Regards. jacques
1. What 'important dirs' are you looking for ?
i assume you are looking for $plugins_subdir variable.
2. for script loading, you may need :
$plug_url = $this->get_plugin_url();
then you can load your resources (js or css) as such
require_js( $plug_url . 'myscript.js', TRUE );
require_css( $plug_url . 'extra-style.css' );
3. i dont know what exactly you are getting at , but you can use htmlspecialchars if you are having troubles with accented characters
9 lefataliste Nov 20, 2012 01:45
tilqicom wrote:
1. What 'important dirs' are you looking for ?
i assume you are looking for $plugins_subdir variable.
2. for script loading, you may need :
$plug_url = $this->get_plugin_url();
then you can load your resources (js or css) as such
require_js( $plug_url . 'myscript.js', TRUE ); require_css( $plug_url . 'extra-style.css' );
great ! This is what I was looking for. I'll try it. thanks.
tilqicom wrote:
3. i dont know what exactly you are getting at , but you can use htmlspecialchars if you are having troubles with accented characters
I tried all (or say, a lot of) possible php code and decode, but I always finish with the plugin writing my accents like &# 123; in the final page and these codes are not translated by the browser when in a js alert or in a "title" :( But forget about that, it worked when importing the text from an external js.
BTW there is now a new version without an iframe (see the first post in this topic). Ther is a difference between the two versions : the one with iframe allows several instances in the same post, the other one does not.
Regards. Jacques
10 bysteven Feb 08, 2013 19:04
Good effort - however I must admit it's not really beautiful compared to b2nivo.
11 lefataliste Feb 08, 2013 21:14
[quote=@bysteven]Good effort - however I must admit it's not really beautiful compared to b2nivo.[/quote]
Thank you for this half appreciation. You are right, my slideshow looks a simple one, but you obviously overlooked some of its properties. It allows natively to be included in any post in its header (photoblog) or in the body (any blog) and if needed several instances may be used in a single post (v1). The last version, in combination with my modified version of the photoblog alllows to combine a global slide show of all the posts in an album together with local slideshows inside each or every post... The beauty lays in the slides, not the slideshow :) Regards.
12 bysteven Feb 09, 2013 19:07
That's certainly true - the functionality is awesome! Perhaps you can make it more beautiful in the future. After that, it would be perfect!
Keep up the good work!
iframe is not the best idea but thanks for the effort.
If you have a moderate experience on b2 plugins you can easily make it into an actual plugin without iframe.Just look at "renderer" plugins, which will replace [your_slider_trigger] shortcode with actual slideshow code.