Register Members List Search Today's Posts Mark Forums Read

Reply
 
Article Options
  #16  
Old 13 Nov 2005, 03:47
akanevsky akanevsky is offline
 
Join Date: Apr 2005
Real name: Anton Kanevsky
Ermm sorry but if I were extremeTim I would get offended with that comment of yours...
Yes, hmm, I misread this "If I was gonna have a vbulletin 3.5 change tutorial on my site I would definatly make my own."... but unfortunately, too late.

Anyway thanks for the great tutorial
NP
__________________
I can no longer support any of my hacks. Please do not contact me for that. Feel free to create and post new versions of my hacks, as long as you give me credit for the original work.
Reply With Quote
  #17  
Old 13 Nov 2005, 03:55
Lea Verou Lea Verou is offline
 
Join Date: Jul 2005
Real name: Lea Verou
I need to make a query (from the table user) that returns an array and the key of the array would be the userid and the value would be the value of another field in the database (eg referrerid).
For example if the array is $array and the users with userid 100, 200, 300 have a referrerid of 1,1 and 50 respectively that array should have the values $array[100]=1 $array[200]=1 $array[300]=50

Is that hard? How can I do it without adding many queries?
Thanks a lot in advance

edit: [offtopic] OMG I just saw you are 16!!! Wow! I'd never had expected that! I thought you were about 25+! OMG, most 16 year olds in Greece do not know how an opening tag of php is and generally they only care about playing games... Of course there are exeptions, like my bf which is in that age but still there is a huge difference... OMG, I still can't believe it! [/offtopic]

Nevermind, I figured out another way to get the results I wanted

Last edited by Lea Verou; 13 Nov 2005 at 04:23. Reason: Automerged Doublepost
Reply With Quote
  #18  
Old 13 Nov 2005, 04:25
akanevsky akanevsky is offline
 
Join Date: Apr 2005
Real name: Anton Kanevsky
That could be done with just one query.


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

This code is not tested but should be working properly.

[offtopic] OMG I just saw you are 16!!! Wow! I'd never had expected that! I thought you were about 25+! OMG, most 16 year olds in Greece do not know how an opening tag of php is and generally they only care about playing games... Of course there are exeptions, like my bf which is in that age but still there is a huge difference... OMG, I still can't believe it! [/offtopic]
That's right, I am 16

EDIT:

Nevermind, I figured out another way to get the results I wanted
(lol)... How did you do it?
__________________
I can no longer support any of my hacks. Please do not contact me for that. Feel free to create and post new versions of my hacks, as long as you give me credit for the original work.
Reply With Quote
  #19  
Old 13 Nov 2005, 04:30
Lea Verou Lea Verou is offline
 
Join Date: Jul 2005
Real name: Lea Verou
Something similar but WAY more messy than yours

However the 100,200,300 where just examples, in an actual forum it should go through all the userids
Well, that's not very hard to change, I'll just put instead of your WHERE a WHERE referrerid>0 (cause I want it to only return the users with a referrer)

Thanks so much!! That's much more organized than my code. I'm still trying to figure out how those SQL things work, it's quite hard :nervous:

edit: And it works too! Woo hoo!! Thanks, thanks, thanks!!!

Last edited by Lea Verou; 13 Nov 2005 at 04:32. Reason: Automerged Doublepost
Reply With Quote
  #20  
Old 13 Nov 2005, 04:35
akanevsky akanevsky is offline
 
Join Date: Apr 2005
Real name: Anton Kanevsky
np, and what are you trying to make, if it's not a secret?
__________________
I can no longer support any of my hacks. Please do not contact me for that. Feel free to create and post new versions of my hacks, as long as you give me credit for the original work.
Reply With Quote
  #21  
Old 13 Nov 2005, 04:38
Lea Verou Lea Verou is offline
 
Join Date: Jul 2005
Real name: Lea Verou
I'm trying to make a mod to display referrer statistics, so that a forum can have referrer contests etc. I've seen this requested many times in the modification requests and I would also like it for my forum.
I have lots of learning to do though in order to make it, but I'm determined
Reply With Quote
  #22  
Old 13 Nov 2005, 04:42
akanevsky akanevsky is offline
 
Join Date: Apr 2005
Real name: Anton Kanevsky
Originally Posted by Michelle
I'm trying to make a mod to display referrer statistics, so that a forum can have referrer contests etc. I've seen this requested many times in the modification requests and I would also like it for my forum.
I have lots of learning to do though in order to make it, but I'm determined
Ah, great, I remember back in 2.3.x days there was a "vbStats 230.b created by Bane for Talkloud.NET" hack, but that project was abandoned (or at least it is not free anymore). Even though I PM-ed them many times ... Then I forgot about it, but now if you going to make it, that'd be great, and I'll gladly help you

EDIT:

Yes, I thought so. They have it, but they do not release it anymore:
http://www.talkloud.net/forums/vbsta...on=memberrefer
__________________
I can no longer support any of my hacks. Please do not contact me for that. Feel free to create and post new versions of my hacks, as long as you give me credit for the original work.

Last edited by akanevsky; 13 Nov 2005 at 04:44.
Reply With Quote
  #23  
Old 13 Nov 2005, 04:48
Lea Verou Lea Verou is offline
 
Join Date: Jul 2005
Real name: Lea Verou
Thanks so much!!!
How can I ask you if I have a question? In this thread or via pm? :nervous:
I wish I could code for hours today, I am really eager to do it but I have a trip so I have to start packing in about an hour, so I'll continue working at night when I arrive (it's 6:46 in the morning here)
Anyway, when I really want to make something I can sit at the computer for hours till I make it, lol I made smilie maker in one night and for my (low) level of knowledge that's an achievement

Originally Posted by Psionic Vision
Yes, I thought so. They have it, but they do not release it anymore:
http://www.talkloud.net/forums/vbsta...on=memberrefer
That's really mean of them.
Anyway mine will be better

OMG I am totally insane!
I postponed my trip 5 hours so I can work at the script! LOOOOOOOOOOL!!!

Last edited by Lea Verou; 13 Nov 2005 at 05:56. Reason: Automerged Doublepost
Reply With Quote
  #24  
Old 13 Nov 2005, 13:17
akanevsky akanevsky is offline
 
Join Date: Apr 2005
Real name: Anton Kanevsky
How can I ask you if I have a question? In this thread or via pm?
It's better via PM or even AIM, so as not to clutter up this thread

Anyway, when I really want to make something I can sit at the computer for hours till I make it, lol
Same here.

Anyway mine will be better
Nice attitude

I postponed my trip 5 hours so I can work at the script!
Wow. Hopefully it wasn't a business trip or an interview appointment lol.

Update:
Added "Authentication Storage" section, based on a random Kirby's post that I've found.
__________________
I can no longer support any of my hacks. Please do not contact me for that. Feel free to create and post new versions of my hacks, as long as you give me credit for the original work.

Last edited by akanevsky; 13 Nov 2005 at 19:23. Reason: Automerged Doublepost
Reply With Quote
  #25  
Old 14 Nov 2005, 17:36
FamilyCorner FamilyCorner is offline
 
Join Date: Jun 2005
I hope someone here can help me I have a hack that stopped working after upgrading to 3.5.1. I have already made the change for "db" from "DB_site", but this page seems to still be having a problem:
http://www.familycorner.com/forums/contest.php3

You will see if you scroll down to where it says "Posts Today" in a purple box that the total number of posts are missing. This is what the post count is calling from:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

What else do I need to change from the old version code to update it to work on 3.5.1?

THANK YOU!

Sorry, I should have posted this as well. This code is at the top of the page, just under the body tag:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

and this is at the very top of the page, before the HTML tag:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


Last edited by FamilyCorner; 14 Nov 2005 at 17:39. Reason: Automerged Doublepost
Reply With Quote
  #26  
Old 05 Feb 2006, 10:24
vietkieu_cz vietkieu_cz is offline
 
Join Date: Dec 2005
Some screenshot please?
Reply With Quote
  #27  
Old 08 Mar 2006, 23:06
bairy bairy is offline
 
Join Date: Oct 2005
Real name: Chris
Not exactly related to the first post but some things I find very very useful when coding.

At the bottom of includes/functions.php I have the following:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

where xxx.xxx.xxx.xxx is your internet IP and 127.0.0.1 is if you have an installation on your pc.

All of the above were taken off user comments at php.net


Usages:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

This will print_r a variable in a formatted way (print_r is a php function that outputs the value of variables, good for arrays).
Extremely useful for seeing what vB knows at any point, especially if you need to call some of that data. A tip: don't pre($vbulletin), it's really messy.


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Does what echo $var does, but as you can see from the code, it only shows you so it doesn't disrupt the board.


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

and

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

This is a microtimer, put the s() just before the code you want to time, and the e() after, and it will echo the time it took in seconds. Change the 6 to control the number of decimal places. So:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

That will tell you how long it takes the system to assign a value to a variable 1 million times (I got 0.35secs on a 2.4ghz P4, if anyone cares).


These are all bound to your IP or localhost to save unnecessary outputting to the board.
Reply With Quote
  #28  
Old 15 Jun 2006, 21:43
DrewM DrewM is offline
 
Join Date: Oct 2005
$db->mysql_insert_id();
Input: None.
Returns: int Row ID of the latest INSERT operation.
this isn't right it's $db->insert_id();
Reply With Quote
  #29  
Old 15 Jun 2006, 21:57
akanevsky akanevsky is offline
 
Join Date: Apr 2005
Real name: Anton Kanevsky
Thank you for pointing that out. Corrected.
__________________
I can no longer support any of my hacks. Please do not contact me for that. Feel free to create and post new versions of my hacks, as long as you give me credit for the original work.
Reply With Quote
  #30  
Old 16 Jun 2006, 22:30
Antivirus's Avatar
Antivirus Antivirus is offline
 
Join Date: Sep 2004
Thanks for taking the time to put this together anthony, i have been using it as a reference quite frequently.
__________________
Please feel free to PM me about custom work, installations, and upgrades!

Eclipse Records - Streetcult Street Team
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Article Options

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 11:34.

Layout Options | Width: Wide Color: