PortalParts.com Site

 Forum Index > Geeklog > glMessenger Plugin New Topic Post Reply
 Extending smilies!
 |  Printable Version
Dazzy
 March 14 2004 08:28 AM (Read 9904 times)  
Forum Big Cheese
Big Cheese

Status: offline

Registered: 08/17/03
Posts: 191

hi

Has anyone attemting intrigrating the smilies module with geeklog's commment engine? I took a brief look and discovered I had no idea where to start let alone attempt it!


Dazzy test
 
Profile Email Website PM
Quote
Blaine
 March 14 2004 19:54 PM  
Forum Admin
Admin

Status: offline

Registered: 03/01/02
Posts: 3576

Thats a good question and one that I had down as a project to document. This will require changes in several places as you have to handle stories and comments for both create, preview and display.

There have been changes with 1.3.9 for how comments are handled. I will use 1.3.9 and document the hacks required and post my results shortly.


Please consider contributing to support my efforts ..
 
Profile Email Website PM
Quote
Blaine
 March 14 2004 22:37 PM  
Forum Admin
Admin

Status: offline

Registered: 03/01/02
Posts: 3576

The glMessenger function msg_replaceEmoticons() will replace any emoticons with the HTML for the assigned image. By adding this function in the lib-common functions that display the article and the comments you will have support for smilies. Only the emoticon like is stored and will be replaced with the smilie image on the fly when being displayed.

This was tested with GL 1.3.9

Step1: lib-common.php function COM_article

We want to use the replaceEmoticons on the introtext and bodytext of any articles.
Around Line 485 - add:

PHP Formatted Code

$A['introtext'] = msg_replaceEmoticons($A['introtext']);
$A['bodytext'] = msg_replaceEmoticons($A['bodytext']);




 


Step2: lib-common.php COM_getComment
We want to use the replaceEmoticons on the comment text.

Around Line 2806 - add:
PHP Formatted Code

$A['comment'] = msg_replaceEmoticons($A['comment']);




 


The only additional calls would be needed to the Admin Story Editor for when creating or editing stories as Admin. The 2 changes above will add smilie support for anyone submitting stories and/or comments.

Plus glMessenger provides you with the Smilie Admin interface to add/edit smilies for a complete solution to personalize your site.




Please consider contributing to support my efforts ..
 
Profile Email Website PM
Quote
Dazzy
 March 15 2004 13:36 PM  
Forum Big Cheese
Big Cheese

Status: offline

Registered: 08/17/03
Posts: 191

Many thanks Blaine, I'm still currently using some incarnation of 1.38, I'll test this once I update my page to 1.39, should be pretty soon!


Dazzy test
 
Profile Email Website PM
Quote
Anonymous: FreakWorld
 March 15 2004 14:15 PM  


hmmmm
ok I am getting ready to update tomorrow and this may be something I need to add to it also.

The only additional calls would be needed to the Admin Story Editor for when creating or editing stories as Admin.
????????? I don't understand?

Also what do I need to do to get the smileys from the messenger to work on the forums.


 
Quote
Content generated in: 0.23 seconds
New Topic Post Reply



 All times are CDT. The time is now 10:08 PM.
Normal Topic Normal Topic
Locked Topic Locked Topic
Sticky Topic Sticky Topic
New Post New Post
Sticky Topic W/ New Post Sticky Topic W/ New Post
Locked Topic W/ New Post Locked Topic W/ New Post
View Anonymous Posts 
Anonymous users can post 
Filtered HTML Allowed 
Censored Content