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

The Realist 03-30-2005 07:54 PM

Works fine with 3.0.7.

Installed.

sunnycher 04-21-2005 10:34 AM

tamarian! I love this, thanks so much!

sunnycher 07-13-2005 04:00 PM

Mine is linking each member but when you click on them it goes to a Page Not Found. How do I correct this? TIA!

tamarian 07-13-2005 04:44 PM

Quote:

Originally Posted by sunnycher
Mine is linking each member but when you click on them it goes to a Page Not Found. How do I correct this? TIA!

Check the links themselse, and make sure this has the correct link to member.php. It might be due to a portal page? Is that where you're displaying the list?

You probably can display it on a different page, but a small mod may be required. The default is this:
PHP Code:

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

For yours you might need to change it to this:
PHP Code:

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


sunnycher 07-13-2005 04:51 PM

thanks! which file do I change this in?

tamarian 07-13-2005 04:56 PM

In include/functions.php within the same chunk of code that was added in step #2

sunnycher 07-13-2005 05:03 PM

I found it, sorry about that.

This is what I see.
This is the link to one of the newest contributors
http://www.littlegreenphotographers.com/"member.php?u=424\" See "s? and the \?
Now if I click on a member that is online this is the link I get without the " and \
http://www.littlegreenphotographers....ember.php?u=71

you think that this is affecting it?

tamarian 07-13-2005 05:17 PM

Quote:

Originally Posted by sunnycher
I found it, sorry about that.

This is what I see.
This is the link to one of the newest contributors
http://www.littlegreenphotographers.com/"member.php?u=424\" See "s? and the \?
Now if I click on a member that is online this is the link I get without the " and \
http://www.littlegreenphotographers....ember.php?u=71

you think that this is affecting it?

Double-check to make sure you have made the edits correctly. Also check in your vb options in the admincp, is the forum URL set correctly?

sunnycher 07-13-2005 05:25 PM

I see where the problem is.
First, it has the " and the \ in there but it is also not adding the \community\
in there.
I wouldn't of changed that at all, I just did the cut and pasting.
Is there a place to correct this?

tamarian 07-13-2005 05:53 PM

Quote:

Originally Posted by sunnycher
I see where the problem is.
First, it has the " and the \ in there but it is also not adding the \community\
in there.
I wouldn't of changed that at all, I just did the cut and pasting.
Is there a place to correct this?

Yes, from the admin panel, for the forum URL setting. If for some reason (due to the portal for example), you do not want to add the /community/ portion to the forum URL, then you can try another modification, change the same line to:

PHP Code:

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


sunnycher 07-13-2005 06:08 PM

all fixed! Thank you SO much for your help!!!!!

wacnstac 10-20-2005 01:53 AM

Any update on how to make this hack with 3.5?

tamarian 10-20-2005 02:37 AM

Quote:

Originally Posted by wacnstac
Any update on how to make this hack with 3.5?

Are you sure you want it? There are better ones for 3.5 :)

https://vborg.vbsupport.ru/showthread.php?t=91567

wacnstac 10-21-2005 10:06 PM

tamarian I don't want the hack you posted. I just want the simple hack that displays your last 5 subscribing members. It was much simplier than the hack you linked to. I don't need anything that complicated. I just don't know how to install the 5 latest subscribers hack to 3.5.

Help, has anyone done this on 3.5?!!

tamarian 10-21-2005 10:59 PM

Quote:

Originally Posted by wacnstac
tamarian I don't want the hack you posted. I just want the simple hack that displays your last 5 subscribing members. It was much simplier than the hack you linked to. I don't need anything that complicated. I just don't know how to install the 5 latest subscribers hack to 3.5.

Help, has anyone done this on 3.5?!!

O.k. a 3.5 version should be a plugin version. If you don't hear from me by next week, feel free to bump this thread :)

wacnstac 10-21-2005 11:19 PM

Boy will I appreciate that. Thanks.

tamarian 10-22-2005 09:27 PM

Here you go:

https://vborg.vbsupport.ru/showthrea...threadid=99049


All times are GMT. The time now is 10:04 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.01271 seconds
  • Memory Usage 1,799KB
  • 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_php_printable
  • (10)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (27)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