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)
-   -   vB Affiliates v.2 (https://vborg.vbsupport.ru/showthread.php?t=63044)

Bryan Ex 04-16-2004 11:19 PM

Got it. I deleted the <dfn> tags around the description text and all is well in the world. :squareeyed:

Bryan Ex 04-18-2004 05:39 PM

Anyway of resetting the stats on a weekly basis or am I looking at digging into the database for that?

AN-net 04-18-2004 09:49 PM

you mean resetting the clicks in and out?

Bryan Ex 04-18-2004 11:49 PM

Exactly. Even with a reasonable delay on clicks - people will cheat so it's nice to either give others a fair chance at being listed or keep the cheaters very busy.

AN-net 04-19-2004 12:20 AM

hmm ill see if i have time to write up a cron script

Bryan Ex 04-19-2004 12:36 AM

That would be great if you have time. Didn't mean to make work for you ... just looking for the easiest way to maintain my affiliate list now that it's installed and running well.

djohn 04-21-2004 11:20 AM

Before I install this, does this hack have a master on-off switch, that would make the affiliates section completely unavailable\available for users?

Bryan Ex 04-21-2004 06:06 PM

Yes it does and you can also grant access to only certain usergroups - like mods for example

SQL question... how can I get the following query to list ORDER BY totalratings / totalvotes ?

Code:

$mvotes= $DB_site->query_first("SELECT sitename,buttonurl,affiliate_id,siteurl,totalvotes FROM affiliates WHERE active='1' AND approved='1' ORDER BY totalvotes DESC");
I'm looking to list affiliates based on average ratings instead of totals but "calcrating" isn't entered into the db.

AN-net 04-21-2004 09:20 PM

Code:

$mvotes= $DB_site->query_first("SELECT sitename,buttonurl,affiliate_id,siteurl,totalvotes FROM affiliates WHERE active='1' AND approved='1' ORDER BY totalvotes DESC");
change that to this:

PHP Code:

$mvotes$DB_site->query_first("SELECT sitename,buttonurl,affiliate_id,siteurl,totalvotes FROM affiliates WHERE active='1' AND approved='1' ORDER BY totalvotes DESC,totalrating DESC"); 


reply back on how that works;)

Bryan Ex 04-21-2004 10:02 PM

It still orders them by totalrating which isn't necesarily correct. I have a "two star" affiliate listed before a "four star" one because of extra votes for a higher total. I think there needs to be some sort of division equasion - SORT BY (totalrating / totalvotes) DESC - for example to list by average.


All times are GMT. The time now is 11:10 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.01511 seconds
  • Memory Usage 1,732KB
  • 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
  • (2)bbcode_code_printable
  • (1)bbcode_php_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