vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   Shows List of other sites linked to your forum (https://vborg.vbsupport.ru/showthread.php?t=105220)

ironchef 01-26-2006 03:37 AM

Just made a minor modification to the query on this plugin. I wanted to see referrals as they happened (newest first), so I changed the ordering:

PHP Code:

$referrals $db->query_read("SELECT COUNT(refer) AS num,refer FROM " TABLE_PREFIX "referrallinks GROUP BY refer ORDER BY date DESC, num DESC LIMIT $num"); 


Blazin Trav 01-26-2006 07:25 PM

I don't get it, which .php file do I edit to add it?

Illustrious 01-27-2006 05:29 AM

Quote:

Originally Posted by murrtex
if we can add sites manually from acp it'll be nice...

This is very nice. However, it doesn't seem to work with vBAffiliates, keep saying it tries to refer itself and that causes db errors.

joefitz 01-28-2006 08:28 PM

Thanks for the feature!

I was looking over the code and have a few comments and an offer:

1) I noticed a define for 'THIS_SCRIPT' and yet I didn't see it referenced in the code. It appears that the var was put in there to make it easier to change the name of the page -- which is great, but since it isn't used it didn't work. I updated the script to use the DEFINE (I'm sure it was just an oversite). So could that be incorporated into the next release?

2) Related to #1 above, I thought it would make sense to add another phrase in which would be something like 'referral_links_linkTitle' or 'referral_links_pagename' and then the DEFINE could get it's value from that phrase so no code changes would be necessary to rename the file. All one would have to do is rename the referrals.php file and then update the phrase...

3) While I was in the code, I noticed a few potential changes that I believe to be optimizations:
a) default $insert to true
b) change the first if statement so it will set $insert to false when appropriate (these first two changes are more about clarity than anything)
c) check $insert as first part of all the rest of the if statements (for the other options loops) to prevent those checks from running if $insert is already false
d) use the break; command to exit loops as soon as $insert = false

4) My host has various aliases (as many do) and therefore I need the system to not record referrals from those various aliases in addition to the standard server name.

I have already coded all of these updates into a new xml and referrals.php file if you (or anyone else) would like to make these changes.

Thanks again for the feature -- great work!!

atosoup 01-29-2006 12:58 PM

Quote:

Originally Posted by Wachtmeister
installed and uninstalled. does (currently) not work with table prefixes

MySQL Error : Table 'db.referrallinks' doesn't exist
Error Number : 1146
Date : Friday, January 13th 2006 @ 08:55:32 PM
Script : http://www.webgurus.de/forum/forumdisplay.php?f=110
Referrer : http://cronjob.de
IP Address : 80.237.144.8
Username : Unregistriert
Classname : vb_database

I get this same error..

Would love to use this hack.. Is there a fix?

IrPr 01-29-2006 01:37 PM

it seems u must set TablePrefix manually...

joefitz 01-29-2006 01:59 PM

Hmn. Looks like TABLE_PREFIX is in the script before the table name in every query... Looks like it should work to me...odd.

atosoup 01-29-2006 02:23 PM

Quote:

Originally Posted by Moosa
it seems u must set TablePrefix manually...

How is this done?

Deimos 01-29-2006 11:26 PM

Installed aok, but all i get is 10 referalls, all are the same domain name the forum is hosted on?

vietfancy 01-30-2006 12:01 AM

installed


All times are GMT. The time now is 08:01 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.01207 seconds
  • Memory Usage 1,740KB
  • 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
  • (3)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