The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Show custom profile field on page.
Ok..
It was possible in phpbb3.. and im not sure in vbulletin.. but i want to display 10 random entries from a custom profile field.. My members enter a url into a custom profile field and i want to dispaly 10 random entries from different users on my forum index.. If this is possible Thanks in advance |
#2
|
|||
|
|||
You could use a mysql statement like this...(I think)
Code:
"select fieldNUMBER from ".TABLE_PREFIX."userfield order by rand() limit 10" |
#3
|
|||
|
|||
You wouldnt want to run that query per post. Each page load would hit the db 10-20 times per page per user.
|
#4
|
|||
|
|||
What does that have to do with the question? He wants to show it once on his forumhome not per post.
|
#5
|
||||
|
||||
thanks, how would i implement this? Sorry, im only new to vbulletin (im a phpbb coder but wanting to code vb)
|
#6
|
|||
|
|||
You would use the vb database manager to run the query and gather the info like so....
PHP Code:
ex.... PHP Code:
|
#7
|
|||
|
|||
Here is a sample plugin that draws in a profile field and places it in a table so you can get an idea of how to do it...Edit the plugin and change the field6 in the query to the one that corresponds to your forum before you import the plugin.
You would then need to edit your forumHome template and find $navbar then place $pb_fields right under it. |
#8
|
||||
|
||||
i still dont understand..
so do i put the info in my file (index.php) ? i need further steps, sorry EDIT: i will try that plugin you made thanks --------------- Added [DATE]1216356491[/DATE] at [TIME]1216356491[/TIME] --------------- ok.. i edited the plugin and ran it.. also edited my template.. and im getting no result showing up? |
#9
|
|||
|
|||
All that means is there is an extra '<' somewhere in the code that there should not be. Its not in the plugin unless you edited the html in the plugin.
|
#10
|
||||
|
||||
ok! i got it but.. its on the forum homepage..
I am running vbdrupal, how would i be able to get it on that page? also its displaying empty tables.. how can i make it so it doesnt show null fields? or empty fields? Many thanks mate |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|