The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Mod help
I/m working on a mod and I posted in the wrong section. What I'm trying to do is get the socialgroup leader, and member count from the socialgroups and then display them in an small div based layout on a new page. Its for RPG on my site. I was wondering how to go about doing this as my code didnt display anything.
PHP Code:
I wanted to create a tag/badge for each group showing there leader and member count while haveing the images look difrrent based on the groups name. |
#2
|
||||
|
||||
Usually when you do a fetch_array, you are looking to get more than one line back from the query, otherwise you would do a query_first. Are you trying to get one thing back or many? If many, you should put your fetch_array in a while loop (you can do a search on 'fetch_array' in the vb code and you'll find many examples).
|
#3
|
||||
|
||||
I'm trying to only get the name, the catagory id of the social group, the creators id and the member count of the group. I would do query_first instead? Would I apply it to the php script or to the template like in my example?
|
#4
|
||||
|
||||
If you are only trying to get one row returned, then replace query_read with query_first and then you don't need the fetch_array line (query_first will fetch the variables also).
|
#5
|
||||
|
||||
Thanks but would I add it to a template or to the php file itself?
|
#6
|
||||
|
||||
You cannot put php in a template - all php must go in the page or a plugin.
|
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|