vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   List latest X paid subscribers on Forum Home (https://vborg.vbsupport.ru/showthread.php?t=65254)

Jenta 03-16-2005 12:45 PM

Quote:

Originally Posted by utlamer
ok its working now!
what happened was since its set to 5, it takes 5 subscriptions for it to kick in
at least thats what i think made it kick on

i take that back
its still not right
anyone have any luck with this on 3.0.7?

Jenta 03-20-2005 06:33 PM

heres a simpler solution that works for me every time
its only one user but im sure it can be expanded
https://vborg.vbsupport.ru/showthrea...284#post628284

tamarian 03-20-2005 06:51 PM

Quote:

Originally Posted by utlamer
heres a simpler solution that works for me every time
its only one user but im sure it can be expanded
https://vborg.vbsupport.ru/showthrea...284#post628284

It is simpler, but it will effect your forum performance, since you add a new query to the index.php page, executed every time the page loads. If your forum does not have heavy traffic, this may not be an issue.

Jenta 03-21-2005 02:25 AM

yeah i know, my forum is small so it's cool
any chance of looking into why this doesnt work for some
i notice you are running 3.0.1 on ur site
maybe something has changed since then?

tamarian 03-21-2005 11:23 AM

Quote:

Originally Posted by utlamer
yeah i know, my forum is small so it's cool
any chance of looking into why this doesnt work for some
i notice you are running 3.0.1 on ur site
maybe something has changed since then?

Yes, we haven't upgraded yet, and probably will wait for a major release before we upgrade.

If you're willing to test this, I think it may work :)

Use this code in functions.php

PHP Code:

// ###################### thankyou #######################
function thankyou(){
      global 
$DB_site;

    
$thanksbit ' <a href=\"member.php?$session[sessionurl]u=$contributer[userid]\"><font color=\"#228E8E\"><b>$contributer[username]</b></font></a>';

    
$latestcontributers $DB_site->query("SELECT username, status,regdate,  subscriptionlog.userid
                FROM " 
TABLE_PREFIX "subscriptionlog AS subscriptionlog
                LEFT  JOIN " 
TABLE_PREFIX "user AS user
                USING ( userid )
                WHERE user.userid = subscriptionlog.userid
                AND STATUS = '1'
                ORDER  BY  regdate  DESC
                LIMIT 5"
);

    
$latest_str '';
    while (
$contributer $DB_site->fetch_array($latestcontributers))
    {
        eval(
"\$latest_str .= ', ' . \"$thanksbit\";");
    }
    
$latest_str substr($latest_str 2);
    
$latest_str addslashes($latest_str);
    
$DB_site->query("UPDATE " TABLE_PREFIX "template SET template=\"$latest_str\", template_un=\"$latest_str\"  WHERE title='thanks'");


Instead of the code in the first post. It uses a hard-coded template instead of the thanksbit, to avoid dealing with fetch template.

Jenta 03-21-2005 02:57 PM

awesome
Tested on 3.0.7 and the new code works perfect!

Just to make it more clear, you dont need to create the template thanksbit anymore. Delete it by clicking revert if you have it already made. If you use this updated code, skip that step in the current instructions and only create the blank template name thanks. Correct me if I'm wrong.

Thanks a million!

tamarian 03-21-2005 03:20 PM

Quote:

Originally Posted by utlamer
awesome
Tested on 3.0.7 and the new code works perfect!

Good to know, I've added the changes to the first post.
Quote:

Just to make it more clear, you dont need to create the template thanksbit anymore. Delete it by clicking revert if you have it already made. If you use this updated code, skip that step in the current instructions and only create the blank template name thanks. Correct me if I'm wrong.
That is correct :)

jilly 03-23-2005 01:14 PM

The new code works fine for me now - thanks!!!

oztrack 03-27-2005 01:06 AM

I want it on my front page as well.

Also when trying to change the colour - i cant get mine to be any different by editing the colour code in functions.php

Please help

jilly 03-30-2005 04:08 PM

Is there a way to separately show the newest paid subscribers for each level?

For example:

Thanks to the supporting members, here are the newest supporters!
Level A: member1, member2, member3
Level B: member1, member2, member3
Level C: member1, member2, member3


All times are GMT. The time now is 01:46 AM.

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.01126 seconds
  • Memory Usage 1,749KB
  • 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
  • (1)bbcode_php_printable
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (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