Gifts Plugin v0.1.1

Release Notes



v0.1.1 2009-09-07
    + Fix: IE8 Send Button not working

v0.1.0 2009-09-07
    + Add: River icon
    + Add: New administration area
    + Add: Write a message to your gift
    + Add: "Sent gifts"-page
    + Add: Upload pictures for gifts
    + Add: Gifts Widget for profile
    + Fix: My Gifts Page not showing all my gifts
    + Fix: Gift URL was wrong on river
    + Add: Gift preview
    + Add: You can configure if the "All Gifts"-page is shown
    + Add: Userpoint API Support
v0.0.2 2009-09-02
    + Better River Support (thanks to DDFUSION)
    + Add: Mail Notification for new gifts
    + Add: User Profile Menu Item "Send gift"
    + Removed noimage notification for gifts with no imagefile

v0.0.1 2009-09-01
    + Initial Release


Included Languages:
English, German, Hebrew (thanks to Susan)


1. Copy the gifts plugin to you mod folder
2. !!!! Set the folder permissions of gifts/images to be writeable by the webserver (chmod 777) !!!!
3. Enable the gifts plugin in your "Tool Administrator"
5. Configure your Gifts in the Gifts Settings

If you are using a version below 0.1.0 and uploaded pictures to the images folder,
you have to upload the picutres again within the Gifts admin menu

!!! Please check the permissions of the images directory !!!
For RTL languages change left to right in gifts/views/default/gifts/css.php
.river_user_gifts {
    background:transparent url(<?php echo $vars['url']; ?>mod/gifts/river_icon_gifts.gif) no-repeat scroll left -1px;

.river_user_gifts {
    background:transparent url(<?php echo $vars['url']; ?>mod/gifts/river_icon_gifts.gif) no-repeat scroll right -1px;

  • Hello,

    I use userpoints in this plugin.

    I paid for the gift and the userpoints deduct from me, but the recipient never received the points.

    Could you please advise?


  • Only 25 gift pictures are accepted?

    I set the number of gifts to the maximum of 98. The upload of the first 25 pictures worked fine, but starting with the 26th gift the pictures were not accepted anymore. The rest of the gift information is saved (name, points). If I rename for example the pictures gift_25* to gift_26* these are shown for the 26th gift. Only the direct upload doesn't seem to work.

    Any idea what goes wrong? I would be glad for any advice. Thanks. It's a very useful plugin.


  • I have problems to connect that plugin with elggx_userpoints to use userpoints to "buy" a gift. Some ideas?

  • @ Thoralf:

    The gifts plugin checks if the (old) userpoints plugin is installed. I managed to connect the gifts plugin with elggx_userpoints by adjusting line 27 in gifts/views/default/gifts/globalsettings.php. You have to change

    if plugin_enable('userpoints')


    if plugin_enable('elggx_userpoints')

  • im still trying to figure out how to set up the points feature, i see no display of point or anyway to set them up, i see the code in the files but i see no refference to points at all in any of the screens or settings in admin, how do you set up points feature ?

  • ok got it, for those that dont know you need to install the elggx userpoints plugin also, then on your admin panel it will ask you if you want to use points..  here is the link to the userpoints plugin 

    and yes what thoralf said above in the post just above mind here  about changing the file  to read elggx_userpoints seems to be true... mine seems to be working fine for now..

  • also has anyone ever thought about putting together a simple script for the gifts to filter age, as in if i want to set up a bottle of wine or a 6 pack of beer and if the sender or reciever is under 21 then it will tell them they are not old enough to send that gift.  right now i have the description of the item set to 6 pack of beer (Adult only please)  but i dont think that is good enough.   Is someone up to the challenge to add a small age check function on this.. would be really appreciated, thanks so much

  • all gifts is not showing, i have 50 gifts input into the system and nothing shows when click on all gifts and i made sure it was set to yes in the settings,  i thought the all gifts option was to display all the gifts available to a user,  thats what i was hoping to find. 

    Since i did not find that function, i thought i could take the admin.php and copy that into the all.php since the admin displayes all the info i need, gift name and price, so made a allold.php to save the original and i copied the admin to all.php....    i removed all the fancy display since i just want the data, gift and price, to be displayed when i click on all gifts... but of course it did not work, i got it to disply the info but could not get it to display as a non admin even when i removed the screening code,

    so everything is back to the way it was and im hoping to get some help in making the all gifts work, either that or i will just have to write some html on the page to show the info. but i would rather do it thru php as to not have to update anothe html page manually...

    can someone one assist..

  • @WildShot

    Replace the "<?" with "<?php" in "globalsettings.php" and "giftssettings.php". (As far as i remember.)



  • How To Uploading Animated "*.gif" pictures to gifts?????

    Please help!

  • Hi. Thanks for sharing the plugin.  When in the administration settings, the following is displayed:


    showallgifts; $useuserpoints = $plugin->useuserpoints; $giftcount = $plugin->giftcount; $action = $vars['url'] . 'action/gifts/settings'; $form = "

    ".elgg_echo('gifts:settings:showallgifts'); $form .= '

    \n\r"; // Userpoints // Check if Userpoint Api is enabled if (is_plugin_enabled('userpoints')) { $form .= elgg_echo('gifts:settings:useuserpoints'); $form .= '

    \n\r"; } $form .= elgg_echo('gifts:settings:number'); $form .= "
    "; $form .= "

    ".elgg_view('input/submit', array('value' => elgg_echo("save"))); $form .= "

    "; echo elgg_view('input/form', array('action' => $action, 'body' => $form)); /* $gift_count = $giftcount; for ($i=1;$i<=$gift_count;$i++) { echo elgg_echo('gifts:settings:title')." #$i"; echo elgg_view('input/text',array('internalname'=>'params[gift_'.$i.']','value'=>get_plugin_setting('gift_'.$i, 'gifts'))); }*/ ?>


    showallgifts; $useuserpoints = $plugin->useuserpoints; $giftcount = $plugin->giftcount; $action = $vars['url'] . 'action/gifts/savegifts'; if($useuserpoints == 1 && function_exists('userpoints_get')) { $pTemp = userpoints_get(get_loggedin_userid()); $points = $pTemp['approved']; } $form = ""; $gift_count = $giftcount; for ($i=1;$i<=$gift_count;$i++) { $form .= "

    ".elgg_echo('gifts:settings:title')." #$i

    "; $form .= elgg_view('input/text',array('internalname'=>'params[gift_'.$i.']','value'=>get_plugin_setting('gift_'.$i, 'gifts'))); if ($useuserpoints == 1) { $form .= elgg_echo('gifts:settings:userpoints')." #$i"; $form .= elgg_view('input/text',array('internalname'=>'params[giftpoints_'.$i.']','value'=>get_plugin_setting('giftpoints_'.$i, 'gifts'))); if (function_exists('userpoints_delete')) { } //$form .= elgg_echo('gifts:settings:code')." #$i"; //$form .= elgg_view('input/longtext',array('internalname'=>'params[giftcode_'.$i.']','value'=>get_plugin_setting('giftcode_'.$i, 'gifts'))); } //elgg_view("input/file",array('internalname' => 'icon')) $form .= elgg_echo('gifts:settings:image')." #$i
    "; $form .= elgg_view('input/file',array('internalname'=>'giftimage_'.$i)); // Show Image if already uploaded $imgfile = dirname(dirname(dirname(dirname(__FILE__))))."/images/gift_".$i.".jpg"; //$form .= $imgfile; if (file_exists($imgfile)) { $form .= 'image
    '; } //Show Image if available } $form .= "

    ".elgg_view('input/submit', array('value' => elgg_echo("save"))); $form .= ""; echo elgg_view('input/form', array('action' => $action, 'enctype'=>"multipart/form-data" ,'body' => $form)); ?>

    I have the userpoints plugin installed, and this has been placed above the gifts plugin.

    I sincerely apprecuate any assistance you can provide. 

    Many thanks,


    elgg version = 1.6.1


  • Hello , congratulations for this  plugin!

    Anyone can help me?

    How can i add the the time the gift was sent

    How can i put linkeable the username of the sender


    thanks ! cheers


  • well you can capture the time of day and add it to the php file as a modification and as far as the sender from what i remember the sender is linkable when you get your gift from what i remember, ill have to take another look here in a bit...

  • one thing i have noticed lately on mine is that sometimes the send gift button works and sometimes it does not, if i access thru the tools menu and set up my send gift and then the  button on the bottom that says send gift does not work then sometimes i go to the actual profile and click on send gift and im able to process it that way, but yet sometimes neither of them work.   Im referring to the button on the bottom under the text area that you press to actually send your gift, its inop sometimes and sometimes its not.

  • Hello. Thanks for your answer. Sender is not linkeable in the Gifts page, but it is linkeable in river.

    How can i make it linkeable in gifts page?

    If you want to charge me for this customization, no problem , just send me a message. cheers.

  • i need ver  1.7 because i have problem

    I have problem with token :/


    I am greeting

    arround Polish

  • Hi ! have you tested this pluggin in elgg 1.7.1?  I`m having problems sending gifts: "Form is missing __token or __ts fields"

    Could you help me?

    Thanks !

  • Hi, am using elgg 1.6.1 and am getting this error in the admin panel.

    showallgifts; $useuserpoints = $plugin->useuserpoints; $giftcount = $plugin->giftcount; $action = $vars['url'] . 'action/gifts/settings'; $form = "

    ".elgg_echo('gifts:settings:showallgifts'); $form .= '

    \n\r"; // Userpoints // Check if Userpoint Api is enabled if (is_plugin_enabled('userpoints')) { $form .= elgg_echo('gifts:settings:useuserpoints'); $form .= '

    \n\r"; } $form .= elgg_echo('gifts:settings:number'); $form .= "
    "; $form .= "

    ".elgg_view('input/submit', array('value' => elgg_echo("save"))); $form .= "

    "; echo elgg_view('input/form', array('action' => $action, 'body' => $form)); /* $gift_count = $giftcount; for ($i=1;$i<=$gift_count;$i++) { echo elgg_echo('gifts:settings:title')." #$i"; echo elgg_view('input/text',array('internalname'=>'params[gift_'.$i.']','value'=>get_plugin_setting('gift_'.$i, 'gifts'))); }*/


    Please some one help to over come this problem?


  • This does not work on 1.7.1. 

    It installs OK, but you get the missing security token when you try and send someone a gift. I emailed the plugin designed with detailed feedback of me trying it in elgg 1.7.1. So we'll see if he responds.

  • Is it possible somehow to see the gift before I send it? I can see just the name of them in a dropdown list.

    It would be great to see the sendable gifts in thumbview. 



  •   When I try to send a friend a gift it comes up saying missing token. Whats wrong?

  • @Wnadering Bear: this version of the plugin is simply not compatible with Elgg 1.7. Try this version here:

  • update for 1.8 in the future?


  • Category: Uncategorized
  • License: GNU General Public License (GPL) version 2
  • Updated: 2014-11-17
  • Downloads: 4876
  • Recommendations: 4

Other Projects

View Christian Heckelmann's plugins