smiley

NP_Smiley.php

It replaces the text smiley by graphics smiley. ie :) becomes <img src=”smiley.gif”>

It also has an option to convert the link text by a real link, ie http://www.google.com or www.google.com will be replaced by <a href=”http://www.google.com“> or advert@google.com by <a href=”mailto:advert@google.com”>

note: default icons set is taken from phpBB

General Plugin info
Current Version: v1.0
Download: here
Code: n/a
Demo: n/a
Forum Thread: forum here

Installing

  1. download the code
  2. uncompress and upload to the server into plugin dir
  3. choose Plugin in the admin menu and use “Install New Plugin” to install the plugin
  4. edit the options of the plugin
  5. add <%Smiley(script)%> skinvar in your skin, just after <body> in the item skin part
  6. add <%Smiley(panel)%> skinvar in commentform-loggedin.template and commentform-notloggedin.template, see example here

Options

  • Use Smiley in the items ? (Yes/No)
  • Use Smiley in the comment ? (Yes/No)
  • Auto create link with internet adresses ? (Yes/No)
  • Smiley set to use (default is ‘default’)

Adding New Smiley Set

User now can replace the default smiley set

  1. Download a new smiley set
  2. unzip and upload the set to plugins/emoticons
  3. set the smiley set to use from plugin option “Smiley set to use”

Modify existing Smiley pack

To modify a smiley set, user can edit emoticons/[set]/smiley_panel.template and emoticons/[set]/mapping.inc.

The mapping.inc map the smiley with an icon.

smiley_panel.template control how the smiley panel in commentform looks. User can change the smiley panel layout from this file. It’s just a table of plain HTML, be sure to left ##URL## alone.

Create Your Own Smiley Pack

  1. Create a new smiley directory under /emoticons
  2. Upload all smiley icon files to the newly created /emoticons/newsmiley directory
  3. Create mapping.inc, which has entry to map a smiley to its corresponding icon
  4. Create smiley_panel.template, which is the smiley panel to show in the commentform
  5. Be sure to activate the smiley set from plugin option

History

  • 0.1
    • initial release
  • 0.2
    • added emoticons, supportsFeature
  • 0.2a
    • fixed XHTML
  • 0.3
    • fixed more XHTML (mod from fishywang)
  • 0.4
    • auto emoticons path detection
  • 0.5
    • add smiley panel
    • fix emticons alt/title corruption bug
  • 0.6
    • fixed get_file_contents() problem in older PHP
  • 0.7
    • add alt=’’ in img link
  • 1.0
    • add user-defined smiley set infra-structure

Plugin review

NP_Smiley version 1.0 works with Nucleus CMS 3.31 - 2007-10-29 admun

 
smiley.txt · Last modified: 2007/10/29 16:41 by admun