Socialengine greetings plugin, beta

Started on the old forum in April 2010 · view the original in the archive · old links redirect here

2 replies · 1,774 views · started 16 years ago · 2 min read

2 participants
GumSlone Administrator Principal · 1,690 posts #1

Here is a gretings plugin which ive recently created, it works the same way like kiss/wink/etc plugin but has more options.

here are the install instructions:

upload the content of the attached zip file to your site,

and then add this code to mysql:

CREATE TABLE IF NOT EXISTS `gum_greeting` ( 
  `greeting_id` int(11) NOT NULL AUTO_INCREMENT, 
  `greeting_from_user_id` int(11) NOT NULL, 
  `greeting_to_user_id` int(11) NOT NULL, 
  `greeting_type` varchar(30) NOT NULL, 
  `greeting_new` varchar(10) NOT NULL DEFAULT '1', 
  `greeting_time` int(11) NOT NULL, 
  PRIMARY KEY (`greeting_id`), 
  KEY `greeting_to_user_id` (`greeting_to_user_id`,`greeting_new`,`greeting_time`) 
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=10 ; 

INSERT INTO `se_notifytypes` (`notifytype_id`, `notifytype_icon`, `notifytype_name`, `notifytype_title`, `notifytype_url`, `notifytype_desc`, `notifytype_group`) VALUES 
(21, 'greetings.png', 'greeting', 198230200, 'user_greetings.php?mod=new', 198230209, 1); 

INSERT INTO `se_languagevars` (`languagevar_id`, `languagevar_language_id`, `languagevar_value`, `languagevar_default`) VALUES 
(198230200, 1, 'Greetings', 'gum_greeting'), 

(198230201, 1, 'Send a greetings', 'gum_greeting'), 

(198230202, 1, 'Greeting sent', 'gum_greeting'), 

(198230203, 1, 'Greeting is not sent', 'gum_greeting'), 

(198230204, 1, 'Answer', 'gum_greeting'), 

(198230205, 1, 'New Greetings', 'gum_greeting'), 

(198230206, 1, 'All Greetings', 'gum_greeting'),  

(198230207, 1, 'Delete Greeting', 'gum_greeting'), 

(198230208, 1, 'When I receive a Greeting', 'gum_greeting'),  

(198230209, 1, 'New Greetings: %1$d', 'gum_greeting'), 

(198230210, 1, 'Greetings Settings', 'gum_greeting'), 

(198230211, 1, 'Edit your greetings privacy settings.', 'gum_greeting'), , 

(198230212, 1, 'Who can send you greetings?', 'gum_greeting'), 

(198230213, 1, 'Greetings notification.', 'gum_greeting'), 

(198230214, 1, 'Yes, notify me when someone sends me a greeting.', 'gum_greeting'), 

(198230215, 1, 'No Greetings.', 'gum_greeting'), 

(198230216, 1, 'Outgoing Greetings.', 'gum_greeting'), 

(198230220, 1, 'Kiss', 'gum_greeting'), 
(198230221, 1, 'Sends you a kiss.', 'gum_greeting'), 

(198230222, 1, 'Wink', 'gum_greeting'), 
(198230223, 1, 'Winked you.', 'gum_greeting'), 

(198230224, 1, 'Smile', 'gum_greeting'), 
(198230225, 1, 'Sent you a smile.', 'gum_greeting'), 

(198230226, 1, 'Hug', 'gum_greeting'), 
(198230227, 1, 'Sent you a hug.', 'gum_greeting'), 

(198230228, 1, 'Tickle', 'gum_greeting'), 
(198230229, 1, 'Tickeled you.', 'gum_greeting'), 

(198230230, 1, 'Declare you love', 'gum_greeting'), 
(198230231, 1, 'Loves you.', 'gum_greeting'), 

(198230232, 1, 'Bite', 'gum_greeting'), 
(198230233, 1, 'Bit you.', 'gum_greeting'), 

(198230234, 1, 'Send Beer', 'gum_greeting'), 
(198230235, 1, 'Sent you a beer.', 'gum_greeting'), 

(198230236, 1, 'Send Poison', 'gum_greeting'), 
(198230237, 1, 'Sent you a poison.', 'gum_greeting'), 

(198230238, 1, 'Kick', 'gum_greeting'), 
(198230239, 1, 'Kicked you.', 'gum_greeting'); 

open header.php and after:

include "include/functions_stats.php"; 

add:

include "include/class_gum_greeting.php"; 
include "include/functions_gum_greeting.php"; 

find and add after:

$plugin_vars = array(); 

this code:

$plugin_vars['menu_user'] = array('file' => 'user_greetings.php', 'icon' => 'greetings.png', 'title' => 198230200); 

save changes.

now open profile.php and after:

// ASSIGN VARIABLES AND INCLUDE FOOTER 

add this:

$smarty->assign('gum_greetings', greetings_menu()); 

save changes.

open templates/profile.tpl and after:

{* SHOW SEND MESSAGE MENU ITEM *} 

    {if ($user->level_info.level_message_allow == 2 || ($user->level_info.level_message_allow == 1 && $is_friend)) && $owner->level_info.level_message_allow != 0} 

      <tr><td class='profile_menu1' nowrap='nowrap'><a href="javascript:TB_show('{lang_print id=784}', 'user_messages_new.php?to_user={$owner->user_displayname|escape:url}&to_id={$owner->user_info.user_username}&TB_iframe=true&height=400&width=450', '', '/images/trans.gif');"><img src='/images/icons/sendmessage16.gif' class='icon' border='0'>{lang_print id=839}</a></td></tr> 

      {assign var='showmenu' value='1'} 

    {/if}

add this:

{include file='gum_profile_greetings.tpl'} 

this plugin should work will all SE versions over 3.14

Advertise your mobile site for FREE with AdTwirl

External image (may be gone)

GumSlone Administrator Principal · 1,690 posts #3

you will get error like this:

Fatal error: Call to undefined method SEDatabase::database_fetch_row() in /home/users/p/мой сайт/domains/мой сайт.ru/include/class_gum_greeting.php on line 31

open class_gum_greeting.php and replace database_fetch_row with database_fetch_array

Advertise your mobile site for FREE with AdTwirl

External image (may be gone)

Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close