Pedro Prez's plugins:
This Plugin allows to show a message to the users that iniciated session. The messages is shown as a lightbox. The administrator of the site can also choose to show the site announcements or a customized message.
To correctly activate this plugin please read the README.txt file.
To correctly configure the plugin the administrator of the site must click the "Show" button in the plugin link settings (yoursite.com/pg/flyer/setup)
Plugin developed by Keetup.
Comments
I'm getting a missing token ts fields after saving the flyer_setup.
Using 1.7.1 on a LAMP (HostGator)
Any thoughts?
Apologies, this was caused by the IZAP plugin handing out missing tokens to all actions on the site. Flyers works fine.
@Trajan: which version of the IZAP plugin is causing the token problem?
when I set 'show the flyer only one time' to 'yes'..
I am unable to change the setting back to 'no'.
Pedro, this is nice, thanks! I found a potential bug: if you add content that contains line breaks, it will break your script's functionality with an "unterminated string literal" JS error. This is because you inject the content via the following javascript code:
$('.lbHome .lightbox-content').html(<?php echo $vars['content'] ?>).addClass('flyer-content');
And, of course, if the content contains line breaks, this will lead to the unterminated string literal error. I think a better approach is to put the content in a hidden div and read it from there. This is the change I did to handle content with line breaks correctly (views/default/flyer/flyer.php):
<div id='flyer-content' style="display:none; visibility: hidden;">
<?php echo $vars['content'] ?>
</div>
<script type="text/javascript">
jQuery(document).ready(
function() {
var content = $('#flyer-content').html();
$('.lbHome .lightbox-content').html(content).addClass('flyer-content');
showLB('.lbHome');
}
);
</script>
i'm now using the later version of this plugin in elgg 1.7.6 and finding that i can insert a table into a flyer text body on my local install but not on my public site.. i have yet to find why.. the table is removed completely when i save the flyer content..
any idea why? anyone?
thanks
update: this was being caused by htmlawed.. disabling it stopped the issue..
not sure why htmlawed is stripping tables out in one installation and not in another.. i'll keep looking
Congratulations on your plugin works Elgg 1.7.9. Only it does not work if one added the text formatting such as bold or temporarily place image, or even a text link to another page. Allow inserting image with a link would be good.
Works fine on 1.7.14! Will it also be available for 1.8.xx?