StickyNote plugin
Written by kksou   
Tuesday, 04 November 2008

The Sticky Note plugin allows you to display a pop-up sticky note from within your content item or article.

This is a demo of the Sticky Note plugin. There are 2 modes of display:
  • Every time the page loads
  • Once per browser session using cookies

You can use it to display a promotional text or broadcast important messages to your users.

The original DHTML script was written by dynamicdrive.com. What I've done is to wrap the original code into a Joomla plugin/mambot so that you can easily display a sticky note in any of your content item.


Demo

You should see a sticky note displayed when you first load this page. The sticky note automatically disappears in 5 seconds.

If you missed the sticky note, you can view it again by reloading this page.

Latest Version

v1.0.2 (for Joomla 1.0) and v1.5.1 (for Joomla 1.5)
Released December 19, 2008

  • Fixed the warning meesage: "Notice: Undefined property: Plugin_StickyNote::$menu_width in StickyNote.lib.php on line 304"
  • Fixed the warning meesage: "Undefined property: Plugin_StickyNote::$menu_height in StickyNote.lib.php on line 305"

Unique Features

  1. Easily display a sticky note within a content item or article.
  2. Two different modes of display: 1) Every time the page loads 2) Once per browser session using cookies
  3. Toggle the "fading" effect on and off.
  4. Specify whether sticky note should automatically disappear after x seconds.
  5. You can easily customize the menu through css.

How to use the "Sticky Note" plugin

Important: If you're using Joomla 1.5.8, please refer to the article:
How to enter HTML tags, javascript and PHP codes in Joomla 1.5.8?
Otherwise you might find that all your HTML tags, Javascript and PHP scripts will be removed the moment you click the Save or Apply button.
  1. To insert the Accordion Menu Apple style, use the syntax:
  2. {StickyNote}
    ... msg ... 
    {/StickyNote}
    

    Note that you can use any standard HTML tags in the msg, e.g. <h3>, <img>, <ul>, <ol>, <br>, <p>etc.

  3. Display Mode: The default display mode is defined in the Parameters in the Plugin Manager. "Always" means the sticky note will appear every time the page loads. "Oncepersession" means that the sticky note will only appear once per browser session using cookies.
  4. You can also overwrite the global setting of the display mode in your content item.

    To set the display mode as "always" for the current content item (regardless of the setting in the Parameters page), use the following:

    {StickyNote displaymode:always}
    ... msg ... 
    {/StickyNote}
    

    To set the display mode as "oncepersession" for the current content item (regardless of the setting in the Parameters page), use the following:

    {StickyNote displaymode:oncepersession}
    ... msg ... 
    {/StickyNote}
    


  5. Auto Hide Box: In the Parameters of the Plugin Manager is a field called "Auto Hide Box". If you set it to "yes", it means that the Sticky Note will automatically hide itself (after a number of seconds as defined in the next field). If you set it to "no", it means that the Sticky Note will remain there until the user closes it.
  6. You can also overwrite the global setting of the "Auto Hide Box" in your content item.

    To set the "Auto Hide Box" to yes for the current sticky note (regardless of the setting in the Parameters page), use the following:

    {StickyNote autohidebox:yes}
    ... msg ... 
    {/StickyNote}
    

    To set the "Auto Hide Box" to no for the current sticky note (regardless of the setting in the Parameters page), use the following:

    {StickyNote autohidebox:no}
    ... msg ... 
    {/StickyNote}
    

  7. Auto Hide Time: In the Parameters of the Plugin Manager is a field called "Auto hide after x seconds". If you have set the previous field "Auto Hide Box" to "yes", the sticky note will automatically hide after the number of seconds as specified in this field.
  8. You can also overwrite the global setting of this field in your content item.

    For example, to automatically hide the current sticky note after 10 seconds (regardless of the setting in the Parameters page), use the following:

    {StickyNote autohidebox:yes autohidetime:10}
    ... msg ... 
    {/StickyNote}
    
  9. Auto Hide Box: In the Parameters of the Plugin Manager is a field called "Do not display in Home Page". If you set it to "yes", it means that the Sticky Note will not be displayed if your article or content item is displayed in the home page. If you set it to "no", it means that the Sticky Note will be shown even in the home page.
  10. You can also overwrite the global setting of the "Do not display in Home Page" in your content item.

    To set the "Do not display in Home Page" to yes for the current sticky note (regardless of the setting in the Parameters page), use the following:

    {StickyNote homepagehide:1}
    ... msg ... 
    {/StickyNote}
    

    To set the "Do not display in Home Page" to no for the current sticky note (regardless of the setting in the Parameters page), use the following:

    {StickyNote homepagehide:0}
    ... msg ... 
    {/StickyNote}
    

Download

How to install (Joomla 1.0.x)

  1. Download the plugin and unzip it into a folder.
  2. From the Installers menu, select mambots. In the field "Install directory", enter the folder location (where you unzipped the file) and click Install.
  3. From the Mambots menu, select Site Mambots.
  4. Make sure the plugin "StickyNote" is published. If you see a cross in the Published column, just click on it. It will turn into a green tick.

You are now ready to use this plugin!

How to install (Joomla 1.5.x)

  1. Download the plugin and unzip it into a folder.
  2. From the Extensions menu, select Install/Uninstall. In the field "Install directory", enter the folder location (where you unzipped the file) and click Install.
  3. From the Extensions menu, select Plugin Manager.
  4. Enable the plugin "StickyNote" - make sure there is a green tick in the Enabled column.
  5. Very Important: If you're using Joomla 1.5.8 and above, please refer to the article:
    How to enter HTML tags, javascript and PHP codes in Joomla 1.5.8?. Otherwise you might find that all your HTML tags, Javascript and PHP scripts will be removed the moment you click the Save or Apply button.

You are now ready to use this plugin!

Display Sticky Note in module

This plugin is used for displaying a sticky note associated with a content item or article.

If you wish to display sticky notes from within modules, I will write another module for this purpose.

Version History

  • v1.0.1 (for Joomla 1.0) and v1.5.1 (for Joomla 1.5)
    Released December 9, 2008
    • Fixed the warning message "Undefined variable: module on line 43"
    • Fixed the warning message "Undefined offset: 0 on line 55"

 

Comments  

 
+1 # b-here 2012-03-27 08:55
Great and simple thingie, exactly what I need but I wonder if there is a way to exactly determine the position of the Sticky note on the page. I would need it in the top above the menu some 40px from the top, when I change css nothing happens, position is same as original.
ty
B
 
 
+1 # kksou 2012-03-30 08:37
Hi,

Sorry for the late reply.

Assuming you're using Joomla 1.5:

1) Goto the folder: /plugins/content/StickyNote

2) Edit the file: StickyNote.lib.php

3) In line 220 and 221, you should see:
objref.style.left=docwidth/2-objwidth/2+"px"
objref.style.top=scroll_top+doch eight/2-objheight/2+"px"

4) Change the 2 lines above to your desired left and top

Save the file and reload.

Let me know if it works, ok?

Regards,
/kksou
 
 
# kksou 2012-03-30 09:57
Please also refer to:
http://www.kksou.com/php-gtk2/index.php?option=com_fireboard&Itemid=67&func=view&catid=23&id=3527

Regards,
/kksou
 
 
# b-here 2012-03-31 08:42
Thank you kksou, worked perfect.
Now you can subscribe to my art :)
http://borisnovak.art-portfolio.nl/exhibitions
 
 
# Jodi 2012-05-26 01:55
Hi

I installed your plugin for a Joomla V1.7 site (on the hope that it would work).

No luck. Is there anything that I can do on my site, e.g. PHP or CSS that can make it work. I have had a look at a few "sticky note" extensions, and yours seems the best and simplest.

Thanks
Jodi
 
 
# kksou 2012-05-28 07:32
Hi Jodi,

It might be a conflict with your other plugins or modules.

To ascertain this, what I usually do is to setup a fresh install of Joomla somewhere on the server, then install just the plugin. This will allow you to see if the plugin works on your machine at all.

If it works, then it's most likely a conflict with some plugins or modules.

Regards,
/kksou
 
 
# Dorine 2012-09-10 05:48
Hi there,

I installed the plugin on Joomla 1.5.28 and all html makeup is stripped from the message. Not from the article! How can i keep the html in the sticky note?
 
 
# inbal 2012-10-05 16:51
Hello,

This plugin is very useful for me, and I was wondering if you
can you please help me make the text in
sticky note to be RTL?

thanks!
 
 
# kksou 2012-10-05 19:35
Hi,

You have the complete source code. You might need to ask one of your friends who know PHP to help you change the code slightly to output the format you required.

Regards,
/kksou
 
 
# inbal 2012-10-06 00:20
this is really the most unhelpful response I got from a plugin support.

I manage to fix it but it was very hard.
 
 
# kksou 2012-10-06 02:00
Hi,

Sincerely apologize for this. It's because I'm not expert in everything. I'm not familiar with the output format that you want.

Regards,
/kksou
 
 
# Versacom1 2012-11-05 09:51
Hi

Im trying to use Joomla Survey in a popup but cannot select a radio option. Survey input shows but user is unable to select an option...

Any ideas?

Thn
 
< Prev   Next >

Blog - Forum - Privacy Policy - Contact Us
Copyright © 2006-2015. kksou.com. All Rights Reserved