vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.7 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=228)
-   -   Profile Enhancements - MyLs1 Gifts ( Send gifts or drinks! ) (https://vborg.vbsupport.ru/showthread.php?t=189788)

TNCclubman 11-30-2008 01:48 PM

Quote:

Originally Posted by Ohiosweetheart (Post 1675437)
We can't add our own?

Thats what Im saying... its so easy to make your own, just google image what you want, crop it down to 70X70 and upload it. Hardly worth bothering the coder to do something so simple.

puregraf 11-30-2008 09:35 PM

Quote:

Originally Posted by GlamRockTalk (Post 1675458)
Yes, you can add your own Peggy! I've done it. :D

I agree Aurora, if there was a different way to upload the gifts, it would be better. And, I think that a postbit option to show the gifts (or a couple at least) would be cool as well. :)


is there a way to show the gifts, each one on the postbit? can you give me a code i can make this happen please? i really need them to show on postbit_legacy

thanks!!!

MrEyes 12-01-2008 08:46 AM

Found a minor bug:

If PM inbox of the gift recipient is full the gift will fail, having looked at the code it seems that this was thought about but not implemented correctly:

Original Code (gifts.php)
Code:

// Force the PM through
$doit['adminpermissions'] = 2;

// create the DM to do error checking and insert the new PM
$pm->set('fromuserid', $senderid);
$pm->set('fromusername', $sender);
$pm->set('title', 'You have a new gift!');
$pm->set('message', $pmcontents);
$pm->set_recipients($recipient['username'], $do);
$pm->set('dateline', TIMENOW);
$pm->save();

Updated Code (gifts.php)
Code:

// Force the PM through
$doit['adminpermissions'] = 2;

// create the DM to do error checking and insert the new PM
$pm->set('fromuserid', $senderid);
$pm->set('fromusername', $sender);
$pm->set('title', 'You have a new gift!');
$pm->set('message', $pmcontents);
$pm->set_recipients($recipient['username'], $doit);
$pm->set('dateline', TIMENOW);
$pm->save();

I have marked the changes in bold

EDIT 1:
Also, although it would be great to show gift count in postbit the suggestion made is a really bad idea, especially if you have a busy forum. If you use this hack it will increase your SQL query calls dramatically as an additional query will be made for every member that has posted in a thread every time that thread page is displayed.

EDIT 2:
Just spotted that one of the templates is not being cached:

Original Code (gifts.php):
Code:

// pre-cache templates used by all actions
$globaltemplates = array(
        'GIFTS',
        'gifts_list_bit',
        'gifts_list_row_start',
        'gifts_list_row_break'
       
);


Updated Code (gifts.php):
Code:

// pre-cache templates used by all actions
$globaltemplates = array(
        'GIFTS',
        'gifts_list_bit',
        'gifts_list_row_start',
        'gifts_list_row_break',
        'gifts_add_category_select'

       
);

Changes in bold

GlamRockTalk 12-01-2008 02:30 PM

Thanks for the tips Mr Eyes! :D

Chris, you might want to adjust and reupload that gifts.php file for future folks using this mod.

christian8a 12-01-2008 03:21 PM

^ It won open the link when you click on My Gifts with that fix

GlamRockTalk 12-01-2008 03:24 PM

Christian, which fix causes that? I just noticed that error message myself.

Is it the $do and $doit, one?

Should we do the other fix for the cache though?

MrEyes 12-01-2008 03:25 PM

Quote:

Originally Posted by christian8a (Post 1676502)
^ It won open the link when you click on My Gifts with that fix

Odd, seems to be working fine on my site.

Which one of the two fixes? The template or the PM permissions?

Also whats the error you see?

EDIT 1: If it is the template fix it might be the comma that needs to be added after 'gifts_list_row_break'. Although I made it bold it wasn't immediately obvious it needed adding, so I have changed the post to mark the changes in red.

christian8a 12-01-2008 05:44 PM

Quote:

Originally Posted by MrEyes (Post 1676507)
Odd, seems to be working fine on my site.

Which one of the two fixes? The template or the PM permissions?

Also whats the error you see?

EDIT 1: If it is the template fix it might be the comma that needs to be added after 'gifts_list_row_break'. Although I made it bold it wasn't immediately obvious it needed adding, so I have changed the post to mark the changes in red.

Oh I see, the ( , ) Now I see, Ill try it and update the php file, thanx for your help man :up:

christian8a 12-01-2008 05:51 PM

Yea now it worked fine.. What about that issue of the Postbit Gift count?
What do you mean, needs to be corrected or it will be an issue for busy forums?

GlamRockTalk 12-01-2008 06:01 PM

Chris, what do we have to do to upgrade? Just overwrite the gifts.php file?


All times are GMT. The time now is 01:15 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01543 seconds
  • Memory Usage 1,746KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_code_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete