vBulletin Modifications

teach me 2 things

Welcome to vBHackers.com! - vBHackers Updates:

Go Back   vBulletin Modifications > General vBulletin Section > General vBulletin Support

Reply
 
LinkBack Thread Tools
Old 07-01-2006, 09:20 AM   #1
vB Newbie
Join Date: Jun 2006
Tekan is on a distinguished road

Default teach me 2 things

I've searched for quite a bit to learn how to do two things. I'm not sure this is a modification here, so I'm posting here to get some input hopefully.

I have a fairly large site with a soon to be released vBulletien board added to it. Thankfully moving away from our current boards. Anyway since the site is made up of more then the vB boards I'd like to use some of its material elsewhere on the site.
  1. Allow me to create a page outside of the boards directory that lists the avatar and name of each person in a specified usergroup. Linking back to the person's profile.
  2. Allow me to randomly display a member avatar, name, selected profile fields to the front page of my site, also above the boards directory.
These two things are key to what I'm trying to design and so far I've had next to zero luck with deciphering how to play with the vB database to do this. Any input someone might have on how is has been done or might be done would be incredibly appericated.

Thanks




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
Old 07-01-2006, 09:47 AM   #2
vBulletin Guru
Nick R's Avatar
Join Date: May 2006
Real Name: Nick
Location: Cyberspace, UK
Nick R is on a distinguished road

Default

2. Do you have a script which randomly picks a row out of the database?

as for 1. Just add a base href tag to the header..

Last edited by Nick R; 07-01-2006 at 10:00 AM..




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 07-01-2006, 10:10 AM   #3
vB Newbie
Join Date: Jun 2006
Tekan is on a distinguished road

Default

So for 2 I need to start first with a function to randomly select a row from the userid table?

As for one I'm looking to actually make subdomain pages for my site, for example say house.mydomain.com, trance.mydomain.com, etc. With my forums being at boards.mydomain.com. So given this setup none of the subdomains would be inside the forum directory or below. I got the idea from the Forum Leaders page. I'd like to be able to put members into the assoicated usergroup, then on say trance.mydomain.com have the page simply pull the name and profile/avatar picture of each member that was found in that usergroup. With the picture linking back to the user's profile on boards.mydomain.com.

Is that any clearer?




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 07-01-2006, 11:51 AM   #4
Coder
bairy's Avatar
Join Date: Jun 2006
Real Name: Chris
Location: Birmingham, UK
bairy is on a distinguished road

Default

You don't have to use the db database handler to access the vb database. With just the username/password you can use php's mysql_connect() // mysql_query to do the trick. If you want to use the vb config,
require_once('vb_forum/includes/config.php');

For 1, assuming you only want to show members with avatars and assuming you have avatars in the filesystem:
You must first be a registered member to view any code.
Naturally you can format the output however you want.
usergroupid is the usergroup you want to use.


Similar for 2, but add ORDER BY RAND() LIMIT 1 to pick a random one. Also LEFT JOIN userfield USING (userid) and add the fields you want to the select range.


I know this is a bit of a throwtogether but it should get you started - it depends how much you know about mysql in general.

Last edited by bairy; 07-02-2006 at 10:56 AM..




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 07-01-2006, 12:00 PM   #5
vBulletin Guru
Nick R's Avatar
Join Date: May 2006
Real Name: Nick
Location: Cyberspace, UK
Nick R is on a distinguished road

Default

And curtesy of Livewire you can also use vbulletin for the whole thing:
You must first be a registered member to view any code.

Last edited by Nick R; 07-01-2006 at 12:39 PM..




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 07-01-2006, 12:50 PM   #6
vBulletin Guru
Nick R's Avatar
Join Date: May 2006
Real Name: Nick
Location: Cyberspace, UK
Nick R is on a distinguished road

Default

Also by Livewire: don't use == just = it's a query!

Last edited by Nick R; 07-01-2006 at 12:58 PM..




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 07-01-2006, 02:31 PM   #7
Coder
bairy's Avatar
Join Date: Jun 2006
Real Name: Chris
Location: Birmingham, UK
bairy is on a distinguished road

Default

Ah yes, just single = for sql. I've corrected a '. error too, so you'll probably want to re-quote me on the vb version.




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 07-01-2006, 02:42 PM   #8
vBulletin Guru
Nick R's Avatar
Join Date: May 2006
Real Name: Nick
Location: Cyberspace, UK
Nick R is on a distinguished road

Default

Here's a little thing: Add this code to global_start:
You must first be a registered member to view any code.
Add this code:
You must first be a registered member to view any code.
to FORUMHOME underneath: $navbar

Then you have a block on forum home with the user's avatar and name plus if it is the user browsing it the title will change. I am aware this is not user of the day but it can be made into user of the day with some tweaking.. ie. cron job. This is more User of the refresh...




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 07-01-2006, 10:53 PM   #9
vB Newbie
Join Date: Jun 2006
Tekan is on a distinguished road

Default

You guys are outstanding I can't wait to give these a try.




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 07-02-2006, 05:11 AM   #10
vBulletin Guru
Nick R's Avatar
Join Date: May 2006
Real Name: Nick
Location: Cyberspace, UK
Nick R is on a distinguished road

Default

I'm working on a cron job for the vb version.




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply



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

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
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Accessing things like {$blockheight} in creating a plugin Amadeus General vBulletin Support 4 06-22-2006 03:29 PM
Couple of things I've noticed... hellsatan Site Feedback 4 08-09-2005 10:38 AM
If you teach me, i'll do all the hacks Infamouz Nex Site Feedback 9 04-16-2004 03:36 PM


All times are GMT -3. The time now is 01:28 AM.

Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0 ©2008, Crawlability, Inc. (Patent Pending)